Subject: Diffs to support Motif on Solaris
To: None <tech-pkg@netbsd.org>
From: Alistair G. Crooks <agc@ftp.netbsd.org>
List: tech-pkg
Date: 11/02/1999 02:41:57
The following diffs support Motif on Solaris, which is typically
installed in a separate directory (/usr/dt). Basically, they add
yet another definition which is used during compilation (MOTIFBASE)

They have been tested, and work, on Solaris, but I'd like to know
that I haven't broken anything with the other operating systems we
support in pkgsrc.

I'd be grateful for any feedback.

Thanks,
Alistair

Index: bsd.pkg.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/bsd.pkg.mk,v
retrieving revision 1.363
diff -u -r1.363 bsd.pkg.mk
--- bsd.pkg.mk	1999/11/01 11:15:20	1.363
+++ bsd.pkg.mk	1999/11/02 10:20:23
@@ -78,10 +78,12 @@
 
 .if defined(USE_IMAKE) || defined(USE_MOTIF) || defined(USE_X11BASE)
 .if defined(USE_LOCALBASE_FOR_X11)
+MOTIFBASE?=		${LOCALBASE}
 PREFIX=			${LOCALBASE}
 BUILD_DEPENDS+=		${X11BASE}/lib/X11/config/xpkgwedge.def:${PKGSRCDIR}/pkgtools/xpkgwedge
 .else
 PREFIX=			${X11BASE}
+MOTIFBASE?=		${X11BASE}
 .endif
 .elif defined(USE_CROSSBASE)
 PREFIX=			${CROSSBASE}
@@ -162,7 +164,7 @@
 PATCH_SUM_FILE?=	${FILESDIR}/patch-sum
 
 .if defined(USE_MOTIF) || defined(USE_X11BASE) || defined(USE_X11)
-LDFLAGS+=		-Wl,-R${X11BASE}/lib -L${X11BASE}/lib
+LDFLAGS+=		-Wl,-R${MOTIFBASE}/lib -L${MOTIFBASE}/lib -Wl,-R${X11BASE}/lib -L${X11BASE}/lib
 .endif
 LDFLAGS+=		-Wl,-R${LOCALBASE}/lib -L${LOCALBASE}/lib
 MAKE_ENV+=		LDFLAGS="${LDFLAGS}"
@@ -398,7 +400,7 @@
 PKG_DBDIR?=		/var/db/pkg
 
 # shared/dynamic motif libs
-MOTIFLIB?=	-L${X11BASE}/lib -L${LOCALBASE}/lib -Wl,-R${X11BASE}/lib -Wl,-R${LOCALBASE}/lib -lXm
+MOTIFLIB?=	-L${MOTIFBASE}/lib -L${X11BASE}/lib -L${LOCALBASE}/lib -Wl,-R${MOTIFBASE}/lib -Wl,-R${X11BASE}/lib -Wl,-R${LOCALBASE}/lib -lXm
 
 .if (${OPSYS} == "SunOS")
 AWK?=		/usr/bin/nawk
@@ -555,8 +557,8 @@
 
 # Check if we got a real Motif, Lesstif or no Motif at all.
 .if defined(USE_MOTIF)
-.if exists(${X11BASE}/include/Xm/Xm.h)
-IS_LESSTIF!=	${EGREP} -c LESSTIF ${X11BASE}/include/Xm/Xm.h || ${TRUE}
+.if exists(${MOTIFBASE}/include/Xm/Xm.h)
+IS_LESSTIF!=	${EGREP} -c LESSTIF ${MOTIFBASE}/include/Xm/Xm.h || ${TRUE}
 .if (${IS_LESSTIF} != "0")
 DEPENDS+=	lesstif-*:${PKGSRCDIR}/x11/lesstif
 .endif
Index: mk.conf.example
===================================================================
RCS file: /cvsroot/pkgsrc/mk/mk.conf.example,v
retrieving revision 1.94
diff -u -r1.94 mk.conf.example
--- mk.conf.example	1999/10/31 17:47:44	1.94
+++ mk.conf.example	1999/11/02 10:20:23
@@ -60,6 +60,10 @@
                                 # Possible: any path
                                 # Default: /usr/X11R6
 
+#MOTIFBASE=	/usr/X11R6	# Where Motif is installed on the system.
+                                # Possible: any path
+                                # Default: /usr/X11R6
+
 #DISTDIR=	${PKGSRCDIR}/distfiles
                                 # Directory where original distribution
                                 # files are stored.