Re: git: 8ba9e3e85bca - main - net-im/quaternion: update to a newer GH commit

From: Nuno Teixeira <eduardo_at_freebsd.org>
Date: Mon, 17 Jul 2023 18:19:41 UTC
Hello Adriaan,

Using port revision to update source is not good, it is used for something
added that implies differences during build, e.g., patches, options,
dependencies, etc.

In this case we still have version 0.0.95.1 but in reality:
---
git describe --tags 447d8ec4f990499fb589a37b7e8eae8c6781cadc
0.0.96-beta3-4-g447d8ec
---
that is 0.0.96-beta3 version with 4 commits until 447d8ec commit.
This means that next release will be 0.0.96.

Have you tried "Example 18. Using USE_GITHUB to Access a Commit Between Two
Versions" from porters handbook"?
I think that DISTVERSION will accept "-beta3-4" and will translate it to
PORTVERSION nicely.
When it's not possible we can use -gYYYYMMDD too.

Further checks goes to `pkg version -t old.version new.version` to see if
it is ok and prevent port epoch bump.

Examples where I used it, because release is old and no new release is
available or because there was some rush in commit (gitup):

archivers/maxcso
editors/amp
net/gitup
graphics/phototonic
x11/xclip

Cheers,

Adriaan de Groot <adridg@freebsd.org> escreveu no dia segunda, 17/07/2023
à(s) 15:39:

> The branch main has been updated by adridg:
>
> URL:
> https://cgit.FreeBSD.org/ports/commit/?id=8ba9e3e85bca8ac4b2bb3fcc8ac8cfada84aa7fa
>
> commit 8ba9e3e85bca8ac4b2bb3fcc8ac8cfada84aa7fa
> Author:     Adriaan de Groot <adridg@FreeBSD.org>
> AuthorDate: 2023-07-16 21:28:56 +0000
> Commit:     Adriaan de Groot <adridg@FreeBSD.org>
> CommitDate: 2023-07-17 14:39:44 +0000
>
>     net-im/quaternion: update to a newer GH commit
>
>     This is so that quaternion can build against latest quaternion.
>
>     Includes work from rakuco@ https://reviews.freebsd.org/D41045
> ---
>  net-im/quaternion/Makefile  | 22 +++++++++++++---------
>  net-im/quaternion/distinfo  |  6 +++---
>  net-im/quaternion/pkg-plist |  3 ++-
>  3 files changed, 18 insertions(+), 13 deletions(-)
>
> diff --git a/net-im/quaternion/Makefile b/net-im/quaternion/Makefile
> index 195b4211efb3..bcc9fe46e920 100644
> --- a/net-im/quaternion/Makefile
> +++ b/net-im/quaternion/Makefile
> @@ -1,29 +1,33 @@
>  PORTNAME=      Quaternion
>  DISTVERSION=   0.0.95.1
> +PORTREVISION=  2
>  CATEGORIES=    net-im
>
>  MAINTAINER=    adridg@FreeBSD.org
>  COMMENT=       Matrix IM client based on Qt technologies
>  WWW=           https://github.com/quotient-im/Quaternion/
>
> -BROKEN=                No upstream release compatible with libquotient
> 0.7 yet
> -
> -LICENSE=       GPLv3
> -LICENSE_FILE=  ${WRKSRC}/COPYING
> +LICENSE=       GPLv3+
> +LICENSE_FILE=  ${WRKSRC}/LICENSES/GPL-3.0-or-later.txt
>
>  LIB_DEPENDS=   libqt5keychain.so:security/qtkeychain@qt5 \
> -               libsecret-1.so:security/libsecret
> -BUILD_DEPENDS= libquotient>=0.7:net-im/libquotient
> +               libsecret-1.so:security/libsecret \
> +               libolm.so:security/olm
> +BUILD_DEPENDS= libquotient>=0.8:net-im/libquotient
>  # Quotient is a static lib, doesn't need to be in RUN_DEPENDS
>
> -USES=          cmake compiler:c++17-lang gettext-runtime gnome \
> +USES=          cmake compiler:c++17-lang desktop-file-utils \
> +               gettext-runtime gnome \
>                 localbase:ldflags qt:5 tar:xz
>  USE_GNOME=     glib20
> -USE_QT=                core dbus declarative gui multimedia network
> widgets \
> -               quickcontrols quickcontrols2 \
> +USE_QT=                core dbus declarative gui multimedia network \
> +               quickcontrols quickcontrols2 sql widgets \
>                 buildtools:build linguist:build qmake:build
>
> +CMAKE_OFF=     BUILD_WITH_QT6
> +
>  USE_GITHUB=    yes
>  GH_ACCOUNT=    quotient-im
> +GH_TAGNAME=    447d8ec4f990499fb589a37b7e8eae8c6781cadc
>
>  .include <bsd.port.mk>
> diff --git a/net-im/quaternion/distinfo b/net-im/quaternion/distinfo
> index 2d654c352d3d..e439dc16d7f2 100644
> --- a/net-im/quaternion/distinfo
> +++ b/net-im/quaternion/distinfo
> @@ -1,3 +1,3 @@
> -TIMESTAMP = 1674504277
> -SHA256 (quotient-im-Quaternion-0.0.95.1_GH0.tar.gz) =
> 69f034241dddc8d9436a895bb76b022e492e61e2f49d9a80ed8d79ab12b63a0e
> -SIZE (quotient-im-Quaternion-0.0.95.1_GH0.tar.gz) = 1224589
> +TIMESTAMP = 1689544557
> +SHA256
> (quotient-im-Quaternion-0.0.95.1-447d8ec4f990499fb589a37b7e8eae8c6781cadc_GH0.tar.gz)
> = 3c7e83987d56dbddb1a7ad947345280f8f399381d7f1129928c5745cf8c58240
> +SIZE
> (quotient-im-Quaternion-0.0.95.1-447d8ec4f990499fb589a37b7e8eae8c6781cadc_GH0.tar.gz)
> = 1641909
> diff --git a/net-im/quaternion/pkg-plist b/net-im/quaternion/pkg-plist
> index 9d3589576b24..a4c7295e9128 100644
> --- a/net-im/quaternion/pkg-plist
> +++ b/net-im/quaternion/pkg-plist
> @@ -1,5 +1,6 @@
>  bin/quaternion
>  share/Quotient/quaternion/translations/quaternion_de.qm
> +share/Quotient/quaternion/translations/quaternion_en.qm
>  share/Quotient/quaternion/translations/quaternion_en_GB.qm
>  share/Quotient/quaternion/translations/quaternion_es.qm
>  share/Quotient/quaternion/translations/quaternion_pl.qm
> @@ -11,5 +12,5 @@ share/icons/hicolor/22x22/apps/quaternion.png
>  share/icons/hicolor/32x32/apps/quaternion.png
>  share/icons/hicolor/48x48/apps/quaternion.png
>  share/icons/hicolor/64x64/apps/quaternion.png
> -share/icons/hicolor/scalable/apps/quaternion.svgz
> +share/icons/hicolor/scalable/apps/quaternion.svg
>  share/metainfo/com.github.quaternion.appdata.xml
>


-- 
Nuno Teixeira
FreeBSD Committer (ports)