From a00b1ebb45c32898e4b6ab01381c15bd9e7e991a Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Mon, 15 Jan 2024 15:03:51 +0100 Subject: [PATCH] dev-build/make: Sync with Gentoo It's from Gentoo commit 7ef71dd2f0e15a353a958b2572de2f2c353c6afb. --- .../portage-stable/dev-build/make/Manifest | 2 + .../portage-stable/dev-build/make/README.md | 2 - .../files/make-4.3-handle-tmpfile-fail.patch | 23 ------ .../make/files/make-4.4-default-cxx.patch | 11 +++ .../{make-4.3.ebuild => make-4.3-r1.ebuild} | 44 +++++++---- .../dev-build/make/make-4.4.1-r1.ebuild | 76 +++++++++++++++++++ .../dev-build/make/make-9999.ebuild | 76 +++++++++++++++++++ .../dev-build/make/metadata.xml | 15 ++-- 8 files changed, 204 insertions(+), 45 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/dev-build/make/README.md delete mode 100644 sdk_container/src/third_party/portage-stable/dev-build/make/files/make-4.3-handle-tmpfile-fail.patch create mode 100644 sdk_container/src/third_party/portage-stable/dev-build/make/files/make-4.4-default-cxx.patch rename sdk_container/src/third_party/portage-stable/dev-build/make/{make-4.3.ebuild => make-4.3-r1.ebuild} (56%) create mode 100644 sdk_container/src/third_party/portage-stable/dev-build/make/make-4.4.1-r1.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/dev-build/make/make-9999.ebuild diff --git a/sdk_container/src/third_party/portage-stable/dev-build/make/Manifest b/sdk_container/src/third_party/portage-stable/dev-build/make/Manifest index f9cbb5a172..ceee9e83b6 100644 --- a/sdk_container/src/third_party/portage-stable/dev-build/make/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-build/make/Manifest @@ -1,2 +1,4 @@ DIST make-4.3.tar.gz 2317073 BLAKE2B 5a82ce1f30eb034366ac3b87d2ec6698aae17d7b1a611941cf42136b2453b34236ab55382eab0a593c43cee8b036ba4a054f966c41ba766fdbd2862942be5dff SHA512 9a1185cc468368f4ec06478b1cfa343bf90b5cd7c92c0536567db0315b0ee909af53ecce3d44cfd93dd137dbca1ed13af5713e8663590c4fdd21ea635d78496b DIST make-4.3.tar.gz.sig 566 BLAKE2B 75bf71602e60f97ec8efa81676329047746d960257ef310b89a059144c00628b6a1ddf7a16a2ac2c3e935b8591475f5043a7c7546668ab39abbc4717c75a6528 SHA512 bf13e2943593b153457c8111179e8ae11cef2d9185a986106a1e70946a260bd930505a5e10002c5a60888e11affc07713c367b8680fd511ad87b2e124d303a99 +DIST make-4.4.1.tar.gz 2348200 BLAKE2B 09a4ad8060259e36854b525ab610fd317a86f4926e44e3ab8adba75dccc8d4b445df9dd25ccfb4c25a54bc0e98238a9127e36401d74cbc3503a329eadcdf4995 SHA512 145260cbd6a8226cef3dfef0c8baba31847beaebc7e6b65d39d02715fd4f4cab9b139b6c3772e550088d4f9ae80c6d3ed20b9a7664c693644dfb96b4cb60e67c +DIST make-4.4.1.tar.gz.sig 833 BLAKE2B d5f9a33b0262d4a9216f47718f6596884852662a692e708191a7007964007940da1c06549db28ae1d13683c4a949b9ee86da9dedd9a80da8f8b09e71e659e9a1 SHA512 d7a5531c10f216d690ec036f3875c7f314fa53006e138568c60132d506db48d1a59201623e168091dafa4465b005991019e42f81ff1a96a44610b6b18de08b09 diff --git a/sdk_container/src/third_party/portage-stable/dev-build/make/README.md b/sdk_container/src/third_party/portage-stable/dev-build/make/README.md deleted file mode 100644 index 6eed06d4d8..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-build/make/README.md +++ /dev/null @@ -1,2 +0,0 @@ -We forked this package to carry a patch that we will try to upstream -to both GNU Make and to Gentoo. diff --git a/sdk_container/src/third_party/portage-stable/dev-build/make/files/make-4.3-handle-tmpfile-fail.patch b/sdk_container/src/third_party/portage-stable/dev-build/make/files/make-4.3-handle-tmpfile-fail.patch deleted file mode 100644 index 340b744673..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-build/make/files/make-4.3-handle-tmpfile-fail.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -u -r make-4.3/src/output.c make-4.3-fix/src/output.c ---- make-4.3/src/output.c 2020-01-03 07:11:27.000000000 -0000 -+++ make-4.3-fix/src/output.c 2022-08-17 07:35:01.473471281 -0000 -@@ -286,15 +286,16 @@ - FILE *tfile = tmpfile (); - - if (! tfile) -- pfatal_with_name ("tmpfile"); -+ return -1; - - /* Create a duplicate so we can close the stream. */ - fd = dup (fileno (tfile)); -- if (fd < 0) -- pfatal_with_name ("dup"); - - fclose (tfile); - -+ if (fd < 0) -+ return -1; -+ - set_append_mode (fd); - - umask (mask); diff --git a/sdk_container/src/third_party/portage-stable/dev-build/make/files/make-4.4-default-cxx.patch b/sdk_container/src/third_party/portage-stable/dev-build/make/files/make-4.4-default-cxx.patch new file mode 100644 index 0000000000..4a56df5da2 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-build/make/files/make-4.4-default-cxx.patch @@ -0,0 +1,11 @@ +--- a/src/default.c ++++ b/src/default.c +@@ -542,7 +542,7 @@ static const char *default_variables[] = + "CXX", "gcc", + # endif /* __MSDOS__ */ + # else +- "CXX", "g++", ++ "CXX", "c++", + # endif + #endif + /* This expands to $(CO) $(COFLAGS) $< $@ if $@ does not exist, diff --git a/sdk_container/src/third_party/portage-stable/dev-build/make/make-4.3.ebuild b/sdk_container/src/third_party/portage-stable/dev-build/make/make-4.3-r1.ebuild similarity index 56% rename from sdk_container/src/third_party/portage-stable/dev-build/make/make-4.3.ebuild rename to sdk_container/src/third_party/portage-stable/dev-build/make/make-4.3-r1.ebuild index 533a77aceb..55a24ce460 100644 --- a/sdk_container/src/third_party/portage-stable/dev-build/make/make-4.3.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-build/make/make-4.3-r1.ebuild @@ -1,20 +1,23 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/make.asc +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/make.asc inherit flag-o-matic verify-sig DESCRIPTION="Standard tool to compile source trees" HOMEPAGE="https://www.gnu.org/software/make/make.html" -if [[ "$(ver_cut 3)" -ge 90 ]] ; then - SRC_URI="https://alpha.gnu.org/gnu//make/${P}.tar.gz" - SRC_URI+=" verify-sig? ( https://alpha.gnu.org/gnu//make/${P}.tar.gz.sig )" +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://git.savannah.gnu.org/git/make.git" + inherit autotools git-r3 +elif [[ $(ver_cut 3) -ge 90 ]] ; then + SRC_URI="https://alpha.gnu.org/gnu/make/${P}.tar.gz" + SRC_URI+=" verify-sig? ( https://alpha.gnu.org/gnu/make/${P}.tar.gz.sig )" else SRC_URI="mirror://gnu//make/${P}.tar.gz" SRC_URI+=" verify-sig? ( mirror://gnu//make/${P}.tar.gz.sig )" - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" fi LICENSE="GPL-3+" @@ -30,9 +33,27 @@ RDEPEND="${DEPEND} PATCHES=( "${FILESDIR}"/${PN}-3.82-darwin-library_search-dylib.patch "${FILESDIR}"/${PN}-4.2-default-cxx.patch - "${FILESDIR}"/${PN}-4.3-handle-tmpfile-fail.patch ) +src_unpack() { + if [[ ${PV} == 9999 ]] ; then + git-r3_src_unpack + + cd "${S}" || die + ./bootstrap || die + else + default + fi +} + +src_prepare() { + default + + if [[ ${PV} == 9999 ]] ; then + eautoreconf + fi +} + src_configure() { use static && append-ldflags -static local myeconfargs=( @@ -46,10 +67,7 @@ src_configure() { src_install() { emake DESTDIR="${D}" install dodoc AUTHORS NEWS README* - if [[ ${USERLAND} == "GNU" ]] ; then - # we install everywhere as 'gmake' but on GNU systems, - # symlink 'make' to 'gmake' - dosym gmake /usr/bin/make - dosym gmake.1 /usr/share/man/man1/make.1 - fi + + dosym gmake /usr/bin/make + dosym gmake.1 /usr/share/man/man1/make.1 } diff --git a/sdk_container/src/third_party/portage-stable/dev-build/make/make-4.4.1-r1.ebuild b/sdk_container/src/third_party/portage-stable/dev-build/make/make-4.4.1-r1.ebuild new file mode 100644 index 0000000000..61fbc91f24 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-build/make/make-4.4.1-r1.ebuild @@ -0,0 +1,76 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/make.asc +inherit flag-o-matic verify-sig + +DESCRIPTION="Standard tool to compile source trees" +HOMEPAGE="https://www.gnu.org/software/make/make.html" +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://git.savannah.gnu.org/git/make.git" + inherit autotools git-r3 +elif [[ $(ver_cut 3) -ge 90 || $(ver_cut 4) -ge 90 ]] ; then + SRC_URI="https://alpha.gnu.org/gnu/make/${P}.tar.gz" + SRC_URI+=" verify-sig? ( https://alpha.gnu.org/gnu/make/${P}.tar.gz.sig )" +else + SRC_URI="mirror://gnu/make/${P}.tar.gz" + SRC_URI+=" verify-sig? ( mirror://gnu/make/${P}.tar.gz.sig )" + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +fi + +LICENSE="GPL-3+" +SLOT="0" +IUSE="guile nls static" + +DEPEND="guile? ( >=dev-scheme/guile-1.8:= )" +RDEPEND=" + ${DEPEND} + nls? ( virtual/libintl ) +" +BDEPEND=" + nls? ( sys-devel/gettext ) + verify-sig? ( sec-keys/openpgp-keys-make ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-4.4-default-cxx.patch +) + +src_unpack() { + if [[ ${PV} == 9999 ]] ; then + git-r3_src_unpack + + cd "${S}" || die + ./bootstrap || die + else + default + fi +} + +src_prepare() { + default + + if [[ ${PV} == 9999 ]] ; then + eautoreconf + fi +} + +src_configure() { + use static && append-ldflags -static + local myeconfargs=( + --program-prefix=g + $(use_with guile) + $(use_enable nls) + ) + econf "${myeconfargs[@]}" +} + +src_install() { + emake DESTDIR="${D}" install + dodoc AUTHORS NEWS README* + + dosym gmake /usr/bin/make + dosym gmake.1 /usr/share/man/man1/make.1 +} diff --git a/sdk_container/src/third_party/portage-stable/dev-build/make/make-9999.ebuild b/sdk_container/src/third_party/portage-stable/dev-build/make/make-9999.ebuild new file mode 100644 index 0000000000..2be7d7adb8 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-build/make/make-9999.ebuild @@ -0,0 +1,76 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/make.asc +inherit flag-o-matic verify-sig + +DESCRIPTION="Standard tool to compile source trees" +HOMEPAGE="https://www.gnu.org/software/make/make.html" +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://git.savannah.gnu.org/git/make.git" + inherit autotools git-r3 +elif [[ $(ver_cut 3) -ge 90 || $(ver_cut 4) -ge 90 ]] ; then + SRC_URI="https://alpha.gnu.org/gnu/make/${P}.tar.gz" + SRC_URI+=" verify-sig? ( https://alpha.gnu.org/gnu/make/${P}.tar.gz.sig )" +else + SRC_URI="mirror://gnu/make/${P}.tar.gz" + SRC_URI+=" verify-sig? ( mirror://gnu/make/${P}.tar.gz.sig )" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +fi + +LICENSE="GPL-3+" +SLOT="0" +IUSE="guile nls static" + +DEPEND="guile? ( >=dev-scheme/guile-1.8:= )" +RDEPEND=" + ${DEPEND} + nls? ( virtual/libintl ) +" +BDEPEND=" + nls? ( sys-devel/gettext ) + verify-sig? ( sec-keys/openpgp-keys-make ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-4.4-default-cxx.patch +) + +src_unpack() { + if [[ ${PV} == 9999 ]] ; then + git-r3_src_unpack + + cd "${S}" || die + ./bootstrap || die + else + default + fi +} + +src_prepare() { + default + + if [[ ${PV} == 9999 ]] ; then + eautoreconf + fi +} + +src_configure() { + use static && append-ldflags -static + local myeconfargs=( + --program-prefix=g + $(use_with guile) + $(use_enable nls) + ) + econf "${myeconfargs[@]}" +} + +src_install() { + emake DESTDIR="${D}" install + dodoc AUTHORS NEWS README* + + dosym gmake /usr/bin/make + dosym gmake.1 /usr/share/man/man1/make.1 +} diff --git a/sdk_container/src/third_party/portage-stable/dev-build/make/metadata.xml b/sdk_container/src/third_party/portage-stable/dev-build/make/metadata.xml index 1e62dd9102..068fc3567c 100644 --- a/sdk_container/src/third_party/portage-stable/dev-build/make/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/dev-build/make/metadata.xml @@ -1,11 +1,12 @@ - - base-system@gentoo.org - Gentoo Base System - - - cpe:/a:gnu:make - + + base-system@gentoo.org + Gentoo Base System + + + cpe:/a:gnu:make + make +