diff --git a/misc/mbuffer/Makefile b/misc/mbuffer/Makefile index 00fcb87f9c37..bd2650e2575b 100644 --- a/misc/mbuffer/Makefile +++ b/misc/mbuffer/Makefile @@ -1,44 +1,50 @@ # Created by: Rong-En Fan PORTNAME= mbuffer PORTVERSION= 20211018 CATEGORIES= misc MASTER_SITES= http://www.maier-komor.de/software/mbuffer/ MAINTAINER= loader@FreeBSD.org COMMENT= Tool for buffering data streams LICENSE= GPLv3+ LICENSE_FILE= ${WRKSRC}/LICENSE TEST_DEPENDS= gtar:archivers/gtar USES= localbase ssl tar:tgz autoreconf gmake GNU_CONFIGURE= yes # for --ignore-failed-read TEST_ARGS= TAR=gtar TEST_TARGET= check OPTIONS_DEFINE= GCRYPT MHASH RHASH OPTIONS_DEFAULT= MHASH GCRYPT_DESC= Use gcrypt for hash generation MHASH_DESC= Use mhash for hash generation RHASH_DESC= Use rhash for hash generation GCRYPT_RUN_DEPENDS= libgcrypt>=1.8.4_1:security/libgcrypt MHASH_RUN_DEPENDS= mhash>=0.9.9.9_5:security/mhash RHASH_RUN_DEPENDS= rhash>=1.3.5:security/rhash +.include + +.if ${ARCH} == aarch64 && ${OSVERSION} < 1300000 +EXTRA_PATCHES= ${PATCHDIR}/extra-patch-12.3 +.endif + post-patch: ${REINPLACE_CMD} \ -e 's@bash@sh@' ${WRKSRC}/Makefile.in post-install: ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/mbuffer ${MV} ${STAGEDIR}${PREFIX}/etc/mbuffer.rc \ ${STAGEDIR}${PREFIX}/etc/mbuffer.rc.sample -.include +.include diff --git a/misc/mbuffer/files/extra-patch-12.3 b/misc/mbuffer/files/extra-patch-12.3 new file mode 100644 index 000000000000..c60d49818579 --- /dev/null +++ b/misc/mbuffer/files/extra-patch-12.3 @@ -0,0 +1,61 @@ +- cc(1) crashes with "-g" on FreeBSD 12.3-RELEASE aarch64 + + cc: error: unable to execute command: Abort trap (core dumped) + cc: error: clang frontend command failed due to signal (use -v to see invocation) + FreeBSD clang version 10.0.1 (git@github.com:llvm/llvm-project.git llvmorg-10.0.1-0-gef32c611aa2) + Target: aarch64-unknown-freebsd12.3 + Thread model: posix + InstalledDir: /usr/bin + cc: note: diagnostic msg: PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script. + cc: note: diagnostic msg: + ******************** + + PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: + Preprocessed source(s) and associated run script(s) are located at: + cc: note: diagnostic msg: /tmp/idev-47a323.c + cc: note: diagnostic msg: /tmp/idev-47a323.sh + cc: note: diagnostic msg: + + ******************** + gmake[1]: *** [Makefile:197: idev.so] Error 254 + gmake[1]: Leaving directory '/usr/ports/misc/mbuffer/work/mbuffer-20211018' + +- llvm-objdump(1) does not support "-T" on FreeBSD 12.3-RELEASE aarch64 + +--- Makefile.in.orig 2022-05-14 11:38:27 UTC ++++ Makefile.in +@@ -194,7 +194,7 @@ tapetest.so: tapetest.c config.h + $(CC) $(CFLAGS) -shared -fPIC tapetest.c -o $@ $(LIBS) + + idev.so: idev.c config.h +- $(CC) $(CFLAGS) -shared -g -fPIC idev.c -o $@ $(LIBS) ++ $(CC) $(CFLAGS) -shared -fPIC idev.c -o $@ $(LIBS) + + $(DEPS): | build + +--- configure.in.orig 2022-05-14 11:37:04 UTC ++++ configure.in +@@ -173,19 +173,19 @@ else + ]])],[ + AC_MSG_RESULT([OK]) + AC_MSG_CHECKING([name of open() in C library]) +- libc_open=`$OBJDUMP -T conftest | $AWK '/\*UND\*/ && $NF ~ /^open/ { print $NF }'` ++ libc_open=`$OBJDUMP -t conftest | $AWK '/\*UND\*/ && $NF ~ /^open/ { print $NF }'` + AC_DEFINE_UNQUOTED([LIBC_OPEN], $libc_open, [name of open() in libc]) + AC_MSG_RESULT($libc_open) + AC_MSG_CHECKING([name of read() in C library]) +- libc_read=`$OBJDUMP -T conftest | $AWK '/\*UND\*/ && $NF ~ /^read/ { print $NF }'` ++ libc_read=`$OBJDUMP -t conftest | $AWK '/\*UND\*/ && $NF ~ /^read/ { print $NF }'` + AC_DEFINE_UNQUOTED([LIBC_READ], $libc_read, [name of write() in libc]) + AC_MSG_RESULT($libc_read) + AC_MSG_CHECKING([name of write() in C library]) +- libc_write=`$OBJDUMP -T conftest | $AWK '/\*UND\*/ && $NF ~ /^write/ { print $NF }'` ++ libc_write=`$OBJDUMP -t conftest | $AWK '/\*UND\*/ && $NF ~ /^write/ { print $NF }'` + AC_DEFINE_UNQUOTED([LIBC_WRITE], $libc_write, [name of write() in libc]) + AC_MSG_RESULT($libc_write) + AC_MSG_CHECKING([name of fstat() in C library]) +- libc_fstat=`$OBJDUMP -T conftest | $AWK '/\*UND\*/ && $NF ~ /^_*fstat/ { print $NF }'` ++ libc_fstat=`$OBJDUMP -t conftest | $AWK '/\*UND\*/ && $NF ~ /^_*fstat/ { print $NF }'` + AC_DEFINE_UNQUOTED([LIBC_FSTAT], $libc_fstat, [name of fstat() in libc]) + AC_MSG_RESULT($libc_fstat) + ],