Wed Sep 10 16:01:52 2008 UTC ()
Add MOTIF_TYPE and MOTIF_BASE to BUILD_DEFS.


(joerg)
diff -r1.11 -r1.12 pkgsrc/mk/motif.buildlink3.mk

cvs diff -r1.11 -r1.12 pkgsrc/mk/motif.buildlink3.mk (switch to unified diff)

--- pkgsrc/mk/motif.buildlink3.mk 2006/11/06 11:29:38 1.11
+++ pkgsrc/mk/motif.buildlink3.mk 2008/09/10 16:01:52 1.12
@@ -1,103 +1,105 @@ @@ -1,103 +1,105 @@
1# $NetBSD: motif.buildlink3.mk,v 1.11 2006/11/06 11:29:38 joerg Exp $ 1# $NetBSD: motif.buildlink3.mk,v 1.12 2008/09/10 16:01:52 joerg Exp $
2# 2#
3# Package-settable variables: 3# Package-settable variables:
4# 4#
5# MOTIFBASE 5# MOTIFBASE
6# choose the Motif-2.0 installation at the named location. 6# choose the Motif-2.0 installation at the named location.
7# 7#
8# MOTIF_TYPE 8# MOTIF_TYPE
9# choose a specific Motif-2.0 package. 9# choose a specific Motif-2.0 package.
10# 10#
11# Result variables: 11# Result variables:
12# 12#
13# MOTIFBASE 13# MOTIFBASE
14# The chosen Motif installation. 14# The chosen Motif installation.
15# 15#
16# MOTIF_TYPE 16# MOTIF_TYPE
17# The chosen Motif package. 17# The chosen Motif package.
18 18
19.if !defined(MOTIF_BUILDLINK3_MK) 19.if !defined(MOTIF_BUILDLINK3_MK)
20MOTIF_BUILDLINK3_MK= # defined 20MOTIF_BUILDLINK3_MK= # defined
21 21
22.include "../../mk/bsd.prefs.mk" 22.include "../../mk/bsd.prefs.mk"
23 23
 24BUILD_DEFS+= MOTIF_TYPE MOTIF_BASE
 25
