diff options
Diffstat (limited to 'dev-build')
36 files changed, 1441 insertions, 0 deletions
diff --git a/dev-build/Manifest.gz b/dev-build/Manifest.gz Binary files differindex 25580ae63c8a..26a4a9034b12 100644 --- a/dev-build/Manifest.gz +++ b/dev-build/Manifest.gz diff --git a/dev-build/bmake/Manifest b/dev-build/bmake/Manifest new file mode 100644 index 000000000000..49955c7447fe --- /dev/null +++ b/dev-build/bmake/Manifest @@ -0,0 +1,8 @@ +AUX bmake-20210206-tests.patch 467 BLAKE2B 7c66cfbb610f2ea9615a737dd2d97fbea359ecb0e5b5c746447b9a0e9d2dff188f6f0d45225dd07d1226a86297f0c9ba8b8be7587039f2cc7ceaab4bde61f570 SHA512 3d855d54b64e2871ad8ccd494939c92a6bca2bec61f186e907a9b6b8b4f51b4ff63fcacbb8b6d44cef33a39c6ba2bed6c1fdd30d7ad65ad03d1d659781c420fe +AUX bmake-20210314-mk-fixes.patch 2054 BLAKE2B 404e99593f04408e3f62d8c6118fc1676ef414b4cc18f5ec8b089182fad8865ad79e40c236e58b084f3194bdcc94c92e1e10e40efbddc142b84053117065e202 SHA512 8c9e823dd158e352021f0905e2a15cb8d7da3020c49a8f824cc5dbd8f33910fc64629d5f400fd8651a16b07e0685a1247a661fd9230a62b7330bd5fc71427dd4 +DIST bmake-20230909.tar.gz 859801 BLAKE2B 02a44598edf05ebbcb31767b156563bfa10071774a3e7ae565efddc9b1ea6e684558e4ec3cfbc56d7d855cbe8663c43f43bd8d37e0a289c55ec12733e3e4916c SHA512 50622aee8024b3e0385974a8f446a4b5df0ba494b6133ab91ebbe63c408154b112f62c9df8521f4f1beaf28cdd6e7da178c3334337f6b14c8bced532029d8ba5 +DIST bmake-20231210.tar.gz 859537 BLAKE2B 554a4fab9df6c3f0ed1659c69a6294a6c3e1ebce4a8609ea1fe8bc657c11be04ea9b66ca01c50fc3bfc1ee54552a7e16584b26bea9f5461834e608ea39bbc38a SHA512 e2e35b5442f17c521ef2bf1c4cc1dbdedd0b1a335ac9a3c743add1c0bbaf4e32396ba64fd572cca75821cfa2b722d58ee71ec694d150d7e70d7a550d911a308b +DIST mk-20210330.tar.gz 107380 BLAKE2B 9ac30a117d9ba31635cf8d8d29fdba76f148611f47628403ca8f807081c32509f10498d3c30fd24985e5420af4710fe59fc6315d71f2d0c1cfed93263a06553a SHA512 6acd3ee911442934082f4f877d795b07c5e23022eaa9c0874799d97e92a2f5a663cb45f94b7f9745c49cbbce6b7e755a29e381ccfb9e68a0be1eedbd22fd5d3b +EBUILD bmake-20230909.ebuild 1331 BLAKE2B e64a8654efd87234cb5b9f7a4855bf72ccf8fa4f54dacb0e50b90fc6b82e1bc00e9daf7f165a3a96037ca36def957d05218b32f6b0adf4987c3e551fad15decd SHA512 2f8e69919dd498f9b7f9dd0a65f08be2da9cc92f908aefdcd4518e4f0506cf4a25c505cc5d1c2200a5cbd49cf4c5068d2a40fa93d323ecaa6e85edad691b00cd +EBUILD bmake-20231210.ebuild 1332 BLAKE2B 00d3c103c7b89c91984d4f7feb649364fb7d8b6892db35d03e2daaf8d6a6621f731f464775f0611a7b9a1c115e0a338f1bd9223bbdfd8a2cb66ff25264bb0f81 SHA512 fd1d8a168f93ce617592035dbc3a5136c68baf241bb33bc20929589ca27e8a5d5884de61c8caa24432499f2f1884ea7f380da3e2ff363e0c8912c70c3997c143 +MISC metadata.xml 353 BLAKE2B 70bd5eb274c4693a005986471e5a5c29a162bd0a080a7ba590c64171f2aa171bf9670093419f0b3e9ef304e5478f71df4899082e3dc76b4b0cedfe782a6625df SHA512 ade70c57a7ae5165c432d2024ec685609971347a94ecd69ab73142ff602f4cafb49df880d4dd1cee5695f1ea11c2c0ccc837d9a1ad38e50c61d0d27049279bc5 diff --git a/dev-build/bmake/bmake-20230909.ebuild b/dev-build/bmake/bmake-20230909.ebuild new file mode 100644 index 000000000000..2d2fc27388a5 --- /dev/null +++ b/dev-build/bmake/bmake-20230909.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +MK_VER=20210330 + +DESCRIPTION="NetBSD's portable make" +HOMEPAGE="http://www.crufty.net/help/sjg/bmake.html" +SRC_URI=" + http://void.crufty.net/ftp/pub/sjg/${P}.tar.gz + http://void.crufty.net/ftp/pub/sjg/mk-${MK_VER}.tar.gz" +S="${WORKDIR}/${PN}" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" + +# Skip failing test (sandbox and csh) +PATCHES=( + "${FILESDIR}"/${PN}-20210206-tests.patch +) + +src_prepare() { + default + cd "${WORKDIR}" || die + eapply "${FILESDIR}"/${PN}-20210314-mk-fixes.patch +} + +src_configure() { + econf \ + --with-mksrc=../mk \ + --with-default-sys-path="${EPREFIX}"/usr/share/mk/${PN} \ + --with-machine_arch=${ARCH} +} + +src_compile() { + sh make-bootstrap.sh || die "bootstrap failed" +} + +src_test() { + cd unit-tests || die + + # the 'ternary' test uses ${A} internally, which + # conflicts with Gentoo's ${A}, hence unset it for + # the tests temporarily. + env -u A MAKEFLAGS= \ + "${S}"/bmake -r -m / TEST_MAKE="${S}"/bmake test || die "tests compilation failed" +} + +src_install() { + dobin ${PN} + doman ${PN}.1 + FORCE_BSD_MK=1 SYS_MK_DIR=. \ + sh ../mk/install-mk -v -m 644 "${ED}"/usr/share/mk/${PN} \ + || die "failed to install mk files" +} diff --git a/dev-build/bmake/bmake-20231210.ebuild b/dev-build/bmake/bmake-20231210.ebuild new file mode 100644 index 000000000000..9c749f92ff06 --- /dev/null +++ b/dev-build/bmake/bmake-20231210.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +MK_VER=20210330 + +DESCRIPTION="NetBSD's portable make" +HOMEPAGE="http://www.crufty.net/help/sjg/bmake.html" +SRC_URI=" + http://void.crufty.net/ftp/pub/sjg/${P}.tar.gz + http://void.crufty.net/ftp/pub/sjg/mk-${MK_VER}.tar.gz" +S="${WORKDIR}/${PN}" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" + +# Skip failing test (sandbox and csh) +PATCHES=( + "${FILESDIR}"/${PN}-20210206-tests.patch +) + +src_prepare() { + default + cd "${WORKDIR}" || die + eapply "${FILESDIR}"/${PN}-20210314-mk-fixes.patch +} + +src_configure() { + econf \ + --with-mksrc=../mk \ + --with-default-sys-path="${EPREFIX}"/usr/share/mk/${PN} \ + --with-machine_arch=${ARCH} +} + +src_compile() { + sh make-bootstrap.sh || die "bootstrap failed" +} + +src_test() { + cd unit-tests || die + + # the 'ternary' test uses ${A} internally, which + # conflicts with Gentoo's ${A}, hence unset it for + # the tests temporarily. + env -u A MAKEFLAGS= \ + "${S}"/bmake -r -m / TEST_MAKE="${S}"/bmake test || die "tests compilation failed" +} + +src_install() { + dobin ${PN} + doman ${PN}.1 + FORCE_BSD_MK=1 SYS_MK_DIR=. \ + sh ../mk/install-mk -v -m 644 "${ED}"/usr/share/mk/${PN} \ + || die "failed to install mk files" +} diff --git a/dev-build/bmake/files/bmake-20210206-tests.patch b/dev-build/bmake/files/bmake-20210206-tests.patch new file mode 100644 index 000000000000..49e5f258e91a --- /dev/null +++ b/dev-build/bmake/files/bmake-20210206-tests.patch @@ -0,0 +1,18 @@ +--- a/unit-tests/Makefile ++++ b/unit-tests/Makefile +@@ -191,7 +191,6 @@ TESTS+= dotwait + TESTS+= envfirst + TESTS+= error + TESTS+= # escape # broken by reverting POSIX changes +-TESTS+= export + TESTS+= export-all + TESTS+= export-env + TESTS+= export-variants +@@ -290,7 +289,6 @@ TESTS+= sh-leading-plus + TESTS+= sh-meta-chars + TESTS+= sh-multi-line + TESTS+= sh-single-line +-TESTS+= shell-csh + TESTS+= shell-custom + .if exists(/bin/ksh) + TESTS+= shell-ksh diff --git a/dev-build/bmake/files/bmake-20210314-mk-fixes.patch b/dev-build/bmake/files/bmake-20210314-mk-fixes.patch new file mode 100644 index 000000000000..6dd935863be1 --- /dev/null +++ b/dev-build/bmake/files/bmake-20210314-mk-fixes.patch @@ -0,0 +1,66 @@ +# https://bugs.gentoo.org/779340 +# https://bugs.gentoo.org/778458 +# - Fix incorrect linking of shared libraries +# - Respect LDFLAGS +# - Do not strip prog binaries +--- a/mk/lib.mk ++++ b/mk/lib.mk +@@ -170,7 +170,7 @@ LD_solib= lib${LIB}_pic.a + .elif ${TARGET_OSNAME} == "Linux" + SHLIB_LD = ${CC} + # this is ambiguous of course +-LD_shared=-shared -Wl,"-soname lib${LIB}.so.${SHLIB_MAJOR}" ++LD_shared=-shared -Wl,-soname,lib${LIB}.so.${SHLIB_MAJOR} + LD_solib= -Wl,--whole-archive lib${LIB}_pic.a -Wl,--no-whole-archive + .if ${COMPILER_TYPE} == "gcc" + # Linux uses GNU ld, which is a multi-pass linker +@@ -455,11 +455,11 @@ lib${LIB}.${LD_so}: ${SOLIB} ${DPADD} + --whole-archive ${SOLIB} --no-whole-archive ${SHLIB_LDADD} \ + ${SHLIB_LDENDFILE} + .else +- ${SHLIB_LD} ${LD_x} ${LD_shared} \ ++ ${SHLIB_LD} ${LD_x} ${LD_shared} ${LDFLAGS} \ + -o ${.TARGET} ${SOLIB} ${SHLIB_LDADD} + .endif + .else +- ${SHLIB_LD} -o ${.TARGET} ${LD_shared} ${LD_solib} ${DLLIB} ${SHLIB_LDADD} ++ ${SHLIB_LD} -o ${.TARGET} ${LD_shared} ${LDFLAGS} ${LD_solib} ${DLLIB} ${SHLIB_LDADD} + .endif + .endif + .if !empty(SHLIB_LINKS) +--- a/mk/prog.mk ++++ b/mk/prog.mk +@@ -178,7 +178,7 @@ proginstall: + .if defined(PROG) + [ -d ${DESTDIR}${BINDIR} ] || \ + ${INSTALL} -d ${PROG_INSTALL_OWN} -m 775 ${DESTDIR}${BINDIR} +- ${INSTALL} ${COPY} ${STRIP_FLAG} ${PROG_INSTALL_OWN} -m ${BINMODE} \ ++ ${INSTALL} ${COPY} ${PROG_INSTALL_OWN} -m ${BINMODE} \ + ${PROG} ${DESTDIR}${BINDIR}/${PROG_NAME} + .endif + .if defined(HIDEGAME) +--- a/mk/sys/Linux.mk ++++ b/mk/sys/Linux.mk +@@ -19,12 +19,13 @@ NEED_SOLINKS ?=yes + AR ?= ar + ARFLAGS ?= rl + RANLIB ?= ranlib ++LDFLAGS ?= + + AS ?= as + AFLAGS= + COMPILE.s ?= ${AS} ${AFLAGS} + LINK.s ?= ${CC} ${AFLAGS} ${LDFLAGS} +-COMPILE.S ?= ${CC} ${AFLAGS} ${CPPFLAGS} -c ++COMPILE.S ?= ${CC} ${AFLAGS} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -c + LINK.S ?= ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS} + .if exists(/usr/local/bin/gcc) + CC ?= gcc -pipe +@@ -65,7 +66,6 @@ LFLAGS= + LEX.l ?= ${LEX} ${LFLAGS} + + LD ?= ld +-LDFLAGS= + + LINT ?= lint + LINTFLAGS ?= -chapbx diff --git a/dev-build/bmake/metadata.xml b/dev-build/bmake/metadata.xml new file mode 100644 index 000000000000..fe8a3a5da516 --- /dev/null +++ b/dev-build/bmake/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>jsmolic@gentoo.org</email> + <name>Jakov Smolić</name> + </maintainer> + <maintainer type="person"> + <email>soap@gentoo.org</email> + <name>David Seifert</name> + </maintainer> +</pkgmetadata> diff --git a/dev-build/make/Manifest b/dev-build/make/Manifest new file mode 100644 index 000000000000..92e03015a409 --- /dev/null +++ b/dev-build/make/Manifest @@ -0,0 +1,11 @@ +AUX make-3.82-darwin-library_search-dylib.patch 394 BLAKE2B abd83733bc3036e412a57e0ced927511f45b9308f77d759ab299a5fc7fd76e81346cb4b908513ab20bc4aa931d436dbd4b3cd8cd0f5b05f94816569830589ce8 SHA512 32728cda66093f813e2731e120d71befa71e97e57a908503f60f79fd400e9fe0766f72d0c2ed065def1ea3a36a03b67d189dbff474728f41622489f1c3a515cb +AUX make-4.2-default-cxx.patch 212 BLAKE2B 16ab647e54b27b2be8fe3b8abc37940690e828a1f68a21856377dec4b282ef489246f5de7c2b364654327166fb9b3f2a0dae755dc15db786c607c6d7f1fd76d1 SHA512 9b9be230f8c74ee438851d1c10409ebd188f818d04e99b799a353fc26c2da78d2e298b907287ceece7b6e64f9ac0908ae65e33c35634b9338b246225b63cb409 +AUX make-4.4-default-cxx.patch 278 BLAKE2B 9b5a0428e37f3abcaa01567302b12e48031b755cd988054464275c5ae255a9c77a507d9772f2124614569a858c820c533a46d859e11813591a6cdea636d74f2a SHA512 f569ebd924d64c95e0d3d7c61daaedb7780cccded83bd73036d56f1ef658497056f95a65c463fe347b14b1d12205507173eaab8cb74205cbcf32bf1a25531f9d +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 +EBUILD make-4.3-r1.ebuild 1747 BLAKE2B d400011552ac97990e4ab92141eac6eacdf6b6b4e3fe48f35fb3b04f2769d22915d5933d02ad0c3eb6c7b23c1b9d6d66744c933506fec4d90cbe39f226627fd7 SHA512 175af2f28a54bbcc0dce211efccf10bd1fa613a6bb66ef8eb7da60c45b00eefcf95ea456852d91552aba36d9b7cce873eb17f9ef3a15606119e56c6203ebf081 +EBUILD make-4.4.1-r1.ebuild 1714 BLAKE2B d010b515fe5419aa7b159955e80100c68c84a7b664165aa752e0487bcaa76dfe8c7208791df65f35b10aa8006c9a1263dbf8156a7874e10cc9d46090a0f5de9b SHA512 bb506c194a84bbb98ad3755605764b9b10549fb07fb335772c61772520ba5ca802fbf9deb1e1790c120f18e60c5eb0af6483fc9c8777c1d02fb5fe9f1a7e0d99 +EBUILD make-9999.ebuild 1722 BLAKE2B d2158bf6ade4e67f4dcee8dbf29204a00a7a850945ff4da79531448244215a642276ccce98dc508ef29b748fb94b5732cfb913ce58c76a9692574c7ad5fa8f7d SHA512 406e5cdb77891197add0f3eb9086f0be0d5a0825abeb58d0c7b5c638583fa2e11cbeec7253defdd0341aa7ecda76e937c6a2ae1638973e4aac67e2026609e147 +MISC metadata.xml 381 BLAKE2B 867fd4a045ef622ccb62c72b7198e205293501d075ec0dca7daf702bacbe2df21ea23aadb4150e42fdc0914a95cab0f48d439c1f7073acf2302bdaf48fa18688 SHA512 66494f08f599035728fa7f87b3f7ca093e3c50dbb694aed8214d1dbbb3d1e03441e6e159b1453709fa8c7da8cc8d73ab2c972517a3506b1fb671533d459c4418 diff --git a/dev-build/make/files/make-3.82-darwin-library_search-dylib.patch b/dev-build/make/files/make-3.82-darwin-library_search-dylib.patch new file mode 100644 index 000000000000..743583b5a0a3 --- /dev/null +++ b/dev-build/make/files/make-3.82-darwin-library_search-dylib.patch @@ -0,0 +1,17 @@ +Fixed default libpatttern on Darwin, imported from prefix overlay. +Got merged upstream: +https://savannah.gnu.org/bugs/?37197 +--- a/src/default.c ++++ b/src/default.c +@@ -509,7 +509,11 @@ + #ifdef __MSDOS__ + ".LIBPATTERNS", "lib%.a $(DJDIR)/lib/lib%.a", + #else ++#ifdef __APPLE__ ++ ".LIBPATTERNS", "lib%.dylib lib%.a", ++#else + ".LIBPATTERNS", "lib%.so lib%.a", ++#endif + #endif + #endif + diff --git a/dev-build/make/files/make-4.2-default-cxx.patch b/dev-build/make/files/make-4.2-default-cxx.patch new file mode 100644 index 000000000000..39e3ee0dd9f9 --- /dev/null +++ b/dev-build/make/files/make-4.2-default-cxx.patch @@ -0,0 +1,11 @@ +--- a/src/default.c ++++ b/src/default.c +@@ -530,7 +530,7 @@ static const char *default_variables[] = + "OBJC", "gcc", + #else + "CC", "cc", +- "CXX", "g++", ++ "CXX", "c++", + "OBJC", "cc", + #endif + diff --git a/dev-build/make/files/make-4.4-default-cxx.patch b/dev-build/make/files/make-4.4-default-cxx.patch new file mode 100644 index 000000000000..4a56df5da2c8 --- /dev/null +++ b/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/dev-build/make/make-4.3-r1.ebuild b/dev-build/make/make-4.3-r1.ebuild new file mode 100644 index 000000000000..55a24ce4609e --- /dev/null +++ b/dev-build/make/make-4.3-r1.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +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 ]] ; 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:= )" +BDEPEND="nls? ( sys-devel/gettext ) + verify-sig? ( sec-keys/openpgp-keys-make )" +RDEPEND="${DEPEND} + nls? ( virtual/libintl )" + +PATCHES=( + "${FILESDIR}"/${PN}-3.82-darwin-library_search-dylib.patch + "${FILESDIR}"/${PN}-4.2-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/dev-build/make/make-4.4.1-r1.ebuild b/dev-build/make/make-4.4.1-r1.ebuild new file mode 100644 index 000000000000..61fbc91f243f --- /dev/null +++ b/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/dev-build/make/make-9999.ebuild b/dev-build/make/make-9999.ebuild new file mode 100644 index 000000000000..2be7d7adb832 --- /dev/null +++ b/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/dev-build/make/metadata.xml b/dev-build/make/metadata.xml new file mode 100644 index 000000000000..068fc3567c55 --- /dev/null +++ b/dev-build/make/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>base-system@gentoo.org</email> + <name>Gentoo Base System</name> + </maintainer> + <upstream> + <remote-id type="cpe">cpe:/a:gnu:make</remote-id> + <remote-id type="savannah">make</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-build/ninja/Manifest b/dev-build/ninja/Manifest new file mode 100644 index 000000000000..8a2107651fc3 --- /dev/null +++ b/dev-build/ninja/Manifest @@ -0,0 +1,7 @@ +AUX ninja-cflags.patch 738 BLAKE2B ec025836197d41d96cfcab0a7363ab3bda50cb7fc3f91f096ccfaa16babdc353269738aef92e68a261f43ba617720f677766f7044acb1a01dd7e07d6c9eca13e SHA512 97935accbef92e6eeda7d38bae6978016f4423e3989fcfb13c6de55644133ddef43db49811fc85d2649d68473d8b81e1bfb70f59a5e63d2607741d90152a4f42 +DIST ninja-1.11.1.tar.gz 229479 BLAKE2B c96cf7c319b7abd65f644465688d256f8b3a576c4616d0c63852e25dd0dc5f63c66708d429d8dddb6228502eb147211a86a5dd369b80ec2228902b370d2343e5 SHA512 1bca38877c70ee6613f347ffccef5adc02ba0a3947c62ae004ea97f918442b5a3de92378e4f820ae2a7676bc7609d25fbc7d41f6cfb3a61e5e4b26ec3639e403 +EBUILD ninja-1.11.1-r2.ebuild 2543 BLAKE2B 5a7e075acc0c1fe74efd1c67663cf6a227a98418278061ddad90bb448d17d1834d64ee3d508ea31fef27e2c529de9f46ec71769725cb8c61252a6aba62abb408 SHA512 ec33e4c178f8f13c80822568cd531d06d616e1c6484ba20741aff4c65b6deb439cdd1f1c205a1b82a6d8873e38145f6ee3624303fd703ab577d09557a26f5177 +EBUILD ninja-1.11.1-r3.ebuild 2699 BLAKE2B aa8a3d1a893ea4a1130c2658a1785d951411f37a23ef4443a97514dd82fbf9c3c3e2ba5e982074be8ba8c30c6be4ccfe4006048f868f70651994f3614b55c0dd SHA512 019bae6f9580ef5c4bbc9c6c9300df60ba88b1717b9b89b695e40ffb8a334699c98263fc8691ef7f95c84a16f2e07e41c43dc9109baef6e2b6d502bc96a8ce6e +EBUILD ninja-1.11.1-r4.ebuild 2409 BLAKE2B 58291c8571d0c167dbcc15129849ab879158e74d65f19757ccdf24ffec8731e101d9043122474e0fb96bb2ca0f13dd2bf6bc1873f03be06dbf8f3c0abf28e951 SHA512 050421b837e12b8a2cd03f4bf83cbfa5c5c9623dea85f87945faef884ac4f118fbe193faf5302212428dcfe8ce569b416da3c033994521e019d8d3f3d14f24e4 +EBUILD ninja-9999.ebuild 2409 BLAKE2B 58291c8571d0c167dbcc15129849ab879158e74d65f19757ccdf24ffec8731e101d9043122474e0fb96bb2ca0f13dd2bf6bc1873f03be06dbf8f3c0abf28e951 SHA512 050421b837e12b8a2cd03f4bf83cbfa5c5c9623dea85f87945faef884ac4f118fbe193faf5302212428dcfe8ce569b416da3c033994521e019d8d3f3d14f24e4 +MISC metadata.xml 463 BLAKE2B 4094365ee9f5db41a29df26eada46bc42050da4043003bc265733666475d950df0b53cc475585b5d0ad79a1b9cbe83a53076911e564960d21568479e52bc4b33 SHA512 2d08b1e9f5377ba2d1976093fc9a3a9ceec51e80a7473e3d80e536585d1adb21c90d954205b97dd063dc99fe60b7b0c5335a16e05d0a2fa79e951c4833697880 diff --git a/dev-build/ninja/files/ninja-cflags.patch b/dev-build/ninja/files/ninja-cflags.patch new file mode 100644 index 000000000000..0c4ef2813bb7 --- /dev/null +++ b/dev-build/ninja/files/ninja-cflags.patch @@ -0,0 +1,25 @@ +From e4530769ef6a497f8f5f06159f6be049dc20e2ea Mon Sep 17 00:00:00 2001 +From: Mike Gilbert <floppym@gentoo.org> +Date: Thu, 19 Mar 2020 11:21:29 -0400 +Subject: [PATCH] Avoid adding -O2 -DNDEBUG to cflags + +--- + configure.py | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/configure.py b/configure.py +index 7d8ce90..7566147 100755 +--- a/configure.py ++++ b/configure.py +@@ -344,8 +344,6 @@ else: + if options.debug: + cflags += ['-D_GLIBCXX_DEBUG', '-D_GLIBCXX_DEBUG_PEDANTIC'] + cflags.remove('-fno-rtti') # Needed for above pedanticness. +- else: +- cflags += ['-O2', '-DNDEBUG'] + try: + proc = subprocess.Popen( + [CXX, '-fdiagnostics-color', '-c', '-x', 'c++', '/dev/null', +-- +2.25.1 + diff --git a/dev-build/ninja/metadata.xml b/dev-build/ninja/metadata.xml new file mode 100644 index 000000000000..674485d1018e --- /dev/null +++ b/dev-build/ninja/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>base-system@gentoo.org</email> + <name>Gentoo Base System</name> + </maintainer> + <maintainer type="project"> + <email>chromium@gentoo.org</email> + <name>Chromium in Gentoo Project</name> + </maintainer> + <upstream> + <remote-id type="github">ninja-build/ninja</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-build/ninja/ninja-1.11.1-r2.ebuild b/dev-build/ninja/ninja-1.11.1-r2.ebuild new file mode 100644 index 000000000000..0cb89335a647 --- /dev/null +++ b/dev-build/ninja/ninja-1.11.1-r2.ebuild @@ -0,0 +1,127 @@ +# Copyright 2012-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) + +inherit edo bash-completion-r1 elisp-common flag-o-matic python-any-r1 toolchain-funcs + +if [[ ${PV} == 9999 ]]; then + EGIT_REPO_URI="https://github.com/ninja-build/ninja.git" + inherit git-r3 +else + SRC_URI="https://github.com/ninja-build/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + 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 + +DESCRIPTION="A small build system similar to make" +HOMEPAGE="https://ninja-build.org/" + +LICENSE="Apache-2.0" +SLOT="0" + +IUSE="doc emacs test" +RESTRICT="!test? ( test )" + +BDEPEND=" + ${PYTHON_DEPS} + dev-util/re2c + doc? ( + app-text/asciidoc + app-text/doxygen + dev-libs/libxslt + media-gfx/graphviz + ) + test? ( dev-cpp/gtest ) +" +RDEPEND="emacs? ( >=app-editors/emacs-23.1:* )" + +PATCHES=( + "${FILESDIR}"/ninja-cflags.patch +) + +run_for_build() { + if tc-is-cross-compiler; then + local -x AR=$(tc-getBUILD_AR) + local -x CXX=$(tc-getBUILD_CXX) + local -x CFLAGS= + local -x CXXFLAGS=${BUILD_CXXFLAGS} + local -x LDFLAGS=${BUILD_LDFLAGS} + fi + echo "$@" >&2 + "$@" +} + +src_compile() { + tc-export AR CXX + + # configure.py appends CFLAGS to CXXFLAGS + unset CFLAGS + + append-lfs-flags + + run_for_build ${EPYTHON} configure.py --bootstrap --verbose || die + + if tc-is-cross-compiler; then + mv ninja ninja-build || die + ${EPYTHON} configure.py || die + ./ninja-build -v ninja || die + else + ln ninja ninja-build || die + fi + + if use doc; then + ./ninja-build -v doxygen manual || die + fi + + if use emacs; then + elisp-compile misc/ninja-mode.el || die + fi +} + +src_test() { + if ! tc-is-cross-compiler; then + # Bug 485772 + ulimit -n 2048 + edo ./ninja -v ninja_test + edo ./ninja_test + fi +} + +src_install() { + dodoc README.md CONTRIBUTING.md + + if use doc; then + docinto html + dodoc -r doc/doxygen/html/. + dodoc doc/manual.html + fi + + dobin ninja + + newbashcomp misc/bash-completion ${PN} + + insinto /usr/share/vim/vimfiles/syntax/ + doins misc/ninja.vim + + echo 'au BufNewFile,BufRead *.ninja set ft=ninja' > "${T}"/ninja.vim || die + insinto /usr/share/vim/vimfiles/ftdetect + doins "${T}"/ninja.vim + + insinto /usr/share/zsh/site-functions + newins misc/zsh-completion _ninja + + if use emacs; then + cd misc || die + elisp-install ninja ninja-mode.el* || die + fi +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/dev-build/ninja/ninja-1.11.1-r3.ebuild b/dev-build/ninja/ninja-1.11.1-r3.ebuild new file mode 100644 index 000000000000..2ca427037c35 --- /dev/null +++ b/dev-build/ninja/ninja-1.11.1-r3.ebuild @@ -0,0 +1,131 @@ +# Copyright 2012-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) + +inherit edo bash-completion-r1 elisp-common flag-o-matic python-any-r1 toolchain-funcs + +if [[ ${PV} == 9999 ]]; then + EGIT_REPO_URI="https://github.com/ninja-build/ninja.git" + inherit git-r3 +else + SRC_URI="https://github.com/ninja-build/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + 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 + +DESCRIPTION="A small build system similar to make" +HOMEPAGE="https://ninja-build.org/" + +LICENSE="Apache-2.0" +SLOT="0" + +IUSE="doc emacs test" +RESTRICT="!test? ( test )" + +BDEPEND=" + ${PYTHON_DEPS} + dev-util/re2c + doc? ( + app-text/asciidoc + app-text/doxygen + dev-libs/libxslt + media-gfx/graphviz + ) + test? ( dev-cpp/gtest ) +" +RDEPEND="emacs? ( >=app-editors/emacs-23.1:* )" +PDEPEND="app-alternatives/ninja" + +PATCHES=( + "${FILESDIR}"/ninja-cflags.patch +) + +run_for_build() { + if tc-is-cross-compiler; then + local -x AR=$(tc-getBUILD_AR) + local -x CXX=$(tc-getBUILD_CXX) + local -x CFLAGS= + local -x CXXFLAGS=${BUILD_CXXFLAGS} + local -x LDFLAGS=${BUILD_LDFLAGS} + fi + echo "$@" >&2 + "$@" +} + +src_compile() { + tc-export AR CXX + + # configure.py appends CFLAGS to CXXFLAGS + unset CFLAGS + + append-lfs-flags + + run_for_build ${EPYTHON} configure.py --bootstrap --verbose || die + + if tc-is-cross-compiler; then + mv ninja ninja-build || die + ${EPYTHON} configure.py || die + ./ninja-build -v ninja || die + else + ln ninja ninja-build || die + fi + + if use doc; then + ./ninja-build -v doxygen manual || die + fi + + if use emacs; then + elisp-compile misc/ninja-mode.el || die + fi +} + +src_test() { + if ! tc-is-cross-compiler; then + # Bug 485772 + ulimit -n 2048 + edo ./ninja -v ninja_test + edo ./ninja_test + fi +} + +src_install() { + dodoc README.md CONTRIBUTING.md + + if use doc; then + docinto html + dodoc -r doc/doxygen/html/. + dodoc doc/manual.html + fi + + newbin ninja ninja-reference + + newbashcomp misc/bash-completion ${PN} + + insinto /usr/share/vim/vimfiles/syntax/ + doins misc/ninja.vim + + echo 'au BufNewFile,BufRead *.ninja set ft=ninja' > "${T}"/ninja.vim || die + insinto /usr/share/vim/vimfiles/ftdetect + doins "${T}"/ninja.vim + + insinto /usr/share/zsh/site-functions + newins misc/zsh-completion _ninja + + if use emacs; then + cd misc || die + elisp-install ninja ninja-mode.el* || die + fi +} + +pkg_postinst() { + use emacs && elisp-site-regen + if ! [[ -e "${EROOT}/usr/bin/ninja" ]]; then + ln -s ninja-reference "${EROOT}/usr/bin/ninja" || die + fi +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/dev-build/ninja/ninja-1.11.1-r4.ebuild b/dev-build/ninja/ninja-1.11.1-r4.ebuild new file mode 100644 index 000000000000..4a9cf1f32132 --- /dev/null +++ b/dev-build/ninja/ninja-1.11.1-r4.ebuild @@ -0,0 +1,117 @@ +# Copyright 2012-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) + +inherit edo bash-completion-r1 flag-o-matic python-any-r1 toolchain-funcs + +if [[ ${PV} == 9999 ]]; then + EGIT_REPO_URI="https://github.com/ninja-build/ninja.git" + inherit git-r3 +else + SRC_URI="https://github.com/ninja-build/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + 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 + +DESCRIPTION="A small build system similar to make" +HOMEPAGE="https://ninja-build.org/" + +LICENSE="Apache-2.0" +SLOT="0" +IUSE="doc test" +RESTRICT="!test? ( test )" + +BDEPEND=" + ${PYTHON_DEPS} + dev-util/re2c + doc? ( + app-text/asciidoc + app-text/doxygen + dev-libs/libxslt + media-gfx/graphviz + ) + test? ( dev-cpp/gtest ) +" +PDEPEND=" + app-alternatives/ninja +" + +PATCHES=( + "${FILESDIR}"/ninja-cflags.patch +) + +run_for_build() { + if tc-is-cross-compiler; then + local -x AR=$(tc-getBUILD_AR) + local -x CXX=$(tc-getBUILD_CXX) + local -x CFLAGS= + local -x CXXFLAGS=${BUILD_CXXFLAGS} + local -x LDFLAGS=${BUILD_LDFLAGS} + fi + echo "$@" >&2 + "$@" +} + +src_compile() { + tc-export AR CXX + + # configure.py appends CFLAGS to CXXFLAGS + unset CFLAGS + + append-lfs-flags + + run_for_build ${EPYTHON} configure.py --bootstrap --verbose || die + + if tc-is-cross-compiler; then + mv ninja ninja-build || die + ${EPYTHON} configure.py || die + ./ninja-build -v ninja || die + else + ln ninja ninja-build || die + fi + + if use doc; then + ./ninja-build -v doxygen manual || die + fi +} + +src_test() { + if ! tc-is-cross-compiler; then + # Bug 485772 + ulimit -n 2048 + edo ./ninja -v ninja_test + edo ./ninja_test + fi +} + +src_install() { + dodoc README.md CONTRIBUTING.md + + if use doc; then + docinto html + dodoc -r doc/doxygen/html/. + dodoc doc/manual.html + fi + + newbin ninja ninja-reference + + newbashcomp misc/bash-completion ${PN} + + insinto /usr/share/vim/vimfiles/syntax/ + doins misc/ninja.vim + + echo 'au BufNewFile,BufRead *.ninja set ft=ninja' > "${T}"/ninja.vim || die + insinto /usr/share/vim/vimfiles/ftdetect + doins "${T}"/ninja.vim + + insinto /usr/share/zsh/site-functions + newins misc/zsh-completion _ninja +} + +pkg_postinst() { + if ! [[ -e "${EROOT}/usr/bin/ninja" ]]; then + ln -s ninja-reference "${EROOT}/usr/bin/ninja" || die + fi +} diff --git a/dev-build/ninja/ninja-9999.ebuild b/dev-build/ninja/ninja-9999.ebuild new file mode 100644 index 000000000000..4a9cf1f32132 --- /dev/null +++ b/dev-build/ninja/ninja-9999.ebuild @@ -0,0 +1,117 @@ +# Copyright 2012-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) + +inherit edo bash-completion-r1 flag-o-matic python-any-r1 toolchain-funcs + +if [[ ${PV} == 9999 ]]; then + EGIT_REPO_URI="https://github.com/ninja-build/ninja.git" + inherit git-r3 +else + SRC_URI="https://github.com/ninja-build/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + 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 + +DESCRIPTION="A small build system similar to make" +HOMEPAGE="https://ninja-build.org/" + +LICENSE="Apache-2.0" +SLOT="0" +IUSE="doc test" +RESTRICT="!test? ( test )" + +BDEPEND=" + ${PYTHON_DEPS} + dev-util/re2c + doc? ( + app-text/asciidoc + app-text/doxygen + dev-libs/libxslt + media-gfx/graphviz + ) + test? ( dev-cpp/gtest ) +" +PDEPEND=" + app-alternatives/ninja +" + +PATCHES=( + "${FILESDIR}"/ninja-cflags.patch +) + +run_for_build() { + if tc-is-cross-compiler; then + local -x AR=$(tc-getBUILD_AR) + local -x CXX=$(tc-getBUILD_CXX) + local -x CFLAGS= + local -x CXXFLAGS=${BUILD_CXXFLAGS} + local -x LDFLAGS=${BUILD_LDFLAGS} + fi + echo "$@" >&2 + "$@" +} + +src_compile() { + tc-export AR CXX + + # configure.py appends CFLAGS to CXXFLAGS + unset CFLAGS + + append-lfs-flags + + run_for_build ${EPYTHON} configure.py --bootstrap --verbose || die + + if tc-is-cross-compiler; then + mv ninja ninja-build || die + ${EPYTHON} configure.py || die + ./ninja-build -v ninja || die + else + ln ninja ninja-build || die + fi + + if use doc; then + ./ninja-build -v doxygen manual || die + fi +} + +src_test() { + if ! tc-is-cross-compiler; then + # Bug 485772 + ulimit -n 2048 + edo ./ninja -v ninja_test + edo ./ninja_test + fi +} + +src_install() { + dodoc README.md CONTRIBUTING.md + + if use doc; then + docinto html + dodoc -r doc/doxygen/html/. + dodoc doc/manual.html + fi + + newbin ninja ninja-reference + + newbashcomp misc/bash-completion ${PN} + + insinto /usr/share/vim/vimfiles/syntax/ + doins misc/ninja.vim + + echo 'au BufNewFile,BufRead *.ninja set ft=ninja' > "${T}"/ninja.vim || die + insinto /usr/share/vim/vimfiles/ftdetect + doins "${T}"/ninja.vim + + insinto /usr/share/zsh/site-functions + newins misc/zsh-completion _ninja +} + +pkg_postinst() { + if ! [[ -e "${EROOT}/usr/bin/ninja" ]]; then + ln -s ninja-reference "${EROOT}/usr/bin/ninja" || die + fi +} diff --git a/dev-build/pmake/Manifest b/dev-build/pmake/Manifest new file mode 100644 index 000000000000..baa89ebf39f6 --- /dev/null +++ b/dev-build/pmake/Manifest @@ -0,0 +1,6 @@ +AUX pmake-1.111.1-ldflags.patch 484 BLAKE2B d94f955c6ec149b7617c26010e7364fe2ad5e88ae39251e2e751eb69a3d60e855783fe621b69c9bc418e0c09b17d95a3247517b3a477ca52b45a2068e18f339a SHA512 10276e6caa4e339a2e7c787ee04dc97187d48cf433cd6148ec5451ae055d638f79c8d8950c94fe84cdffa02b20519423272f09a6ee669ab026db861442051849 +AUX pmake-1.98-skipdots.patch 513 BLAKE2B 03f63f698b3d147dc0d1df0140f40657cecd445d7c7659f18369e5fa541b0370ced4cddafd27639149aa93053440f7d43b715baf1893cf4613ba15fe6820bdc9 SHA512 ccd751cca406abdb763f251c147f7b7efd7b001e415bc8c98a4fa8069420b64c3a5819b4abd5f174606390f903f8cba5e560e02a14519619713da26ab52c54ad +DIST pmake_1.111-3.3.debian.tar.gz 31648 BLAKE2B 31aca433bbeac4275d4c2af0cfd33ef81b0086b0dec107edfc1fba55b15480367ebf62abccd6e2e48f0c7ccc25c59f0b07eed7ac950a5037b73c267b066a9638 SHA512 b22a1d9e371712732f196d91ac3eb9239fa98ee8ee05754576e7a5878cab88976cb10bb6be90706df5ac738373f519468403c23f6a3ff3860a2968b3222a66ed +DIST pmake_1.111.orig.tar.gz 264383 BLAKE2B 54dd510251441b54c9f5d7f6061109b0222191b3acdded1394b51b72b87bbd4255edd80fab46976d92c58929693b6809a9f2c4f001cab8c9cdaabfac9f3adac9 SHA512 ad48708ea014d6a38ad36303504c52992b51a1e815564f1710849d859b1fc3cd58c4a1a71f54ec902c9b69112e9cd1e1a64282ff738439cdb209a4f75c364c22 +EBUILD pmake-1.111.3.3-r1.ebuild 1865 BLAKE2B f49aae1172503c150ed7e1d91f6bf37e7e630fc21698f3ebe0923035ca49213d3b483526f87ab39b8042efaee0b27a770c00ec0c5eb69d0bd986122f6429cfa8 SHA512 764c815daee90a764bd7cbc2832137b99a77ae3baeda3e5f73c6b2733c3dd3073d59935b0a163786d07cb26550de996eaffd981cf738d92deba20733e1e28cdb +MISC metadata.xml 167 BLAKE2B 868e3b584722eaacf68273db062bb773d8c7e5d7ab2b81ca7e8397643bf7cc106c3a1033594401c99c54f667bb45d6b73f9048fc335580bbd44b4589ad26a832 SHA512 30caadd1496c3b9969136038239a1d8e01f236726b4022c2d7e19ca7575f25f735e556835e581afbf44fbd3e4104c40f2b5ef5fa70118d75c881fdf871962d0a diff --git a/dev-build/pmake/files/pmake-1.111.1-ldflags.patch b/dev-build/pmake/files/pmake-1.111.1-ldflags.patch new file mode 100644 index 000000000000..d6047d48994b --- /dev/null +++ b/dev-build/pmake/files/pmake-1.111.1-ldflags.patch @@ -0,0 +1,13 @@ +Index: pmake/Makefile.boot +=================================================================== +--- pmake.orig/Makefile.boot ++++ pmake/Makefile.boot +@@ -36,7 +36,7 @@ LIBOBJ= lst.lib/lstAppend.o lst.lib/lstA + + bmake: ${OBJ} ${LIBOBJ} + # @echo 'make of make and make.0 started.' +- ${CC} ${CFLAGS} ${OBJ} ${LIBOBJ} -o bmake ${LIBS} ++ ${CC} ${LDFLAGS} ${CFLAGS} ${OBJ} ${LIBOBJ} -o bmake ${LIBS} + @ls -l $@ + # nroff -h -man make.1 > make.0 + # @echo 'make of make and make.0 completed.' diff --git a/dev-build/pmake/files/pmake-1.98-skipdots.patch b/dev-build/pmake/files/pmake-1.98-skipdots.patch new file mode 100644 index 000000000000..6783a9799919 --- /dev/null +++ b/dev-build/pmake/files/pmake-1.98-skipdots.patch @@ -0,0 +1,12 @@ +diff -urN pmake-2.0.orig/dir.c pmake-2.0/dir.c +--- pmake-2.0.orig/dir.c 2005-02-08 09:26:28.932978574 -0500 ++++ pmake-2.0/dir.c 2005-02-08 09:36:18.208704201 -0500 +@@ -1528,6 +1528,8 @@ + Hash_InitTable (&p->files, -1); + + while ((dp = readdir (d)) != (struct dirent *) NULL) { ++ if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, "..")) ++ continue; + #if defined(sun) && defined(d_ino) /* d_ino is a sunos4 #define for d_fileno */ + /* + * The sun directory library doesn't check for a 0 inode diff --git a/dev-build/pmake/metadata.xml b/dev-build/pmake/metadata.xml new file mode 100644 index 000000000000..85e4ed814fa2 --- /dev/null +++ b/dev-build/pmake/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<!-- maintainer-needed --> +</pkgmetadata> diff --git a/dev-build/pmake/pmake-1.111.3.3-r1.ebuild b/dev-build/pmake/pmake-1.111.3.3-r1.ebuild new file mode 100644 index 000000000000..edf3149254bb --- /dev/null +++ b/dev-build/pmake/pmake-1.111.3.3-r1.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs linux-info + +MY_P="${PN}-$(ver_cut 1-2)" +DEBIAN_SOURCE="${PN}_$(ver_cut 1-2).orig.tar.gz" +DEBIAN_PATCH="${PN}_$(ver_rs 2 '-').debian.tar.gz" + +DESCRIPTION="BSD build tool to create programs in parallel. Debian's version of NetBSD's make" +HOMEPAGE="http://www.netbsd.org/" +SRC_URI=" + mirror://debian/pool/main/p/pmake/${DEBIAN_SOURCE} + mirror://debian/pool/main/p/pmake/${DEBIAN_PATCH}" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha amd64 arm ~arm64 ~ia64 ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux" + +S="${WORKDIR}/${PN}" + +PATCHES=( + "${WORKDIR}"/debian/patches + + # pmake makes the assumption that . and .. are the first two + # entries in a directory, which doesn't always appear to be the + # case on ext3... (05 Apr 2004 agriffis) + "${FILESDIR}"/${PN}-1.98-skipdots.patch + + # Don't ignore ldflags + "${FILESDIR}"/${PN}-1.111.1-ldflags.patch +) + +src_compile() { + # The following CFLAGS are almost directly from Red Hat 8.0 and + # debian/rules, so assume it's okay to void out the __COPYRIGHT + # and __RCSID. I've checked the source and don't see the point, + # but whatever... (07 Feb 2004 agriffis) + CFLAGS="${CFLAGS} -Wall -Wno-unused -D_GNU_SOURCE \ + -DHAVE_STRERROR -DHAVE_STRDUP -DHAVE_SETENV \ + -D__COPYRIGHT\(x\)= -D__RCSID\(x\)= -I. \ + -DMACHINE=\\\"gentoo\\\" -DMACHINE_ARCH=\\\"$(tc-arch-kernel)\\\" \ + -D_PATH_DEFSHELLDIR=\\\"${EPREFIX}/bin\\\" \ + -D_PATH_DEFSYSPATH=\\\"${EPREFIX}/usr/share/mk\\\" \ + -DHAVE_VSNPRINTF -D_PATH_DEFSYSPATH=\\\"${EPREFIX}/usr/share/mk/${PN}\\\"" + + emake -f Makefile.boot \ + CC="$(tc-getCC)" \ + CFLAGS="${CFLAGS}" +} + +src_install() { + insinto /usr/share/mk/${PN} + doins -r mk/. + + newbin bmake pmake + dobin mkdep + + doman mkdep.1 + newman make.1 pmake.1 + + dodoc PSD.doc/tutorial.ms +} diff --git a/dev-build/remake/Manifest b/dev-build/remake/Manifest new file mode 100644 index 000000000000..e21084811f8d --- /dev/null +++ b/dev-build/remake/Manifest @@ -0,0 +1,4 @@ +AUX remake-4.3.1.1.5-fno-common.patch 2988 BLAKE2B c9d6a4adef35cc51a82b5e625771bede0a13cbca4dfe40483497a9a2bfa6ac0f66c47023ec2d75075cd7c7abde7ccf1bb5eba315bad052ab3d7ac6c263c6ac09 SHA512 509096e2cfa1daefc1a7fd9b69355f21c6fcaf2adf4572bd6742ebb61b5d7ac65c0d8bbc0576c6bb2b3e895bac97d51f1da3008ae15b50e487aa09fe118d8b7a +DIST remake-4.3+dbg-1.5.tar.gz 2546056 BLAKE2B c5c1b254d0533e0d9787d408f79e8aba93cab5185de76519dabef7ddca5c9d2021671099f9ff80df345732552f859ce31d1131b89cd56fb185bae4cee676b412 SHA512 90aa9674ed5d88b72fda5a99a103d0b1a643d10b18c1de1186478b026f6b4da73628bff75a180df880157b5cbfff1bfd782f4ee81880e0635d79113fcc0f7497 +EBUILD remake-4.3.1.1.5.ebuild 1084 BLAKE2B db91ec1185d019c1a4a586c1b917720e2428ad6d234cca005692e5b49d9d157f81daa4c02d7a0a074a26177896438f88c48cad85b7a55f0b08cfcb9582e640f8 SHA512 20fde68f5ddd150e277aa85f51f3750111c2c605c3520abf5bd18a788ca88645a0c2170a4af61f2be10104ed1de6fa37b920492ba07ca422da274e8e4005de38 +MISC metadata.xml 296 BLAKE2B e3146e98a4240740fa3d3089a7e15fa9833e60ec13e6f158b5db2d5ac6f59f98bd5d1c34554d87759eabf4d42376bc3cbfeaab9c5f6e8faed40520cb1e82804d SHA512 e5d3192b7c2ec0bd9e81b3c83449addd1e6cf240637c0ac2dbacadb0d0896d46691b55ad4337a90f35b79649366db012698932b71b0bfd2670eac50d84066d89 diff --git a/dev-build/remake/files/remake-4.3.1.1.5-fno-common.patch b/dev-build/remake/files/remake-4.3.1.1.5-fno-common.patch new file mode 100644 index 000000000000..6c8650472e4e --- /dev/null +++ b/dev-build/remake/files/remake-4.3.1.1.5-fno-common.patch @@ -0,0 +1,103 @@ +Adapted version of https://github.com/rocky/remake/commit/08113a28b9be25cf157ace5d63c2d36d7dbefc04 +--- a/src/debugger/file2line.c ++++ b/src/debugger/file2line.c +@@ -26,6 +26,8 @@ Boston, MA 02111-1307, USA. */ + #include "../src/rule.h" + #include "./file2line.h" + ++struct hash_table file2lines; ++ + unsigned long + file2lines_hash_1 (const void *key) + { +--- a/src/debugger/file2line.h ++++ b/src/debugger/file2line.h +@@ -19,15 +19,15 @@ the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + #ifndef REMAKE_FILE2LINE + #define REMAKE_FILE2LINE +-struct hash_table file2lines; ++extern struct hash_table file2lines; + + typedef enum { + F2L_TARGET, + F2L_PATTERN + } f2l_entry_t; + +- +-typedef struct lineo_array_s ++ ++typedef struct lineo_array_s + { + const char *hname; /**< Name stored in hash table */ + unsigned int size; /**< Number of entries in array */ +@@ -40,13 +40,13 @@ typedef struct lineo_array_s + only. So we do this on demand. + */ + extern bool file2lines_init(void); +-extern file_t *target_for_file_and_line (const char *psz_filename, ++extern file_t *target_for_file_and_line (const char *psz_filename, + unsigned int lineno, + /*out*/ f2l_entry_t *entry_type); + extern void file2lines_dump(void); + #endif + +-/* ++/* + * Local variables: + * eval: (c-set-style "gnu") + * indent-tabs-mode: nil +--- a/src/dep.h ++++ b/src/dep.h +@@ -139,7 +139,7 @@ struct dep *copy_dep_chain (const struct dep *d); + struct goaldep *read_all_makefiles (const char **makefiles); + + /*! The chain of makefiles read by read_makefile. */ +-struct goaldep *read_makefiles; ++extern struct goaldep *read_makefiles; + + void eval_buffer (char *buffer, const gmk_floc *floc); + enum update_status update_goal_chain (struct goaldep *goals); +--- a/src/globals.h ++++ b/src/globals.h +@@ -89,6 +89,6 @@ extern int in_debugger; + extern bool b_debugger_preread; + + /* Remember the original value of the SHELL variable, from the environment. */ +-struct variable shell_var; ++extern struct variable shell_var; + + #endif /*GLOBALS_H*/ +--- a/src/main.c ++++ b/src/main.c +@@ -45,6 +45,8 @@ this program. If not, see <http://www.gnu.org/licenses/>. */ + # include <fcntl.h> + #endif + ++struct goaldep *read_makefiles; ++ + extern void initialize_stopchar_map (); + + #if defined HAVE_WAITPID || defined HAVE_WAIT3 +--- a/src/make.h ++++ b/src/make.h +@@ -324,7 +324,7 @@ extern int unixy_shell; + #endif + #ifdef SET_STACK_SIZE + # include <sys/resource.h> +-struct rlimit stack_limit; ++extern struct rlimit stack_limit; + #endif + + /* We have to have stdarg.h or varargs.h AND v*printf or doprnt to use +--- a/src/print.h ++++ b/src/print.h +@@ -39,7 +39,7 @@ void fatal_err (target_stack_node_t *p_call, const char *fmt, ...); + + /* Think of the below not as an enumeration but as #defines done in a + way that we'll be able to use the value in a gdb. */ +-enum debug_print_enums_e { ++extern enum debug_print_enums_e { + MAX_STACK_SHOW = 1000, + } debug_print_enums1; + diff --git a/dev-build/remake/metadata.xml b/dev-build/remake/metadata.xml new file mode 100644 index 000000000000..17bb5f7f22f9 --- /dev/null +++ b/dev-build/remake/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <!-- maintainer-needed --> + <upstream> + <remote-id type="github">rocky/remake</remote-id> + <remote-id type="sourceforge">bashdb</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-build/remake/remake-4.3.1.1.5.ebuild b/dev-build/remake/remake-4.3.1.1.5.ebuild new file mode 100644 index 000000000000..2ecae49335c2 --- /dev/null +++ b/dev-build/remake/remake-4.3.1.1.5.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +MY_MAKE_BASE=$(ver_cut 1-2) +MY_REMAKE_PATCH=$(ver_cut 4-) +MY_P="${PN}-${MY_MAKE_BASE}+dbg-${MY_REMAKE_PATCH}" + +DESCRIPTION="Patched version of GNU Make with improved error reporting, tracing and debugging" +HOMEPAGE="http://bashdb.sourceforge.net/remake/" +SRC_URI="https://github.com/rocky/remake/releases/download/release_${MY_P/remake-/}/${MY_P}.tar.gz" +S="${WORKDIR}"/${MY_P} + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ppc ~ppc64 ~s390 ~sparc x86" +IUSE="guile readline" + +DEPEND="readline? ( sys-libs/readline:0= )" +RDEPEND="${DEPEND} + guile? ( >=dev-scheme/guile-1.8:= )" +BDEPEND="guile? ( >=dev-scheme/guile-1.8 )" + +PATCHES=( + "${FILESDIR}"/${P}-fno-common.patch +) + +src_configure() { + use readline || export vl_cv_lib_readline=no + econf $(use_with guile) +} + +src_install() { + default + + # delete files GNU make owns and remake doesn't care about. + rm -r "${ED}"/usr/include || die + rm "${ED}"/usr/share/info/make.info* || die +} diff --git a/dev-build/samurai/Manifest b/dev-build/samurai/Manifest new file mode 100644 index 000000000000..1ed454c01d08 --- /dev/null +++ b/dev-build/samurai/Manifest @@ -0,0 +1,5 @@ +AUX samurai-1.2-null_pointer_fix.patch 2089 BLAKE2B f721cec4d42b4826ec52d4e88ee86b907956739f30427eeaee047eef8e59f953c1bcb2fda301cf3a8214c707954cbbb0abf0901c63ec557f4d9cc614962894d1 SHA512 5ead4b0aa47fd9c3bc84cf437744a36a9a1ed21b438883d32ab98b598c98a20561ba46954255553befdb9f46efa4f6251f73342de9000415f09bce63064e52eb +DIST samurai-1.2.tar.gz 32709 BLAKE2B 86ed79f7d6ab492216cf3bf0e19ff8be8c1ca37e5c99de84b457875fa710d720624bd0de53105ed0b1d382c417aeb7397929cb9a35a8d1b36a11e053bf8d7ff5 SHA512 bbe6a582c34b04f1df53b76c1647aa3e03c4698ebf7591a203935f11ffa05971bbcb86dc1a8c06aeb904cdc741abb08918122810fc47216fed0a6d9f87fd1225 +EBUILD samurai-1.2-r2.ebuild 749 BLAKE2B fd215292da69e3afa669e0c51925ea53bd71c81267bde9ac80bd6a55cda1296a3832eae7d59c47ab2ca7472dc7a38948e182abe5e701264bcf5b58a227842dff SHA512 c1d98d5832894a25929e52373dd4596256b283cbd597ea3515f6c4a00c8f17b1fee4e5235e968de122959ecbd63833664d7e89ecf6f08843d9420f048866cad9 +EBUILD samurai-9999.ebuild 667 BLAKE2B d7cd61d295ddd710163d362dd208643574b0784fd1ff77ab6010a72a2fc6ba6ddf9b0f8cc0bca94444899401e7c6c07ac377ebce22827787b5682011456b480e SHA512 dc94ed93d609f510f30d0b15d98fab58da752d08301527b239d693c003a33dae86cbbb45ac16b3b41192b259d3b5df9882001fc0371227dc5cd60d95bb4bd44b +MISC metadata.xml 454 BLAKE2B b3f71bd78021685a69254816df743ace390d3aadeaaf9adb1cdeb5f7c3f567623b863fe87b7b230e45efd65bb74b306e0615081f14d396882197c178eb2f77e7 SHA512 527fa97c53904b68ef8f182d6faf8c18116bf3b60099a1b0152a7326cbb372130bd2de0fda38c7ec66dac6d10dba9af29d50d1b98a12999108eab90cd5ed1b79 diff --git a/dev-build/samurai/files/samurai-1.2-null_pointer_fix.patch b/dev-build/samurai/files/samurai-1.2-null_pointer_fix.patch new file mode 100644 index 000000000000..76ffc8cd350f --- /dev/null +++ b/dev-build/samurai/files/samurai-1.2-null_pointer_fix.patch @@ -0,0 +1,60 @@ +CVE-2021-30218 + CVE-2021-30219 +Bug: https://bugs.gentoo.org/786951 + +Upstream-Commit: https://github.com/michaelforney/samurai/commit/e84b6d99c85043fa1ba54851ee500540ec206918 +From e84b6d99c85043fa1ba54851ee500540ec206918 Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Fri, 2 Apr 2021 17:27:48 -0700 +Subject: [PATCH] util: Check for NULL string in writefile + +This check was there previously, but was removed in f549b757 with +the addition of a check during parse that every rule has rspfile +if and only if it has rspfile_content. However, this fails to +consider the possibility of those variables coming from the edge +or global environment. So, re-add the check. + +Fixes #67 (https://github.com/michaelforney/samurai/issues/67). +--- + util.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/util.c b/util.c +index ea5c3ce..2a59881 100644 +--- a/util.c ++++ b/util.c +@@ -258,7 +258,7 @@ writefile(const char *name, struct string *s) + return -1; + } + ret = 0; +- if (fwrite(s->s, 1, s->n, f) != s->n || fflush(f) != 0) { ++ if (s && (fwrite(s->s, 1, s->n, f) != s->n || fflush(f) != 0)) { + warn("write %s:", name); + ret = -1; + } +Upstream-Commit: https://github.com/michaelforney/samurai/commit/d2af3bc375e2a77139c3a28d6128c60cd8d08655 +From d2af3bc375e2a77139c3a28d6128c60cd8d08655 Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Sun, 4 Apr 2021 03:50:09 -0700 +Subject: [PATCH] parse: Check for non-empty command/rspfile/rspfile_content + +This matches ninja behavior and prevents the possibility of a rule +with an empty (NULL) command string. + +Fixes #68 (https://github.com/michaelforney/samurai/issues/68). +--- + parse.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/parse.c b/parse.c +index f79a5ee..b4b98a1 100644 +--- a/parse.c ++++ b/parse.c +@@ -42,6 +42,8 @@ parserule(struct scanner *s, struct environment *env) + var = scanname(s); + parselet(s, &val); + ruleaddvar(r, var, val); ++ if (!val) ++ continue; + if (strcmp(var, "command") == 0) + hascommand = true; + else if (strcmp(var, "rspfile") == 0) diff --git a/dev-build/samurai/metadata.xml b/dev-build/samurai/metadata.xml new file mode 100644 index 000000000000..f797645e008e --- /dev/null +++ b/dev-build/samurai/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person" proxied="yes"> + <email>orbea@riseup.net</email> + <name>orbea</name> + </maintainer> + <maintainer type="person" proxied="proxy"> + <email>sam@gentoo.org</email> + <name>Sam James</name> + </maintainer> + <upstream> + <remote-id type="github">michaelforney/samurai</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-build/samurai/samurai-1.2-r2.ebuild b/dev-build/samurai/samurai-1.2-r2.ebuild new file mode 100644 index 000000000000..d6584ed27041 --- /dev/null +++ b/dev-build/samurai/samurai-1.2-r2.ebuild @@ -0,0 +1,32 @@ +# Copyright 2021-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="ninja-compatible build tool written in C" +HOMEPAGE="https://github.com/michaelforney/samurai" +if [[ "${PV}" == *9999 ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/michaelforney/samurai.git" +else + SRC_URI="https://github.com/michaelforney/samurai/releases/download/${PV}/${P}.tar.gz" + KEYWORDS="amd64 arm arm64 hppa ppc ppc64 ~riscv sparc x86" +fi + +LICENSE="ISC Apache-2.0 MIT" +SLOT="0" + +PATCHES=( + "${FILESDIR}/${P}-null_pointer_fix.patch" # 786951 +) + +src_compile() { + emake CC="$(tc-getCC)" +} + +src_install() { + emake DESTDIR="${D}" PREFIX="${EPREFIX}"/usr install + dodoc README.md +} diff --git a/dev-build/samurai/samurai-9999.ebuild b/dev-build/samurai/samurai-9999.ebuild new file mode 100644 index 000000000000..ddd44b78fab1 --- /dev/null +++ b/dev-build/samurai/samurai-9999.ebuild @@ -0,0 +1,28 @@ +# Copyright 2021-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="ninja-compatible build tool written in C" +HOMEPAGE="https://github.com/michaelforney/samurai" +if [[ "${PV}" == *9999 ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/michaelforney/samurai.git" +else + SRC_URI="https://github.com/michaelforney/samurai/releases/download/${PV}/${P}.tar.gz" + KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86" +fi + +LICENSE="ISC Apache-2.0 MIT" +SLOT="0" + +src_compile() { + emake CC="$(tc-getCC)" +} + +src_install() { + emake DESTDIR="${D}" PREFIX="${EPREFIX}"/usr install + dodoc README.md +} |