From owner-svn-ports-head@FreeBSD.ORG Fri Jul 26 12:28:27 2013 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2941E2EE; Fri, 26 Jul 2013 12:28:27 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 088B926FE; Fri, 26 Jul 2013 12:28:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6QCSQ0i020712; Fri, 26 Jul 2013 12:28:26 GMT (envelope-from danfe@svn.freebsd.org) Received: (from danfe@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6QCSQxa020709; Fri, 26 Jul 2013 12:28:26 GMT (envelope-from danfe@svn.freebsd.org) Message-Id: <201307261228.r6QCSQxa020709@svn.freebsd.org> From: Alexey Dokuchaev Date: Fri, 26 Jul 2013 12:28:26 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r323715 - in head/sysutils/heirloom: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jul 2013 12:28:27 -0000 Author: danfe Date: Fri Jul 26 12:28:26 2013 New Revision: 323715 URL: http://svnweb.freebsd.org/changeset/ports/323715 Log: - Attempt to fix parallel build (I've fixed most notable cases, and it allowed my 4-core Q9550 to build it -- but there might be more, since quality of this software (esp. makefiles) is not particularly high - Try to respect CFLAGS in addition to CC, wrap one overly long line - Cleanup Makefile while here: trim header, sort the knobs, employ USES - Convert NOPORTDOCS -> PORT_OPTIONS:MDOCS, add OPTIONS_DEFINE, etc. Reported by: pointyhat-west Added: head/sysutils/heirloom/files/patch-nawk_Makefile.mk (contents, props changed) head/sysutils/heirloom/files/patch-oawk_Makefile.mk (contents, props changed) Modified: head/sysutils/heirloom/Makefile Modified: head/sysutils/heirloom/Makefile ============================================================================== --- head/sysutils/heirloom/Makefile Fri Jul 26 12:25:46 2013 (r323714) +++ head/sysutils/heirloom/Makefile Fri Jul 26 12:28:26 2013 (r323715) @@ -1,9 +1,5 @@ -# New ports collection makefile for: heirloom -# Date created: 3 June 2004 -# Whom: Cyrille.Lefevre@laposte.net -# +# Created by: Cyrille Lefevre # $FreeBSD$ -# PORTNAME= heirloom PORTVERSION= 070715 @@ -12,27 +8,29 @@ CATEGORIES= sysutils MASTER_SITES= SF MAINTAINER= gahr@FreeBSD.org -COMMENT= The Heirloom Toolchest is a collection of standard Unix utilities +COMMENT= Collection of standard Unix utilities BUILD_DEPENDS= ksh:${PORTSDIR}/shells/pdksh RUN_DEPENDS:= ${BUILD_DEPENDS} USE_BZIP2= yes -USE_GMAKE= yes -MAKE_ARGS= CC=${CC} +USES= gmake +MAKE_ARGS= CC=${CC} CFLAGS="${CFLAGS}" MAKEFILE= makefile -ALL_TARGET= +ALL_TARGET= # DATADIR= ${PREFIX}/${PORTNAME} REINPLACE_SUB= DATADIR="${DATADIR}" -.include +OPTIONS_DEFINE= DOCS + +.include .if ${OSVERSION} >= 900007 EXTRA_PATCHES= ${FILESDIR}/extra-utmpx .endif .if ${ARCH} == "powerpc" -BROKEN= Does not compile on powerpc +BROKEN= does not compile on ${ARCH} .endif _MANPREFIX= ${DATADIR}/usr/share/man/5man @@ -87,16 +85,29 @@ DOC_FILES= CHANGES LICENSE/COPYING LICEN # more/NOTES nawk/NOTES oawk/EXPLAIN oawk/NOTES \ # oawk/README ps/NOTES shl/NOTES tar/NOTES +post-patch: +# FreeBSD does not have neither nor system headers + @${GREP} -ERl --null 'm?alloca?\.h' ${WRKSRC} | \ + ${XARGS} -0 ${REINPLACE_CMD} -E '//d' +# Avoid a race (to unbreak parallel builds) + @${REINPLACE_CMD} -e 's|htemp2|$$@.temp|g' \ + ${WRKSRC}/spell/Makefile.mk + pre-configure: @${REINPLACE_CMD} ${REINPLACE_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ ${WRKSRC}/build/mk.config ${WRKSRC}/su/su.dfl.in - @${REINPLACE_CMD} -e 's|/sbin/sh| ${SH}|' ${SH2FIX:S|^|${WRKSRC}/build/|} + @${REINPLACE_CMD} -e 's|/sbin/sh| ${SH}|' \ + ${SH2FIX:S|^|${WRKSRC}/build/|} + +# XXX: hack to avoid inner race (for -jX builds); should be fixed properly +# one day (e.g. by factoring out special target in the top makefile) +pre-build: + ${MAKE} -C ${WRKSRC}/libcommon -f Makefile.mk headers post-install: compress-man install-doc install-doc: -.if !defined(NOPORTDOCS) - @${MKDIR} ${DOCSDIR} +.if ${PORT_OPTIONS:MDOCS} @${MKDIR} ${DOCSDIR}/LICENSE . for f in ${DOC_FILES} @${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}/${f} @@ -106,4 +117,4 @@ install-doc: #. endfor .endif -.include +.include Added: head/sysutils/heirloom/files/patch-nawk_Makefile.mk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/heirloom/files/patch-nawk_Makefile.mk Fri Jul 26 12:28:26 2013 (r323715) @@ -0,0 +1,21 @@ +--- nawk/Makefile.mk.orig 2005-02-09 23:58:39.000000000 +0800 ++++ nawk/Makefile.mk 2013-07-26 18:01:39.000000000 +0800 +@@ -12,14 +12,14 @@ + $(LD) $(LDFLAGS) awk.g.2001.o $(OBJ) version_su3.o $(LUXRE) -lm $(LCOMMON) $(LWCHAR) $(LIBS) -o awk_su3 + + awk.g.c: awk.g.y +- $(YACC) -d awk.g.y +- mv -f y.tab.c awk.g.c ++ $(YACC) -d awk.g.y && mv -f y.tab.c awk.g.c ++ ++y.tab.h: awk.g.y | awk.g.c + (echo '1i'; echo '#include '; echo '.'; echo 'w';) | \ + ed -s y.tab.h + + awk.g.2001.c: awk.g.2001.y awk.g.c +- $(YACC) awk.g.2001.y +- mv -f y.tab.c awk.g.2001.c ++ $(YACC) awk.g.2001.y && mv -f y.tab.c awk.g.2001.c + + awk.g.2001.y: awk.g.y + sed -f rerule.sed awk.g.2001.y Added: head/sysutils/heirloom/files/patch-oawk_Makefile.mk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/heirloom/files/patch-oawk_Makefile.mk Fri Jul 26 12:28:26 2013 (r323715) @@ -0,0 +1,32 @@ +--- oawk/Makefile.mk.orig 2004-10-03 02:23:20.000000000 +0800 ++++ oawk/Makefile.mk 2013-07-26 18:34:22.000000000 +0800 +@@ -4,9 +4,7 @@ + $(LD) $(LDFLAGS) awk.g.o awk.lx.o b.o main.o token.o tran.o lib.o run.o parse.o proctab.o version.o $(LUXRE) -lm $(LCOMMON) $(LWCHAR) $(LIBS) -o awk + + awk.g.c: awk.g.y +- $(YACC) -d awk.g.y +- mv -f y.tab.c awk.g.c +- mv -f y.tab.h awk.g.h ++ $(YACC) -d -o $@ awk.g.y + + token.c: awk.h + echo '#include "awk.h"' > $@ +@@ -78,11 +76,11 @@ + awk.g.o: awk.def + awk.g.o: awk.def + awk.lx.o: awk.def +-b.o: awk.def +-lib.o: awk.def +-main.o: awk.def +-parse.o: awk.def +-proc.o: awk.def ++b.o: awk.def awk.h ++lib.o: awk.def awk.h ++main.o: awk.def awk.h ++parse.o: awk.def awk.h ++proc.o: awk.def awk.h + proctab.o: awk.def +-run.o: awk.def +-tran.o: awk.def ++run.o: awk.def awk.h ++tran.o: awk.def awk.h