24# 26#
25# If /usr/dt is a valid Motif-2.0 installation, then use it. Otherwise, 27# If /usr/dt is a valid Motif-2.0 installation, then use it. Otherwise,
26# check to see if a pkgsrc Motif-2.0 is installed and valid, then use it. 28# check to see if a pkgsrc Motif-2.0 is installed and valid, then use it.
27# Otherwise, if ${X11BASE} is valid, then use it. Otherwise, use the 29# Otherwise, if ${X11BASE} is valid, then use it. Otherwise, use the
28# Motif-2.0 specified by ${MOTIF_TYPE_DEFAULT}. 30# Motif-2.0 specified by ${MOTIF_TYPE_DEFAULT}.
29# 31#
30.if exists(/usr/dt/include/Xm/Xm.h) && \ 32.if exists(/usr/dt/include/Xm/Xm.h) && \
31 exists(/usr/dt/include/Xm/Gadget.h) 33 exists(/usr/dt/include/Xm/Gadget.h)
32_MOTIF_TYPE= dt 34_MOTIF_TYPE= dt
33.elif exists(${X11BASE}/lib/X11/config/OpenMotif.tmpl) || \ 35.elif exists(${X11BASE}/lib/X11/config/OpenMotif.tmpl) || \
34 exists(${LOCALBASE}/lib/X11/config/OpenMotif.tmpl) 36 exists(${LOCALBASE}/lib/X11/config/OpenMotif.tmpl)
35_MOTIF_TYPE= openmotif 37_MOTIF_TYPE= openmotif
36.elif exists(${X11BASE}/lib/X11/config/LessTif.tmpl) || \ 38.elif exists(${X11BASE}/lib/X11/config/LessTif.tmpl) || \
37 exists(${LOCALBASE}/lib/X11/config/LessTif.tmpl) 39 exists(${LOCALBASE}/lib/X11/config/LessTif.tmpl)
38_MOTIF_TYPE= lesstif 40_MOTIF_TYPE= lesstif
39.elif exists(${X11BASE}/include/Xm.h) && \ 41.elif exists(${X11BASE}/include/Xm.h) && \
40 exists(${X11BASE}/include/Xm/Gadget.h) 42 exists(${X11BASE}/include/Xm/Gadget.h)
41_MOTIF_TYPE= none 43_MOTIF_TYPE= none
42.else 44.else
43_MOTIF_TYPE= ${MOTIF_TYPE_DEFAULT} 45_MOTIF_TYPE= ${MOTIF_TYPE_DEFAULT}
44.endif 46.endif
45 47
46# If MOTIF_TYPE is set, then let that override the Motif-discovery just 48# If MOTIF_TYPE is set, then let that override the Motif-discovery just
47# performed. We only recognize the tested strings as proper values for 49# performed. We only recognize the tested strings as proper values for
48# MOTIF_TYPE. 50# MOTIF_TYPE.
49# 51#
50.if defined(MOTIF_TYPE) 52.if defined(MOTIF_TYPE)
51. if (${MOTIF_TYPE} == "dt") || \ 53. if (${MOTIF_TYPE} == "dt") || \
52 (${MOTIF_TYPE} == "lesstif") || \ 54 (${MOTIF_TYPE} == "lesstif") || \
53 (${MOTIF_TYPE} == "openmotif") 55 (${MOTIF_TYPE} == "openmotif")
54_MOTIF_TYPE= ${MOTIF_TYPE} 56_MOTIF_TYPE= ${MOTIF_TYPE}
55. endif 57. endif
56.endif 58.endif
57 59
58# 60#
59# If MOTIFBASE is set, then let that override all other Motif-2.0 61# If MOTIFBASE is set, then let that override all other Motif-2.0
60# discovery just performed. 62# discovery just performed.
61# 63#
62.if defined(MOTIFBASE) 64.if defined(MOTIFBASE)
63_MOTIF_TYPE= none 65_MOTIF_TYPE= none
64_MOTIFBASE= ${MOTIFBASE} 66_MOTIFBASE= ${MOTIFBASE}
65.else 67.else
66. if ${_MOTIF_TYPE} == "dt" 68. if ${_MOTIF_TYPE} == "dt"
67_MOTIFBASE= /usr/dt 69_MOTIFBASE= /usr/dt
68. elif ${_MOTIF_TYPE} == "none" 70. elif ${_MOTIF_TYPE} == "none"
69_MOTIFBASE= ${X11BASE} 71_MOTIFBASE= ${X11BASE}
70. endif 72. endif
71.endif 73.endif
72 74
73.if ${_MOTIF_TYPE} == "openmotif" 75.if ${_MOTIF_TYPE} == "openmotif"
74. include "../../x11/openmotif/buildlink3.mk" 76. include "../../x11/openmotif/buildlink3.mk"
75_MOTIFBASE= ${BUILDLINK_PREFIX.openmotif} 77_MOTIFBASE= ${BUILDLINK_PREFIX.openmotif}
76.elif ${_MOTIF_TYPE} == "lesstif" 78.elif ${_MOTIF_TYPE} == "lesstif"
77. include "../../x11/lesstif/buildlink3.mk" 79. include "../../x11/lesstif/buildlink3.mk"
78_MOTIFBASE= ${BUILDLINK_PREFIX.lesstif} 80_MOTIFBASE= ${BUILDLINK_PREFIX.lesstif}
79.else 81.else
80# 82#
81# Link the pre-existing Motif libraries and headers in ${_MOTIFBASE} into 83# Link the pre-existing Motif libraries and headers in ${_MOTIFBASE} into
82# ${BUILDLINK_DIR}. 84# ${BUILDLINK_DIR}.
83# 85#
84BUILDLINK_PREFIX.motif= ${_MOTIFBASE} 86BUILDLINK_PREFIX.motif= ${_MOTIFBASE}
85 87
86.include "../../mk/x11.buildlink3.mk" 88.include "../../mk/x11.buildlink3.mk"
87.endif 89.endif
88 90
89.if !defined(MOTIFBASE) 91.if !defined(MOTIFBASE)
90MOTIF_TYPE:= ${_MOTIF_TYPE} 92MOTIF_TYPE:= ${_MOTIF_TYPE}
91MOTIFBASE= ${_MOTIFBASE} 93MOTIFBASE= ${_MOTIFBASE}
92.endif 94.endif
93 95
94 96
95MAKE_ENV+= MOTIFLIB=${MOTIFLIB:Q} 97MAKE_ENV+= MOTIFLIB=${MOTIFLIB:Q}
96MAKE_ENV+= MOTIFBASE=${_MOTIFBASE:Q} 98MAKE_ENV+= MOTIFBASE=${_MOTIFBASE:Q}
97CPPFLAGS+= -I${_MOTIFBASE}/include 99CPPFLAGS+= -I${_MOTIFBASE}/include
98LDFLAGS+= -L${_MOTIFBASE}/lib 100LDFLAGS+= -L${_MOTIFBASE}/lib
99LDFLAGS+= ${COMPILER_RPATH_FLAG}${_MOTIFBASE}/lib 101LDFLAGS+= ${COMPILER_RPATH_FLAG}${_MOTIFBASE}/lib
100MOTIFLIB?= ${COMPILER_RPATH_FLAG}${_MOTIFBASE}/lib \ 102MOTIFLIB?= ${COMPILER_RPATH_FLAG}${_MOTIFBASE}/lib \
101 -L${_MOTIFBASE}/lib -lXm -lXp 103 -L${_MOTIFBASE}/lib -lXm -lXp
102 104
103.endif # MOTIF_BUILDLINK3_MK 105.endif # MOTIF_BUILDLINK3_MK