1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-23 00:43:28 +00:00

- 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
This commit is contained in:
Alexey Dokuchaev 2013-07-26 12:28:26 +00:00
parent ab098bfa3d
commit 68ed010955
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=323715
3 changed files with 79 additions and 15 deletions

View File

@ -1,9 +1,5 @@
# New ports collection makefile for: heirloom
# Date created: 3 June 2004
# Whom: Cyrille.Lefevre@laposte.net
#
# Created by: Cyrille Lefevre <Cyrille.Lefevre@laposte.net>
# $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 <bsd.port.pre.mk>
OPTIONS_DEFINE= DOCS
.include <bsd.port.options.mk>
.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 LICENSE/LICENSE LICENSE/LUCENT \
# more/NOTES nawk/NOTES oawk/EXPLAIN oawk/NOTES \
# oawk/README ps/NOTES shl/NOTES tar/NOTES
post-patch:
# FreeBSD does not have neither <malloc.h> nor <alloca.h> system headers
@${GREP} -ERl --null 'm?alloca?\.h' ${WRKSRC} | \
${XARGS} -0 ${REINPLACE_CMD} -E '/<m?alloca?\.h>/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 <bsd.port.post.mk>
.include <bsd.port.mk>

View File

@ -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 <inttypes.h>'; 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.y >awk.g.2001.y

View File

@ -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