diff --git a/textproc/msort/Makefile b/textproc/msort/Makefile index 575c51b0e61a..9f22d2bf9d18 100644 --- a/textproc/msort/Makefile +++ b/textproc/msort/Makefile @@ -1,38 +1,35 @@ PORTNAME= msort PORTVERSION= 8.53 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= textproc MASTER_SITES= http://billposer.org/Software/Downloads/ MAINTAINER= ports@FreeBSD.org COMMENT= Sorting files in sophisticated ways WWW= https://billposer.org/Software/msort.html LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/COPYING -BROKEN_aarch64= fails to link: missing sbrk -BROKEN_riscv64= fails to link: missing sbrk - LIB_DEPENDS= libtre.so:textproc/libtre \ libuninum.so:devel/libuninum \ libutf8proc.so:textproc/utf8proc RUN_DEPENDS= iwidgets>=0:x11-toolkits/iwidgets USES= gettext localbase tk:wrapper,run CONFIGURE_ENV= ac_cv_lib_tre_regwcomp=yes GNU_CONFIGURE= yes TEST_TARGET= test PLIST_FILES= bin/msg bin/msort man/man1/msort.1.gz post-patch: @${MV} ${WRKSRC}/limits.h ${WRKSRC}/${PORTNAME}_limits.h @${REINPLACE_CMD} -e 's,limits\.h,${PORTNAME}_&,' \ ${WRKSRC}/Makefile.in ${WRKSRC}/info.c \ ${WRKSRC}/input.c ${WRKSRC}/msort.c @${REINPLACE_CMD} -e 's|bash|sh|' ${WRKSRC}/RegressionTests/Makefile @${REINPLACE_CMD} -e 's|msort|../&|' \ ${WRKSRC}/RegressionTests/RunTests.sh .include diff --git a/textproc/msort/files/patch-msort.c b/textproc/msort/files/patch-msort.c new file mode 100644 index 000000000000..16c6763655b0 --- /dev/null +++ b/textproc/msort/files/patch-msort.c @@ -0,0 +1,38 @@ +--- msort.c.orig ++++ msort.c +@@ -639,7 +639,6 @@ + char *endptr; /* Used by strtol */ + char * tmpstr; + char *FirstLocale = NULL; +- void *InitialBreak; + int lgoindex; /* Unused but needed by getopt_long */ + char t; + #ifndef USEUTF8PROC +@@ -720,7 +719,6 @@ + xav = av; + xac = ac; + +- InitialBreak = sbrk(0); + #ifdef HAVE_SETLOCALE + (void) setlocale(LC_ALL,""); + #endif +@@ -1946,18 +1944,14 @@ + + if(LogP) { + +- /* Record random number generator seed, dynamic memory usage and number of comparisons */ ++ /* Record random number generator seed and number of comparisons */ + #ifdef HAVE_PRINTF_THSEP +- PrintLog(_("Dynamically allocated memory: %'15d bytes\n"), +- ((char *)sbrk(0) - (char *)InitialBreak)); + PrintLog(_("Random number generator seed: %15u\n"),RandomSeed); + #ifndef NOCOMPARISONCNT + PrintLog(_("Comparisons: %'15llu\n"),ComparisonCnt); + if(VerboseP) fprintf(stderr,_("Comparisons: %'15llu\n"),ComparisonCnt); + #endif + #else +- PrintLog("Dynamically allocated memory: %d bytes\n", +- ((char *)sbrk(0) - (char *)InitialBreak)); + PrintLog(_("Random number generator seed: %15u\n"),RandomSeed); + #ifndef NOCOMPARISONCNT + PrintLog(_("Comparisons: %'14llu\n"),ComparisonCnt);