commit:     c3d9e65b97f09bd07b8b216b6ae813d0dcda84b0
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 14 07:10:33 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Sep 14 07:33:00 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3d9e65b

dev-lang/xsb: fix --Wl,--dynamic-linker typo

Add some extra '|| die' while here. Eli actually fixed one typo in this
configure check already in 3e2a234b2bf548497b0d3b5828fdb4f3820fa97d.

Bug: https://bugs.gentoo.org/870970
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-lang/xsb/files/xsb-4.0.0-ld-typo.patch         | 45 ++++++++++++++++++++++
 .../{xsb-4.0.0-r3.ebuild => xsb-4.0.0-r4.ebuild}   | 25 ++++++------
 2 files changed, 58 insertions(+), 12 deletions(-)

diff --git a/dev-lang/xsb/files/xsb-4.0.0-ld-typo.patch 
b/dev-lang/xsb/files/xsb-4.0.0-ld-typo.patch
new file mode 100644
index 000000000000..cfb917a136f8
--- /dev/null
+++ b/dev-lang/xsb/files/xsb-4.0.0-ld-typo.patch
@@ -0,0 +1,45 @@
+-Wl,-export-dynamic tells the linker we want an entry point of 'xport-dynamic'.
+Fix the typo accordingly.
+--- a/build/configure.in
++++ b/build/configure.in
+@@ -1343,10 +1343,10 @@ else
+ fi
+ 
+ 
+-####### Test for -export-dynamic option of ld
++####### Test for --export-dynamic option of ld
+ TEMP_LDFLAGS=$LDFLAGS
+-LDFLAGS="-Wl,-export-dynamic"
+-AC_MSG_CHECKING([whether loader understands -Wl,-export-dynamic])
++LDFLAGS="-Wl,--export-dynamic"
++AC_MSG_CHECKING([whether loader understands -Wl,--export-dynamic])
+ # Ideally we should use AC_LINK_IFELSE instead of the obsolete AC_TRY_LINK
+ #AC_TRY_LINK([],[], __export_dynamic=yes, __export_dynamic=no)
+ AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(){return 0;}]])], 
__export_dynamic=yes, __export_dynamic=no)
+@@ -1402,7 +1402,7 @@ case "$canonical" in
+                             LDFLAGS="${LDFLAGS} -ldl"
+ 
+                             if test "$__export_dynamic" = "yes" ; then
+-                                LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
++                                LDFLAGS="${LDFLAGS} -Wl,--export-dynamic"
+                             fi
+                         fi
+ 
+@@ -1416,7 +1416,7 @@ case "$canonical" in
+     *freebsd* ) AC_DEFINE(FREEBSD)
+                 AC_DEFINE(FOREIGN_ELF)
+                 if test "$__export_dynamic" = "yes" ; then
+-                    LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
++                    LDFLAGS="${LDFLAGS} -Wl,--export-dynamic"
+                 fi
+ 
+                 if test "${have_dl}" = yes ; then
+@@ -1498,7 +1498,7 @@ case "$canonical" in
+ 
+                 LDFLAGS="-lsocket ${LDFLAGS}"
+                 if test "$__export_dynamic" = "yes" ; then
+-                    LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
++                    LDFLAGS="${LDFLAGS} -Wl,--export-dynamic"
+                 fi
+                 if test "${have_socket}" = "no" ; then
+                     AC_MSG_ERROR(Your system is missing library: \`socket')

diff --git a/dev-lang/xsb/xsb-4.0.0-r3.ebuild b/dev-lang/xsb/xsb-4.0.0-r4.ebuild
similarity index 91%
rename from dev-lang/xsb/xsb-4.0.0-r3.ebuild
rename to dev-lang/xsb/xsb-4.0.0-r4.ebuild
index 2772a8edd4ac..ca90694a5520 100644
--- a/dev-lang/xsb/xsb-4.0.0-r3.ebuild
+++ b/dev-lang/xsb/xsb-4.0.0-r4.ebuild
@@ -37,11 +37,12 @@ PATCHES=(
        "${FILESDIR}"/0001-modern-C-fix-for-implicit-int.patch
        "${FILESDIR}"/xsb-4.0.0-gcc14-build-fix.patch
        "${FILESDIR}"/xsb-4.0.0-gcc14-sql.patch
+       "${FILESDIR}"/xsb-4.0.0-ld-typo.patch
 )
 
 src_prepare() {
        default
-       cd "${S}"/build
+       cd "${S}"/build || die
        eautoconf
 
        if use mariadb ; then
@@ -63,7 +64,7 @@ src_configure() {
        append-flags -fno-strict-aliasing
        filter-lto
 
-       cd "${S}"/build
+       cd "${S}"/build || die
 
        econf \
                --prefix=/usr/$(get_libdir) \
@@ -76,42 +77,42 @@ src_configure() {
                $(use_enable debug)
 
        if use curl ; then
-               cd "${S}"/packages/curl
+               cd "${S}"/packages/curl || die
                econf
        fi
 
        if use mysql || use mariadb ; then
                local impl=$(usex mariadb mariadb mysql)
-               cd "${S}"/packages/dbdrivers/mysql
+               cd "${S}"/packages/dbdrivers/mysql || die
                econf \
                        --with-mysql-incdir=/usr/include/${impl}
        fi
 
        if use odbc ; then
-               cd "${S}"/packages/dbdrivers/odbc
+               cd "${S}"/packages/dbdrivers/odbc || die
                econf
        fi
 
        if use pcre ; then
-               cd "${S}"/packages/pcre
+               cd "${S}"/packages/pcre || die
                econf
        fi
 
        if use xml ; then
-               cd "${S}"/packages/xpath
+               cd "${S}"/packages/xpath || die
                econf
        fi
 }
 
 src_compile() {
-       cd "${S}"/build
+       cd "${S}"/build || die
 
        default
 
        # All XSB Packages are compiled using a single Prolog engine.
        # Consequently they must all be compiled using a single make job.
 
-       cd "${S}"/packages
+       cd "${S}"/packages || die
        rm -f *.xwam
        emake -j1
 
@@ -137,13 +138,13 @@ src_compile() {
 }
 
 src_install() {
-       cd "${S}"/build
+       cd "${S}"/build || die
        default
 
        local XSB_INSTALL_DIR=/usr/$(get_libdir)/xsb-${PV}
        dosym ${XSB_INSTALL_DIR}/bin/xsb /usr/bin/xsb
 
-       cd "${S}"/packages
+       cd "${S}"/packages || die
        local PACKAGES=${XSB_INSTALL_DIR}/packages
        insinto ${PACKAGES}
        doins *.xwam
@@ -220,6 +221,6 @@ src_install() {
                doins pcre/cc/*.H
        fi
 
-       cd "${S}"
+       cd "${S}" || die
        dodoc FAQ README
 }

Reply via email to