From e9f842f3204d54f212d6b8bde56aaad554042a7b Mon Sep 17 00:00:00 2001 From: Laszlo Valko Date: Wed, 4 Dec 2024 21:24:06 +0100 Subject: [PATCH] Added package sys-devel/autogen. --- sys-devel/autogen/Manifest | 12 ++ sys-devel/autogen/autogen-5.18.16-r4.ebuild | 82 +++++++ .../autogen-5.18.16-FORTIFY_SOURCE.patch | 100 +++++++++ .../files/autogen-5.18.16-configure-c99.patch | 42 ++++ .../files/autogen-5.18.16-guile-3.patch | 38 ++++ .../files/autogen-5.18.16-make-4.3.patch | 19 ++ .../files/autogen-5.18.16-no-werror.patch | 14 ++ .../files/autogen-5.18.16-no-which.patch | 201 ++++++++++++++++++ .../autogen-5.18.16-respect-TMPDIR.patch | 29 +++ .../autogen/files/autogen-5.18.16-rpath.patch | 80 +++++++ sys-devel/autogen/metadata.xml | 14 ++ 11 files changed, 631 insertions(+) create mode 100644 sys-devel/autogen/Manifest create mode 100644 sys-devel/autogen/autogen-5.18.16-r4.ebuild create mode 100644 sys-devel/autogen/files/autogen-5.18.16-FORTIFY_SOURCE.patch create mode 100644 sys-devel/autogen/files/autogen-5.18.16-configure-c99.patch create mode 100644 sys-devel/autogen/files/autogen-5.18.16-guile-3.patch create mode 100644 sys-devel/autogen/files/autogen-5.18.16-make-4.3.patch create mode 100644 sys-devel/autogen/files/autogen-5.18.16-no-werror.patch create mode 100644 sys-devel/autogen/files/autogen-5.18.16-no-which.patch create mode 100644 sys-devel/autogen/files/autogen-5.18.16-respect-TMPDIR.patch create mode 100644 sys-devel/autogen/files/autogen-5.18.16-rpath.patch create mode 100644 sys-devel/autogen/metadata.xml diff --git a/sys-devel/autogen/Manifest b/sys-devel/autogen/Manifest new file mode 100644 index 0000000..4f86f71 --- /dev/null +++ b/sys-devel/autogen/Manifest @@ -0,0 +1,12 @@ +AUX autogen-5.18.16-FORTIFY_SOURCE.patch 3582 BLAKE2B 324cd6455caaf116419cbea323439742e936242dc3e49f5068f0fce4090a13576fb59d43777b0026f1bd720f6dd2a7c8f120e2d8b405d216f7067e6ea2db2fcc SHA512 483d49422b7f724e44d6b1f1fe1216194131121edfa4736b3cf80e9da869ae2624613c0fa4ecccf40120f987eda0d4eba96bfc6243247b444dba8b1bd19bf9ba +AUX autogen-5.18.16-configure-c99.patch 1380 BLAKE2B ec007ffc3052d156e2dfa671cecac363f849f44e51958364967a113ceb79b28cf1bc94e96b8a7432f06878594fbee9b0f6ca40d81135cd8617048f55aeeb1cc2 SHA512 1f1a3f6c720b2bdaaad75fbf4ac3ecf5365df5ed1a60d2dd4248f31b035c7dbe670655f2842b5a6b9459d7f065b2e74ad6e68188cf5a6de37f9bc01b7d77121e +AUX autogen-5.18.16-guile-3.patch 1277 BLAKE2B 18aea6b2da8afc14c37ad6dc6b21eafcf76a93715c399a167237d653aa133879093c6b0c430f28941db8f2b5c5760b9c9586a19836e9692cd080afb9c4e0efac SHA512 a006bcd4dd496274894f7d57c8884171a370fb1fd59bf2e61478c5848b3f3a2dedcda2e01a3f70a4904036ee097d570491065d1f2bf18bcb2ce7525727e17689 +AUX autogen-5.18.16-make-4.3.patch 814 BLAKE2B 53c823c59d4c896881593190fa27242bc90cc47412ca79fa58a29ecebd6ba1f201aafca7262c7eec30749e684148ae845fb1db1f8687b15b9a332e12462a12a0 SHA512 27489e5fd3a9df979a43c479d30e8566e863cd70d20ebf5788582aeaf8144912b7153f42f8df7156cd11b21ab849ff984f5042667500ee041af76de85a8eea3e +AUX autogen-5.18.16-no-werror.patch 738 BLAKE2B f6228e7eb39cbdffae794d62e352ee0b3bee7a60f46ef31585838fc24ac85a8dac813aa698670f0d94fc1767add8b083c646dd89c56527c2e3765fac0d61f51c SHA512 ecf7f910957bface75eb2b828c5ba90b49c205183ea9242c2f47907fbf6bfd1154b4dc1d2ed0fef8bbf3c8f01d05bfa1450ecdef73786ff0292bbfdd904bd193 +AUX autogen-5.18.16-no-which.patch 6158 BLAKE2B 7a92cd282bade9b83c3e08af8c3ae3abdffa3532052e1f00ecb955a067a6a4586514cb5409f6fff364df64d816f8a6f0b624c6eac26e80324fc6ca9a0013df48 SHA512 2250b0f200cb23b4d11803d184321fc0959d0b5227f9bf3d405456c1a80fbb3fdbe46f075a2bcce70f9cc21f30074554cf1f36532ceb2832a47b891efeaf91a7 +AUX autogen-5.18.16-respect-TMPDIR.patch 824 BLAKE2B de70fb423955fc006ef10765ab5d534a02ff4e0d47bb29ab47706edf0e00cad241e8e51fd60aef2168181fce7b2af2623c4c1f163f8ef98ad09efa3c6488edd7 SHA512 9a37cb7c6703ffc24bd5f839f9d466db0fa92ce830d136f34594000863a1ade0d124d7aa4ef47baf411b0473ede65a8dd1f82d0e7fd7bb2713e003dfbf9437de +AUX autogen-5.18.16-rpath.patch 2990 BLAKE2B 8374f788feee898f35f6baae40d0a42a0426b757572217bdfaefe8b3fc308e7c3b29d41a6dd4db77677c208702cd836ac58a463814624bc965b71c8b5613935b SHA512 3279567863152a2874d64be1cae8129dfaa9d67612e6f2d3c0de408914ea5b2d19e037ade460393fd942d897776906fe5df483a69255c4f279c13893a6cec1fd +DIST autogen-5.18.16-gnulib-3b57ddee0acffd23cc51bc8910a15cf879f90619-lib-verify.h 11231 BLAKE2B 4f38f6ae84cf5cc4ba47d8a7da3b38b06f58e30ac8b70f2b10936cbb7a775179b67f22ca8e636588515c4ace7410f98835218e3222d4a793378cdafc4aa84d0f SHA512 b8ff80fd764a3f21040b0054e71a443e3d9ec18dd631843f2de999aa54776964b36366b35fd158dbbe5f2ece146fab12c6ff5008e18c52188b718c89972f867b +DIST autogen-5.18.16.tar.xz 1046276 BLAKE2B 23f9e0948f24ada715fb2bcbbfecba768cf51d169ea3ff4724a97b18f598d2d7fb2ffa7e23919ec8dcc0e352f9d3280f3740dab279a0af1412919cf10c6cb0bf SHA512 5f12c982dbe27873f5649a96049bf019ff183c90cc0c8a9196556b0ca02e72940cd422f6d6601f68cc7d8763b1124f2765c3b1a6335fc92ba07f84b03d2a53a1 +EBUILD autogen-5.18.16-r4.ebuild 2308 BLAKE2B d71e9838a0becaf92ccb1fa53fd8a926d96dc1a2c5f65532de326685265aff32249e92ecffa44bb8b7c5912826f6b0a09f24c281529d0ad4c29b005c05febc72 SHA512 372a512b35105b107cfa009f64c0147797a96104592521fad824f255b0d62be41a27c2a96b3d36a7821498981e3f631c52367d1b95e1e49e8283bd4156aacfc5 +MISC metadata.xml 465 BLAKE2B d749ac3e74b39a006006e3f8d09ca2e8dd392f05385ffaf4d4d4cc95af4571c48e6ff6383e5f582ed6158d3536c9d9447c8f9587a8dc8ad9bce3ea3d5f8b2b5a SHA512 da4398891bf5ddd30545e5ca15b1591da5126d0ae22d00a5d5851864351c43465e6eac9010a9e35a029eb3009727fcd3264cb4fa87fd1f6545639f90b9cf2a47 diff --git a/sys-devel/autogen/autogen-5.18.16-r4.ebuild b/sys-devel/autogen/autogen-5.18.16-r4.ebuild new file mode 100644 index 0000000..6cf60c1 --- /dev/null +++ b/sys-devel/autogen/autogen-5.18.16-r4.ebuild @@ -0,0 +1,82 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic autotools toolchain-funcs + +DESCRIPTION="Program and text file generation" +HOMEPAGE="https://www.gnu.org/software/autogen/" +SRC_URI=" + mirror://gnu/${PN}/rel${PV}/${P}.tar.xz + https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f=lib/verify.h;h=3b57ddee0acffd23cc51bc8910a15cf879f90619;hb=537a5511ab0b1326e69b32f87593a50aedb8a589 -> ${P}-gnulib-3b57ddee0acffd23cc51bc8910a15cf879f90619-lib-verify.h +" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" +IUSE="libopts static-libs" + +RDEPEND=" + >=dev-scheme/guile-2.0:= + dev-libs/libxml2 +" +DEPEND="${RDEPEND}" + +# We don't pass the flag explicitly, bug #796776. +# Let's fix it upstream after next autogen release if it happens. +QA_CONFIGURE_OPTIONS+=" --enable-snprintfv-convenience" + +QA_CONFIG_IMPL_DECL_SKIP+=( + # libgen.h is legacy and linux doesn't include -lgen nor nonstandard + # functions. bug #924961 + pathfind +) + +PATCHES=( + "${FILESDIR}"/${PN}-5.18.16-no-werror.patch + "${FILESDIR}"/${PN}-5.18.16-rpath.patch + "${FILESDIR}"/${PN}-5.18.16-respect-TMPDIR.patch + "${FILESDIR}"/${PN}-5.18.16-make-4.3.patch + "${FILESDIR}"/${PN}-5.18.16-guile-3.patch + "${FILESDIR}"/${PN}-5.18.16-configure-c99.patch + "${FILESDIR}"/${PN}-5.18.16-FORTIFY_SOURCE.patch + "${FILESDIR}"/${PN}-5.18.16-no-which.patch +) + +src_prepare() { + default + + # missing tarball file + cp "${DISTDIR}"/${P}-gnulib-3b57ddee0acffd23cc51bc8910a15cf879f90619-lib-verify.h autoopts/verify.h || die + + # May be able to drop this on next release (>5.18.16) + eautoreconf +} + +src_configure() { + # suppress possibly incorrect -R flag + export ag_cv_test_ldflags= + + # autogen requires run-time sanity of regex and string functions. + # Use defaults of linux-glibc until we need somethig more advanced. + if tc-is-cross-compiler ; then + export ag_cv_run_strcspn=no + export libopts_cv_with_libregex=yes + fi + + # bug 920174 + use elibc_musl && append-cppflags -D_LARGEFILE64_SOURCE + + econf $(use_enable static-libs static) +} + +src_install() { + default + + find "${ED}" -name '*.la' -delete || die + + if ! use libopts ; then + rm "${ED}"/usr/share/autogen/libopts-*.tar.gz || die + fi +} diff --git a/sys-devel/autogen/files/autogen-5.18.16-FORTIFY_SOURCE.patch b/sys-devel/autogen/files/autogen-5.18.16-FORTIFY_SOURCE.patch new file mode 100644 index 0000000..b8108c1 --- /dev/null +++ b/sys-devel/autogen/files/autogen-5.18.16-FORTIFY_SOURCE.patch @@ -0,0 +1,100 @@ +https://bugs.gentoo.org/889394 +https://sourceforge.net/p/autogen/bugs/212/ +https://bugzilla.redhat.com/2173623 +https://siddhesh.in/posts/that-is-not-a-number-that-is-a-freed-object.html +https://gcc.gnu.org/PR105217 +https://src.fedoraproject.org/rpms/autogen/blob/684b717191dd8bcd4e01a7775e62d50bc41b8ccb/f/autogen-fortify.patch + +commit 772b282a4e858a27af610bcdcc8b66925cbf1a83 +Author: Tomas Korbar +Date: Tue Feb 28 16:08:13 2023 +0100 + + avoid GCC code analysis bug + +--- a/agen5/defLoad.c ++++ b/agen5/defLoad.c +@@ -448,17 +448,28 @@ read_defs(void) + FILE * fp; + def_input_mode_t in_mode = ready_def_input(&def_fname, &data_sz); + ++ /* ++ * "ready_def_input" has a lot of side effects. It's possible that ++ * there are no definitions, so "in_mode" is set to DONE and there's ++ * nothing to do. ++ */ + if (in_mode == INPUT_DONE) + return; + + /* + * Allocate the space we need for our definitions. ++ * "data_sz" was set by read_def_input to the size of the ++ * definitions file (or 4096 if we're reading from a fifo file). ++ * In that alternate case, we'll start the input size at 4096 bytes. ++ * The allocation includes space for context and a NUL byte or two + */ +- rem_sz = data_sz+4+sizeof(*base_ctx); +- base_ctx = (scan_ctx_t *)AGALOC(rem_sz, "file buf"); +- memset(VOIDP(base_ctx), 0, rem_sz); ++ { ++ size_t sz = data_sz + sizeof(long) + sizeof(*base_ctx); ++ base_ctx = (scan_ctx_t *)AGALOC(sz, "file buf"); ++ memset(VOIDP(base_ctx), 0, sz); ++ } + base_ctx->scx_line = 1; +- rem_sz = data_sz; ++ rem_sz = data_sz; // size available for storing def text + + /* + * Our base context will have its currency pointer set to this +@@ -482,6 +493,9 @@ read_defs(void) + if (fp == NULL) + AG_CANT(READ_DEF_OPEN, def_fname); + ++ /* ++ * If we're emitting dependency information, then do so. ++ */ + if (dep_fp != NULL) + add_source_file(def_fname); + } +@@ -516,8 +530,7 @@ read_defs(void) + * See if there is any space left + */ + if (rem_sz == 0) { +- scan_ctx_t * p; +- off_t dataOff; ++ off_t scan_off; + + /* + * IF it is a regular file, then we are done +@@ -527,24 +540,16 @@ read_defs(void) + + /* + * We have more data and we are out of space. +- * Try to reallocate our input buffer. ++ * AGREALOC will succeed or not return. + */ + data_sz += (rem_sz = 0x1000); +- dataOff = data - base_ctx->scx_data; +- p = AGREALOC(VOIDP(base_ctx), data_sz + 4 + sizeof(*base_ctx), +- "expand f buf"); ++ scan_off = data - base_ctx->scx_data; ++ base_ctx = AGREALOC(VOIDP(base_ctx), data_sz + 4 + sizeof(*base_ctx), ++ "expand f buf"); + +- /* +- * The buffer may have moved. Set the data pointer at an +- * offset within the new buffer and make sure our base pointer +- * has been corrected as well. +- */ +- if (p != base_ctx) { +- p->scx_scan = \ +- p->scx_data = (char *)(p + 1); +- data = p->scx_data + dataOff; +- base_ctx = p; +- } ++ base_ctx->scx_scan = \ ++ base_ctx->scx_data = (char *)(base_ctx + 1); ++ data = base_ctx->scx_data + scan_off; + } + } + diff --git a/sys-devel/autogen/files/autogen-5.18.16-configure-c99.patch b/sys-devel/autogen/files/autogen-5.18.16-configure-c99.patch new file mode 100644 index 0000000..75e2e76 --- /dev/null +++ b/sys-devel/autogen/files/autogen-5.18.16-configure-c99.patch @@ -0,0 +1,42 @@ +https://bugs.gentoo.org/898590 +https://src.fedoraproject.org/rpms/autogen/c/7d157d98e73dcd1602111309a690643faa80e207?branch=rawhide +--- a/config/ag_macros.m4 ++++ b/config/ag_macros.m4 +@@ -113,7 +113,7 @@ AC_DEFUN([INVOKE_AG_MACROS_LAST],[ + fi + + AC_CACHE_CHECK([for static inline], [snv_cv_static_inline], [ +- AC_TRY_COMPILE([static inline foo(bar) int bar; { return bar; }], ++ AC_TRY_COMPILE([static inline int foo(bar) int bar; { return bar; }], + [return foo(0);], + [snv_cv_static_inline='static inline'], + [snv_cv_static_inline='static']) +@@ -428,7 +428,7 @@ int main (int argc, char ** argv) { + char zRej@<:@@:>@ = reject; + char zAcc@<:@@:>@ = "a-ok-eject"; + return strcspn( zAcc, zRej ) - 5; +-}] )] ++}] )], + [ag_cv_run_strcspn=yes],[ag_cv_run_strcspn=no],[ag_cv_run_strcspn=no] + ) # end of RUN_IFELSE + ]) # end of AC_CACHE_VAL for ag_cv_run_strcspn +--- a/configure ++++ b/configure +@@ -17338,7 +17338,7 @@ int main (int argc, char ** argv) { + char zAcc[] = "a-ok-eject"; + return strcspn( zAcc, zRej ) - 5; + } +- ag_cv_run_strcspn=yes ++#error + _ACEOF + if ac_fn_c_try_run "$LINENO"; then : + ag_cv_run_strcspn=no +@@ -18406,7 +18405,7 @@ else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-static inline foo(bar) int bar; { return bar; } ++static inline int foo(bar) int bar; { return bar; } + int + main () + { diff --git a/sys-devel/autogen/files/autogen-5.18.16-guile-3.patch b/sys-devel/autogen/files/autogen-5.18.16-guile-3.patch new file mode 100644 index 0000000..2d21c4f --- /dev/null +++ b/sys-devel/autogen/files/autogen-5.18.16-guile-3.patch @@ -0,0 +1,38 @@ +--- a/config/guile.m4 ++++ b/config/guile.m4 +@@ -61,7 +61,7 @@ + # + AC_DEFUN([GUILE_PKG], + [PKG_PROG_PKG_CONFIG +- _guile_versions_to_search="m4_default([$1], [2.2 2.0 1.8])" ++ _guile_versions_to_search="m4_default([$1], [3.0 2.2 2.0 1.8])" + if test -n "$GUILE_EFFECTIVE_VERSION"; then + _guile_tmp="" + for v in $_guile_versions_to_search; do +--- a/configure ++++ b/configure +@@ -14799,7 +14799,7 @@ $as_echo "no" >&6; } + PKG_CONFIG="" + fi + fi +- _guile_versions_to_search="2.2 2.0 1.8" ++ _guile_versions_to_search="3.0 2.2 2.0 1.8" + if test -n "$GUILE_EFFECTIVE_VERSION"; then + _guile_tmp="" + for v in $_guile_versions_to_search; do +--- a/agen5/guile-iface.h ++++ b/agen5/guile-iface.h +@@ -16,6 +16,13 @@ + # define AG_SCM_TO_LONG(_v) scm_to_long(_v) + # define AG_SCM_TO_ULONG(_v) ((unsigned long)scm_to_ulong(_v)) + ++#elif GUILE_VERSION < 400000 ++# define AG_SCM_IS_PROC(_p) scm_is_true( scm_procedure_p(_p)) ++# define AG_SCM_LIST_P(_l) scm_is_true( scm_list_p(_l)) ++# define AG_SCM_PAIR_P(_p) scm_is_true( scm_pair_p(_p)) ++# define AG_SCM_TO_LONG(_v) scm_to_long(_v) ++# define AG_SCM_TO_ULONG(_v) ((unsigned long)scm_to_ulong(_v)) ++ + #else + # error unknown GUILE_VERSION + choke me. diff --git a/sys-devel/autogen/files/autogen-5.18.16-make-4.3.patch b/sys-devel/autogen/files/autogen-5.18.16-make-4.3.patch new file mode 100644 index 0000000..a91fc8c --- /dev/null +++ b/sys-devel/autogen/files/autogen-5.18.16-make-4.3.patch @@ -0,0 +1,19 @@ +Without this change 'make check -j9' on make-4.3 hangs indefinitely. +Older make versions just leak process. Ideally 'run_ag' (or 'defs'?) +should be fixed to stop process leak. +--- a/agen5/test/directives.test ++++ b/agen5/test/directives.test +@@ -120,9 +120,10 @@ echo '#assert `echo true`' >> ${testname}.inc + run_ag x2 ${agopts} ${testname}.def + test $? -eq 0 || failure ${agopts}-2 failed + +-echo '#assert `echo false`' >> ${testname}.inc +-run_ag x3 ${agopts} ${testname}.def +-test $? -ne 0 || failure ${agopts}-3 failed ++#leaks process and makes make-4.3 hang on leaked process ++#echo '#assert `echo false`' >> ${testname}.inc ++#run_ag x3 ${agopts} ${testname}.def ++#test $? -ne 0 || failure ${agopts}-3 failed + + ${FGREP} -v '#assert' ${testname}.inc > ${testname}2.inc + mv -f ${testname}2.inc ${testname}.inc diff --git a/sys-devel/autogen/files/autogen-5.18.16-no-werror.patch b/sys-devel/autogen/files/autogen-5.18.16-no-werror.patch new file mode 100644 index 0000000..ee8245c --- /dev/null +++ b/sys-devel/autogen/files/autogen-5.18.16-no-werror.patch @@ -0,0 +1,14 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -200,3 +200,3 @@ test "X${GCC}" = Xyes && { + CFLAGS="$CFLAGS -Wno-format-contains-nul -fno-strict-aliasing" +- WARN_CFLAGS="$CFLAGS "`echo -Wall -Werror -Wcast-align -Wmissing-prototypes \ ++ WARN_CFLAGS="$CFLAGS "`echo -Wall -Wcast-align -Wmissing-prototypes \ + -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \ +--- a/configure ++++ b/configure +@@ -18926,3 +18926,3 @@ test "X${GCC}" = Xyes && { + CFLAGS="$CFLAGS -Wno-format-contains-nul -fno-strict-aliasing" +- WARN_CFLAGS="$CFLAGS "`echo -Wall -Werror -Wcast-align -Wmissing-prototypes \ ++ WARN_CFLAGS="$CFLAGS "`echo -Wall -Wcast-align -Wmissing-prototypes \ + -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \ diff --git a/sys-devel/autogen/files/autogen-5.18.16-no-which.patch b/sys-devel/autogen/files/autogen-5.18.16-no-which.patch new file mode 100644 index 0000000..ce53c27 --- /dev/null +++ b/sys-devel/autogen/files/autogen-5.18.16-no-which.patch @@ -0,0 +1,201 @@ +--- a/autoopts/mk-tpl-config.sh ++++ b/autoopts/mk-tpl-config.sh +@@ -98,7 +98,7 @@ fix_scripts() { + st=`sed 1q $f` + + case "$st" in +- *perl ) echo '#!' `which perl` ++ *perl ) echo '#!' `command -v perl` + sed 1d $f + ;; + +@@ -124,7 +124,7 @@ find_shell_prog() { + case `uname -s` in + SunOS ) + while : ; do +- POSIX_SHELL=`which bash` ++ POSIX_SHELL=`command -v bash` + test -x "${POSIX_SHELL}" && break + POSIX_SHELL=/usr/xpg4/bin/sh + test -x "${POSIX_SHELL}" && break +@@ -139,7 +139,7 @@ find_cat_prog() { + do + \unalias -a + unset -f command cat which +- POSIX_CAT=`which cat` ++ POSIX_CAT=`command -v cat` + test -x "$POSIX_CAT" && break + POSIX_CAT=` + PATH=\`command -p getconf CS_PATH\` +--- a/autoopts/test/defs.in ++++ b/autoopts/test/defs.in +@@ -40,7 +40,7 @@ cfg_vals() + if test "X$BASH_VERSION" = X + then + # On Solaris, make certain we do not use /bin/sh +- sh=`which bash` ++ sh=`command -v bash` + test "X$sh" = X && sh=/usr/xpg4/bin/sh + BASH_VERSION=not-good-enough + export BASH_VERSION +--- a/autoopts/tpl/agtexi-cmd.tpl ++++ b/autoopts/tpl/agtexi-cmd.tpl +@@ -779,7 +779,7 @@ DEFINE initialization =][= + =][= # END-BUILDTREE-ISMS + + (shell "CLexe=`echo ${AGexe} | sed 's@/autogen@/columns@'` +- test -x \"${CLexe}\" || CLexe=`which columns`") ++ test -x \"${CLexe}\" || CLexe=`command -v columns`") + + # END-INSTALL-ONLY-CODE =][= + +--- a/autoopts/tpl/cmd-doc.tlib ++++ b/autoopts/tpl/cmd-doc.tlib +@@ -42,7 +42,7 @@ + :+][+: # END-BUILDTREE-ISMS + + (shell "CLexe=`echo ${AGexe} | sed 's@/autogen@/columns@'` +- test -x \"${CLexe}\" || CLexe=`which columns`") ++ test -x \"${CLexe}\" || CLexe=`command -v columns`") + + # END-INSTALL-ONLY-CODE :+][+: + +--- a/autoopts/tpl/def2pot.tpl ++++ b/autoopts/tpl/def2pot.tpl +@@ -68,7 +68,7 @@ ENDDEF =][= + =][= # END-BUILDTREE-ISMS + + (shell "CLexe=`echo ${AGexe} | sed 's@/autogen@/columns@'` +- test -x \"${CLexe}\" || CLexe=`which columns`") ++ test -x \"${CLexe}\" || CLexe=`command -v columns`") + + # END-INSTALL-ONLY-CODE =][= # + +--- a/autoopts/tpl/getopt.tpl ++++ b/autoopts/tpl/getopt.tpl +@@ -81,7 +81,7 @@ CASE (suffix) +][+ + # END-BUILDTREE-ISMS the following code is for installed version: + agopts= + aocfg=`echo ${AGexe} | sed 's@/[^/]*$@@'`/autoopts-config +- test -x "${aocfg}" || aocfg=`which autoopts-config` ++ test -x "${aocfg}" || aocfg=`command -v autoopts-config` + tarfile=`${aocfg} libsrc` + + # END-INSTALL-ONLY-CODE +] +--- a/autoopts/tpl/options.tpl ++++ b/autoopts/tpl/options.tpl +@@ -39,7 +39,7 @@ c + =][= # END-BUILDTREE-ISMS + + (shell "CLexe=`echo ${AGexe} | sed 's@/autogen@/columns@'` +- test -x \"${CLexe}\" || CLexe=`which columns`") ++ test -x \"${CLexe}\" || CLexe=`command -v columns`") + + # END-INSTALL-ONLY-CODE =][= + +--- a/autoopts/tpl/usage.tlib ++++ b/autoopts/tpl/usage.tlib +@@ -34,7 +34,7 @@ + =][= # END-BUILDTREE-ISMS + + (shell "CLexe=`echo ${AGexe} | sed 's@/autogen@/columns@'` +- test -x \"${CLexe}\" || CLexe=`which columns`") ++ test -x \"${CLexe}\" || CLexe=`command -v columns`") + + # END-INSTALL-ONLY-CODE =][= + +--- a/config/ag_macros.m4 ++++ b/config/ag_macros.m4 +@@ -505,7 +505,7 @@ AC_DEFUN([AG_ENABLE_DEBUG],[ + [Define this if wanting autogen debugging]) + AC_DEFINE([DEBUG_ENABLED], [1], + [Define this if debugging is enabled]) +- [f=`which dmalloc 2>/dev/null` ++ [f=`command -v dmalloc 2>/dev/null` + test -n "$f" && LIBS="${LIBS} -ldmalloc"] + fi + +--- a/config/bootstrap.shlib ++++ b/config/bootstrap.shlib +@@ -47,16 +47,16 @@ case "${SHELL}" in + *[akz]sh) : ;; + *) + while : ; do +- SHELL=`which bash 2>/dev/null` ++ SHELL=`command -v bash 2>/dev/null` + test -x "${SHELL}" && break + +- SHELL=`which ksh 2>/dev/null` ++ SHELL=`command -v ksh 2>/dev/null` + test -x "${SHELL}" && break + + SHELL=/usr/xpg4/bin/sh + test -x "${SHELL}" && break + +- SHELL=`which sh 2>/dev/null` ++ SHELL=`command -v sh 2>/dev/null` + test -x "${SHELL}" && break + + die "unable to determine which shell to use" +--- a/config/libopts.m4 ++++ b/config/libopts.m4 +@@ -108,9 +108,9 @@ AC_DEFUN([INVOKE_LIBOPTS_MACROS_FIRST],[ + [while : + do + test -x "$POSIX_SHELL" && break +- POSIX_SHELL=`which bash` ++ POSIX_SHELL=`command -v bash` + test -x "$POSIX_SHELL" && break +- POSIX_SHELL=`which dash` ++ POSIX_SHELL=`command -v dash` + test -x "$POSIX_SHELL" && break + POSIX_SHELL=/usr/xpg4/bin/sh + test -x "$POSIX_SHELL" && break +--- a/config/mk-shdefs.in ++++ b/config/mk-shdefs.in +@@ -109,7 +109,7 @@ configure() { + { + cmd='`set -o | '${AWK}" '/^allexport/ {print \$2}'"\` + cat <<- _EOF_ +- #! `which echo` this-file-should-be-sourced,-not-executed ++ #! `command -v echo` this-file-should-be-sourced,-not-executed + # -*- Mode: shell-script -*- + + case "$cmd" in +--- a/configure.ac ++++ b/configure.ac +@@ -149,9 +149,9 @@ GDnam=getdefs${ac_exeext} + CLnam=columns${ac_exeext} + if test "X$cross_compiling" = Xyes + then +- AGexe=`which ${AGnam}` +- GDexe=`which ${GDnam}` +- CLexe=`which ${CLnam}` ++ AGexe=`command -v ${AGnam}` ++ GDexe=`command -v ${GDnam}` ++ CLexe=`command -v ${CLnam}` + else + AGexe=${ag_top_builddir}/agen5/${AGnam} + GDexe=${ag_top_builddir}/getdefs/${GDnam} +--- a/doc/mk-agen-texi.sh ++++ b/doc/mk-agen-texi.sh +@@ -65,7 +65,7 @@ set_config_values() + nl=' + ' ht=' ' + . ${top_builddir}/config/shdefs +- : ${MAKE=`which make`} ++ : ${MAKE=`command -v make`} + : ${srcdir=`pwd`} + srcdir=`cd ${srcdir} >/dev/null ; pwd` + INCLUDES="${DEFS} "` +--- a/getdefs/test/defs ++++ b/getdefs/test/defs +@@ -40,7 +40,7 @@ cfg_vals() + if test "X$BASH_VERSION" = X + then + # On Solaris, make certain we do not use /bin/sh +- sh=`which bash` ++ sh=`command -v bash` + test "X$sh" = X && sh=/usr/xpg4/bin/sh + BASH_VERSION=not-good-enough + export BASH_VERSION diff --git a/sys-devel/autogen/files/autogen-5.18.16-respect-TMPDIR.patch b/sys-devel/autogen/files/autogen-5.18.16-respect-TMPDIR.patch new file mode 100644 index 0000000..792214e --- /dev/null +++ b/sys-devel/autogen/files/autogen-5.18.16-respect-TMPDIR.patch @@ -0,0 +1,29 @@ +User ebuild's ${T} instead of /tmp to hide leftover files from ./configure. + +'run-ag.sh' does not clean temporary directories after itself and makes +it hard to implement it cleanly without changing 'run-ag.sh' structure. + +Reported-by: Fedja Beader +Bug: https://bugs.gentoo.org/704740 +--- a/build-aux/run-ag.sh ++++ b/build-aux/run-ag.sh +@@ -45,7 +45,7 @@ find_exe() { + return 0 + } + +-STAMP_TEMP_DIR=$(mktemp --suffix=.tdir -d /tmp/run-ag-XXXXXXXX) ++STAMP_TEMP_DIR=$(mktemp --suffix=.tdir -d -t run-ag-XXXXXXXX) + exec 9>&2 2>> ${STAMP_TEMP_DIR}/mk-stamps.log + VERBOSE=1 + +--- a/config/mk-shdefs.in ++++ b/config/mk-shdefs.in +@@ -130,7 +130,7 @@ + + set -x + exec 9>&2 +-tmp=$(mktemp --suffix=.tdir -d /tmp/shdefs-XXXXXXXXX) ++tmp=$(mktemp --suffix=.tdir -d -t shdefs-XXXXXXXXX) + exec 2>> $tmp/mk-shdef.log + init $0 $1 + mk_config diff --git a/sys-devel/autogen/files/autogen-5.18.16-rpath.patch b/sys-devel/autogen/files/autogen-5.18.16-rpath.patch new file mode 100644 index 0000000..8d20191 --- /dev/null +++ b/sys-devel/autogen/files/autogen-5.18.16-rpath.patch @@ -0,0 +1,80 @@ +https://bugs.gentoo.org/676692 + +'make install' actually installs 'getdefs', 'columns', 'autogen' +and gentoo's 'scanelf' QA checker tool detects it as: + + * QA Notice: The following files contain insecure RUNPATHs + * Please file a bug about this at https://bugs.gentoo.org/ + * with the maintainer of the package. + * /tmp/portage/sys-devel/autogen-5.18.16/image/usr/bin/getdefs + * RPATH: /tmp/portage/sys-devel/autogen-5.18.16/work/autogen-5.18.16/autoopts/.libs + * /tmp/portage/sys-devel/autogen-5.18.16/image/usr/bin/columns + * RPATH: /tmp/portage/sys-devel/autogen-5.18.16/work/autogen-5.18.16/autoopts/.libs + * /tmp/portage/sys-devel/autogen-5.18.16/image/usr/bin/autogen + * RPATH: /tmp/portage/sys-devel/autogen-5.18.16/work/autogen-5.18.16/autoopts/.libs +--- a/agen5/Makefile.am ++++ b/agen5/Makefile.am +@@ -63,7 +63,7 @@ SNV_LIB = $(top_builddir)/snprintfv/libsnprintfv.la + nodist_autogen_SOURCES = ag.c + autogen_SOURCES = $(gen_csrc) + autogen_LDADD = $(LO_LIB) $(SNV_LIB) $(GUILE_LIBS) +-autogen_LDFLAGS = $(DYNAMIC_AG) $(AG_STATIC_AUTOGEN) -no-install ++autogen_LDFLAGS = $(DYNAMIC_AG) $(AG_STATIC_AUTOGEN) + autogen_CFLAGS = $(GUILE_CFLAGS) + stamp_script = $(srcdir)/mk-stamps.sh + +--- a/agen5/Makefile.in ++++ b/agen5/Makefile.in +@@ -482,7 +482,7 @@ SNV_LIB = $(top_builddir)/snprintfv/libsnprintfv.la + nodist_autogen_SOURCES = ag.c + autogen_SOURCES = $(gen_csrc) + autogen_LDADD = $(LO_LIB) $(SNV_LIB) $(GUILE_LIBS) +-autogen_LDFLAGS = $(DYNAMIC_AG) $(AG_STATIC_AUTOGEN) -no-install ++autogen_LDFLAGS = $(DYNAMIC_AG) $(AG_STATIC_AUTOGEN) + autogen_CFLAGS = $(GUILE_CFLAGS) + stamp_script = $(srcdir)/mk-stamps.sh + AM_YFLAGS = -d +--- a/columns/Makefile.am ++++ b/columns/Makefile.am +@@ -20,7 +20,7 @@ + ## with this program. If not, see . + + bin_PROGRAMS = columns +-columns_LDFLAGS = -no-install ++#columns_LDFLAGS = -no-install + csrc = opts.h columns.c opts.c + nodist_columns_SOURCES = cols.c + +--- a/columns/Makefile.in ++++ b/columns/Makefile.in +@@ -389,7 +389,7 @@ target_vendor = @target_vendor@ + top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ +-columns_LDFLAGS = -no-install ++#columns_LDFLAGS = -no-install + csrc = opts.h columns.c opts.c + nodist_columns_SOURCES = cols.c + LO_LIB = $(top_builddir)/autoopts/libopts.la +--- a/getdefs/Makefile.am ++++ b/getdefs/Makefile.am +@@ -23,7 +23,7 @@ + TARG = getdefs + + bin_PROGRAMS = getdefs +-getdefs_LDFLAGS = -no-install ++#getdefs_LDFLAGS = -no-install + gdsrcs = getdefs.h proto.h gdemit.c gdinit.c getdefs.c + getdefs_SOURCES = proto.h + BUILT_SOURCES = gd.c +--- a/getdefs/Makefile.in ++++ b/getdefs/Makefile.in +@@ -434,7 +434,7 @@ top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + TARG = getdefs +-getdefs_LDFLAGS = -no-install ++#getdefs_LDFLAGS = -no-install + gdsrcs = getdefs.h proto.h gdemit.c gdinit.c getdefs.c + getdefs_SOURCES = proto.h + BUILT_SOURCES = gd.c diff --git a/sys-devel/autogen/metadata.xml b/sys-devel/autogen/metadata.xml new file mode 100644 index 0000000..8f3ef98 --- /dev/null +++ b/sys-devel/autogen/metadata.xml @@ -0,0 +1,14 @@ + + + + + toolchain@gentoo.org + Gentoo Toolchain Project + + + install the libopts tarball (a few packages want this for developing) + + + autogen + +