summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorasami <asami@FreeBSD.org>1996-04-12 08:08:36 +0000
committerasami <asami@FreeBSD.org>1996-04-12 08:08:36 +0000
commit699b9de7734782d8b0f60133c166b1cc715e6044 (patch)
tree0b75d9d3ebee9911204f5617299622d444d13f99
parent791b2ca0a687efa30f63c62c9980fda15032f843 (diff)
downloadFreeBSD-src-699b9de7734782d8b0f60133c166b1cc715e6044.zip
FreeBSD-src-699b9de7734782d8b0f60133c166b1cc715e6044.tar.gz
Add NO_CDROM, RESTRICTED, BROKEN and Motif support.
(1) The new NO_CDROM Boolean variable means "don't put the distfile/ package on the CDROM you're going to sell". It will basically turn off everything if FOR_CDROM is set. Many of the NO_PACKAGE ports are actually "don't sell for profit" types, which we shouldn't have any problem distributing via ftp. (2) The new RESTRICTED Boolean variable means don't build this unless you know what you are doing. It doesn't have any effect unless NO_RESTRICTED is also set. (3) BROKEN means this port is broken. At least it will now show up in INDEX and README.html, and give people more incentive to fix (I hope). RESTRICTED and BROKEN are expected to replace the pseudo-targets in parent Makefiles. (The RESTRICTED and BROKEN list didn't do anything before, they were solely for grepping purposes.) (4) The Motif support brings in four new variables: REQUIRES_MOTIF, which the porter sets for ports that require Motif to build; HAVE_MOTIF, which the user sets to indicate the system has Motif; MOTIF_STATIC, which the user sets to indicate that the static libXm, instead af the default dynamic library, is to be used; and MOTIFLIB, which is set to "${X11BASE}/lib/libXm.a" or "-L${X11BASE}/lib -lXm", depending on whether MOTIF_STATIC is set. The porter is expected to replace all occurrences of libXm in the {Im,M}akefiles with ${MOTIFLIB}, and this will allow both dynamic linkage (for users with Motif) and static linkage (for those who build packages to be used by those withot Motif, i.e., me ;) automatically. Original Motif support idea by: graichen
-rw-r--r--share/mk/bsd.port.mk59
1 files changed, 50 insertions, 9 deletions
diff --git a/share/mk/bsd.port.mk b/share/mk/bsd.port.mk
index e1424e2..960c180 100644
--- a/share/mk/bsd.port.mk
+++ b/share/mk/bsd.port.mk
@@ -3,7 +3,7 @@
# bsd.port.mk - 940820 Jordan K. Hubbard.
# This file is in the public domain.
#
-# $Id: bsd.port.mk,v 1.199 1996/04/01 11:12:58 asami Exp $
+# $Id: bsd.port.mk,v 1.200 1996/04/07 08:34:21 asami Exp $
#
# Please view me with 4 column tabs!
@@ -83,10 +83,13 @@
# NO_BUILD - Use a dummy (do-nothing) build target.
# NO_PACKAGE - Use a dummy (do-nothing) package target.
# NO_INSTALL - Use a dummy (do-nothing) install target.
+# NO_CDROM - Use dummy (do-nothing) targets if FOR_CDROM is set.
# NO_WRKSUBDIR - Assume port unpacks directly into ${WRKDIR}.
# NO_WRKDIR - There's no work directory at all; port does this someplace
# else.
# NO_DEPENDS - Don't verify build of dependencies.
+# BROKEN - Port is broken.
+# RESTRICTED - Port is restricted. Set this string to the reason why.
# USE_GMAKE - Says that the port uses gmake.
# USE_IMAKE - Says that the port uses imake.
# USE_X11 - Says that the port uses X11.
@@ -141,6 +144,14 @@
# NCFTP - Full path to ncftp command if not in $PATH (default: ncftp).
# NCFTPFLAGS - Arguments to ${NCFTP} (default: -N).
#
+# Motif support:
+#
+# REQUIRES_MOTIF - Set this in your port if it requires Motif. It will be
+# built only if HAVE_MOTIF is set.
+# HAVE_MOTIF - If set, means system has Motif. Typically set in
+# /etc/make.conf.
+# MOTIF_STATIC - If set, link libXm statically; otherwise, link it
+# dynamically.
#
# Variables to change if you want a special behavior:
#
@@ -249,8 +260,10 @@ GMAKE?= gmake
XMKMF?= xmkmf -a
MD5?= /sbin/md5
MD5_FILE?= ${FILESDIR}/md5
+
MAKE_FLAGS?= -f
MAKEFILE?= Makefile
+MAKE_ENV?= PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} X11BASE=${X11BASE} MOTIFLIB="${MOTIFLIB}"
NCFTP?= /usr/bin/ncftp
NCFTPFLAGS?= -N
@@ -323,6 +336,15 @@ PKG_SUFX?= .tgz
# where pkg_add records its dirty deeds.
PKG_DBDIR?= /var/db/pkg
+# shared/dynamic motif libs
+.if defined(HAVE_MOTIF)
+.if defined(MOTIF_STATIC)
+MOTIFLIB?= ${X11BASE}/lib/libXm.a
+.else
+MOTIFLIB?= -L${X11BASE}/lib -lXm
+.endif
+.endif
+
ECHO?= /bin/echo
CAT+= /bin/cat
CP?= /bin/cp
@@ -389,6 +411,8 @@ HAS_CONFIGURE= yes
.MAIN: all
################################################################
+# Many ways to disable a port.
+#
# If we're in BATCH mode and the port is interactive, or we're
# in interactive mode and the port is non-interactive, skip all
# the important targets. The reason we have two modes is that
@@ -396,10 +420,27 @@ HAS_CONFIGURE= yes
# overnight, then come back in the morning and do _only_ the
# interactive ones that required your intervention.
#
-# This allows you to do both.
+# Don't attempt to build ports that require Motif if you don't
+# have Motif.
+#
+# Ignore ports that can't be reselled if building for a CDROM.
+#
+# Don't build a port if it's restricted and we don't want to get
+# into that.
+#
+# Don't build a port if it's broken.
################################################################
-.if (defined(IS_INTERACTIVE) && defined(BATCH)) || (!defined(IS_INTERACTIVE) && defined(INTERACTIVE))
+.if (defined(IS_INTERACTIVE) && defined(BATCH)) || \
+ (!defined(IS_INTERACTIVE) && defined(INTERACTIVE)) || \
+ (defined(REQUIRES_MOTIF) && !defined(HAVE_MOTIF)) || \
+ (defined(NO_CDROM) && defined(FOR_CDROM)) || \
+ (defined(RESTRICTED) && defined(NO_RESTRICTED)) || \
+ defined(BROKEN)
+IGNORE= yes
+.endif
+
+.if defined(IGNORE)
all:
@${DO_NADA}
build:
@@ -648,9 +689,9 @@ do-configure:
.if !target(do-build)
do-build:
.if defined(USE_GMAKE)
- @(cd ${WRKSRC}; ${GMAKE} PREFIX=${PREFIX} X11BASE=${X11BASE} ${MAKE_FLAGS} ${MAKEFILE} ${ALL_TARGET})
+ @(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${ALL_TARGET})
.else defined(USE_GMAKE)
- @(cd ${WRKSRC}; ${MAKE} PREFIX=${PREFIX} X11BASE=${X11BASE} ${MAKE_FLAGS} ${MAKEFILE} ${ALL_TARGET})
+ @(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${ALL_TARGET})
.endif
.endif
@@ -659,14 +700,14 @@ do-build:
.if !target(do-install)
do-install:
.if defined(USE_GMAKE)
- @(cd ${WRKSRC}; ${GMAKE} PREFIX=${PREFIX} X11BASE=${X11BASE} ${MAKE_FLAGS} ${MAKEFILE} ${INSTALL_TARGET})
+ @(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${INSTALL_TARGET})
.if defined(USE_IMAKE) && !defined(NO_INSTALL_MANPAGES)
- @(cd ${WRKSRC}; ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} install.man)
+ @(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} install.man)
.endif
.else defined(USE_GMAKE)
- @(cd ${WRKSRC}; ${MAKE} PREFIX=${PREFIX} X11BASE=${X11BASE} ${MAKE_FLAGS} ${MAKEFILE} ${INSTALL_TARGET})
+ @(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${INSTALL_TARGET})
.if defined(USE_IMAKE) && !defined(NO_INSTALL_MANPAGES)
- @(cd ${WRKSRC}; ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} install.man)
+ @(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} install.man)
.endif
.endif
.endif
OpenPOWER on IntegriCloud