diff --git a/devel/libtool/Makefile b/devel/libtool/Makefile index f0d65e761860..52d018b4a5f1 100644 --- a/devel/libtool/Makefile +++ b/devel/libtool/Makefile @@ -1,30 +1,36 @@ PORTNAME= libtool -PORTREVISION= 0 +PORTREVISION= 1 COMMENT= Generic shared library support script WWW= https://www.gnu.org/software/libtool/ .include "${.CURDIR}/../libtool/Makefile.common" LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING BUILD_DEPENDS= gm4:devel/m4 RUN_DEPENDS= gm4:devel/m4 GNU_CONFIGURE= yes GNU_CONFIGURE_MANPREFIX=${PREFIX}/share CONFIGURE_ARGS= --disable-ltdl-install TEST_TARGET= check NO_ARCH= yes INFO= libtool .if "${CC}" == "/nxb-bin/usr/bin/cc" # Generate libtool script for the native compiler, not the cross compiler. CC= cc CXX= c++ LD= ld .endif +# Perform the patching after the build, because touching m4 files before the +# configuration step causes autoreconf to be invoked +post-stage: + cd ${STAGEDIR}${PREFIX}/share/aclocal && \ + ${PATCH} --posix -p1 < ${PATCHDIR}/stagepatch-m4_libtool.m4 + .include diff --git a/devel/libtool/files/stagepatch-m4_libtool.m4 b/devel/libtool/files/stagepatch-m4_libtool.m4 new file mode 100644 index 000000000000..63415144279d --- /dev/null +++ b/devel/libtool/files/stagepatch-m4_libtool.m4 @@ -0,0 +1,13 @@ +https://lists.gnu.org/archive/html/libtool-patches/2025-07/msg00000.html + +--- m4/libtool.m4.orig 2024-11-20 19:01:08 UTC ++++ m4/libtool.m4 +@@ -4825,7 +4825,7 @@ m4_if([$1], [CXX], [ + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + +- linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) ++ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu* | *freebsd*) + case $cc_basename in + # old Intel for x86_64, which still supported -KPIC. + ecc*)