blob: 4f83d99ff45abd69f625deffbdc3173eb61ae02a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
|
# $NetBSD: Makefile.common,v 1.14 2004/12/27 17:26:19 xtraeme Exp $
#
# XBUILD_DIRS is the group of directories under ${WRKSRC} that will
# be built in.
# XINCLUDE_DIRS is the group of directories under ${WRKSRC} that need
# to be Makefilesed or included in besides XBUILD_DIRS
# XINSTALL_DIRS is the group of directories which will have
# their install targets run.
# XINSTALL_MAN_DIRS is the group of directories which will have
# their install.man targets run.
.if !defined(XORG_MAKEFILE_COMMON)
XORG_MAKEFILE_COMMON= # defined
.include "../../mk/bsd.prefs.mk"
#
# Manual page handling.
#
.if ${OPSYS} == "DragonFly"
XTHRSTUB_MINOR= '@comment '
LIBXTHRSTUB=
XF86RUSH= '@comment '
IMAKE_MANTOOLS=
LIBDRI=
MANSOURCEPATH= man/man
MAN_DIR= ${MANSOURCEPATH}1
LIBMAN_DIR= ${MANSOURCEPATH}3
KERNMAN_DIR= ${MANSOURCEPATH}4
FILEMAN_DIR= ${MANSOURCEPATH}5
MISCMAN_DIR= ${MANSOURCEPATH}7
MAN_SUFFIX= 1
LIBMAN_SUFFIX= 3
KERNMAN_SUFFIX= 4
FILEMAN_SUFFIX= 5
MISCMAN_SUFFIX= 7
.elif ${OPSYS} == "FreeBSD"
. if ${LOWER_OPSYS_VERSUFFIX} == "4"
XTHRSTUB_MINOR= '@comment '
LIBXTHRSTUB=
. else
XTHRSTUB_MINOR=
LIBXTHRSTUB= '@comment '
. endif
XF86RUSH= '@comment '
IMAKE_MANTOOLS=
LIBDRI=
MANSOURCEPATH= man/man
MAN_DIR= ${MANSOURCEPATH}1
LIBMAN_DIR= ${MANSOURCEPATH}3
KERNMAN_DIR= ${MANSOURCEPATH}4
FILEMAN_DIR= ${MANSOURCEPATH}5
MISCMAN_DIR= ${MANSOURCEPATH}7
MAN_SUFFIX= 1
LIBMAN_SUFFIX= 3
KERNMAN_SUFFIX= 4
FILEMAN_SUFFIX= 5
MISCMAN_SUFFIX= 7
.elif ${OPSYS} == "Linux"
XF86RUSH=
USE_GNU_TOOLS+= make
IMAKE_MANTOOLS=
LIBDRI=
MANSOURCEPATH= man/man
MAN_DIR= ${MANSOURCEPATH}1
LIBMAN_DIR= ${MANSOURCEPATH}3
KERNMAN_DIR= ${MANSOURCEPATH}4
FILEMAN_DIR= ${MANSOURCEPATH}5
MISCMAN_DIR= ${MANSOURCEPATH}7
MAN_SUFFIX= 1x
LIBMAN_SUFFIX= 3x
KERNMAN_SUFFIX= 4x
FILEMAN_SUFFIX= 5x
MISCMAN_SUFFIX= 7x
.elif ${OPSYS} == "NetBSD" || ${OPSYS} == "OpenBSD"
XF86RUSH= '@comment '
IMAKE_MANTOOLS= '@comment '
LIBDRI= '@comment '
MANSOURCEPATH= man/cat
MAN_DIR= ${MANSOURCEPATH}1
LIBMAN_DIR= ${MANSOURCEPATH}3
KERNMAN_DIR= ${MANSOURCEPATH}4
FILEMAN_DIR= ${MANSOURCEPATH}5
MISCMAN_DIR= ${MANSOURCEPATH}7
MAN_SUFFIX= 0
LIBMAN_SUFFIX= ${MAN_SUFFIX}
KERNMAN_SUFFIX= ${MAN_SUFFIX}
FILEMAN_SUFFIX= ${MAN_SUFFIX}
MISCMAN_SUFFIX= ${MAN_SUFFIX}
.endif # NetBSD
.if !defined(XORG_ONLY_DIRS) || empty(XORG_ONLY_DIRS:M[Yy][Ee][Ss])
PLIST_SUBST+= XTHRSTUB_MINOR=${XTHRSTUB_MINOR}
PLIST_SUBST+= LIBXTHRSTUB=${LIBXTHRSTUB}
PLIST_SUBST+= XF86RUSH=${XF86RUSH}
PLIST_SUBST+= IMAKE_MANTOOLS=${IMAKE_MANTOOLS}
PLIST_SUBST+= LIBDRI=${LIBDRI}
PLIST_SUBST+= MAN_DIR=${MAN_DIR}
PLIST_SUBST+= LIBMAN_DIR=${LIBMAN_DIR}
PLIST_SUBST+= MAN_SUFFIX=${MAN_SUFFIX}
PLIST_SUBST+= LIBMAN_SUFFIX=${LIBMAN_SUFFIX}
PLIST_SUBST+= KERNMAN_DIR=${KERNMAN_DIR}
PLIST_SUBST+= KERNMAN_SUFFIX=${KERNMAN_SUFFIX}
PLIST_SUBST+= FILEMAN_DIR=${FILEMAN_DIR}
PLIST_SUBST+= FILEMAN_SUFFIX=${FILEMAN_SUFFIX}
PLIST_SUBST+= MISCMAN_DIR=${MISCMAN_DIR}
PLIST_SUBST+= MISCMAN_SUFFIX=${MISCMAN_SUFFIX}
CHECK_X11_TYPE?= yes
.if defined(CHECK_X11_TYPE)
. if !defined(X11_TYPE) || empty(X11_TYPE:Mxorg)
PKG_SKIP_REASON+= "X11_TYPE=xorg is mandatory."
. endif
.endif
NO_MTREE= # defined
WRKSRC?= ${WRKDIR}/xc
X11ROOT?= ${LOCALBASE}/${X11ROOT_PREFIX}
PREPEND_PATH+= ${X11ROOT}/bin # Make sure we have this in PATH :)
EGDIR?= ${LOCALBASE}/share/examples/xorg
PLIST_SUBST+= X11ROOT_PREFIX=${X11ROOT_PREFIX}
MESSAGE_SUBST+= X11ROOT=${X11ROOT}
#
# Any volunteer to test any platform not listed here? :)
#
ONLY_FOR_PLATFORM= FreeBSD-*-* Linux-*-* NetBSD-*-* \
OpenBSD-*-* SunOS-*-* DragonFly-*-*
MASTER_SITE_XORG+= \
http://freedesktop.org/~xorg/X11R${XORG_VER}/src/ \
ftp://ftp.x.org/pub/ \
ftp://ftp.gwdg.de/pub/x11/x.org/pub/ \
ftp://ftp.cica.es/pub/X/pub/ \
ftp://ftp.cs.cuhk.edu.hk/pub/X11/ \
ftp://sunsite.sut.ac.jp/pub/archives/X11/ \
ftp://ftp.unicamp.br/pub/X11/releases/
XORG_VER= 6.8.1
IMAKE= ${X11ROOT}/bin/imake
XINSTALL_DIRS?= ${XBUILD_DIRS}
_XINCLUDE_DIRS= include ${XBUILD_DIRS} ${XINCLUDE_DIRS}
#
# Operating Systems to pass our compiler options (CC, CXX, CPP, CFLAGS).
#
SYSTEMS= FreeBSD NetBSD OpenBSD linux DragonFly
.if !defined(NO_XORG_TARGETS)
.if !empty(MACHINE_PLATFORM:MNetBSD-2.[0-9]*)
. if exists(/usr/include/threadlib.h)
SUBST_CLASSES+= thr
SUBST_STAGE.thr= post-patch
SUBST_FILES.thr= config/cf/NetBSD.cf.in
SUBST_SED.thr= -e 's|@@NETBSD_THREADLIB@@|-DUSE_NBSD_THREADLIB|'
SUBST_MESSAGE.thr= "Fixes for threadlib.h."
. else
SUBST_CLASSES+= nada
SUBST_STAGE.nada= post-patch
SUBST_FILES.nada= config/cf/NetBSD.cf.in
SUBST_SED.nada= -e 's|@@NETBSD_THREADLIB@@||'
. endif
.endif
USE_LANGUAGES= c c++
. if !target(post-extract)
GLOBAL_LDFLAGS= -L${LOCALBASE}/lib -L${X11ROOT}/lib \
${COMPILER_RPATH_FLAG}${LOCALBASE}/lib \
${COMPILER_RPATH_FLAG}${X11BASE}/lib
post-extract:
@${SED} \
-e "s|@BLNK@|${BUILDLINK_DIR}|g" \
-e "s|@MAKE@|${MAKE_PROGRAM}|g" \
-e "s|@MAKE_PROGRAM@|${MAKE_PROGRAM}|g" \
-e "s|@IMAKE@|${IMAKE}|g" \
-e "s|@RMAN@|${X11ROOT}/bin/rman|g" \
-e "s|@MKHTMLINDEX@|${X11ROOT}/bin/mkhtmlindex|g" \
-e "s|@GCCMAKEDEP@|${X11ROOT}/bin/gccmakedep|g" \
-e "s|@MAKEDEPEND@|${X11ROOT}/bin/makedepend|g" \
-e "s|@REVPATH@|${X11ROOT}/bin/revpath|g" \
-e "s|@PREFIX@|${X11ROOT}|g" \
-e "s|@LOCALBASE@|${LOCALBASE}|g" \
-e "s|@LDFLAGS@|${GLOBAL_LDFLAGS}|g" \
-e "s|@WRKSRC@|${WRKSRC}|g" \
-e "s|@COMPILER_RPATH_FLAG@|${COMPILER_RPATH_FLAG}|g" \
-e "s|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g" \
-e "s|@EGDIR@|${EGDIR}|g" \
${FILESDIR}/host.def > ${WRKSRC}/config/cf/host.def
@${LN} -sf ${X11ROOT}/bin/gccmakedep ${WRKSRC}/config/util
@${LN} -sf ${X11ROOT}/bin/revpath ${WRKSRC}/config/util
@${LN} -sf ${X11ROOT}/bin/pswrap ${WRKSRC}/config/pswrap
@${LN} -sf ${X11ROOT}/lib/X11/config/version.def ${WRKSRC}/config/cf
@${LN} -sf ${X11ROOT}/lib/X11/config/date.def ${WRKSRC}/config/cf
@${TOUCH} ${WRKSRC}/config/cf/DragonFly.cf
. for F in ${SYSTEMS}
@${MV} ${WRKSRC}/config/cf/${F}.cf \
${WRKSRC}/config/cf/${F}.cf.in
. endfor
. undef F
. endif
. if !target(pre-configure)
pre-configure:
. for F in ${SYSTEMS}
@${SED} -e "s|@@PKGSRC_CC@@|${CC}|g" \
-e "s|@@PKGSRC_CXX@@|${CXX}|g" \
-e "s|@@PKGSRC_CPP@@|${CPP}|g" \
-e "s|@@PKGSRC_CFLAGS@@|${CFLAGS:C/-I.*//}|g" \
-e "s|-I${LOCALBASE}/include||" \
-e "s|-I${X11BASE}/include||" \
${WRKSRC}/config/cf/${F}.cf.in > \
${WRKSRC}/config/cf/${F}.cf
. endfor
. undef F
. endif
. if !target(do-configure)
do-configure:
@for dir in ${_XINCLUDE_DIRS}; do \
cd ${WRKSRC}/$${dir} && ${IMAKE} \
-DTOPDIR=${WRKSRC} -DCURDIR=$${dir} \
-I${WRKSRC}/config/cf; \
done
@for dir in ${_XINCLUDE_DIRS}; do \
cd ${WRKSRC}/$${dir} && ${MAKE} Makefiles; \
done
@for dir in ${_XINCLUDE_DIRS}; do \
cd ${WRKSRC}/$${dir} && ${MAKE} includes; \
done
@for dir in include ${XBUILD_DIRS}; do \
cd ${WRKSRC}/$${dir} && ${MAKE} depend; \
done
. endif
. if !target(do-build)
do-build:
@for dir in ${XBUILD_DIRS}; do \
cd ${WRKSRC}/$${dir} && ${MAKE} all; \
done
. endif
. if !target(do-install)
do-install:
@for dir in ${XINSTALL_DIRS}; do \
cd ${WRKSRC}/$${dir} && ${MAKE} install; \
done
@for dir in ${XINSTALL_MAN_DIRS}; do \
cd ${WRKSRC}/$${dir} && ${MAKE} install.man; \
done
. endif
.endif # !defined(XORG_TARGETS)
.endif # !defined(XORG_ONLY_DIRS) || empty(XORG_ONLY_DIRS:M[Yy][Ee][Ss])
.endif # !defined(XORG_MAKEFILE_COMMON)
|