Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 May 2017 12:15:21 +0000 (UTC)
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r441310 - in head/textproc/msort: . files
Message-ID:  <201705201215.v4KCFLLH000216@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: danfe
Date: Sat May 20 12:15:20 2017
New Revision: 441310
URL: https://svnweb.freebsd.org/changeset/ports/441310

Log:
  - 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.

Added:
  head/textproc/msort/files/patch-RegressionTests_RunTests.sh   (contents, props changed)
Modified:
  head/textproc/msort/Makefile

Modified: head/textproc/msort/Makefile
==============================================================================
--- head/textproc/msort/Makefile	Sat May 20 12:02:07 2017	(r441309)
+++ head/textproc/msort/Makefile	Sat May 20 12:15:20 2017	(r441310)
@@ -13,28 +13,27 @@ COMMENT=	Sorting files in sophisticated 
 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>

Added: head/textproc/msort/files/patch-RegressionTests_RunTests.sh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/textproc/msort/files/patch-RegressionTests_RunTests.sh	Sat May 20 12:15:20 2017	(r441310)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201705201215.v4KCFLLH000216>