Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Aug 1998 18:24:15 -0700 (PDT)
From:      asami@FreeBSD.ORG (Satoshi Asami)
To:        ac199@hwcn.org
Cc:        ports@FreeBSD.ORG
Subject:   Re: cvs commit: ports/x11-wm/afterstep/pkg PLIST ports/x11-wm/amiwm/pkg         PLIST ports/x11-wm/fvwm2/pkg PLIST ports/x11-wm/fvwm95/pkg PLIST         ports/x11-wm/mlvwm/pkg PLIST ports/x11-wm/qvwm/pkg PLIST
Message-ID:  <199808220124.SAA13367@silvia.hip.berkeley.edu>
In-Reply-To: <Pine.BSF.3.96.980821194349.2702A-100000@localhost> (message from Tim Vanderhoek on Fri, 21 Aug 1998 20:23:19 -0400 (EDT))

next in thread | previous in thread | raw e-mail | index | archive | help
 * From: Tim Vanderhoek <ac199@hwcn.org>

 * Just for the record, a roughtly more accurate count yields ~220. 
 * Of this, ~150 have USE_IMAKE defined.

Ok.

By the way, I found a couple of ports (japanese/Canna and astro/xtide)
that define USE_IMAKE and not define NO_INSTALL_MANPAGES and still
install manpages uncompressed.  So I guess I need another variable to
turn off MANCOMPRESSED.

I tentatively named it MANNOTCOMPRESSED.  I think the logic is getting 
a little too twisted, on the other hand this seems to minimize the
number of lines in Makefiles.

Satoshi
-------
Index: bsd.port.mk
===================================================================
RCS file: /home/ncvs/src/share/mk/bsd.port.mk,v
retrieving revision 1.227.2.46
diff -u -r1.227.2.46 bsd.port.mk
--- bsd.port.mk	1998/08/15 17:37:46	1.227.2.46
+++ bsd.port.mk	1998/08/21 10:41:30
@@ -99,7 +99,6 @@
 #				  (default: ${.CURDIR}/files)
 # PKGDIR 		- A direction containing any package creation files.
 #				  (default: ${.CURDIR}/pkg)
-# PKG_DBDIR		- Where package installation is recorded (default: /var/db/pkg)
 # FORCE_PKG_REGISTER - If set, it will overwrite any existing package
 #				  registration information in ${PKG_DBDIR}/${PKGNAME}.
 # NO_MTREE		- If set, will not invoke mtree from bsd.port.mk from
@@ -117,7 +116,6 @@
 # NO_LATEST_LINK - Do not install the "Latest" link for package.  Define this
 #				  if this port is a beta version of another stable port
 #				  which is also in the tree.
-# NO_PKG_REGISTER - Don't register a port install as a package.
 # NO_WRKSUBDIR	- Assume port unpacks directly into ${WRKDIR}.
 # NO_WRKDIR		- There's no work directory at all; port does this someplace
 #				  else.
@@ -175,6 +173,8 @@
 # DEPENDS		- A list of other ports this package depends on being
 #				  made first.  Use this for things that don't fall into
 #				  the above two categories.
+# DEPENDS_TARGET - The target to execute when a port is calling a
+#				  dependency (default: "install").
 # EXTRACT_CMD	- Command for extracting archive (default: tar).
 # EXTRACT_SUFX	- Suffix for archive names (default: .tar.gz).
 # EXTRACT_BEFORE_ARGS -
@@ -209,10 +209,10 @@
 #
 # ECHO_MSG		- Used to print all the '===>' style prompts - override this
 #				  to turn them off (default: /bin/echo).
-# DEPENDS_TARGET - The target to execute when a port is calling a
-#				  dependency (default: "install").
 # PATCH_DEBUG	- If set, print out more information about the patches as
 #				  it attempts to apply them.
+# PKG_DBDIR		- Where package installation is recorded (default: /var/db/pkg)
+# NO_PKG_REGISTER - Don't register a port install as a package.
 #
 # Variables that serve as convenient "aliases" for your *-install targets.
 # Use these like: "${INSTALL_PROGRAM} ${WRKSRC}/prog ${PREFIX}/bin".
@@ -353,7 +353,10 @@
 .endif
 
 .if defined(USE_IMAKE)
-USE_X_PREFIX=		yes
+USE_X_PREFIX=	yes
+.if ${OPSYS} != "OpenBSD" && !defined(NO_INSTALL_MANPAGES) && !defined(MANNOTCOMPRESSED)
+MANCOMPRESSED=	yes
+.endif
 .endif
 .if defined(USE_X_PREFIX)
 USE_XLIB=		yes
