summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2001-09-14 01:52:40 +0000
committerjlam <jlam@pkgsrc.org>2001-09-14 01:52:40 +0000
commitfec4edb91ac34556314c6d472b85f47e77708abc (patch)
tree14f34a10d007b0ea9796185a5bb30490237e1ede
parent54914a30b8048cd11b01db142a5e589b2eea23ff (diff)
downloadpkgsrc-fec4edb91ac34556314c6d472b85f47e77708abc.tar.gz
Document the new Motif-related variables. Deprecate USE_MOTIF in favor of
including motif.buildlink.mk, which contains more sophisticated and complete logic for detecting the various Motif options that may be installed. Though deprecated, USE_MOTIF is still recognized, though it does no more than include motif.buildlink.mk.
-rw-r--r--Packages.txt19
-rw-r--r--mk/bsd.pkg.mk70
2 files changed, 21 insertions, 68 deletions
diff --git a/Packages.txt b/Packages.txt
index bd6286b2eb0..309568c613b 100644
--- a/Packages.txt
+++ b/Packages.txt
@@ -1,4 +1,4 @@
-# $NetBSD: Packages.txt,v 1.187 2001/09/09 20:36:08 agc Exp $
+# $NetBSD: Packages.txt,v 1.188 2001/09/14 01:52:40 jlam Exp $
###########################################################################
==========================
@@ -1185,10 +1185,9 @@ and which variables influence this.
The automatic variable PREFIX indicates where all files of the final
program shall be installed. It is usually set to $LOCALBASE (/usr/pkg),
or $CROSSBASE for pkgs in the "cross" category, though its value becomes
-that of $X11BASE if USE_IMAKE, USE_MOTIF, or USE_X11BASE is set. The value
-${PREFIX} needs to be put into the various places in the program's source
-where paths to these files are encoded; see sections 4.3 and 6.2 for
-details on this.
+that of $X11BASE if USE_IMAKE or USE_X11BASE is set. The value ${PREFIX}
+needs to be put into the various places in the program's source where paths
+to these files are encoded; see sections 4.3 and 6.2 for details on this.
When choosing which of these variables to use, follow the following rules:
@@ -1207,8 +1206,8 @@ When choosing which of these variables to use, follow the following rules:
X11BASE or LOCALBASE. To install X11 packages in LOCALBASE, simply
install the xpkgwedge package (pkgsrc/pkgtools/xpkgwedge).
If you need to find includes or libraries installed by a pkg that has
- USE_IMAKE, USE_MOTIF, or USE_X11BASE in its pkg Makefile, you need to use
- _both_ ${X11BASE} and ${LOCALBASE}.
+ USE_IMAKE or USE_X11BASE in its pkg Makefile, you need to use _both_
+ ${X11BASE} and ${LOCALBASE}.
* ${X11PREFIX} should be used to refer to the installed location of an X11
package. X11PREFIX will be set to ${X11BASE} if xpkgwedge is not installed,
@@ -1624,7 +1623,6 @@ buildlink.mk files:
USE_LTDL --> .include "../../devel/libtool/buildlink.mk"
USE_MESA --> .include "../../graphics/Mesa/buildlink.mk"
USE_MOTIF --> .include "../../mk/motif.buildlink.mk"
- USE_MOTIF12 --> .include "../../x11/lesstif12/buildlink.mk"
USE_SSL --> .include "../../security/openssl/buildlink.mk"
USE_X11 --> .include "../../mk/x11.buildlink.mk"
USE_XAW --> .include "../../mk/xaw.buildlink.mk"
@@ -1637,6 +1635,11 @@ where the system curses differs from ncurses, and when the development of
the system curses catches up in functionality, the USE_NCURSES setting may
be removed.
+Package that need a Motif-1.2-compatible installation should define
+USE_MOTIF12, otherwise assume the need for a Motif-2.0-compatible
+installation. If MOTIFBASE or MOTIF12BASE is set, then it is assumed that
+they point to valid 1.2-compatible or 2.0-compatible Motif, respectively.
+
Packages that use OpenSSL that require a specific version of OpenSSL should
define USE_OPENSSL_VERSION to the minimum version number required prior to
including "../../security/openssl/buildlink.mk". The version number is the
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 3ad1233d9f1..b8756779476 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.810 2001/09/12 10:38:12 agc Exp $
+# $NetBSD: bsd.pkg.mk,v 1.811 2001/09/14 01:52:41 jlam Exp $
#
# This file is in the public domain.
#
@@ -121,27 +121,7 @@ XMKMF_CMD?= ${X11PREFIX}/bin/xmkmf
#
BUILDLINK_X11_DIR?= ${X11BASE}
-.if defined(USE_MOTIF12)
-USE_MOTIF= # defined
-.endif
-
-.if defined(USE_MOTIF)
-. if ${OPSYS} == "SunOS"
-MOTIFBASE?= /usr/dt
-. elif exists(${X11BASE}/include/Xm/Xm.h)
-. if defined(USE_MOTIF12) && exists(${X11BASE}/include/Xm/Gadget.h)
-MOTIFBASE?= ${X11PREFIX}/LessTif/Motif1.2
-. else
-MOTIFBASE?= ${X11BASE}
-. endif
-. elif defined(USE_MOTIF12)
-MOTIFBASE?= ${X11PREFIX}/LessTif/Motif1.2
-. else
-MOTIFBASE?= ${X11PREFIX}
-. endif
-.endif # USE_MOTIF
-
-.if defined(USE_IMAKE) || defined(USE_MOTIF) || defined(USE_X11BASE)
+.if defined(USE_IMAKE) || defined(USE_X11BASE)
. if exists(${LOCALBASE}/lib/X11/config/xpkgwedge.def) || \
exists(${X11BASE}/lib/X11/config/xpkgwedge.def)
BUILD_DEPENDS+= xpkgwedge>=1.5:../../pkgtools/xpkgwedge
@@ -328,13 +308,7 @@ DISTINFO_FILE?= ${.CURDIR}/distinfo
M4?= /usr/bin/m4
.endif
-.if defined(USE_MOTIF) || defined(USE_X11BASE) || defined(USE_X11)
-. if defined(USE_MOTIF)
-LDFLAGS+= -Wl,-R${MOTIFBASE}/lib
-. if !defined(USE_BUILDLINK_ONLY) || (${MOTIFBASE} != ${LOCALBASE})
-LDFLAGS+= -L${MOTIFBASE}/lib
-. endif
-. endif
+.if defined(USE_X11BASE) || defined(USE_X11)
LDFLAGS+= -Wl,-R${X11BASE}/lib
. if !defined(X11_BUILDLINK_MK)
LDFLAGS+= -L${X11BASE}/lib
@@ -351,10 +325,6 @@ MAKE_FLAGS?=
MAKEFILE?= Makefile
MAKE_ENV+= PATH=${PATH}:${LOCALBASE}/bin:${X11BASE}/bin PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} X11BASE=${X11BASE} CFLAGS="${CFLAGS}" CPPFLAGS="${CPPFLAGS}"
-.if defined(USE_MOTIF)
-MAKE_ENV+= MOTIFLIB="${MOTIFLIB}"
-.endif
-
.if exists(${ZOULARISBASE}/bin/ftp) # Zoularis
FETCH_CMD?= ${ZOULARISBASE}/bin/ftp
.else
@@ -436,7 +406,7 @@ EXTRACT_CMD?= ${DECOMPRESS_CMD} ${DOWNLOADED_DISTFILE} | ${GTAR} -xf - ${EXTRAC
# Figure out where the local mtree file is
.if !defined(MTREE_FILE)
-. if defined(USE_IMAKE) || defined(USE_MOTIF) || defined(USE_X11BASE)
+. if defined(USE_IMAKE) || defined(USE_X11BASE)
MTREE_FILE= ${PKGSRCDIR}/mk/${OPSYS}.x11.dist
. else
MTREE_FILE= ${PKGSRCDIR}/mk/${OPSYS}.pkg.dist
@@ -683,11 +653,6 @@ PKG_SUFX?= .tgz
# where pkg_add records its dirty deeds.
PKG_DBDIR?= ${DESTDIR}/var/db/pkg
-# shared/dynamic motif libs
-.if defined(USE_MOTIF)
-MOTIFLIB?= -L${MOTIFBASE}/lib -L${X11BASE}/lib -L${LOCALBASE}/lib -Wl,-R${MOTIFBASE}/lib -Wl,-R${X11BASE}/lib -Wl,-R${LOCALBASE}/lib -lXm -lXp
-.endif
-
# Define SMART_MESSAGES in /etc/mk.conf for messages giving the tree
# of dependencies for building, and the current target.
.ifdef SMART_MESSAGES
@@ -715,26 +680,12 @@ INSTALL_TARGET+= install.man
FETCH_BEFORE_ARGS += -p
.endif
-# Check if we got a real Motif, LessTif or no Motif at all.
+# If USE_MOTIF (deprecated) is set, then include motif.buildlink.mk for the
+# Motif discovery logic.
+#
.if defined(USE_MOTIF)
-. if defined(USE_MOTIF12)
-LESSTIF_DEPENDS= lesstif12-*:../../x11/lesstif12
-. else
-LESSTIF_DEPENDS= lesstif-*:../../x11/lesstif
-. endif
-. if exists(${MOTIFBASE}/include/Xm/Xm.h)
-. if !defined(IS_LESSTIF)
-IS_LESSTIF!= ${EGREP} -c LESSTIF ${MOTIFBASE}/include/Xm/Xm.h || ${TRUE}
-MAKEFLAGS+= IS_LESSTIF=${IS_LESSTIF}
-. endif # !IS_LESSTIF
-. if (${IS_LESSTIF} != "0") || \
- (defined(USE_MOTIF12) && exists(${MOTIFBASE}/include/Xm/Gadget.h))
-DEPENDS+= ${LESSTIF_DEPENDS}
-. endif
-. else
-DEPENDS+= ${LESSTIF_DEPENDS}
-. endif
-.endif # USE_MOTIF
+. include "../../mk/motif.buildlink.mk"
+.endif
# If USE_XPM is set, depend on xpm.
.if defined(USE_XPM)
@@ -1037,8 +988,7 @@ IGNORE+= "${PKGNAME} is restricted:" \
IGNORE+= "${PKGNAME} may not be built, because it utilizes strong cryptography"
. endif
. endif
-. if ((defined(USE_IMAKE) || defined(USE_MOTIF) || \
- defined(USE_X11BASE) || defined(USE_X11)) && \
+. if ((defined(USE_IMAKE) || defined(USE_X11BASE) || defined(USE_X11)) && \
!exists(${X11BASE}))
IGNORE+= "${PKGNAME} uses X11, but ${X11BASE} not found"
. endif