summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoragc <agc@pkgsrc.org>1998-09-15 17:05:04 +0000
committeragc <agc@pkgsrc.org>1998-09-15 17:05:04 +0000
commitaaf5955178c6caf930db329731cd58dd4a22ed82 (patch)
tree48ae37e9d777cd9f9314459490224420971e45c6
parent9050bdb93146490b7110b6fd84da6a7ce5bf8516 (diff)
downloadpkgsrc-aaf5955178c6caf930db329731cd58dd4a22ed82.tar.gz
Modifications for a read-only pkgsrc (but writable WRKOBJDIR).
-rw-r--r--graphics/rayshade/Makefile17
-rw-r--r--graphics/urt/Makefile14
-rw-r--r--mbone/nte/Makefile14
-rw-r--r--mbone/vat/Makefile12
-rw-r--r--mk/bsd.pkg.mk53
-rw-r--r--net/p5-SNMP/Makefile10
-rw-r--r--plan9/9term/Makefile17
-rw-r--r--print/ghostscript5/Makefile19
8 files changed, 102 insertions, 54 deletions
diff --git a/graphics/rayshade/Makefile b/graphics/rayshade/Makefile
index 9dd650eb36e..76bd213e6fd 100644
--- a/graphics/rayshade/Makefile
+++ b/graphics/rayshade/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 1998/08/24 18:11:40 agc Exp $
+# $NetBSD: Makefile,v 1.2 1998/09/15 17:05:04 agc Exp $
# FreeBSD Id: Makefile,v 1.1.1.1 1998/05/26 04:04:11 mph Exp
#
@@ -11,7 +11,15 @@ EXTRACT_SUFX= .tar.Z
MAINTAINER= packages@netbsd.org
-BUILD_DEPENDS= ${PKGSRCDIR}/graphics/urt/${WRKDIR:T}/include/rle.h:../../graphics/urt:patch
+.include "../../mk/bsd.prefs.mk"
+
+.ifdef WRKOBJDIR
+BUILD_ROOT= ${WRKOBJDIR}
+.else
+BUILD_ROOT= ${PKGSRCDIR}
+.endif
+
+BUILD_DEPENDS= ${BUILD_ROOT}/graphics/urt/${WRKDIR:T}/include/rle.h:../../graphics/urt:configure
DEPENDS+= urt-3.1b1:../../graphics/urt
HAS_CONFIGURE= yes
@@ -20,8 +28,9 @@ CONFIGURE_ARGS+= < ${WRKDIR}/config.ans
ALL_TARGET=
pre-configure:
- ${SED} -e 's|@CFLAGS@|${CFLAGS}|g' -e 's|\$${PREFIX}|${PREFIX}|g' \
- -e 's|\$${URTDIR}|${.CURDIR}/../../graphics/urt/${WRKDIR:T}|g' \
+ ${SED} -e 's|@CFLAGS@|${CFLAGS}|g' \
+ -e 's|\$${PREFIX}|${PREFIX}|g' \
+ -e 's|\$${URTDIR}|${BUILD_ROOT}/graphics/urt/${WRKDIR:T}|g' \
${FILESDIR}/config.ans > ${WRKDIR}/config.ans
do-install:
diff --git a/graphics/urt/Makefile b/graphics/urt/Makefile
index b263549e7bc..b16c9bf10df 100644
--- a/graphics/urt/Makefile
+++ b/graphics/urt/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 1998/08/24 16:55:35 agc Exp $
+# $NetBSD: Makefile,v 1.2 1998/09/15 17:05:05 agc Exp $
# FreeBSD Id: Makefile,v 1.6 1998/02/11 08:48:26 tg Exp
#
@@ -10,8 +10,16 @@ DISTFILES= urt-3.1b.tar.Z urt-doc.tar urt-img.tar
MAINTAINER= packages@netbsd.org
+.include "../../mk/bsd.prefs.mk"
+
+.ifdef WRKOBJDIR
+BUILD_ROOT= ${WRKOBJDIR}
+.else
+BUILD_ROOT= ${PKGSRCDIR}
+.endif
+
DEPENDS+= tiff-3.4:../../graphics/tiff
-BUILD_DEPENDS+= ../../graphics/netpbm/${WRKDIR:T}/netpbm:../../graphics/netpbm:build
+BUILD_DEPENDS+= ${BUILD_ROOT}/graphics/netpbm/${WRKDIR:T}/netpbm:../../graphics/netpbm:build
EXTRACT_ONLY= urt-3.1b.tar.Z
PATCH_SITES= ftp://ptolemy.berkeley.edu/pub/misc/urt/
@@ -23,7 +31,7 @@ CONFIGURE_SCRIPT=Configure
CONFIGURE_ARGS= config/urt
HAS_CONFIGURE= yes
MAKEFILE= makefile
-MAKE_ENV+= PKGSRCDIR=${.CURDIR}/../.. WORKINGDIRNAME=${WRKDIR:T}
+MAKE_ENV+= PKGSRCDIR=${BUILD_ROOT} WORKINGDIRNAME=${WRKDIR:T}
ALL_TARGET=
post-install:
diff --git a/mbone/nte/Makefile b/mbone/nte/Makefile
index 11c08524901..9da25deb4c5 100644
--- a/mbone/nte/Makefile
+++ b/mbone/nte/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.9 1998/08/20 15:17:11 tsarna Exp $
+# $NetBSD: Makefile,v 1.10 1998/09/15 17:05:05 agc Exp $
#
DISTNAME= nt.1.5a23
@@ -8,10 +8,18 @@ MASTER_SITES= ftp://cs.ucl.ac.uk/mice/nte/
MAINTAINER= mycroft@netbsd.org
-BUILD_DEPENDS= ${PKGSRCDIR}/x11/tk80/${WRKDIR:T}/tk8.0/generic/default.h:${TK_DIR}:configure
+.include "../../mk/bsd.prefs.mk"
+
+.ifdef WRKOBJDIR
+BUILD_ROOT= ${WRKOBJDIR}
+.else
+BUILD_ROOT= ${PKGSRCDIR}
+.endif
+
+BUILD_DEPENDS= ${BUILD_ROOT}/x11/tk80/${WRKDIR:T}/tk8.0/generic/default.h:${TK_DIR}:configure
DEPENDS+= tk-8.0p2:../../x11/tk80
-TK_DIR= ${PKGSRCDIR}/x11/tk80
+TK_DIR= ${BUILD_ROOT}/x11/tk80
TK_SRC= ${TK_DIR}/${WRKDIR:T}/tk8.0
RESTRICTED= "Contains DES encryption"
diff --git a/mbone/vat/Makefile b/mbone/vat/Makefile
index 60d9b3b7de6..3bc507450d1 100644
--- a/mbone/vat/Makefile
+++ b/mbone/vat/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.15 1998/08/20 15:17:11 tsarna Exp $
+# $NetBSD: Makefile,v 1.16 1998/09/15 17:05:06 agc Exp $
# FreeBSD Id: Makefile,v 1.4 1997/09/11 03:54:43 fenner Exp
#
@@ -17,7 +17,15 @@ BUILD_DEPENDS= ${GSM_WORK}/lib/libgsm.a:${GSM_DIR}:build
DEPENDS+= tk-8.0p2:../../x11/tk80
#DEPENDS+= gsm-1.0.10:${GSM_DIR}
-GSM_DIR= ${PKGSRCDIR}/audio/gsm
+.include "../../mk/bsd.prefs.mk"
+
+.ifdef WRKOBJDIR
+BUILD_ROOT= ${WRKOBJDIR}
+.else
+BUILD_ROOT= ${PKGSRCDIR}
+.endif
+
+GSM_DIR= ${BUILD_ROOT}/audio/gsm
GSM_WORK= ${GSM_DIR}/${WRKDIR:T}/gsm-1.0-pl10
GNU_CONFIGURE= yes
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index b76a70edd3e..3bd03afcea6 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.160 1998/09/14 17:07:46 garbled Exp $
+# $NetBSD: bsd.pkg.mk,v 1.161 1998/09/15 17:05:08 agc Exp $
#
# This file is in the public domain.
#
@@ -286,29 +286,35 @@ SHAREGRP = ${DOCGRP}
SHAREMODE = ${DOCMODE}
.endif
-.if !defined(NO_WRKDIR)
-.if defined(OBJMACHINE)
+# If WRKOBJDIR is set, use that tree to build
+.ifdef WRKOBJDIR
+__canonical_PKGSRCDIR!= cd ${PKGSRCDIR}; pwd -P
+__canonical_CURDIR!= cd ${.CURDIR}; pwd -P
+PKGSRC_SUBDIR= ${__canonical_CURDIR:S,${__canonical_PKGSRCDIR}/,,}
+BUILD_DIR?= ${WRKOBJDIR}/${PKGSRC_SUBDIR}
+.else
+BUILD_DIR?= ${.CURDIR}
+.endif # WRKOBJDIR
+
+# If OBJMACHINE is set, use ${MACHINE_ARCH} in the working directory name
+.ifdef OBJMACHINE
WRKDIR_BASENAME?= work.${MACHINE_ARCH}
-.else # OBJMACHINE
+.else
WRKDIR_BASENAME?= work
-.endif # OBJMACHINE
-WRKDIR?= ${.CURDIR}/${WRKDIR_BASENAME}
-.else # !NO_WRKDIR
-WRKDIR?= ${.CURDIR}
+.endif
+
+.ifdef NO_WRKDIR
+WRKDIR?= ${BUILD_DIR}
+.else
+WRKDIR?= ${BUILD_DIR}/${WRKDIR_BASENAME}
.endif # !NO_WRKDIR
+
.if defined(NO_WRKSUBDIR)
WRKSRC?= ${WRKDIR}
.else # NO_WRKSUBDIR
WRKSRC?= ${WRKDIR}/${DISTNAME}
.endif # NO_WRKSUBDIR
-.if defined(WRKOBJDIR)
-# XXX Is pwd -P available in FreeBSD's /bin/sh?
-__canonical_PKGSRCDIR!= cd ${PKGSRCDIR}; pwd -P
-__canonical_CURDIR!= cd ${.CURDIR}; pwd -P
-PORTSUBDIR= ${__canonical_CURDIR:S,${__canonical_PKGSRCDIR}/,,}
-.endif
-
# A few aliases for *-install targets
INSTALL_PROGRAM?= \
${INSTALL} ${COPY} ${STRIPFLAG} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE}
@@ -829,13 +835,14 @@ mirror-distfiles:
.if !target(do-extract)
do-extract:
-.if !defined(NO_WRKDIR)
-.if defined(WRKOBJDIR)
- @${RM} -rf ${WRKOBJDIR}/${PORTSUBDIR}/${WRKDIR_BASENAME}
- @${MKDIR} -p ${WRKOBJDIR}/${PORTSUBDIR}/${WRKDIR_BASENAME}
- @echo "${WRKDIR} -> ${WRKOBJDIR}/${PORTSUBDIR}/${WRKDIR_BASENAME}"
- @# XXX whatif a build is going on right now? Is this wise?
- @${LN} -sf ${WRKOBJDIR}/${PORTSUBDIR}/${WRKDIR_BASENAME} ${WRKDIR}
+.ifndef NO_WRKDIR
+.ifdef WRKOBJDIR
+ @${RM} -rf ${WRKOBJDIR}/${PKGSRC_SUBDIR}/${WRKDIR_BASENAME}
+ @${MKDIR} -p ${WRKOBJDIR}/${PKGSRC_SUBDIR}/${WRKDIR_BASENAME}
+ @if [ ${WRKDIR} != ${WRKOBJDIR}/${PKGSRC_SUBDIR}/${WRKDIR_BASENAME} ]; then \
+ ${ECHO} "${WRKDIR} -> ${WRKOBJDIR}/${PKGSRC_SUBDIR}/${WRKDIR_BASENAME}"; \
+ @${LN} -sf ${WRKOBJDIR}/${PKGSRC_SUBDIR}/${WRKDIR_BASENAME} ${WRKDIR}; \
+ fi
.else
@${RM} -rf ${WRKDIR}
@${MKDIR} ${WRKDIR}
@@ -1323,7 +1330,7 @@ clean: pre-clean
@${ECHO_MSG} "===> Cleaning for ${PKGNAME}"
.if !defined(NO_WRKDIR)
.if defined(WRKOBJDIR)
- @${RM} -rf ${WRKOBJDIR}/${PORTSUBDIR}
+ @${RM} -rf ${WRKOBJDIR}/${PKGSRC_SUBDIR}
@${RM} -f ${WRKDIR}
.else
@if [ -d ${WRKDIR} ]; then \
diff --git a/net/p5-SNMP/Makefile b/net/p5-SNMP/Makefile
index 8ad045a8627..175bf3f8371 100644
--- a/net/p5-SNMP/Makefile
+++ b/net/p5-SNMP/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 1998/05/24 12:33:45 hubertf Exp $
+# $NetBSD: Makefile,v 1.2 1998/09/15 17:05:06 agc Exp $
# FreeBSD Id: Makefile,v 1.1.1.1 1997/06/27 01:53:13 jfitz Exp
#
@@ -10,14 +10,14 @@ MASTER_SITE_SUBDIR= SNMP
MAINTAINER= packages@netbsd.org
-BUILD_DEPENDS= ${PREFIX}/lib/libsnmp.a:${PKGSRCDIR}/net/ucd-snmp
+BUILD_DEPENDS= ${PREFIX}/lib/libsnmp.a:../../net/ucd-snmp
-USE_PERL5= YES
+USE_PERL5= yes
do-configure:
- @ cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${PREFIX}/bin/perl Makefile.PL
+ @cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${PREFIX}/bin/perl Makefile.PL
post-install:
- @ ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/lib/perl5/site_perl/README.SNMP
+ @${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/lib/perl5/site_perl/README.SNMP
.include "../../mk/bsd.pkg.mk"
diff --git a/plan9/9term/Makefile b/plan9/9term/Makefile
index 0ec0f023236..f98be929979 100644
--- a/plan9/9term/Makefile
+++ b/plan9/9term/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.13 1998/09/09 12:29:48 agc Exp $
+# $NetBSD: Makefile,v 1.14 1998/09/15 17:05:07 agc Exp $
# FreeBSD Id: Makefile,v 1.5 1996/12/07 23:43:56 asami Exp
#
@@ -10,15 +10,18 @@ MASTER_SITES= ftp://ftp.ecf.toronto.edu/pub/plan9/matty/
MAINTAINER= packages@netbsd.org
HOMEPAGE= http://www.psrg.cs.usyd.edu.au/~matty/9term/index.html
-# needs library and private header, but not during runtime
-BUILD_DEPENDS= ${PKGSRCDIR}/plan9/sam/${WRKDIR:T}/libframe/libframe.a:../../plan9/sam
+.include "../../mk/bsd.prefs.mk"
-OPSYS!= uname -s
-.if (${OPSYS} == "NetBSD")
-MANCOMPRESSED= yes
+# needs library and private header, but not during runtime
+.ifdef WRKOBJDIR
+BUILD_ROOT= ${WRKOBJDIR}
+.else
+BUILD_ROOT= ${PKGSRCDIR}
.endif
+BUILD_DEPENDS= ${BUILD_ROOT}/plan9/sam/${WRKDIR:T}/libframe/libframe.a:../../plan9/sam
+MANCOMPRESSED= yes
NO_WRKSUBDIR= yes
-MAKE_ENV+= WRKDIR=${WRKDIR} PKGSRCDIR=${PKGSRCDIR}
+MAKE_ENV+= WRKDIR=${WRKDIR} PKGSRCDIR=${BUILD_ROOT}
.include "../../mk/bsd.pkg.mk"
diff --git a/print/ghostscript5/Makefile b/print/ghostscript5/Makefile
index 4b8d0976fc7..fec700df32c 100644
--- a/print/ghostscript5/Makefile
+++ b/print/ghostscript5/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.23 1998/08/20 15:17:23 tsarna Exp $
+# $NetBSD: Makefile,v 1.24 1998/09/15 17:05:07 agc Exp $
# FreeBSD Id: Makefile,v 1.14 1997/10/13 11:22:43 asami Exp
#
@@ -14,11 +14,10 @@ DISTFILES= ${GS_SOURCES} ${GS_FONTS_STD} ${GS_FONTS_OTHER} \
MAINTAINER= explorer@netbsd.org
HOMEPAGE= http://www.cs.wisc.edu/~ghost/index.html
-BUILD_DEPENDS= ../../graphics/jpeg/${WRKDIR:T}/jpeg-6b:../../graphics/jpeg:extract \
- ../../graphics/png/${WRKDIR:T}/libpng-1.0.2:../../graphics/png:extract \
+BUILD_DEPENDS= ${BUILD_ROOT}/graphics/jpeg/${WRKDIR:T}/jpeg-6b:../../graphics/jpeg:extract \
+ ${BUILD_ROOT}/graphics/png/${WRKDIR:T}/libpng-1.0.2:../../graphics/png:extract \
unzip:../../archivers/unzip
-MAKE_ENV= PORTSDIR=${.CURDIR}/../..
EXTRACT_ONLY= ${GS_SOURCES}
WRKSRC= ${WRKDIR}/gs5.10
MAKEFILE= unix-gcc.mak
@@ -43,6 +42,12 @@ PDF_SEC= pdf_sec.ps
.include "../../mk/bsd.prefs.mk"
+.ifdef WRKOBJDIR
+BUILD_ROOT= ${WRKOBJDIR}
+.else
+BUILD_ROOT= ${PKGSRCDIR}
+.endif
+
.if defined(PAPERSIZE) && (${PAPERSIZE} == "A4" || ${PAPERSIZE} == "a4")
PAPERSIZE_DEF= -DA4
.endif
@@ -58,13 +63,13 @@ post-extract:
${TOUCH} ${WRKSRC}/adler32.o
${TOUCH} ${WRKSRC}/deflate.o
${TOUCH} ${WRKSRC}/trees.o
- ${LN} -s ${PKGSRCDIR}/graphics/jpeg/${WRKDIR:T}/jpeg-6b ${WRKSRC}/jpeg-6b
- ${LN} -s ${PKGSRCDIR}/graphics/png/${WRKDIR:T}/libpng-1.0.2 ${WRKSRC}/libpng
+ ${LN} -s ${BUILD_ROOT}/graphics/jpeg/${WRKDIR:T}/jpeg-6b ${WRKSRC}/jpeg-6b
+ ${LN} -s ${BUILD_ROOT}/graphics/png/${WRKDIR:T}/libpng-1.0.2 ${WRKSRC}/libpng
cd ${WRKSRC} && unzip -La ${DISTDIR}/${HP850_DRV}
${CP} ${DISTDIR}/${PDF_SEC} ${WRKSRC}
do-configure:
- @${SETENV} PORTSDIR=${.CURDIR}/../.. WRKSRC=${WRKSRC} \
+ @${SETENV} WRKSRC=${WRKSRC} \
${SH} ${SCRIPTDIR}/configure${SCRIPT_SUFFIX}
do-build: