commit: 1d32f41aa6dab138dfec25c8a5433793420d9293 Author: Eli Schwartz <eschwartz93 <AT> gmail <DOT> com> AuthorDate: Fri Mar 29 06:03:53 2024 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Fri Mar 29 18:45:14 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1d32f41a
sci-libs/libticalcs2: fix erroneous bashism during building * QA Notice: Abnormal configure code * * checking for the host compiler... ./configure: 17678: test: xx86_64-pc-linux-gnu: unexpected operator Bug: https://github.com/debrouxl/tilibs/pull/87 Closes: https://bugs.gentoo.org/723452 Signed-off-by: Eli Schwartz <eschwartz93 <AT> gmail.com> Signed-off-by: Sam James <sam <AT> gentoo.org> ...fix-erroneous-bashism-in-configure-script.patch | 39 ++++++++++++++++++++++ sci-libs/libticalcs2/libticalcs2-1.1.9-r1.ebuild | 5 +++ 2 files changed, 44 insertions(+) diff --git a/sci-libs/libticalcs2/files/0001-libticalcs-fix-erroneous-bashism-in-configure-script.patch b/sci-libs/libticalcs2/files/0001-libticalcs-fix-erroneous-bashism-in-configure-script.patch new file mode 100644 index 000000000000..7cf0f173af34 --- /dev/null +++ b/sci-libs/libticalcs2/files/0001-libticalcs-fix-erroneous-bashism-in-configure-script.patch @@ -0,0 +1,39 @@ +From e27900a6b30f35b1a586b171603047fec3f39990 Mon Sep 17 00:00:00 2001 +From: Eli Schwartz <[email protected]> +Date: Fri, 29 Mar 2024 01:48:47 -0400 +Subject: [PATCH] libticalcs: fix erroneous bashism in configure script + +configure scripts are POSIX /bin/sh scripts and cannot have +bash-specific syntax. The `test xxx == yyy` construct with double equals +is a bash-specific alias for single equals. It does exactly the same +thing as single equals -- it provides no additional functionality, no +behavior changes, it is *exactly* the same but with an additional +alternate spelling. In exchange for doing nothing, it breaks muscle +memory when writing POSIX sh scripts and tricks developers into writing +the wrong thing. + +It should never be used under any circumstances. Ideally it would be +removed altogether from GNU bash. + +Bug: https://bugs.gentoo.org/723452 +Signed-off-by: Eli Schwartz <[email protected]> +--- + libticalcs/trunk/configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libticalcs/trunk/configure.ac b/libticalcs/trunk/configure.ac +index 3ec257ed..42588f9f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -180,7 +180,7 @@ esac + AC_ARG_VAR([CXX_FOR_BUILD], [C++ compiler for programs to be run on the build system]) + AC_ARG_VAR([CXXFLAGS_FOR_BUILD], [C++ compiler flags for CXX_FOR_BUILD]) + AC_MSG_CHECKING([for the host compiler]) +-if test "x$build" == "x$host" ; then ++if test "x$build" = "x$host" ; then + # Not cross-compiling. + CXX_FOR_BUILD=$CXX + CXXFLAGS_FOR_BUILD=$CXXFLAGS +-- +2.43.2 + diff --git a/sci-libs/libticalcs2/libticalcs2-1.1.9-r1.ebuild b/sci-libs/libticalcs2/libticalcs2-1.1.9-r1.ebuild index d2675ea3c430..88acc8b83976 100644 --- a/sci-libs/libticalcs2/libticalcs2-1.1.9-r1.ebuild +++ b/sci-libs/libticalcs2/libticalcs2-1.1.9-r1.ebuild @@ -28,6 +28,11 @@ BDEPEND=" DOCS=( AUTHORS LOGO NEWS README ChangeLog docs/api.txt ) +PATCHES=( + # https://github.com/debrouxl/tilibs/pull/87 + "${FILESDIR}"/0001-libticalcs-fix-erroneous-bashism-in-configure-script.patch +) + src_prepare() { default eautoreconf
