commit:     57c860968813f09e35e253f6587e4e38489bfc12
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 22 14:29:49 2020 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sat Aug 22 14:30:37 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=57c86096

app-editors/emacs: Calculate SLOT from PV.

Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 app-editors/emacs/emacs-27.1.9999-r1.ebuild | 10 +++++++++-
 app-editors/emacs/emacs-27.1.ebuild         | 10 +++++++++-
 app-editors/emacs/emacs-28.0.9999.ebuild    | 10 +++++++++-
 3 files changed, 27 insertions(+), 3 deletions(-)

diff --git a/app-editors/emacs/emacs-27.1.9999-r1.ebuild 
b/app-editors/emacs/emacs-27.1.9999-r1.ebuild
index c74b9b7bf95..78fc06dd7e0 100644
--- a/app-editors/emacs/emacs-27.1.9999-r1.ebuild
+++ b/app-editors/emacs/emacs-27.1.9999-r1.ebuild
@@ -11,6 +11,7 @@ if [[ ${PV##*.} = 9999 ]]; then
        EGIT_BRANCH="emacs-27"
        EGIT_CHECKOUT_DIR="${WORKDIR}/emacs"
        S="${EGIT_CHECKOUT_DIR}"
+       SLOT="${PV%%.*}-vcs"
 else
        # FULL_VERSION keeps the full version number, which is needed in
        # order to determine some path information correctly for copy/move
@@ -18,12 +19,20 @@ else
        FULL_VERSION="${PV%%_*}"
        SRC_URI="mirror://gnu/emacs/${P}.tar.xz"
        S="${WORKDIR}/emacs-${FULL_VERSION}"
+       # PV can be in any of the following formats:
+       # 27.1                 released version (slot 27)
+       # 27.1_rc1             upstream release candidate (27)
+       # 27.0.9999            live ebuild (slot 27-vcs)
+       # 27.0.90              upstream prerelease snapshot (27-vcs)
+       # 27.0.50_pre20191223  snapshot by Gentoo developer (27-vcs)
        if [[ ${PV} == *_pre* ]]; then
                SRC_URI="https://dev.gentoo.org/~ulm/distfiles/${P}.tar.xz";
                S="${WORKDIR}/emacs"
        elif [[ ${PV//[0-9]} != "." ]]; then
                
SRC_URI="mirror://gnu-alpha/emacs/pretest/${PN}-${PV/_/-}.tar.xz"
        fi
+       SLOT="${PV%%.*}"
+       [[ ${PV} == *.*.* ]] && SLOT+="-vcs"
        KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 
~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
 fi
 
@@ -31,7 +40,6 @@ DESCRIPTION="The extensible, customizable, self-documenting 
real-time display ed
 HOMEPAGE="https://www.gnu.org/software/emacs/";
 
 LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2"
-SLOT="27-vcs"
 IUSE="acl alsa aqua athena cairo dbus dynamic-loading games gconf gfile gif 
+gmp gpm gsettings gtk gtk2 gzip-el harfbuzz imagemagick +inotify jpeg json 
kerberos lcms libxml2 livecd m17n-lib mailutils motif png selinux sound source 
ssl svg systemd +threads tiff toolkit-scroll-bars wide-int X Xaw3d xft +xpm 
xwidgets zlib"
 REQUIRED_USE="?? ( aqua X )"
 RESTRICT="test"

diff --git a/app-editors/emacs/emacs-27.1.ebuild 
b/app-editors/emacs/emacs-27.1.ebuild
index ffbda3f182b..9258d36369f 100644
--- a/app-editors/emacs/emacs-27.1.ebuild
+++ b/app-editors/emacs/emacs-27.1.ebuild
@@ -11,6 +11,7 @@ if [[ ${PV##*.} = 9999 ]]; then
        EGIT_BRANCH="emacs-27"
        EGIT_CHECKOUT_DIR="${WORKDIR}/emacs"
        S="${EGIT_CHECKOUT_DIR}"
+       SLOT="${PV%%.*}-vcs"
 else
        # FULL_VERSION keeps the full version number, which is needed in
        # order to determine some path information correctly for copy/move
@@ -18,12 +19,20 @@ else
        FULL_VERSION="${PV%%_*}"
        SRC_URI="mirror://gnu/emacs/${P}.tar.xz"
        S="${WORKDIR}/emacs-${FULL_VERSION}"
+       # PV can be in any of the following formats:
+       # 27.1                 released version (slot 27)
+       # 27.1_rc1             upstream release candidate (27)
+       # 27.0.9999            live ebuild (slot 27-vcs)
+       # 27.0.90              upstream prerelease snapshot (27-vcs)
+       # 27.0.50_pre20191223  snapshot by Gentoo developer (27-vcs)
        if [[ ${PV} == *_pre* ]]; then
                SRC_URI="https://dev.gentoo.org/~ulm/distfiles/${P}.tar.xz";
                S="${WORKDIR}/emacs"
        elif [[ ${PV//[0-9]} != "." ]]; then
                
SRC_URI="mirror://gnu-alpha/emacs/pretest/${PN}-${PV/_/-}.tar.xz"
        fi
+       SLOT="${PV%%.*}"
+       [[ ${PV} == *.*.* ]] && SLOT+="-vcs"
        KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 
~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
 fi
 
@@ -31,7 +40,6 @@ DESCRIPTION="The extensible, customizable, self-documenting 
real-time display ed
 HOMEPAGE="https://www.gnu.org/software/emacs/";
 
 LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2"
-SLOT="27"
 IUSE="acl alsa aqua athena cairo dbus dynamic-loading games gconf gfile gif 
+gmp gpm gsettings gtk gtk2 gzip-el harfbuzz imagemagick +inotify jpeg json 
kerberos lcms libxml2 livecd m17n-lib mailutils motif png selinux sound source 
ssl svg systemd +threads tiff toolkit-scroll-bars wide-int X Xaw3d xft +xpm 
xwidgets zlib"
 REQUIRED_USE="?? ( aqua X )"
 RESTRICT="test"

diff --git a/app-editors/emacs/emacs-28.0.9999.ebuild 
b/app-editors/emacs/emacs-28.0.9999.ebuild
index 93b9e483392..8137dcdd89b 100644
--- a/app-editors/emacs/emacs-28.0.9999.ebuild
+++ b/app-editors/emacs/emacs-28.0.9999.ebuild
@@ -11,6 +11,7 @@ if [[ ${PV##*.} = 9999 ]]; then
        EGIT_BRANCH="master"
        EGIT_CHECKOUT_DIR="${WORKDIR}/emacs"
        S="${EGIT_CHECKOUT_DIR}"
+       SLOT="${PV%%.*}-vcs"
 else
        # FULL_VERSION keeps the full version number, which is needed in
        # order to determine some path information correctly for copy/move
@@ -18,12 +19,20 @@ else
        FULL_VERSION="${PV%%_*}"
        SRC_URI="mirror://gnu/emacs/${P}.tar.xz"
        S="${WORKDIR}/emacs-${FULL_VERSION}"
+       # PV can be in any of the following formats:
+       # 27.1                 released version (slot 27)
+       # 27.1_rc1             upstream release candidate (27)
+       # 27.0.9999            live ebuild (slot 27-vcs)
+       # 27.0.90              upstream prerelease snapshot (27-vcs)
+       # 27.0.50_pre20191223  snapshot by Gentoo developer (27-vcs)
        if [[ ${PV} == *_pre* ]]; then
                SRC_URI="https://dev.gentoo.org/~ulm/distfiles/${P}.tar.xz";
                S="${WORKDIR}/emacs"
        elif [[ ${PV//[0-9]} != "." ]]; then
                
SRC_URI="mirror://gnu-alpha/emacs/pretest/${PN}-${PV/_/-}.tar.xz"
        fi
+       SLOT="${PV%%.*}"
+       [[ ${PV} == *.*.* ]] && SLOT+="-vcs"
        KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 
~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
 fi
 
@@ -31,7 +40,6 @@ DESCRIPTION="The extensible, customizable, self-documenting 
real-time display ed
 HOMEPAGE="https://www.gnu.org/software/emacs/";
 
 LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2"
-SLOT="28-vcs"
 IUSE="acl alsa aqua athena cairo dbus dynamic-loading games gconf gfile gif 
+gmp gpm gsettings gtk gtk2 gzip-el harfbuzz imagemagick +inotify jpeg json 
kerberos lcms libxml2 livecd m17n-lib mailutils motif png selinux sound source 
ssl svg systemd +threads tiff toolkit-scroll-bars wide-int X Xaw3d xft +xpm 
xwidgets zlib"
 REQUIRED_USE="?? ( aqua X )"
 RESTRICT="test"

Reply via email to