Re: [gentoo-dev] RFC: Require full $P not just $PN on stable/keyword commit messages
On Fri, 1 Nov 2019 19:59:35 + Michael 'veremitz' Everitt wrote: > Hello, > > I've noticed a lot of stabilisation commit messages (and a few keywording > ones too) simply state the package atom and not the relevant > release/version. I find this a little meaningless, as unless this is the > first time the package has ever been either stabilised or keyworded, it is > reasonable to expect that there is/was some transition point for a package > from when it first entered the Gentoo Repository. > > Therefore, it would be much /more/ useful to have the package-version > tagged in the commit message, so that you could easily grep logs for when a > given version of a package was stabilised, and/or keyworded. Granted, this > is more of-use in a historical context compared to a present (future?!) > one, but I would argue that it conveys more meaning -with- the version than > without. > > Thoughts from outside peanut gallery? A few points: 1. Given that you can't rely on that information today it won't be of much use in future if it's already not precise. If you want consistent keywording/stabilizing behaviour you might want to propose/implement a tool that generates commits in a form everybody agrees. Say, a specific form of repoman commit. Today even keywording itself in not exactly fully automated process: https://bugs.gentoo.org/639724 2. repoman was changed to disallow long enough subject lines from being committed. As a result sometimes you can't just fit both package name and package version into the fist line. Let alone full arch list and bug number. Thus requiring ${P} is technically infeasible. It would probably help to describe original problem in more detail being solved before discussing of a solution. If you need a precise solution for "when foo was stabilized" you have to look at the ebuild's metadata as an authoritative source. -- Sergei
Re: [gentoo-dev] RFC: Require full $P not just $PN on stable/keyword commit messages
On 01/11/19 21:45, Mike Gilbert wrote: > On Fri, Nov 1, 2019 at 5:34 PM Michael 'veremitz' Everitt > wrote: >> On 01/11/19 21:11, Rich Freeman wrote: >>> On Fri, Nov 1, 2019 at 4:36 PM Matt Turner wrote: On Fri, Nov 1, 2019 at 12:59 PM Michael 'veremitz' Everitt wrote: > Therefore, it would be much /more/ useful to have the package-version > tagged in the commit message, so that you could easily grep logs for when > a > given version of a package was stabilised, and/or keyworded. >>> git log --format=oneline glibc-2.29-r2.ebuild | grep stable >>> 9c04d06d06d51d9c76b3fe5ceb573213769f45ae sys-libs/glibc-2.29-r2: sparc >>> stable, bug 685818 >>> b61ab167e82261ed2078c068ba0c2fc3a7b58aa3 sys-libs/glibc: stable >>> 2.29-r2 for hppa, bug #685818 >>> fad52f75c759ca326ce0f8c37e227827f01cd2f1 sys-libs/glibc: m68k stable >>> wrt bug #685818 >>> 0fe91535a7ba382f10084def5482e61359f201cb sys-libs/glibc: sh stable wrt >>> bug #685818 >>> 7b7ec9a6b3355d6111e1a449ca13e24cb6ef0295 sys-libs/glibc: s390 stable >>> wrt bug #685818 >>> bcddad6780ead2b44528a4aa1d51107b4a225524 sys-libs/glibc-2.29-r2: alpha >>> stable >>> 2ca6a4b9d647f567d2300e7b90829993d7575b41 sys-libs/glibc: ia64 stable >>> wrt bug #685818 >>> e56c3c1f1c0a256c228a59be94869751d7fd31d7 sys-libs/glibc: ppc64 stable >>> wrt bug #685818 >>> 52355459ec00b9ca9921bd5f788bad9b95346910 sys-libs/glibc: ppc stable >>> wrt bug #685818 >>> 745b07e84b5035576737d3e1a719121d02e53feb sys-libs/glibc: arm stable >>> wrt bug #685818 >>> 332fc91e3e72a6dd1b183ce4a19d08b45daa8e00 sys-libs/glibc: x86 stable >>> (bug #685818) >>> 9e06c1242e104b66a532e7d5d919c1b3b1f8343d sys-libs/glibc: arm64 stable >>> (bug #685818) >>> b3ad265998a04a40820d078d25c06b7cb51173ef sys-libs/glibc: amd64 stable >>> wrt bug #685818 >>> >>> Seems to work fine for me. >>> >>> >> How well does git handle that when the ebuild is deleted from the tree? > It handles it just fine, though you need to add "--" to disambiguate > it from a ref. For example: > > git log --format=oneline --grep=stable -- foo-123.ebuild > Consider me somewhat enlightened .. (!) :] signature.asc Description: OpenPGP digital signature
Re: [gentoo-dev] RFC: Require full $P not just $PN on stable/keyword commit messages
On Fri, Nov 1, 2019 at 5:34 PM Michael 'veremitz' Everitt wrote: > > > git log --format=oneline glibc-2.29-r2.ebuild | grep stable > > > How well does git handle that when the ebuild is deleted from the tree? > git log --format=oneline -- glibc-2.29-r4.ebuild 23d1c015230d9ff44bcdd7b72e00ca3533815fa4 sys-libs/glibc: drop old f3872a506edc7da0d987bcf0a90d4709945328a7 sys-libs/glibc: restore strip quirk for 'libpthread.so.0' 650d70eb5d91265329e2f730bc1aed0fa5863db6 sys-libs/glibc: disable stripping for cross-glibc e14229b10b513a164f8379ff14cc8c644c071f27 sys-libs/glibc: drop prepallstrip, bug #587296 fb2fe75af62ad29a44aeba1b8e9e41ce5acb3992 sys-libs/glibc: Add 2.29 revision with compile-locales support I was too lazy to find something that had stable keywords, but I'm sure substituting the appropriate filename and grepping would work fine. The trick is to put the "--" in the command line. However, you could hardly be blamed for hitting your head against the wall trying to figure out how to do this. I had to google it as I've run into this myself. As many have said git is an amazing data model with a terrible UI. -- Rich
Re: [gentoo-dev] RFC: Require full $P not just $PN on stable/keyword commit messages
On Fri, Nov 1, 2019 at 5:34 PM Michael 'veremitz' Everitt wrote: > > On 01/11/19 21:11, Rich Freeman wrote: > > On Fri, Nov 1, 2019 at 4:36 PM Matt Turner wrote: > >> On Fri, Nov 1, 2019 at 12:59 PM Michael 'veremitz' Everitt > >> wrote: > >>> > >>> Therefore, it would be much /more/ useful to have the package-version > >>> tagged in the commit message, so that you could easily grep logs for when > >>> a > >>> given version of a package was stabilised, and/or keyworded. > > git log --format=oneline glibc-2.29-r2.ebuild | grep stable > > 9c04d06d06d51d9c76b3fe5ceb573213769f45ae sys-libs/glibc-2.29-r2: sparc > > stable, bug 685818 > > b61ab167e82261ed2078c068ba0c2fc3a7b58aa3 sys-libs/glibc: stable > > 2.29-r2 for hppa, bug #685818 > > fad52f75c759ca326ce0f8c37e227827f01cd2f1 sys-libs/glibc: m68k stable > > wrt bug #685818 > > 0fe91535a7ba382f10084def5482e61359f201cb sys-libs/glibc: sh stable wrt > > bug #685818 > > 7b7ec9a6b3355d6111e1a449ca13e24cb6ef0295 sys-libs/glibc: s390 stable > > wrt bug #685818 > > bcddad6780ead2b44528a4aa1d51107b4a225524 sys-libs/glibc-2.29-r2: alpha > > stable > > 2ca6a4b9d647f567d2300e7b90829993d7575b41 sys-libs/glibc: ia64 stable > > wrt bug #685818 > > e56c3c1f1c0a256c228a59be94869751d7fd31d7 sys-libs/glibc: ppc64 stable > > wrt bug #685818 > > 52355459ec00b9ca9921bd5f788bad9b95346910 sys-libs/glibc: ppc stable > > wrt bug #685818 > > 745b07e84b5035576737d3e1a719121d02e53feb sys-libs/glibc: arm stable > > wrt bug #685818 > > 332fc91e3e72a6dd1b183ce4a19d08b45daa8e00 sys-libs/glibc: x86 stable > > (bug #685818) > > 9e06c1242e104b66a532e7d5d919c1b3b1f8343d sys-libs/glibc: arm64 stable > > (bug #685818) > > b3ad265998a04a40820d078d25c06b7cb51173ef sys-libs/glibc: amd64 stable > > wrt bug #685818 > > > > Seems to work fine for me. > > > > > How well does git handle that when the ebuild is deleted from the tree? It handles it just fine, though you need to add "--" to disambiguate it from a ref. For example: git log --format=oneline --grep=stable -- foo-123.ebuild
[gentoo-dev] RFC: Require full $P not just $PN on stable/keyword commit messages
On 01/11/19 21:11, Rich Freeman wrote: > On Fri, Nov 1, 2019 at 4:36 PM Matt Turner wrote: >> On Fri, Nov 1, 2019 at 12:59 PM Michael 'veremitz' Everitt >> wrote: >>> >>> Therefore, it would be much /more/ useful to have the package-version >>> tagged in the commit message, so that you could easily grep logs for when a >>> given version of a package was stabilised, and/or keyworded. > git log --format=oneline glibc-2.29-r2.ebuild | grep stable > 9c04d06d06d51d9c76b3fe5ceb573213769f45ae sys-libs/glibc-2.29-r2: sparc > stable, bug 685818 > b61ab167e82261ed2078c068ba0c2fc3a7b58aa3 sys-libs/glibc: stable > 2.29-r2 for hppa, bug #685818 > fad52f75c759ca326ce0f8c37e227827f01cd2f1 sys-libs/glibc: m68k stable > wrt bug #685818 > 0fe91535a7ba382f10084def5482e61359f201cb sys-libs/glibc: sh stable wrt > bug #685818 > 7b7ec9a6b3355d6111e1a449ca13e24cb6ef0295 sys-libs/glibc: s390 stable > wrt bug #685818 > bcddad6780ead2b44528a4aa1d51107b4a225524 sys-libs/glibc-2.29-r2: alpha stable > 2ca6a4b9d647f567d2300e7b90829993d7575b41 sys-libs/glibc: ia64 stable > wrt bug #685818 > e56c3c1f1c0a256c228a59be94869751d7fd31d7 sys-libs/glibc: ppc64 stable > wrt bug #685818 > 52355459ec00b9ca9921bd5f788bad9b95346910 sys-libs/glibc: ppc stable > wrt bug #685818 > 745b07e84b5035576737d3e1a719121d02e53feb sys-libs/glibc: arm stable > wrt bug #685818 > 332fc91e3e72a6dd1b183ce4a19d08b45daa8e00 sys-libs/glibc: x86 stable > (bug #685818) > 9e06c1242e104b66a532e7d5d919c1b3b1f8343d sys-libs/glibc: arm64 stable > (bug #685818) > b3ad265998a04a40820d078d25c06b7cb51173ef sys-libs/glibc: amd64 stable > wrt bug #685818 > > Seems to work fine for me. > > How well does git handle that when the ebuild is deleted from the tree? signature.asc Description: OpenPGP digital signature
Re: [gentoo-dev] RFC: Require full $P not just $PN on stable/keyword commit messages
On Fri, Nov 1, 2019 at 4:36 PM Matt Turner wrote: > > On Fri, Nov 1, 2019 at 12:59 PM Michael 'veremitz' Everitt > wrote: > > > > > > Therefore, it would be much /more/ useful to have the package-version > > tagged in the commit message, so that you could easily grep logs for when a > > given version of a package was stabilised, and/or keyworded. git log --format=oneline glibc-2.29-r2.ebuild | grep stable 9c04d06d06d51d9c76b3fe5ceb573213769f45ae sys-libs/glibc-2.29-r2: sparc stable, bug 685818 b61ab167e82261ed2078c068ba0c2fc3a7b58aa3 sys-libs/glibc: stable 2.29-r2 for hppa, bug #685818 fad52f75c759ca326ce0f8c37e227827f01cd2f1 sys-libs/glibc: m68k stable wrt bug #685818 0fe91535a7ba382f10084def5482e61359f201cb sys-libs/glibc: sh stable wrt bug #685818 7b7ec9a6b3355d6111e1a449ca13e24cb6ef0295 sys-libs/glibc: s390 stable wrt bug #685818 bcddad6780ead2b44528a4aa1d51107b4a225524 sys-libs/glibc-2.29-r2: alpha stable 2ca6a4b9d647f567d2300e7b90829993d7575b41 sys-libs/glibc: ia64 stable wrt bug #685818 e56c3c1f1c0a256c228a59be94869751d7fd31d7 sys-libs/glibc: ppc64 stable wrt bug #685818 52355459ec00b9ca9921bd5f788bad9b95346910 sys-libs/glibc: ppc stable wrt bug #685818 745b07e84b5035576737d3e1a719121d02e53feb sys-libs/glibc: arm stable wrt bug #685818 332fc91e3e72a6dd1b183ce4a19d08b45daa8e00 sys-libs/glibc: x86 stable (bug #685818) 9e06c1242e104b66a532e7d5d919c1b3b1f8343d sys-libs/glibc: arm64 stable (bug #685818) b3ad265998a04a40820d078d25c06b7cb51173ef sys-libs/glibc: amd64 stable wrt bug #685818 Seems to work fine for me. > > In the past people have argued that the version in the title is > superfluous since you can get the same info from git (log|show) --stat > but the same (misguided argument) can be used to justify something > absurd like simply making the bug number the subject. I don't think these are at all equivalent. The current state just relies on finding version history in git, which is basically the main purpose git serves. Your example involves joining two disparate datasets, neither of which natively offer an SQL-compatible interface. I think the rationale for not putting more mandatory content in the commit summary was that its length is limited and the more boilerplate we cram in there, the less room we have for meaningful description, when the boilerplate is already easily searched using git (though admittedly not from changelog extracts). Sure, for stable/keyword changes there isn't much in the way of description to worry about, but for other changes I suspect that this could be limiting. >From GLEP 66: The summary line must not exceed 69 characters, and must not be wrapped. In the example I cited the longest summary is already 59 chars: sys-libs/glibc: Fix handling of ${EPREFIX} when building cross-glibc If you wanted to stick 7 more chars of PV info in there then we'd be just 3 chars short of the limit, and this is just a randomly chosen example. Packages with longer PV certainly exist, along with ones with longer summaries. Personally I don't really care that much one way or another as long as repoman is updated to follow any new standard, but this seems like it could be impactful to people doing more complex work in the tree. I get that some people really seem to want to avoid using git, but this is basically what it was made to do, and IMO seems like a step in the wrong direction. I think the main purpose of putting PN in there at all was so that commits that hit multiple packages would be more clear in logs. -- Rich
Re: [gentoo-dev] RFC: Require full $P not just $PN on stable/keyword commit messages
On Fri, Nov 1, 2019 at 12:59 PM Michael 'veremitz' Everitt wrote: > > Hello, > > I've noticed a lot of stabilisation commit messages (and a few keywording > ones too) simply state the package atom and not the relevant > release/version. I find this a little meaningless, as unless this is the > first time the package has ever been either stabilised or keyworded, it is > reasonable to expect that there is/was some transition point for a package > from when it first entered the Gentoo Repository. > > Therefore, it would be much /more/ useful to have the package-version > tagged in the commit message, so that you could easily grep logs for when a > given version of a package was stabilised, and/or keyworded. Granted, this > is more of-use in a historical context compared to a present (future?!) > one, but I would argue that it conveys more meaning -with- the version than > without. Yes, I agree we should do this. My commit messages look like: sys-apps/systemd-243-r2: ppc64 stable, bug 698766 net-misc/mosh-1.3.2: added ~alpha In the past people have argued that the version in the title is superfluous since you can get the same info from git (log|show) --stat but the same (misguided argument) can be used to justify something absurd like simply making the bug number the subject. Honestly, just put the dang version in the title.
[gentoo-dev] Re: RFC: Require full $P not just $PN on stable/keyword commit messages
On 01/11/19 19:59, Michael 'veremitz' Everitt wrote: > Hello, > > I've noticed a lot of stabilisation commit messages (and a few keywording > ones too) simply state the package atom and not the relevant > release/version. I find this a little meaningless, as unless this is the > first time the package has ever been either stabilised or keyworded, it is > reasonable to expect that there is/was some transition point for a package > from when it first entered the Gentoo Repository. > > Therefore, it would be much /more/ useful to have the package-version > tagged in the commit message, so that you could easily grep logs for when a > given version of a package was stabilised, and/or keyworded. Granted, this > is more of-use in a historical context compared to a present (future?!) > one, but I would argue that it conveys more meaning -with- the version than > without. > > Thoughts from outside peanut gallery? > > Michael / veremitz. > Also, it's particularly helpful if you have an atom feed of a given package, to see when versions are stabilised (present and future contexts covered... ;D) signature.asc Description: OpenPGP digital signature
[gentoo-dev] RFC: Require full $P not just $PN on stable/keyword commit messages
Hello, I've noticed a lot of stabilisation commit messages (and a few keywording ones too) simply state the package atom and not the relevant release/version. I find this a little meaningless, as unless this is the first time the package has ever been either stabilised or keyworded, it is reasonable to expect that there is/was some transition point for a package from when it first entered the Gentoo Repository. Therefore, it would be much /more/ useful to have the package-version tagged in the commit message, so that you could easily grep logs for when a given version of a package was stabilised, and/or keyworded. Granted, this is more of-use in a historical context compared to a present (future?!) one, but I would argue that it conveys more meaning -with- the version than without. Thoughts from outside peanut gallery? Michael / veremitz. signature.asc Description: OpenPGP digital signature
[gentoo-dev] [PATCH 4/8] dev-ml/llvm-ocaml: Port 9+ to llvm.org.eclass
Signed-off-by: Michał Górny --- dev-ml/llvm-ocaml/llvm-ocaml-10.0.0..ebuild | 12 +++- dev-ml/llvm-ocaml/llvm-ocaml-9.0.0.ebuild | 7 +++ dev-ml/llvm-ocaml/llvm-ocaml-9.0.1..ebuild | 13 +++-- 3 files changed, 9 insertions(+), 23 deletions(-) diff --git a/dev-ml/llvm-ocaml/llvm-ocaml-10.0.0..ebuild b/dev-ml/llvm-ocaml/llvm-ocaml-10.0.0..ebuild index 664c0aa44847..37dbc834d6fc 100644 --- a/dev-ml/llvm-ocaml/llvm-ocaml-10.0.0..ebuild +++ b/dev-ml/llvm-ocaml/llvm-ocaml-10.0.0..ebuild @@ -8,13 +8,12 @@ EAPI=7 CMAKE_MIN_VERSION=3.7.0-r1 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) -inherit cmake-utils git-r3 llvm multiprocessing python-any-r1 +inherit cmake-utils llvm llvm.org multiprocessing python-any-r1 DESCRIPTION="OCaml bindings for LLVM" HOMEPAGE="https://llvm.org/; -SRC_URI="" -EGIT_REPO_URI="https://github.com/llvm/llvm-project.git; -S=${WORKDIR}/${P}/llvm +LLVM_COMPONENTS=( llvm ) +llvm.org_set_globals # Keep in sync with sys-devel/llvm ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC AVR ) @@ -53,11 +52,6 @@ pkg_setup() { python-any-r1_pkg_setup } -src_unpack() { - git-r3_fetch - git-r3_checkout '' '' '' llvm -} - src_prepare() { # Python is needed to run tests using lit python_setup diff --git a/dev-ml/llvm-ocaml/llvm-ocaml-9.0.0.ebuild b/dev-ml/llvm-ocaml/llvm-ocaml-9.0.0.ebuild index 44c293f604cc..c62d0e0c7625 100644 --- a/dev-ml/llvm-ocaml/llvm-ocaml-9.0.0.ebuild +++ b/dev-ml/llvm-ocaml/llvm-ocaml-9.0.0.ebuild @@ -8,13 +8,12 @@ EAPI=7 CMAKE_MIN_VERSION=3.7.0-r1 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) -inherit cmake-utils llvm multiprocessing python-any-r1 +inherit cmake-utils llvm llvm.org multiprocessing python-any-r1 -MY_P=llvm-${PV/_/}.src DESCRIPTION="OCaml bindings for LLVM" HOMEPAGE="https://llvm.org/; -SRC_URI="https://releases.llvm.org/${PV}/${MY_P}.tar.xz; -S=${WORKDIR}/${MY_P} +LLVM_COMPONENTS=( llvm ) +llvm.org_set_globals # Keep in sync with sys-devel/llvm ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430 diff --git a/dev-ml/llvm-ocaml/llvm-ocaml-9.0.1..ebuild b/dev-ml/llvm-ocaml/llvm-ocaml-9.0.1..ebuild index d47587faed9b..78b08e83dab6 100644 --- a/dev-ml/llvm-ocaml/llvm-ocaml-9.0.1..ebuild +++ b/dev-ml/llvm-ocaml/llvm-ocaml-9.0.1..ebuild @@ -8,14 +8,12 @@ EAPI=7 CMAKE_MIN_VERSION=3.7.0-r1 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) -inherit cmake-utils git-r3 llvm multiprocessing python-any-r1 +inherit cmake-utils llvm llvm.org multiprocessing python-any-r1 DESCRIPTION="OCaml bindings for LLVM" HOMEPAGE="https://llvm.org/; -SRC_URI="" -EGIT_REPO_URI="https://github.com/llvm/llvm-project.git; -EGIT_BRANCH="release/9.x" -S=${WORKDIR}/${P}/llvm +LLVM_COMPONENTS=( llvm ) +llvm.org_set_globals # Keep in sync with sys-devel/llvm ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430 @@ -52,11 +50,6 @@ pkg_setup() { python-any-r1_pkg_setup } -src_unpack() { - git-r3_fetch - git-r3_checkout '' '' '' llvm -} - src_prepare() { # Python is needed to run tests using lit python_setup -- 2.23.0
[gentoo-dev] [PATCH 8/8] sys-devel/lld: Port 9+ to llvm.org.eclass
Signed-off-by: Michał Górny --- sys-devel/lld/lld-10.0.0..ebuild | 17 + sys-devel/lld/lld-9.0.0.ebuild | 23 --- sys-devel/lld/lld-9.0.1..ebuild | 18 +- 3 files changed, 14 insertions(+), 44 deletions(-) diff --git a/sys-devel/lld/lld-10.0.0..ebuild b/sys-devel/lld/lld-10.0.0..ebuild index c0a2e884c80d..0938eee4baad 100644 --- a/sys-devel/lld/lld-10.0.0..ebuild +++ b/sys-devel/lld/lld-10.0.0..ebuild @@ -8,13 +8,13 @@ EAPI=7 CMAKE_MIN_VERSION=3.7.0-r1 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) -inherit cmake-utils git-r3 llvm multiprocessing python-any-r1 +inherit cmake-utils llvm llvm.org multiprocessing python-any-r1 DESCRIPTION="The LLVM linker (link editor)" HOMEPAGE="https://llvm.org/; -SRC_URI="" -EGIT_REPO_URI="https://github.com/llvm/llvm-project.git; -S=${WORKDIR}/${P}/lld +LLVM_COMPONENTS=( lld ) +LLVM_TEST_COMPONENTS=( llvm/utils/{lit,unittest} ) +llvm.org_set_globals LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" SLOT="0" @@ -38,13 +38,6 @@ pkg_setup() { use test && python-any-r1_pkg_setup } -src_unpack() { - local dirs=( lld ) - use test && dirs+=( llvm/utils/{lit,unittest} ) - git-r3_fetch - git-r3_checkout '' '' '' "${dirs[@]}" -} - src_configure() { local mycmakeargs=( -DBUILD_SHARED_LIBS=OFF @@ -53,7 +46,7 @@ src_configure() { ) use test && mycmakeargs+=( -DLLVM_BUILD_TESTS=ON - -DLLVM_MAIN_SRC_DIR="${WORKDIR}/${P}/llvm" + -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}" ) diff --git a/sys-devel/lld/lld-9.0.0.ebuild b/sys-devel/lld/lld-9.0.0.ebuild index c938e81bb902..f411d28781d4 100644 --- a/sys-devel/lld/lld-9.0.0.ebuild +++ b/sys-devel/lld/lld-9.0.0.ebuild @@ -8,16 +8,13 @@ EAPI=7 CMAKE_MIN_VERSION=3.7.0-r1 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) -inherit cmake-utils llvm multiprocessing python-any-r1 - -MY_P=${P/_/}.src -LLVM_P=llvm-${PV/_/}.src +inherit cmake-utils llvm llvm.org multiprocessing python-any-r1 DESCRIPTION="The LLVM linker (link editor)" HOMEPAGE="https://llvm.org/; -SRC_URI="https://releases.llvm.org/${PV}/${MY_P}.tar.xz - test? ( https://releases.llvm.org/${PV}/${LLVM_P}.tar.xz )" -S=${WORKDIR}/${MY_P} +LLVM_COMPONENTS=( lld ) +LLVM_TEST_COMPONENTS=( llvm/utils/{lit,unittest} ) +llvm.org_set_globals LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" SLOT="0" @@ -41,18 +38,6 @@ pkg_setup() { use test && python-any-r1_pkg_setup } -src_unpack() { - einfo "Unpacking ${MY_P}.tar.xz ..." - tar -xf "${DISTDIR}/${MY_P}.tar.xz" || die - - if use test; then - einfo "Unpacking parts of ${LLVM_P}.tar.xz ..." - tar -xf "${DISTDIR}/${LLVM_P}.tar.xz" \ - "${LLVM_P}"/utils/{lit,unittest} || die - mv "${LLVM_P}" llvm || die - fi -} - src_configure() { local mycmakeargs=( -DBUILD_SHARED_LIBS=ON diff --git a/sys-devel/lld/lld-9.0.1..ebuild b/sys-devel/lld/lld-9.0.1..ebuild index 07ffc6f41c97..60ae216d4d6b 100644 --- a/sys-devel/lld/lld-9.0.1..ebuild +++ b/sys-devel/lld/lld-9.0.1..ebuild @@ -8,14 +8,13 @@ EAPI=7 CMAKE_MIN_VERSION=3.7.0-r1 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) -inherit cmake-utils git-r3 llvm multiprocessing python-any-r1 +inherit cmake-utils llvm llvm.org multiprocessing python-any-r1 DESCRIPTION="The LLVM linker (link editor)" HOMEPAGE="https://llvm.org/; -SRC_URI="" -EGIT_REPO_URI="https://github.com/llvm/llvm-project.git; -EGIT_BRANCH="release/9.x" -S=${WORKDIR}/${P}/lld +LLVM_COMPONENTS=( lld ) +LLVM_TEST_COMPONENTS=( llvm/utils/{lit,unittest} ) +llvm.org_set_globals LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" SLOT="0" @@ -39,13 +38,6 @@ pkg_setup() { use test && python-any-r1_pkg_setup } -src_unpack() { - local dirs=( lld ) - use test && dirs+=( llvm/utils/{lit,unittest} ) - git-r3_fetch - git-r3_checkout '' '' '' "${dirs[@]}" -} - src_configure() { local mycmakeargs=( -DBUILD_SHARED_LIBS=ON @@ -54,7 +46,7 @@ src_configure() { ) use test && mycmakeargs+=( -DLLVM_BUILD_TESTS=ON - -DLLVM_MAIN_SRC_DIR="${WORKDIR}/${P}/llvm" + -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}" ) -- 2.23.0
[gentoo-dev] [PATCH 7/8] sys-devel/clang: Port 9+ to llvm.org.eclass
Signed-off-by: Michał Górny --- sys-devel/clang/clang-10.0.0..ebuild | 28 - sys-devel/clang/clang-9.0.0.ebuild | 39 +--- sys-devel/clang/clang-9.0.1..ebuild | 29 -- 3 files changed, 40 insertions(+), 56 deletions(-) diff --git a/sys-devel/clang/clang-10.0.0..ebuild b/sys-devel/clang/clang-10.0.0..ebuild index 7213d45d1617..6ea6bad77fa5 100644 --- a/sys-devel/clang/clang-10.0.0..ebuild +++ b/sys-devel/clang/clang-10.0.0..ebuild @@ -8,15 +8,19 @@ EAPI=7 CMAKE_MIN_VERSION=3.7.0-r1 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) -inherit cmake-utils git-r3 llvm multilib-minimal multiprocessing \ +inherit cmake-utils llvm llvm.org multilib-minimal multiprocessing \ pax-utils python-single-r1 toolchain-funcs DESCRIPTION="C language family frontend for LLVM" HOMEPAGE="https://llvm.org/; -SRC_URI="" -EGIT_REPO_URI="https://github.com/llvm/llvm-project.git; +LLVM_COMPONENTS=( clang clang-tools-extra ) +LLVM_TEST_COMPONENTS=( + llvm/lib/Testing/Support + llvm/utils/{lit,llvm-lit,unittest} +) +llvm.org_set_globals # We need extra level of indirection for CLANG_RESOURCE_DIR -S=${WORKDIR}/x/${P}/clang +S=${WORKDIR}/x/y/clang # Keep in sync with sys-devel/llvm ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC AVR ) @@ -80,16 +84,10 @@ pkg_setup() { src_unpack() { # create extra parent dir for CLANG_RESOURCE_DIR - mkdir -p x || die - - local dirs=( clang clang-tools-extra ) - use test && dirs+=( - llvm/lib/Testing/Support llvm/utils/{lit,llvm-lit,unittest} - ) - git-r3_fetch - git-r3_checkout "${EGIT_REPO_URI}" "${WORKDIR}/x/${P}" '' "${dirs[@]}" - mv "${WORKDIR}/x/${P}/clang-tools-extra" \ - "${WORKDIR}/x/${P}/clang/tools/extra" || die + mkdir -p x/y || die + cd x/y || die + llvm.org_src_unpack + mv clang-tools-extra clang/tools/extra || die } check_distribution_components() { @@ -246,7 +244,7 @@ multilib_src_configure() { -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer) ) use test && mycmakeargs+=( - -DLLVM_MAIN_SRC_DIR="${WORKDIR}/x/${P}/llvm" + -DLLVM_MAIN_SRC_DIR="${WORKDIR}/x/y/llvm" -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}" ) diff --git a/sys-devel/clang/clang-9.0.0.ebuild b/sys-devel/clang/clang-9.0.0.ebuild index 2eabbee087ce..a91cefda2459 100644 --- a/sys-devel/clang/clang-9.0.0.ebuild +++ b/sys-devel/clang/clang-9.0.0.ebuild @@ -8,21 +8,21 @@ EAPI=7 CMAKE_MIN_VERSION=3.7.0-r1 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) -inherit cmake-utils llvm multilib-minimal multiprocessing \ +inherit cmake-utils llvm llvm.org multilib-minimal multiprocessing \ pax-utils python-single-r1 toolchain-funcs -MY_P=cfe-${PV/_/}.src -EXTRA_P=clang-tools-extra-${PV/_/}.src -LLVM_P=llvm-${PV/_/}.src - DESCRIPTION="C language family frontend for LLVM" HOMEPAGE="https://llvm.org/; -SRC_URI="https://releases.llvm.org/${PV}/${MY_P}.tar.xz - https://releases.llvm.org/${PV}/${EXTRA_P}.tar.xz - test? ( https://releases.llvm.org/${PV}/${LLVM_P}.tar.xz ) +SRC_URI=" !doc? ( https://dev.gentoo.org/~mgorny/dist/llvm/llvm-${PV}-manpages.tar.bz2 )" +LLVM_COMPONENTS=( clang clang-tools-extra ) +LLVM_TEST_COMPONENTS=( + llvm/lib/Testing/Support + llvm/utils/{lit,llvm-lit,unittest} +) +llvm.org_set_globals # We need extra level of indirection for CLANG_RESOURCE_DIR -S=${WORKDIR}/x/y/${MY_P} +S=${WORKDIR}/x/y/clang # Keep in sync with sys-devel/llvm ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430 @@ -98,24 +98,13 @@ src_unpack() { # create extra parent dir for CLANG_RESOURCE_DIR mkdir -p x/y || die cd x/y || die - - einfo "Unpacking ${MY_P}.tar.xz ..." - tar -xf "${DISTDIR}/${MY_P}.tar.xz" || die - einfo "Unpacking ${EXTRA_P}.tar.xz ..." - tar -xf "${DISTDIR}/${EXTRA_P}.tar.xz" || die - - mv "${EXTRA_P}" "${S}"/tools/extra || die - if use test; then - einfo "Unpacking parts of ${LLVM_P}.tar.xz ..." - tar -xf "${DISTDIR}/${LLVM_P}.tar.xz" \ - "${LLVM_P}"/lib/Testing/Support \ - "${LLVM_P}"/utils/{lit,llvm-lit,unittest} || die - mv "${LLVM_P}" "${WORKDIR}"/llvm || die - fi + llvm.org_src_unpack + mv clang-tools-extra clang/tools/extra || die if ! use doc; then - einfo "Unpacking llvm-${PV}-manpages.tar.bz2 ..." + ebegin "Unpacking llvm-${PV}-manpages.tar.bz2" tar -xf "${DISTDIR}/llvm-${PV}-manpages.tar.bz2" || die + eend fi } @@ -150,7 +139,7 @@ multilib_src_configure() { -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer) ) use test && mycmakeargs+=( -
[gentoo-dev] [PATCH 5/8] dev-python/lit: Port 9+ to llvm.org.eclass
Signed-off-by: Michał Górny --- dev-python/lit/lit-10.0.0..ebuild | 12 +++- dev-python/lit/lit-9.0.0.ebuild | 12 +++- dev-python/lit/lit-9.0.1..ebuild | 13 +++-- 3 files changed, 9 insertions(+), 28 deletions(-) diff --git a/dev-python/lit/lit-10.0.0..ebuild b/dev-python/lit/lit-10.0.0..ebuild index 05acb219e329..e051ca51410e 100644 --- a/dev-python/lit/lit-10.0.0..ebuild +++ b/dev-python/lit/lit-10.0.0..ebuild @@ -4,13 +4,12 @@ EAPI=7 PYTHON_COMPAT=( python2_7 python3_{5,6,7} ) -inherit distutils-r1 git-r3 multiprocessing +inherit distutils-r1 llvm.org multiprocessing DESCRIPTION="A stand-alone install of the LLVM suite testing tool" HOMEPAGE="https://llvm.org/; -SRC_URI="" -EGIT_REPO_URI="https://github.com/llvm/llvm-project.git; -S=${WORKDIR}/${P}/llvm/utils/lit +LLVM_COMPONENTS=( llvm/utils/lit ) +llvm.org_set_globals LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" SLOT="0" @@ -27,11 +26,6 @@ BDEPEND=" # TODO: move the manpage generation here (from sys-devel/llvm) -src_unpack() { - git-r3_fetch - git-r3_checkout '' '' '' llvm/utils/lit -} - python_test() { local -x LIT_PRESERVES_TMP=1 ./lit.py -j "${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}" \ diff --git a/dev-python/lit/lit-9.0.0.ebuild b/dev-python/lit/lit-9.0.0.ebuild index 379734458ba5..cbc3d5b9e6dd 100644 --- a/dev-python/lit/lit-9.0.0.ebuild +++ b/dev-python/lit/lit-9.0.0.ebuild @@ -4,13 +4,12 @@ EAPI=7 PYTHON_COMPAT=( python2_7 python3_{5,6,7} ) -inherit distutils-r1 multiprocessing +inherit distutils-r1 llvm.org multiprocessing -MY_P=llvm-${PV/_/}.src DESCRIPTION="A stand-alone install of the LLVM suite testing tool" HOMEPAGE="https://llvm.org/; -SRC_URI="https://releases.llvm.org/${PV}/${MY_P}.tar.xz; -S=${WORKDIR}/${MY_P}/utils/lit +LLVM_COMPONENTS=( llvm/utils/lit ) +llvm.org_set_globals LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" SLOT="0" @@ -27,11 +26,6 @@ BDEPEND=" # TODO: move the manpage generation here (from sys-devel/llvm) -src_unpack() { - einfo "Unpacking parts of ${MY_P}.tar.xz ..." - tar -xJf "${DISTDIR}/${MY_P}.tar.xz" "${MY_P}/utils/lit" || die -} - python_test() { local -x LIT_PRESERVES_TMP=1 ./lit.py -j "${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}" \ diff --git a/dev-python/lit/lit-9.0.1..ebuild b/dev-python/lit/lit-9.0.1..ebuild index ca1cce6c00b2..e051ca51410e 100644 --- a/dev-python/lit/lit-9.0.1..ebuild +++ b/dev-python/lit/lit-9.0.1..ebuild @@ -4,14 +4,12 @@ EAPI=7 PYTHON_COMPAT=( python2_7 python3_{5,6,7} ) -inherit distutils-r1 git-r3 multiprocessing +inherit distutils-r1 llvm.org multiprocessing DESCRIPTION="A stand-alone install of the LLVM suite testing tool" HOMEPAGE="https://llvm.org/; -SRC_URI="" -EGIT_REPO_URI="https://github.com/llvm/llvm-project.git; -EGIT_BRANCH="release/9.x" -S=${WORKDIR}/${P}/llvm/utils/lit +LLVM_COMPONENTS=( llvm/utils/lit ) +llvm.org_set_globals LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" SLOT="0" @@ -28,11 +26,6 @@ BDEPEND=" # TODO: move the manpage generation here (from sys-devel/llvm) -src_unpack() { - git-r3_fetch - git-r3_checkout '' '' '' llvm/utils/lit -} - python_test() { local -x LIT_PRESERVES_TMP=1 ./lit.py -j "${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}" \ -- 2.23.0
[gentoo-dev] [PATCH 6/8] sys-devel/clang-common: Port 9+ to llvm.org.eclass
Signed-off-by: Michał Górny --- .../clang-common-10.0.0..ebuild | 19 +- .../clang-common/clang-common-9.0.0.ebuild| 19 +- .../clang-common-9.0.1..ebuild| 20 +-- 3 files changed, 15 insertions(+), 43 deletions(-) diff --git a/sys-devel/clang-common/clang-common-10.0.0..ebuild b/sys-devel/clang-common/clang-common-10.0.0..ebuild index 6b707e3d41ff..d1bfe71d2f80 100644 --- a/sys-devel/clang-common/clang-common-10.0.0..ebuild +++ b/sys-devel/clang-common/clang-common-10.0.0..ebuild @@ -3,13 +3,13 @@ EAPI=7 -inherit bash-completion-r1 git-r3 +inherit bash-completion-r1 llvm.org DESCRIPTION="Common files shared between multiple slots of clang" HOMEPAGE="https://llvm.org/; -SRC_URI="" -EGIT_REPO_URI="https://github.com/llvm/llvm-project.git; -S=${WORKDIR}/${P}/clang +LLVM_COMPONENTS=( clang/utils/bash-autocomplete.sh ) +llvm.org_set_globals +S=${WORKDIR}/clang/utils LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" SLOT="0" @@ -18,15 +18,6 @@ IUSE="" PDEPEND="sys-devel/clang:*" -src_unpack() { - git-r3_fetch - git-r3_checkout '' '' '' clang/utils/bash-autocomplete.sh -} - -src_configure() { :; } -src_compile() { :; } -src_test() { :; } - src_install() { - newbashcomp utils/bash-autocomplete.sh clang + newbashcomp bash-autocomplete.sh clang } diff --git a/sys-devel/clang-common/clang-common-9.0.0.ebuild b/sys-devel/clang-common/clang-common-9.0.0.ebuild index 609bdcde4cc0..3fc7a056a923 100644 --- a/sys-devel/clang-common/clang-common-9.0.0.ebuild +++ b/sys-devel/clang-common/clang-common-9.0.0.ebuild @@ -3,13 +3,13 @@ EAPI=7 -inherit bash-completion-r1 +inherit bash-completion-r1 llvm.org -MY_P=cfe-${PV/_/}.src DESCRIPTION="Common files shared between multiple slots of clang" HOMEPAGE="https://llvm.org/; -SRC_URI="https://releases.llvm.org/${PV}/${MY_P}.tar.xz; -S=${WORKDIR}/${MY_P} +LLVM_COMPONENTS=( clang/utils/bash-autocomplete.sh ) +llvm.org_set_globals +S=${WORKDIR}/clang/utils LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" SLOT="0" @@ -18,15 +18,6 @@ IUSE="" PDEPEND="sys-devel/clang:*" -src_unpack() { - einfo "Unpacking parts of ${MY_P}.tar.xz ..." - tar -xJf "${DISTDIR}/${MY_P}.tar.xz" "${MY_P}/utils/bash-autocomplete.sh" || die -} - -src_configure() { :; } -src_compile() { :; } -src_test() { :; } - src_install() { - newbashcomp utils/bash-autocomplete.sh clang + newbashcomp bash-autocomplete.sh clang } diff --git a/sys-devel/clang-common/clang-common-9.0.1..ebuild b/sys-devel/clang-common/clang-common-9.0.1..ebuild index eecb0ff749dc..d1bfe71d2f80 100644 --- a/sys-devel/clang-common/clang-common-9.0.1..ebuild +++ b/sys-devel/clang-common/clang-common-9.0.1..ebuild @@ -3,14 +3,13 @@ EAPI=7 -inherit bash-completion-r1 git-r3 +inherit bash-completion-r1 llvm.org DESCRIPTION="Common files shared between multiple slots of clang" HOMEPAGE="https://llvm.org/; -SRC_URI="" -EGIT_REPO_URI="https://github.com/llvm/llvm-project.git; -EGIT_BRANCH="release/9.x" -S=${WORKDIR}/${P}/clang +LLVM_COMPONENTS=( clang/utils/bash-autocomplete.sh ) +llvm.org_set_globals +S=${WORKDIR}/clang/utils LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" SLOT="0" @@ -19,15 +18,6 @@ IUSE="" PDEPEND="sys-devel/clang:*" -src_unpack() { - git-r3_fetch - git-r3_checkout '' '' '' clang/utils/bash-autocomplete.sh -} - -src_configure() { :; } -src_compile() { :; } -src_test() { :; } - src_install() { - newbashcomp utils/bash-autocomplete.sh clang + newbashcomp bash-autocomplete.sh clang } -- 2.23.0
[gentoo-dev] [PATCH 3/8] sys-devel/llvm: Port 9+ to llvm.org.eclass
Signed-off-by: Michał Górny --- sys-devel/llvm/llvm-10.0.0..ebuild | 14 -- sys-devel/llvm/llvm-9.0.0.ebuild | 20 +++- sys-devel/llvm/llvm-9.0.1..ebuild | 15 --- 3 files changed, 23 insertions(+), 26 deletions(-) diff --git a/sys-devel/llvm/llvm-10.0.0..ebuild b/sys-devel/llvm/llvm-10.0.0..ebuild index c5cd658cd7b0..062bef474e01 100644 --- a/sys-devel/llvm/llvm-10.0.0..ebuild +++ b/sys-devel/llvm/llvm-10.0.0..ebuild @@ -8,14 +8,13 @@ EAPI=7 CMAKE_MIN_VERSION=3.7.0-r1 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) -inherit cmake-utils git-r3 multilib-minimal multiprocessing pax-utils \ - python-any-r1 toolchain-funcs +inherit cmake-utils llvm.org multilib-minimal multiprocessing \ + pax-utils python-any-r1 toolchain-funcs DESCRIPTION="Low Level Virtual Machine" HOMEPAGE="https://llvm.org/; -SRC_URI="" -EGIT_REPO_URI="https://github.com/llvm/llvm-project.git; -S=${WORKDIR}/${P}/llvm +LLVM_COMPONENTS=( llvm ) +llvm.org_set_globals # Those are in lib/Targets, without explicit CMakeLists.txt mention ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC AVR ) @@ -91,11 +90,6 @@ python_check_deps() { has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]" } -src_unpack() { - git-r3_fetch - git-r3_checkout '' '' '' llvm -} - check_live_ebuild() { local prod_targets=( $(sed -n -e '/set(LLVM_ALL_TARGETS/,/)/p' CMakeLists.txt \ diff --git a/sys-devel/llvm/llvm-9.0.0.ebuild b/sys-devel/llvm/llvm-9.0.0.ebuild index 62d66ff6800b..3fee2f3dffd0 100644 --- a/sys-devel/llvm/llvm-9.0.0.ebuild +++ b/sys-devel/llvm/llvm-9.0.0.ebuild @@ -8,15 +8,15 @@ EAPI=7 CMAKE_MIN_VERSION=3.7.0-r1 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) -inherit cmake-utils multilib-minimal multiprocessing pax-utils \ - python-any-r1 toolchain-funcs +inherit cmake-utils llvm.org multilib-minimal multiprocessing \ + pax-utils python-any-r1 toolchain-funcs -MY_P=${P}.src DESCRIPTION="Low Level Virtual Machine" HOMEPAGE="https://llvm.org/; -SRC_URI="https://releases.llvm.org/${PV}/${MY_P}.tar.xz +SRC_URI=" !doc? ( https://dev.gentoo.org/~mgorny/dist/llvm/${P}-manpages.tar.bz2 )" -S=${WORKDIR}/${MY_P} +LLVM_COMPONENTS=( llvm ) +llvm.org_set_globals # Keep in sync with CMakeLists.txt ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430 @@ -88,6 +88,16 @@ python_check_deps() { has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]" } +src_unpack() { + llvm.org_src_unpack + + if ! use doc; then + ebegin "Unpacking llvm-${PV}-manpages.tar.bz2" + tar -xf "${DISTDIR}/llvm-${PV}-manpages.tar.bz2" || die + eend + fi +} + src_prepare() { # Fix llvm-config for shared linking and sane flags # https://bugs.gentoo.org/show_bug.cgi?id=565358 diff --git a/sys-devel/llvm/llvm-9.0.1..ebuild b/sys-devel/llvm/llvm-9.0.1..ebuild index 45e29fba1c7b..09fb33203ad2 100644 --- a/sys-devel/llvm/llvm-9.0.1..ebuild +++ b/sys-devel/llvm/llvm-9.0.1..ebuild @@ -8,15 +8,13 @@ EAPI=7 CMAKE_MIN_VERSION=3.7.0-r1 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) -inherit cmake-utils git-r3 multilib-minimal multiprocessing pax-utils \ - python-any-r1 toolchain-funcs +inherit cmake-utils llvm.org multilib-minimal multiprocessing \ + pax-utils python-any-r1 toolchain-funcs DESCRIPTION="Low Level Virtual Machine" HOMEPAGE="https://llvm.org/; -SRC_URI="" -EGIT_REPO_URI="https://github.com/llvm/llvm-project.git; -EGIT_BRANCH="release/9.x" -S=${WORKDIR}/${P}/llvm +LLVM_COMPONENTS=( llvm ) +llvm.org_set_globals # Keep in sync with CMakeLists.txt ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430 @@ -88,11 +86,6 @@ python_check_deps() { has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]" } -src_unpack() { - git-r3_fetch - git-r3_checkout '' '' '' llvm -} - src_prepare() { # Fix llvm-config for shared linking and sane flags # https://bugs.gentoo.org/show_bug.cgi?id=565358 -- 2.23.0
[gentoo-dev] [PATCH 2/8] sys-devel/llvm-common: Port 9+ to llvm.org.eclass
Signed-off-by: Michał Górny --- .../llvm-common-10.0.0..ebuild| 18 ++ .../llvm-common/llvm-common-9.0.0.ebuild | 18 +++--- .../llvm-common/llvm-common-9.0.1..ebuild | 19 ++- 3 files changed, 19 insertions(+), 36 deletions(-) diff --git a/sys-devel/llvm-common/llvm-common-10.0.0..ebuild b/sys-devel/llvm-common/llvm-common-10.0.0..ebuild index 7edf27153de4..9751f5cc6a22 100644 --- a/sys-devel/llvm-common/llvm-common-10.0.0..ebuild +++ b/sys-devel/llvm-common/llvm-common-10.0.0..ebuild @@ -3,13 +3,12 @@ EAPI=7 -inherit git-r3 +inherit llvm.org DESCRIPTION="Common files shared between multiple slots of LLVM" HOMEPAGE="https://llvm.org/; -SRC_URI="" -EGIT_REPO_URI="https://github.com/llvm/llvm-project.git; -S=${WORKDIR}/${P}/llvm +LLVM_COMPONENTS=( llvm/utils/vim ) +llvm.org_set_globals LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" SLOT="0" @@ -18,19 +17,14 @@ IUSE="" RDEPEND="!sys-devel/llvm:0" -src_unpack() { - git-r3_fetch - git-r3_checkout '' '' '' llvm/utils/vim -} - src_configure() { :; } src_compile() { :; } src_test() { :; } src_install() { insinto /usr/share/vim/vimfiles - doins -r utils/vim/*/ + doins -r */ # some users may find it useful - newdoc utils/vim/README README.vim - dodoc utils/vim/vimrc + newdoc README README.vim + dodoc vimrc } diff --git a/sys-devel/llvm-common/llvm-common-9.0.0.ebuild b/sys-devel/llvm-common/llvm-common-9.0.0.ebuild index 65eb4d232e33..b81e9311acd4 100644 --- a/sys-devel/llvm-common/llvm-common-9.0.0.ebuild +++ b/sys-devel/llvm-common/llvm-common-9.0.0.ebuild @@ -3,11 +3,12 @@ EAPI=7 -MY_P=llvm-${PV/_/}.src +inherit llvm.org + DESCRIPTION="Common files shared between multiple slots of LLVM" HOMEPAGE="https://llvm.org/; -SRC_URI="https://releases.llvm.org/${PV}/${MY_P}.tar.xz; -S=${WORKDIR}/${MY_P} +LLVM_COMPONENTS=( llvm/utils/vim ) +llvm.org_set_globals LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" SLOT="0" @@ -16,19 +17,14 @@ IUSE="" RDEPEND="!sys-devel/llvm:0" -src_unpack() { - einfo "Unpacking parts of ${MY_P}.tar.xz ..." - tar -xJf "${DISTDIR}/${MY_P}.tar.xz" "${MY_P}/utils/vim" || die -} - src_configure() { :; } src_compile() { :; } src_test() { :; } src_install() { insinto /usr/share/vim/vimfiles - doins -r utils/vim/*/ + doins -r */ # some users may find it useful - newdoc utils/vim/README README.vim - dodoc utils/vim/vimrc + newdoc README README.vim + dodoc vimrc } diff --git a/sys-devel/llvm-common/llvm-common-9.0.1..ebuild b/sys-devel/llvm-common/llvm-common-9.0.1..ebuild index b3b79ac4e6c6..9751f5cc6a22 100644 --- a/sys-devel/llvm-common/llvm-common-9.0.1..ebuild +++ b/sys-devel/llvm-common/llvm-common-9.0.1..ebuild @@ -3,14 +3,12 @@ EAPI=7 -inherit git-r3 +inherit llvm.org DESCRIPTION="Common files shared between multiple slots of LLVM" HOMEPAGE="https://llvm.org/; -SRC_URI="" -EGIT_REPO_URI="https://github.com/llvm/llvm-project.git; -EGIT_BRANCH="release/9.x" -S=${WORKDIR}/${P}/llvm +LLVM_COMPONENTS=( llvm/utils/vim ) +llvm.org_set_globals LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" SLOT="0" @@ -19,19 +17,14 @@ IUSE="" RDEPEND="!sys-devel/llvm:0" -src_unpack() { - git-r3_fetch - git-r3_checkout '' '' '' llvm/utils/vim -} - src_configure() { :; } src_compile() { :; } src_test() { :; } src_install() { insinto /usr/share/vim/vimfiles - doins -r utils/vim/*/ + doins -r */ # some users may find it useful - newdoc utils/vim/README README.vim - dodoc utils/vim/vimrc + newdoc README README.vim + dodoc vimrc } -- 2.23.0
[gentoo-dev] [PATCH 1/8] llvm.org.eclass: New eclass to help maintaining LLVM
llvm.org eclass is meant to provide helper routines for maintaining LLVM packages. It takes care of covering the differences between release, prerelease and git ebuilds in a unified API. This will make maintenance much easier. Initially, the eclass takes care of fetching and unpacking the archives. Later on, I will work on moving some more common stuff there. Signed-off-by: Michał Górny --- eclass/llvm.org.eclass | 198 + 1 file changed, 198 insertions(+) create mode 100644 eclass/llvm.org.eclass // I'm following this up with a few example updates to ebuilds. This // patchset neither covers all ebuilds nor is final. diff --git a/eclass/llvm.org.eclass b/eclass/llvm.org.eclass new file mode 100644 index ..5a704c1d9805 --- /dev/null +++ b/eclass/llvm.org.eclass @@ -0,0 +1,198 @@ +# Copyright 2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# @ECLASS: llvm.org.eclass +# @MAINTAINER: +# Michał Górny +# @AUTHOR: +# Michał Górny +# @BLURB: Common bits for fetching & unpacking llvm.org projects +# @DESCRIPTION: +# The llvm.org eclass provides common code to fetch and unpack parts +# of the llvm.org project tree. It takes care of handling both git +# checkouts and source tarballs, making it possible to unify the code +# of live and release ebuilds and effectively reduce the work needed +# to package new releases/RCs/branches. +# +# In order to use this eclass, the ebuild needs to declare +# LLVM_COMPONENTS and then call llvm.org_set_globals. If tests require +# additional components, they need to be listed in LLVM_TEST_COMPONENTS. +# The eclass exports an implementation of src_unpack() phase. +# +# Example: +# @CODE +# inherit llvm.org +# +# LLVM_COMPONENTS=( lld ) +# LLVM_TEST_COMPONENTS=( llvm/utils/lit ) +# llvm.org_set_globals +# @CODE + +case "${EAPI:-0}" in + 7) + ;; + *) + die "Unsupported EAPI=${EAPI} for ${ECLASS}" + ;; +esac + + +# == internal control bits == + +# @ECLASS-VARIABLE: _LLVM_MASTER_MAJOR +# @INTERNAL +# @DESCRIPTION: +# The major version of current LLVM trunk. Used to determine +# the correct branch to use. +_LLVM_MASTER_MAJOR=10 + +# @ECLASS-VARIABLE: _LLVM_SOURCE_TYPE +# @INTERNAL +# @DESCRIPTION: +# Source type to use: 'git' or 'tar'. +if [[ -z ${_LLVM_SOURCE_TYPE+1} ]]; then + if [[ ${PV} == *. ]]; then + _LLVM_SOURCE_TYPE=git + else + _LLVM_SOURCE_TYPE=tar + fi +fi + +[[ ${_LLVM_SOURCE_TYPE} == git ]] && inherit git-r3 + +[[ ${PV} == ${_LLVM_MASTER_MAJOR}.* && ${_LLVM_SOURCE_TYPE} == tar ]] && + die "${ECLASS}: Release ebuild for master branch?!" + + +# == control variables == + +# @ECLASS-VARIABLE: LLVM_COMPONENTS +# @REQUIRED +# @DESCRIPTION: +# List of components needed unconditionally. Specified as bash array +# with paths relative to llvm-project git. Automatically translated +# for tarball releases. +# +# The first path specified is used to construct default S. + +# @ECLASS-VARIABLE: LLVM_TEST_COMPONENTS +# @DEFAULT_UNSET +# @DESCRIPTION: +# List of additional components needed for tests. + + +# == global scope logic == + +# @FUNCTION: _llvm.org_get_archives +# @USAGE: +# @INTERNAL +# @DESCRIPTION: +# Set 'archives' array to list of unique archive filenames +# for components passed as parameters. +_llvm.org_get_archives() { + local c + archives=() + + for c; do + local cn=${c%%/*} + case ${cn} in + clang) cn=cfe;; + esac + + local a=${cn}-${PV}.src.tar.xz + has "${a}" "${archives[@]}" || archives+=( "${a}" ) + done +} + +# @FUNCTION: llvm.org_set_globals +# @DESCRIPTION: +# Set global variables. This must be called after setting LLVM_* +# variables used by the eclass. +llvm.org_set_globals() { + if [[ $(declare -p LLVM_COMPONENTS) != "declare -a"* ]]; then + die 'LLVM_COMPONENTS must be an array.' + fi + if declare -p LLVM_TEST_COMPONENTS &>/dev/null; then + if [[ $(declare -p LLVM_TEST_COMPONENTS) != "declare -a"* ]]; then + die 'LLVM_TEST_COMPONENTS must be an array.' + fi + fi + + if [[ ${_LLVM_SOURCE_TYPE} == git ]]; then + EGIT_REPO_URI="https://github.com/llvm/llvm-project.git; + + [[ ${PV} != ${_LLVM_MASTER_MAJOR}.* ]] && + EGIT_BRANCH="release/${PV%%.*}.x" + elif [[ ${_LLVM_SOURCE_TYPE} == tar ]]; then + local a archives=() + _llvm.org_get_archives "${LLVM_COMPONENTS[@]}" + for a in "${archives[@]}"; do + SRC_URI+=" + https://releases.llvm.org/${PV}/${a}; + done + else + die "Invalid _LLVM_SOURCE_TYPE: ${LLVM_SOURCE_TYPE}" + fi + +
[gentoo-dev] [PATCH] cmake-utils.eclass: Fix BUILD_SHARED_LIBS variable type
This fixes the following warning: CMake Warning (dev) at gentoo_common_config.cmake:8 (SET): implicitly converting 'BOOLEAN' to 'STRING' type. Signed-off-by: Alexander Tsoy --- eclass/cmake-utils.eclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass index 109b584afb3..e7a48116da7 100644 --- a/eclass/cmake-utils.eclass +++ b/eclass/cmake-utils.eclass @@ -649,7 +649,7 @@ cmake-utils_src_configure() { if [[ ${EAPI} != [56] ]]; then cat >> "${common_config}" <<- _EOF_ || die SET (CMAKE_INSTALL_DOCDIR "${EPREFIX}/usr/share/doc/${PF}" CACHE PATH "") - SET (BUILD_SHARED_LIBS ON CACHE BOOLEAN "") + SET (BUILD_SHARED_LIBS ON CACHE BOOL "") _EOF_ fi -- 2.23.0
[gentoo-dev] Last rites: dev-embedded/gnap-{dev,ext}
# Michał Górny (2019-11-01) # Both make no sense with dev-embedded/gnap removed. # Removal in 14 days. Bug #699072. dev-embedded/gnap-dev dev-embedded/gnap-ext -- Best regards, Michał Górny signature.asc Description: This is a digitally signed message part