diff options
Diffstat (limited to 'sci-physics/siscone')
-rw-r--r-- | sci-physics/siscone/Manifest | 3 | ||||
-rw-r--r-- | sci-physics/siscone/files/0001-configure-fix-broken-bashisms-resulting-in-logic-fai.patch | 71 | ||||
-rw-r--r-- | sci-physics/siscone/siscone-3.0.5.ebuild | 21 |
3 files changed, 93 insertions, 2 deletions
diff --git a/sci-physics/siscone/Manifest b/sci-physics/siscone/Manifest index ae0ed9c700e9..795040606dff 100644 --- a/sci-physics/siscone/Manifest +++ b/sci-physics/siscone/Manifest @@ -1,3 +1,4 @@ +AUX 0001-configure-fix-broken-bashisms-resulting-in-logic-fai.patch 3191 BLAKE2B add4b0710e607c7e55bee0bfa7f9f2f4fa04ce4641c06231f7155cd437161a487275f3c9e7fd582b8427e7d6dd36b356e1096cd834ce7e4f2d278821ae6b9650 SHA512 cebed87f1df067c9cdb912e14562cd25089cc8cfc69740a239a3df8657ca99cf7b5c57bf28a61ed467588543c33d69194f45b187c5927471ef1068b7d3cbb00f DIST siscone-3.0.5.tar.gz 544738 BLAKE2B 7136acfc46d9414831d4e07cc428ad3858c1da02bdcd66817eb6406b9ae1d9d582800412dfcfae5477a720b7893ba070c9ef84816a517992be1762d356840bf8 SHA512 fb9f5e6b6677968e77eb9476abe8345711c69213209c153932adacd69b3c1219abe79655238fec1c0ca4e8ca91795c7693c68e2a48ec41a6afff1f046a781a61 -EBUILD siscone-3.0.5.ebuild 658 BLAKE2B 2530e30c27155c36e34d530cc2c13e5b5820c61715807d4efd14e96b4562a4897f6127b421434ede51ad7a7de125be78b1100cfdd93044778bb1847bf15b0f58 SHA512 4c3a87e81df0909fe88d4a9f09c53490bd148715497813bb82747ca187b0c93c95a7e339e21a72535dedfca09a3991a6a225250c9bd9b49388d885c365a7f337 +EBUILD siscone-3.0.5.ebuild 1052 BLAKE2B f5a5874484e9e8cf668373fc60614ba3ce99ff08f157ec25145398e0283430ae0238790fbc43463eb4a8e652e43e8968736ae491ca95244545822afc5e64b50e SHA512 07c34f05bd3684b33a344e5cb84e15ffa165ae795d6b8fa019d0740ae4f9ee836bda73d364434cbd9cdbf055b457f1efbf623a7f051d52843e11638cc05ba1b5 MISC metadata.xml 487 BLAKE2B d1df4336770fb9ade97d6c75d1712253b0640d95b0a91f34ea2c22f3f9fe58c6b24f25bc7c415fb5bfa49de4c1ae7e5a99cbf336a9255cb74b4b972be3d694dd SHA512 9f442c9d835eb3021ed7dee8e565a24bf190df844920e35c4a92df2efecba3d9ba49856f2f6b7ce7c8dcd89f5fcc0e20a1f9d61ec8c8121b233696442e5c8029 diff --git a/sci-physics/siscone/files/0001-configure-fix-broken-bashisms-resulting-in-logic-fai.patch b/sci-physics/siscone/files/0001-configure-fix-broken-bashisms-resulting-in-logic-fai.patch new file mode 100644 index 000000000000..33e56b5e188b --- /dev/null +++ b/sci-physics/siscone/files/0001-configure-fix-broken-bashisms-resulting-in-logic-fai.patch @@ -0,0 +1,71 @@ +From fd2218e4a671f4aae752620481e541799585fa20 Mon Sep 17 00:00:00 2001 +From: Eli Schwartz <eschwartz93@gmail.com> +Date: Wed, 6 Mar 2024 20:06:07 -0500 +Subject: [PATCH] configure: fix broken bashisms resulting in logic failure + +In a configure check that was carefully written for pre-unix-wars +versions of the bourne shell, some code which was only valid using GNU +bash was included. + +Bash provides the standard `test XXX = YYY` or `[ XXX = YYY ]` +utilities. It also provides the ability to spell the equals sign as a +double equals. This does nothing whatsoever -- it adds no new +functionality to bash, it forbids nothing, it is *literally* an exact +alias. + +It should never be used under any circumstances. All developers must +immediately forget that it exists. Using it is non-portable and does not +work in /bin/sh scripts such as configure scripts, and it results in +dangerous muscle memory when used in bash scripts because it makes +people unthinkingly use the double equals even in /bin/sh scripts. To +add insult to injury, it makes scripts take up more disk space (by a +whole byte! and sometimes even a few bytes...) + +Delete this accidental bashism, and restore the ability to get correct +./configure behavior on systems where /bin/sh is something other than a +symlink to GNU bash. + +Signed-off-by: Eli Schwartz <eschwartz93@gmail.com> +--- + configure.ac | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/configure.ac b/configure.ac +index c0ac33c..619e162 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -44,7 +44,7 @@ AC_ARG_ENABLE(debug, + [ --enable-debug Turn on debug compiler information], + [ENABLE_DEBUG_FLAG="$enableval"], + [ENABLE_DEBUG_FLAG="yes"]) +-if [[ "x$ENABLE_DEBUG_FLAG" == "xyes" ]] ; then ++if test "$ENABLE_DEBUG_FLAG" = yes ; then + CXXFLAGS=${CXXFLAGS}" -g " + fi + +@@ -63,7 +63,7 @@ dnl AM_LDFLAGS=" -lm " + dnl if the debug flags are on, check if we can also use + dnl some profiling tools + dnl COMMENTED: Pass LDFLAGS to configure instead +-dnl if [[ "x$ENABLE_DEBUG_FLAG" == "xyes" ]] ; then ++dnl if test "$ENABLE_DEBUG_FLAG" = yes ; then + dnl AC_CHECK_LIB(profiler, google_initializer_module_profiler) + dnl AC_CHECK_LIB(pthread, pthread_create) + dnl AC_CHECK_LIB(tcmalloc, malloc) +@@ -81,11 +81,11 @@ CXXFLAGS="$CXXFLAGS -Werror=deprecated-declarations" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <memory>]],[[int *a= new int(1); std::auto_ptr<int> b; b.reset(a);]])], + [ac_compilation_deprecated="no"],[ac_compilation_deprecated="yes"]) + AC_MSG_RESULT([$ac_compilation_deprecated]) +-if [[ "$ac_compilation_deprecated" == "yes" ]] ; then ++if test "$ac_compilation_deprecated" = yes ; then + AC_MSG_CHECKING([[if $CXX $CXXFLAGS supports atd::unique_ptr]]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <memory>]],[[int *a= new int(1); std::unique_ptr<int> b; b.reset(a);]])], + [ac_supports_unique_ptr="yes"],[as_supports_unique_ptr="no"]) +- if [[ "$ac_supports_unique_ptr" == "yes" ]] ; then ++ if test "$ac_supports_unique_ptr" = "yes" ; then + AC_DEFINE(USES_UNIQUE_PTR_AS_AUTO_PTR, [], [use unique_ptr instead of auto_ptr]) + fi + AC_MSG_RESULT([$ac_supports_unique_ptr]) +-- +2.43.0 + diff --git a/sci-physics/siscone/siscone-3.0.5.ebuild b/sci-physics/siscone/siscone-3.0.5.ebuild index d66ff8180740..1205f84ddbbf 100644 --- a/sci-physics/siscone/siscone-3.0.5.ebuild +++ b/sci-physics/siscone/siscone-3.0.5.ebuild @@ -1,8 +1,10 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 +inherit autotools + DESCRIPTION="Hadron Seedless Infrared-Safe Cone jet algorithm" HOMEPAGE="https://siscone.hepforge.org/" SRC_URI="https://siscone.hepforge.org/downloads/${P}.tar.gz" @@ -12,6 +14,23 @@ SLOT="0" KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" IUSE="examples" +BDEPEND="dev-build/autoconf-archive" + +PATCHES=( + "${FILESDIR}"/0001-configure-fix-broken-bashisms-resulting-in-logic-fai.patch +) + +src_prepare() { + default + + # The included copy of this macro is from 2008 and totally broken. + # https://bugs.gentoo.org/890780 + rm m4/ax_prefix_config_h.m4 || die + + # Rebuild after patch to configure.ac, removal of broken macro + eautoreconf +} + src_configure() { econf --disable-static } |