diff options
author | danfe <danfe@FreeBSD.org> | 2017-05-20 20:15:20 +0800 |
---|---|---|
committer | danfe <danfe@FreeBSD.org> | 2017-05-20 20:15:20 +0800 |
commit | 2cf6b53bc791da6c5c6635f08ab9d27d3507d7d8 (patch) | |
tree | 0301b7ab262e4ce5d51ea742dfd9b12ce739af5c /textproc | |
parent | 56d511a435a8db91cbb7081bd0f4fb30317ea7a2 (diff) | |
download | freebsd-ports-gnome-2cf6b53bc791da6c5c6635f08ab9d27d3507d7d8.tar.gz freebsd-ports-gnome-2cf6b53bc791da6c5c6635f08ab9d27d3507d7d8.tar.zst freebsd-ports-gnome-2cf6b53bc791da6c5c6635f08ab9d27d3507d7d8.zip |
- Unbreak the build: the problem was caused by header file named `limits.h'
present in the source tree which, with -I. option passed to the compiler,
would sometimes be picked up instead of expected `/usr/include/limits.h'.
Fix this by renaming local header file with a `${PORTNAME}_' prefix;
- Convert CPPFLAGS/LDFLAGS/MAKE_ENV variables to USES+=localbase;
- Rewrite condition expression in standard syntax to get rid of dependency
on `shells/bash', and wrap an overly long line while I'm here.
Diffstat (limited to 'textproc')
-rw-r--r-- | textproc/msort/Makefile | 17 | ||||
-rw-r--r-- | textproc/msort/files/patch-RegressionTests_RunTests.sh | 11 |
2 files changed, 19 insertions, 9 deletions
diff --git a/textproc/msort/Makefile b/textproc/msort/Makefile index 37c36efe75d7..3fdf49081ee1 100644 --- a/textproc/msort/Makefile +++ b/textproc/msort/Makefile @@ -13,28 +13,27 @@ COMMENT= Sorting files in sophisticated ways LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/COPYING -BROKEN= fails to build - LIB_DEPENDS= libtre.so:textproc/libtre \ libuninum.so:devel/libuninum \ libutf8proc.so:textproc/utf8proc RUN_DEPENDS= iwidgets>=0:x11-toolkits/iwidgets -TEST_DEPENDS= ${LOCALBASE}/bin/bash:shells/bash BROKEN_aarch64= Fails to link: missing sbrk +USES= gettext localbase tk:wrapper,run CONFIGURE_ENV= ac_cv_lib_tre_regwcomp=yes -CPPFLAGS+= -I${LOCALBASE}/include -LDFLAGS+= -L${LOCALBASE}/lib -MAKE_ENV+= INCLUDES="-I${LOCALBASE}/include" GNU_CONFIGURE= yes -USES= gettext tk:wrapper,run TEST_TARGET= test PLIST_FILES= bin/msg bin/msort man/man1/msort.1.gz post-patch: - @${REINPLACE_CMD} -e "s|bash|${LOCALBASE}/bin/bash|g" ${WRKSRC}/RegressionTests/Makefile - @${REINPLACE_CMD} -e "s|msort|../&|g" ${WRKSRC}/RegressionTests/RunTests.sh \ + @${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 <bsd.port.mk> diff --git a/textproc/msort/files/patch-RegressionTests_RunTests.sh b/textproc/msort/files/patch-RegressionTests_RunTests.sh new file mode 100644 index 000000000000..1f10c88d7ffa --- /dev/null +++ b/textproc/msort/files/patch-RegressionTests_RunTests.sh @@ -0,0 +1,11 @@ +--- RegressionTests/RunTests.sh.orig 2009-08-05 03:09:24 UTC ++++ RegressionTests/RunTests.sh +@@ -54,7 +54,7 @@ msort -j -q -l -w -c n -Q < CheckOnlyTes + rstat2=$? + cmp -s CheckOnlyTest01B.result CheckOnlyTest01.norm + cstat2=$? +-if [[($rstat1 == 0) && ($cstat1 == 0) && ($cstat2 == 0) && ($rstat2 > 0)]]; ++if [ $rstat1 -eq 0 -a $cstat1 -eq 0 -a $cstat2 -eq 0 -a $rstat2 -gt 0 ]; + then echo "PASSED" >> TestResults; + else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; + fi |