@@ -1121,7 +1124,7 @@
 
 .if !target(do-package)
 do-package:
-	@if [ -e ${PLIST} ]; then \
+	@if [ -e ${TMPPLIST} ]; then \
 		${ECHO_MSG} "===>  Building package for ${PKGNAME}"; \
 		if [ -d ${PACKAGES} ]; then \
 			if [ ! -d ${PKGREPOSITORY} ]; then \
@@ -1229,19 +1232,16 @@
 	fi
 .endif
 .endif
-.if (make(real-install) || make(real-package)) && exists(${PLIST})
-	@>${TMPPLIST}
-.for man in ${__MANPAGES}
-	@${ECHO} ${man} >> ${TMPPLIST}
-.endfor
-	@${SED} ${_sedsubplist} ${PLIST} >> ${TMPPLIST}
-.endif
 	@cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} ${.TARGET:S/^real-/pre-/}
 	@if [ -f ${SCRIPTDIR}/${.TARGET:S/^real-/pre-/} ]; then \
 		cd ${.CURDIR} && ${SETENV} ${SCRIPTS_ENV} ${SH} \
 			${SCRIPTDIR}/${.TARGET:S/^real-/pre-/}; \
 	fi
 	@cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} ${.TARGET:S/^real-/do-/}
+# put here so ports can change the contents of ${TMPPLIST} if necessary
+.if make(real-install)
+	@cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} generate-plist
+.endif
 	@cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} ${.TARGET:S/^real-/post-/}
 	@if [ -f ${SCRIPTDIR}/${.TARGET:S/^real-/post-/} ]; then \
 		cd ${.CURDIR} && ${SETENV} ${SCRIPTS_ENV} ${SH} \
@@ -1536,7 +1536,7 @@
 		if [ -d $$dir ]; then \
 			(cd $$dir ; ${MAKE} package-name package-depends); \
 		else \
-			${ECHO_MSG} "Warning: \"$$dir\" non-existent -- @pkgdep registration incomplete" >&2; \
+			${ECHO_MSG} "${PKGNAME}: \"$$dir\" non-existent -- dependency list incomplete" >&2; \
 		fi; \
 	done
 .endif
@@ -1706,7 +1706,11 @@
 .if !target(depends-list)
 depends-list:
 	@for dir in `${ECHO} "${FETCH_DEPENDS} ${BUILD_DEPENDS} ${LIB_DEPENDS}" | ${TR} '\040' '\012' | ${SED} -e 's/^[^:]*://' -e 's/:.*//' | sort -u` `${ECHO} ${DEPENDS} | ${TR} '\040' '\012' | ${SED} -e 's/:.*//' | sort -u`; do \
-		(cd $$dir; ${MAKE} package-name depends-list); \
+		if [ -d $$dir ]; then \
+			(cd $$dir ; ${MAKE} package-name depends-list); \
+		else \
+			${ECHO_MSG} "${PKGNAME}: \"$$dir\" non-existent -- dependency list incomplete" >&2; \
+		fi; \
 	done
 .endif
 
@@ -1788,13 +1792,25 @@
 .endif
 .endif
 
+# Generate packing list.  Also tests to make sure all required package
+# files exist.
+
+.if !target(generate-plist)
+generate-plist:
+	@if [ ! -f ${PLIST} -o ! -f ${COMMENT} -o ! -f ${DESCR} ]; then ${ECHO} "** Missing package files for ${PKGNAME}."; exit 1; fi
+	@>${TMPPLIST}
+.for man in ${__MANPAGES}
+	@${ECHO} ${man} >> ${TMPPLIST}
+.endfor
+	@${SED} ${_sedsubplist} ${PLIST} >> ${TMPPLIST}
+.endif
+
 # Fake installation of package so that user can pkg_delete it later.
 # Also, make sure that an installed port is recognized correctly in
 # accordance to the @pkgdep directive in the packing lists
 
 .if !target(fake-pkg)
 fake-pkg:
-	@if [ ! -f ${TMPPLIST} -o ! -f ${COMMENT} -o ! -f ${DESCR} ]; then ${ECHO} "** Missing package files for ${PKGNAME} - installation not recorded."; exit 1; fi
 	@if [ ! -d ${PKG_DBDIR} ]; then ${RM} -f ${PKG_DBDIR}; ${MKDIR} ${PKG_DBDIR}; fi
 .if defined(FORCE_PKG_REGISTER)
 	@${RM} -rf ${PKG_DBDIR}/${PKGNAME}

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message



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