Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 3362 lines (3062 sloc) 108.339 kB
78f180f Add a "show-license" target, and a "show-licence" alias, to display
agc authored
1 # $NetBSD: bsd.pkg.mk,v 1.635 2001/01/05 17:37:12 agc Exp $
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
2 #
970dfa8 move documentation to packages.7. also, remove ts=4 crap.
mrg authored
3 # This file is in the public domain.
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
4 #
970dfa8 move documentation to packages.7. also, remove ts=4 crap.
mrg authored
5 # This file is derived from bsd.port.mk - 940820 Jordan K. Hubbard.
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
6 #
970dfa8 move documentation to packages.7. also, remove ts=4 crap.
mrg authored
7 # Please see the NetBSD packages(7) manual page for details on the
8 # that variables used in this make file template.
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
9
10 # Default sequence for "all" is: fetch checksum extract patch configure build
11 #
12 # Please read the comments in the targets section below, you
13 # should be able to use the pre-* or post-* targets/scripts
14 # (which are available for every stage except checksum) or
15 # override the do-* targets to do pretty much anything you want.
16 #
17 # NEVER override the "regular" targets unless you want to open
18 # a major can of worms.
19
85d2418 Implement some parts of proposals posted to tech-pkg:
tv authored
20 ##### Include any preferences, if not already included, and common definitions
21 .include "../../mk/bsd.prefs.mk"
d5d2fd5 Add new NOT_FOR_ARCHS variable, that has the reverse logic of
garbled authored
22
af7d172 Add a new mechanism for handling "crypto" packages, as discussed
fredb authored
23 ##### Build crypto packages by default.
24 MKCRYPTO?= yes
25
85d2418 Implement some parts of proposals posted to tech-pkg:
tv authored
26 ##### Some overrides of defaults below on a per-OS basis.
42ce372 Add Solaris support to pkgsrc, using Christos Zoulas' NetBSD emulation
agc authored
27 .if (${OPSYS} == "NetBSD")
85d2418 Implement some parts of proposals posted to tech-pkg:
tv authored
28 LOCALBASE?= ${DESTDIR}/usr/pkg
42ce372 Add Solaris support to pkgsrc, using Christos Zoulas' NetBSD emulation
agc authored
29 .elif (${OPSYS} == "SunOS")
4f0f7f5 Default umask on Solaris is 022, not 0022.
agc authored
30 DEF_UMASK?= 022
85d2418 Implement some parts of proposals posted to tech-pkg:
tv authored
31 X11BASE?= ${DESTDIR}/usr/openwin
c8bc763 Linux bits; now the package system works on Linux too.
christos authored
32 .elif (${OPSYS} == "Linux")
33 DEF_UMASK?= 022
34 NOMANCOMPRESS?= yes
f4e645f - Add OpenBSD and FreeBSD Ids in the header
hubertf authored
35 .endif
36
85d2418 Implement some parts of proposals posted to tech-pkg:
tv authored
37 DEF_UMASK?= 0022
38 CLEANDEPENDS?= NO
834f2db Let "make deinstall" remove any version installed, not only the one
hubertf authored
39 DEINSTALLDEPENDS?= NO # add -R to pkg_delete
2a0e4ad Add 'update' target to update a package and all depending packages.
rh authored
40 REINSTALL?= NO # reinstall upon update
f83408c * add CHECK_SHLIBS variable that can be set to "no" in emul/compat p…
hubertf authored
41 CHECK_SHLIBS?= YES # run check-shlibs after install
7caaa67 Add knob (SHLIB_HANDLING=YES/NO) for packages to specify if they want
jlam authored
42 SHLIB_HANDLING?= YES # do automatic ELF shared lib handling
7ae11e3 Change the "update" target so it becomes more useful (and less danger…
rh authored
43 NOCLEAN?= NO # don't clean up after update
85d2418 Implement some parts of proposals posted to tech-pkg:
tv authored
44
1e21a3e Don't assume we're on NetBSD when setting LOCALBASE i.e.
agc authored
45 LOCALBASE?= ${DESTDIR}/usr/local
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
46 X11BASE?= ${DESTDIR}/usr/X11R6
db50604 - Introduce CROSSBASE and a USE_CROSSBASE option, for use with pkgs from
tv authored
47 CROSSBASE?= ${LOCALBASE}/cross
d1b2a38 PORTSDIR must die.
agc authored
48
ba05d6b Allow overriding PKGSRCDIR and PKGPATH
hubertf authored
49 PKGSRCDIR?= ${.CURDIR:C|/[^/]*/[^/]*$||}
50 PKGPATH?= ${.CURDIR:C|.*/([^/]*/[^/]*)$|\1|}
a9df889 Oops; use ?= for PKGBASE and PKGVERSION, so pkgs can derive their PKG…
mycroft authored
51 PKGBASE?= ${PKGNAME:C/-[^-]*$//}
52 PKGVERSION?= ${PKGNAME:C/^.*-//}
af6a03b Fix NEED_NCURSES handling:
hubertf authored
53 PKGWILDCARD?= ${PKGBASE}-[0-9]*
5932545 Add PKGPATH, PKGBASE, PKGVERSION and PKGWILDCARD make(1) variables, s…
mycroft authored
54
d1b2a38 PORTSDIR must die.
agc authored
55 DISTDIR?= ${PKGSRCDIR}/distfiles
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
56 _DISTDIR?= ${DISTDIR}/${DIST_SUBDIR}
d1b2a38 PORTSDIR must die.
agc authored
57 PACKAGES?= ${PKGSRCDIR}/packages
58 TEMPLATES?= ${PKGSRCDIR}/templates
f4e645f - Add OpenBSD and FreeBSD Ids in the header
hubertf authored
59
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
60 PATCHDIR?= ${.CURDIR}/patches
61 SCRIPTDIR?= ${.CURDIR}/scripts
62 FILESDIR?= ${.CURDIR}/files
63 PKGDIR?= ${.CURDIR}/pkg
64
190a650 Add a USE_JAVA= variable for packages which use java, and a PKG_JVM v…
jwise authored
65 .if defined(USE_JAVA)
66 BUILD_DEFS+= PKG_JVM JAVA_HOME
67 .if !defined(PKG_JVM)
68 .if ${MACHINE_PLATFORM:MNetBSD-*-i386} != ""
69 PKG_JVM?= jdk
70 .else
71 PKG_JVM?= kaffe
72 .endif
73 .endif
74 .if ${PKG_JVM} == "jdk"
26c9562 Change multidepends for USE_JAVA software to use sun-jre,jdk instead of
tv authored
75 DEPENDS+= {sun-jre,jdk}-*:../../lang/jdk
4110bdf Two nits with the show-shlib-type target:
jwise authored
76 .if defined(JDK_HOME)
77 JAVA_HOME?= ${JDK_HOME}
78 .else
190a650 Add a USE_JAVA= variable for packages which use java, and a PKG_JVM v…
jwise authored
79 JAVA_HOME?= ${LOCALBASE}/java
4110bdf Two nits with the show-shlib-type target:
jwise authored
80 .endif
190a650 Add a USE_JAVA= variable for packages which use java, and a PKG_JVM v…
jwise authored
81 .elif ${PKG_JVM} == "kaffe"
a4979e1 Use relative paths when adding magic dependencies for USE_* variables.
mycroft authored
82 DEPENDS+= kaffe-[0-9]*:../../lang/kaffe
190a650 Add a USE_JAVA= variable for packages which use java, and a PKG_JVM v…
jwise authored
83 JAVA_HOME?= ${LOCALBASE}/kaffe
84 .endif
98c2fff Make previous more thorough:
jwise authored
85 CLASSPATH?= ${JAVA_HOME}/lib/classes.zip:.
86 PATH:= ${PATH}:${JAVA_HOME}/bin
6d253bb Add JAVA_HOME to MAKE_ENV, CONFIGURE_ENV, and SCRIPTS_ENV, even if it…
jwise authored
87 MAKE_ENV+= CLASSPATH=${CLASSPATH} JAVA_HOME=${JAVA_HOME}
88 CONFIGURE_ENV+= CLASSPATH=${CLASSPATH} JAVA_HOME=${JAVA_HOME}
89 SCRIPTS_ENV+= CLASSPATH=${CLASSPATH} JAVA_HOME=${JAVA_HOME}
190a650 Add a USE_JAVA= variable for packages which use java, and a PKG_JVM v…
jwise authored
90 .endif
91
1267095 Update xpkgwedge to 1.0 and make appropriate changes to bsd.pkg.mk to…
jlam authored
92 # Set X11PREFIX to reflect the install directory of X11 packages.
93 #
94 # The check for the existence of ${X11BASE}/lib/X11/config/xpkgwedge.def
95 # is to catch users of xpkgwedge<1.0.
96 #
97 .if exists(${LOCALBASE}/lib/X11/config/xpkgwedge.def) || \
98 exists(${X11BASE}/lib/X11/config/xpkgwedge.def)
f134737 Remove the user setting of the USE_LOCALBASE_FOR_X11 definition.
agc authored
99 X11PREFIX= ${LOCALBASE}
1267095 Update xpkgwedge to 1.0 and make appropriate changes to bsd.pkg.mk to…
jlam authored
100 XMKMF?= pkgxmkmf -a
f134737 Remove the user setting of the USE_LOCALBASE_FOR_X11 definition.
agc authored
101 .else
102 X11PREFIX= ${X11BASE}
1267095 Update xpkgwedge to 1.0 and make appropriate changes to bsd.pkg.mk to…
jlam authored
103 XMKMF?= xmkmf -a
f134737 Remove the user setting of the USE_LOCALBASE_FOR_X11 definition.
agc authored
104 .endif
105
92a4e68 Fixup Motif-handling code to work again after X11PREFIX changes.
jlam authored
106 .if defined(USE_MOTIF12)
107 USE_MOTIF= # defined
108 .endif
109
b4f3b59 Add a MOTIFBASE definition, to allow Motif libraries and headers to be
agc authored
110 .if defined(USE_MOTIF)
92a4e68 Fixup Motif-handling code to work again after X11PREFIX changes.
jlam authored
111 .if ${OPSYS} == "SunOS"
b4f3b59 Add a MOTIFBASE definition, to allow Motif libraries and headers to be
agc authored
112 MOTIFBASE?= /usr/dt
92a4e68 Fixup Motif-handling code to work again after X11PREFIX changes.
jlam authored
113 .elif exists(${X11BASE}/include/Xm/Xm.h)
6898ba3 Motif-checking code broke when X11PREFIX == X11BASE and both lesstif and
jlam authored
114 .if defined(USE_MOTIF12) && exists(${X11BASE}/include/Xm/Gadget.h)
115 MOTIFBASE?= ${X11PREFIX}/LessTif/Motif1.2
b4f3b59 Add a MOTIFBASE definition, to allow Motif libraries and headers to be
agc authored
116 .else
117 MOTIFBASE?= ${X11BASE}
118 .endif
6898ba3 Motif-checking code broke when X11PREFIX == X11BASE and both lesstif and
jlam authored
119 .elif defined(USE_MOTIF12)
120 MOTIFBASE?= ${X11PREFIX}/LessTif/Motif1.2
121 .else
122 MOTIFBASE?= ${X11PREFIX}
92a4e68 Fixup Motif-handling code to work again after X11PREFIX changes.
jlam authored
123 .endif
124 .endif # USE_MOTIF
b4f3b59 Add a MOTIFBASE definition, to allow Motif libraries and headers to be
agc authored
125
7b16248 Replace all occurrences of USE_X11 with USE_X11BASE. This means "inst…
agc authored
126 .if defined(USE_IMAKE) || defined(USE_MOTIF) || defined(USE_X11BASE)
1267095 Update xpkgwedge to 1.0 and make appropriate changes to bsd.pkg.mk to…
jlam authored
127 .if exists(${LOCALBASE}/lib/X11/config/xpkgwedge.def) || \
128 exists(${X11BASE}/lib/X11/config/xpkgwedge.def)
129 # XXX: actually, here we would need something like
130 # BUILD_DEPENDS+=xpkgwedge>=1.0:../../pkgtools/xpkgwedge
131 .if make(install-run-depends)
132 DEPENDS+= xpkgwedge>=1.0:../../pkgtools/xpkgwedge
133 .endif
134 .endif
6898ba3 Motif-checking code broke when X11PREFIX == X11BASE and both lesstif and
jlam authored
135 PREFIX= ${X11PREFIX}
db50604 - Introduce CROSSBASE and a USE_CROSSBASE option, for use with pkgs from
tv authored
136 .elif defined(USE_CROSSBASE)
137 PREFIX= ${CROSSBASE}
c452a59 Set NO_MTREE= for a USE_CROSSBASE pkg.
tv authored
138 NO_MTREE= yes
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
139 .else
db50604 - Introduce CROSSBASE and a USE_CROSSBASE option, for use with pkgs from
tv authored
140 PREFIX= ${LOCALBASE}
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
141 .endif
e7f1bfb - Integrate xpkgwedge with a switch, USE_LOCALBASE_FOR_X11, which leaves
tv authored
142
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
143 .if defined(USE_GMAKE)
a4979e1 Use relative paths when adding magic dependencies for USE_* variables.
mycroft authored
144 BUILD_DEPENDS+= ${GMAKE}:../../devel/gmake
3689d63 Let make do the work:
agc authored
145 MAKE_PROGRAM= ${GMAKE}
85d2418 Implement some parts of proposals posted to tech-pkg:
tv authored
146 GMAKE?= gmake
3689d63 Let make do the work:
agc authored
147 .else
148 MAKE_PROGRAM= ${MAKE}
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
149 .endif
85d2418 Implement some parts of proposals posted to tech-pkg:
tv authored
150
f4d3f50 Change how Kerberos support is enabled in pkgsrc.
kim authored
151 .if defined(USE_KERBEROS)
152 RESTRICTED?= uses Kerberos encryption code
153 BUILD_DEFS+= KERBEROS
154 .endif
155
74d9b13 Changes for building dynamic PLIST for perl packages:
jlam authored
156 PERL5?= ${LOCALBASE}/bin/perl
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
157 .if defined(USE_PERL5)
74d9b13 Changes for building dynamic PLIST for perl packages:
jlam authored
158 DEPENDS+= perl-5.*:../../lang/perl5
cd570b4 Move PERL5_* variable definitions out of USE_PERL5 .if.endif block;
jlam authored
159 .endif
ce66a23 Fix errors with not finding perl in another way.
jlam authored
160 .if exists(${PERL5})
161 .if !defined(PERL5_SITELIB) || !defined(PERL5_SITEARCH) || !defined(PERL5_ARCHLIB)
87ee089 Quiet perl invocations in bsd.pkg.mk when the locale isn't properly s…
jlam authored
162 PERL5_SITELIB!= eval `${PERL5} -V:installsitelib 2>/dev/null`; \
ce66a23 Fix errors with not finding perl in another way.
jlam authored
163 echo $${installsitelib}
87ee089 Quiet perl invocations in bsd.pkg.mk when the locale isn't properly s…
jlam authored
164 PERL5_SITEARCH!= eval `${PERL5} -V:installsitearch 2>/dev/null`; \
ce66a23 Fix errors with not finding perl in another way.
jlam authored
165 echo $${installsitearch}
87ee089 Quiet perl invocations in bsd.pkg.mk when the locale isn't properly s…
jlam authored
166 PERL5_ARCHLIB!= eval `${PERL5} -V:installarchlib 2>/dev/null`; \
ce66a23 Fix errors with not finding perl in another way.
jlam authored
167 echo $${installarchlib}
168 MAKEFLAGS+= PERL5_SITELIB=${PERL5_SITELIB}
169 MAKEFLAGS+= PERL5_SITEARCH=${PERL5_SITEARCH}
170 MAKEFLAGS+= PERL5_ARCHLIB=${PERL5_ARCHLIB}
171 .endif
172 .endif
85d2418 Implement some parts of proposals posted to tech-pkg:
tv authored
173
bede96e - Add USE_FORTRAN variable. In packages which need a fortran compile…
dmcmahill authored
174 .if defined(USE_FORTRAN)
175 .if !exists(/usr/bin/f77)
176 PKG_FC?= f2c-f77
177 .endif
178 # it is anticipated that once /usr/bin/f77 is more stable that the following
179 # default will be changed to f77. However, in the case where there is no
180 # /usr/bin/f77, the default will remain as f2c-f77.
181 PKG_FC?= f2c-f77
182 .if (${PKG_FC} == "f2c-f77")
a4979e1 Use relative paths when adding magic dependencies for USE_* variables.
mycroft authored
183 BUILD_DEPENDS+= f2c-f77:../../lang/f2c
bede96e - Add USE_FORTRAN variable. In packages which need a fortran compile…
dmcmahill authored
184 .endif
185 FC= ${PKG_FC}
186 F77= ${PKG_FC}
c7eb7a7 add "" around ${F77} and ${FC} when adding to MAKE_ENV. This way if …
dmcmahill authored
187 MAKE_ENV+= F77="${F77}"
188 MAKE_ENV+= FC="${FC}"
bede96e - Add USE_FORTRAN variable. In packages which need a fortran compile…
dmcmahill authored
189 .endif
190
59bf989 Introduce USE_GTEXINFO and INFO_FILES definitions to bsd.pkg.mk, and …
agc authored
191 .if defined(INFO_FILES)
192 USE_GTEXINFO= yes
193 .endif
85d2418 Implement some parts of proposals posted to tech-pkg:
tv authored
194
af6a03b Fix NEED_NCURSES handling:
hubertf authored
195 .if ((defined(NEED_NCURSES)) && (${NEED_NCURSES} == YES))
03e0fdd Add USE_CURSES for packages that need curses functionality that only
wiz authored
196 DEPENDS+= ncurses>=5.0:../../devel/ncurses
197 .endif
198
3dcaab9 Missed the !exists(/usr/bin/install-info) on the gtexinfo dependency.
tv authored
199 .if defined(USE_GTEXINFO) && !exists(/usr/bin/install-info)
a4979e1 Use relative paths when adding magic dependencies for USE_* variables.
mycroft authored
200 DEPENDS+= gtexinfo-3.12:../../devel/gtexinfo
59bf989 Introduce USE_GTEXINFO and INFO_FILES definitions to bsd.pkg.mk, and …
agc authored
201 .endif
85d2418 Implement some parts of proposals posted to tech-pkg:
tv authored
202
4efa869 USE_LIBINTL: workaround brokenness in gettext.m4 (configure.in fragment
itojun authored
203 # -lintl in CONFIGURE_ENV is to workaround broken gettext.m4
204 # (gettext.m4 does not add -lintl where it should, and fails to detect
205 # if libintl.a is genuine GNU gettext or not).
206 .if defined(USE_LIBINTL)
207 .if exists(/usr/include/libintl.h)
208 .if defined(GNU_CONFIGURE)
5a0fc01 Don't ignore previously set ${LIBS} in USE_LIBINTL case.
wiz authored
209 CONFIGURE_ENV+= LIBS="${LIBS} -lintl"
4efa869 USE_LIBINTL: workaround brokenness in gettext.m4 (configure.in fragment
itojun authored
210 .endif
211 .else
3f0d3bb declare USE_LIBINTL.
itojun authored
212 DEPENDS+= gettext-lib>=0.10.35nb1:../../devel/gettext-lib
4efa869 USE_LIBINTL: workaround brokenness in gettext.m4 (configure.in fragment
itojun authored
213 .if defined(GNU_CONFIGURE)
214 CPPFLAGS+= -I${LOCALBASE}/include
215 CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}"
5a0fc01 Don't ignore previously set ${LIBS} in USE_LIBINTL case.
wiz authored
216 CONFIGURE_ENV+= LIBS="${LIBS} -L${LOCALBASE}/lib -lintl"
4efa869 USE_LIBINTL: workaround brokenness in gettext.m4 (configure.in fragment
itojun authored
217 .endif
218 .endif
3f0d3bb declare USE_LIBINTL.
itojun authored
219 .endif
220
d0ee045 Add the USE_LIBTOOL pkg Makefile option. When set, it adds a build
tv authored
221 .if defined(USE_LIBTOOL)
ff6b90c s/USE_LIBTOOL/USE_PKGLIBTOOL/
rh authored
222 LIBTOOL= ${LOCALBASE}/bin/libtool
223 # XXX: actually, here we would need something like
d8ac826 Bump libfool version.
mycroft authored
224 # BUILD_DEPENDS+=libtool>=1.3.5nb9:../../devel/libtool
45e5681 Add libtool in 'make fetch-list' output. Suggested by Klaus Heinz.
hubertf authored
225 .if make(install-run-depends) || make(fetch-list-recursive)
d8ac826 Bump libfool version.
mycroft authored
226 DEPENDS+= libtool>=1.3.5nb9:../../devel/libtool
ff6b90c s/USE_LIBTOOL/USE_PKGLIBTOOL/
rh authored
227 .endif
228 .endif
229
a44e8b5 USE_PKGLIBTOOL is no more
wiz authored
230 .if defined(USE_LIBTOOL)
dfb8c94 Add a LIBTOOL_FLAGS definition, and use it when adding ${LIBTOOL} to the
agc authored
231 CONFIGURE_ENV+= LIBTOOL="${LIBTOOL} ${LIBTOOL_FLAGS}"
232 MAKE_ENV+= LIBTOOL="${LIBTOOL} ${LIBTOOL_FLAGS}"
d0ee045 Add the USE_LIBTOOL pkg Makefile option. When set, it adds a build
tv authored
233 .endif
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
234
25920a4 Add new option "USE_SSL" for packages which require a SSL library. An
tron authored
235 .if defined(USE_SSL)
236 .if exists(/usr/include/openssl/ssl.h)
9d0c969 Rename "SSL_DIR" variable to "SSLBASE" to be consistent with e.g.
tron authored
237 SSLBASE= /usr
25920a4 Add new option "USE_SSL" for packages which require a SSL library. An
tron authored
238 .else
a4979e1 Use relative paths when adding magic dependencies for USE_* variables.
mycroft authored
239 DEPENDS+= openssl>=0.9.5a:../../security/openssl
9d0c969 Rename "SSL_DIR" variable to "SSLBASE" to be consistent with e.g.
tron authored
240 SSLBASE= ${LOCALBASE}
25920a4 Add new option "USE_SSL" for packages which require a SSL library. An
tron authored
241 .endif
9d0c969 Rename "SSL_DIR" variable to "SSLBASE" to be consistent with e.g.
tron authored
242 BUILD_DEFS+= SSLBASE
25920a4 Add new option "USE_SSL" for packages which require a SSL library. An
tron authored
243 .endif
244
29d5f75 Introduce a USE_XAW definition, which is used in package Makefiles, to
agc authored
245 .if defined(USE_XAW)
246 XAW_TYPE?= standard
247 .if ${XAW_TYPE} == "xpm"
a4979e1 Use relative paths when adding magic dependencies for USE_* variables.
mycroft authored
248 DEPENDS+= Xaw-Xpm-1.1:../../x11/Xaw-Xpm
29d5f75 Introduce a USE_XAW definition, which is used in package Makefiles, to
agc authored
249 .elif ${XAW_TYPE} == "3d"
a4979e1 Use relative paths when adding magic dependencies for USE_* variables.
mycroft authored
250 DEPENDS+= Xaw3d-1.5:../../x11/Xaw3d
29d5f75 Introduce a USE_XAW definition, which is used in package Makefiles, to
agc authored
251 .endif
252 .endif
253
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
254 # Don't change these!!! These names are built into the _TARGET_USE macro,
255 # there is no way to refer to them cleanly from within the macro AFAIK.
4f685d3 - The comment above the _COOKIE settings says "don't change these!!", so
tv authored
256 EXTRACT_COOKIE= ${WRKDIR}/.extract_done
257 CONFIGURE_COOKIE= ${WRKDIR}/.configure_done
258 INSTALL_COOKIE= ${WRKDIR}/.install_done
259 BUILD_COOKIE= ${WRKDIR}/.build_done
260 PATCH_COOKIE= ${WRKDIR}/.patch_done
261 PACKAGE_COOKIE= ${WRKDIR}/.package_done
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
262
263 # Miscellaneous overridable commands:
33ed0c4 Add code to include the size of a package into both the
hubertf authored
264 SHCOMMENT?= ${ECHO_MSG} >/dev/null '***'
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
265 .if exists(/sbin/md5)
266 MD5?= /sbin/md5
267 .elif exists(/bin/md5)
268 MD5?= /bin/md5
269 .elif exists(/usr/bin/md5)
270 MD5?= /usr/bin/md5
bb27690 better linux support
christos authored
271 .elif exists(${LOCALBASE}/bsd/bin/md5)
272 MD5?= ${LOCALBASE}/bsd/bin/md5
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
273 .else
274 MD5?= md5
275 .endif
276 MD5_FILE?= ${FILESDIR}/md5
48904d8 Add logic to provide md5 checksums on the patch files, placing them in
agc authored
277 PATCH_SUM_FILE?= ${FILESDIR}/patch-sum
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
278
237311f Deal with some hidden dependencies, commonly induced by Gnu configure…
fredb authored
279 .if exists(/usr/bin/m4)
280 M4?= /usr/bin/m4
281 .endif
282
7b16248 Replace all occurrences of USE_X11 with USE_X11BASE. This means "inst…
agc authored
283 .if defined(USE_MOTIF) || defined(USE_X11BASE) || defined(USE_X11)
73265d7 Don't use "MOTIFBASE" if "USE_MOTIF" was not defined. Patch supplied by
tron authored
284 .if defined(USE_MOTIF)
285 LDFLAGS+= -Wl,-R${MOTIFBASE}/lib -L${MOTIFBASE}/lib
286 .endif
287 LDFLAGS+= -Wl,-R${X11BASE}/lib -L${X11BASE}/lib
4fe0aef Add new automatic handling for rpath. This sets the LDFLAGS variable
garbled authored
288 .endif
17ac523 enable xpkgwedge bits -- it basically works now.
mrg authored
289 LDFLAGS+= -Wl,-R${LOCALBASE}/lib -L${LOCALBASE}/lib
4fe0aef Add new automatic handling for rpath. This sets the LDFLAGS variable
garbled authored
290 MAKE_ENV+= LDFLAGS="${LDFLAGS}"
237311f Deal with some hidden dependencies, commonly induced by Gnu configure…
fredb authored
291 CONFIGURE_ENV+= LDFLAGS="${LDFLAGS}" M4="${M4}" YACC="${YACC}"
4fe0aef Add new automatic handling for rpath. This sets the LDFLAGS variable
garbled authored
292
e64754f Remove the trailing '-f' from MAKE_FLAGS in bsd.pkg.mk, and include it
agc authored
293 MAKE_FLAGS?=
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
294 MAKEFILE?= Makefile
73265d7 Don't use "MOTIFBASE" if "USE_MOTIF" was not defined. Patch supplied by
tron authored
295 MAKE_ENV+= PATH=${PATH}:${LOCALBASE}/bin:${X11BASE}/bin PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} X11BASE=${X11BASE} CFLAGS="${CFLAGS}"
296
297 .if defined(USE_MOTIF)
298 MAKE_ENV+= MOTIFLIB="${MOTIFLIB}"
299 .endif
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
300
d672d8e Speedups!
hubertf authored
301 .if exists(${LOCALBASE}/bsd/bin/ftp) # Zoularis
bb27690 better linux support
christos authored
302 FETCH_CMD?= ${LOCALBASE}/bsd/bin/ftp
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
303 .else
304 FETCH_CMD?= /usr/bin/ftp
305 .endif
306
85d2418 Implement some parts of proposals posted to tech-pkg:
tv authored
307 TOUCH_FLAGS?= -f
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
308
85d2418 Implement some parts of proposals posted to tech-pkg:
tv authored
309 PATCH_STRIP?= -p0
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
310 PATCH_DIST_STRIP?= -p0
f97b12f Add automatic manual page handling. This is backwards-compatible with
agc authored
311 .if defined(PATCH_DEBUG) || defined(PKG_VERBOSE)
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
312 PATCH_DEBUG_TMP= yes
85d2418 Implement some parts of proposals posted to tech-pkg:
tv authored
313 PATCH_ARGS?= -d ${WRKSRC} -E ${PATCH_STRIP}
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
314 PATCH_DIST_ARGS?= -d ${WRKSRC} -E ${PATCH_DIST_STRIP}
315 .else
316 PATCH_DEBUG_TMP= no
85d2418 Implement some parts of proposals posted to tech-pkg:
tv authored
317 PATCH_ARGS?= -d ${WRKSRC} --forward --quiet -E ${PATCH_STRIP}
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
318 PATCH_DIST_ARGS?= -d ${WRKSRC} --forward --quiet -E ${PATCH_DIST_STRIP}
319 .endif
320 .if defined(BATCH)
321 PATCH_ARGS+= --batch
322 PATCH_DIST_ARGS+= --batch
323 .endif
2f1fbfb Enable 'PATCH_FUZZ_FACTOR?= -F0' by default, rather than just iff PKG…
abs authored
324 PATCH_FUZZ_FACTOR?= -F0 # Default to zero fuzz
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
325
326 .if defined(PATCH_CHECK_ONLY)
85d2418 Implement some parts of proposals posted to tech-pkg:
tv authored
327 PATCH_ARGS+= -C
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
328 PATCH_DIST_ARGS+= -C
329 .endif
330
7761afa Add support for "lha" archives (as distfiles). Patch submitted by SUN…
fredb authored
331 # If the distfile has a tar.bz2 suffix, use bzcat in preference to gzcat,
332 # pulling in the "bzip2" package if necessary. [Note: this is only for
333 # the benefit of pre 1.5 NetBSD systems. "gzcat" on newer systems happily
334 # decodes bzip2.] Do likewise for ".zip" and ".lha" distfiles.
d820b5d Add automatic handling for ".tar.bz2" archives - just set "EXTRACT_SUFX"
tron authored
335 EXTRACT_SUFX?= .tar.gz
892cc26 Rewrite the extraction commands to be more intuitive.
agc authored
336 .if ${EXTRACT_SUFX} == ".tar.bz2"
d820b5d Add automatic handling for ".tar.bz2" archives - just set "EXTRACT_SUFX"
tron authored
337 .if exists(/usr/bin/bzcat)
338 BZCAT= /usr/bin/bzcat
339 .else
340 BZCAT= ${LOCALBASE}/bin/bzcat
a4979e1 Use relative paths when adding magic dependencies for USE_* variables.
mycroft authored
341 BUILD_DEPENDS+= ${BZCAT}:../../archivers/bzip2
42ce372 Add Solaris support to pkgsrc, using Christos Zoulas' NetBSD emulation
agc authored
342 .endif # !exists bzcat
a8dfdd8 "bzcat" now handles symlinks properly.
tron authored
343 DECOMPRESS_CMD?= ${BZCAT}
57a203f * small whitespace fix
hubertf authored
344 .elif ${EXTRACT_SUFX} == ".tar"
345 DECOMPRESS_CMD?= ${CAT}
9fc90cf Recognize EXTRACT_SUFX=".zip": pull in unzip pkg, and set EXTRACT_CMD
hubertf authored
346 .elif ${EXTRACT_SUFX} == ".zip"
347 BUILD_DEPENDS+= unzip:../../archivers/unzip
6154b81 Don't override EXTRACT_CMD if EXTRACT_SUFX is ".zip".
wiz authored
348 EXTRACT_CMD?= unzip -Laq ${DOWNLOADED_DISTFILE}
7761afa Add support for "lha" archives (as distfiles). Patch submitted by SUN…
fredb authored
349 .elif ${EXTRACT_SUFX} == ".lzh"
350 BUILD_DEPENDS+= lha:../../archivers/lha
351 EXTRACT_CMD?= lha xq ${DOWNLOADED_DISTFILE}
892cc26 Rewrite the extraction commands to be more intuitive.
agc authored
352 .else
353 DECOMPRESS_CMD?= ${GZCAT}
354 .endif
355
0b6de3c Support bzip2 compressed patch files.
fredb authored
356 # Also need bzip2 for PATCHFILES with .bz2 suffix.
357 .if defined(PATCHFILES)
358 .if ${PATCHFILES:E} == "bz2" && ${EXTRACT_SUFX} != ".tar.bz2"
359 .if exists(/usr/bin/bzcat)
360 BZCAT= /usr/bin/bzcat
361 .else
362 BZCAT= ${LOCALBASE}/bin/bzcat
a4979e1 Use relative paths when adding magic dependencies for USE_* variables.
mycroft authored
363 BUILD_DEPENDS+= ${BZCAT}:../../archivers/bzip2
0b6de3c Support bzip2 compressed patch files.
fredb authored
364 .endif # !exists bzcat
365 .endif
366 .endif # defined(PATCHFILES)
367
892cc26 Rewrite the extraction commands to be more intuitive.
agc authored
368 # If this is empty, then everything gets extracted.
369 EXTRACT_ELEMENTS?=
370
7761afa Add support for "lha" archives (as distfiles). Patch submitted by SUN…
fredb authored
371 # If EXTRACT_USING_PAX is defined, use pax in preference to (GNU) tar,
372 # and append 2 tar blocks of zero bytes on the end, in case the archive
373 # was written with a buggy version of GNU tar.
09a566b Add an EXTRACT_USING_PAX definition, which, if defined, will use pax(1)
agc authored
374 .if defined(EXTRACT_USING_PAX)
892cc26 Rewrite the extraction commands to be more intuitive.
agc authored
375 EXTRACT_CMD?= (${DECOMPRESS_CMD} ${DOWNLOADED_DISTFILE} ; dd if=/dev/zero bs=10k count=2) | ${PAX} -r ${EXTRACT_ELEMENTS}
09a566b Add an EXTRACT_USING_PAX definition, which, if defined, will use pax(1)
agc authored
376 .else
c82cc98 Abolish old-style bundled args for ${GTAR}. The purpose is to permit
fredb authored
377 EXTRACT_CMD?= ${DECOMPRESS_CMD} ${DOWNLOADED_DISTFILE} | ${GTAR} -xf - ${EXTRACT_ELEMENTS}
892cc26 Rewrite the extraction commands to be more intuitive.
agc authored
378 .endif
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
379
380 # Figure out where the local mtree file is
381 .if !defined(MTREE_FILE)
7b16248 Replace all occurrences of USE_X11 with USE_X11BASE. This means "inst…
agc authored
382 .if defined(USE_IMAKE) || defined(USE_MOTIF) || defined(USE_X11BASE)
42ce372 Add Solaris support to pkgsrc, using Christos Zoulas' NetBSD emulation
agc authored
383 MTREE_FILE= ${PKGSRCDIR}/mk/${OPSYS}.x11.dist
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
384 .else
42ce372 Add Solaris support to pkgsrc, using Christos Zoulas' NetBSD emulation
agc authored
385 MTREE_FILE= ${PKGSRCDIR}/mk/${OPSYS}.pkg.dist
2748e16 Moved src/etc/mtree/BSD.x11.dist to pkgsrc/mk/NetBSD.x11.dist by
agc authored
386 .endif
42ce372 Add Solaris support to pkgsrc, using Christos Zoulas' NetBSD emulation
agc authored
387 .endif # ! MTREE_FILE
388
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
389 MTREE_ARGS?= -U -f ${MTREE_FILE} -d -e -p
390
42ce372 Add Solaris support to pkgsrc, using Christos Zoulas' NetBSD emulation
agc authored
391 # Debugging levels for this file, dependent on PKG_DEBUG_LEVEL definition
392 # 0 == normal, default, quiet operation
393 # 1 == all shell commands echoed before invocation
394 # 2 == shell "set -x" operation
395 PKG_DEBUG_LEVEL?= 0
396 _PKG_SILENT= @
397 _PKG_DEBUG=
398
399 .if ${PKG_DEBUG_LEVEL} > 0
400 _PKG_SILENT=
401 .endif
402
403 .if ${PKG_DEBUG_LEVEL} > 1
404 _PKG_DEBUG= set -x;
f4e645f - Add OpenBSD and FreeBSD Ids in the header
hubertf authored
405 .endif
406
367b458 Modifications for a read-only pkgsrc (but writable WRKOBJDIR).
agc authored
407 # If WRKOBJDIR is set, use that tree to build
408 .ifdef WRKOBJDIR
5e3e3c7 Move the definition of BUILD_ROOT into bsd.pkg.mk, from the individual
agc authored
409 BUILD_ROOT= ${WRKOBJDIR}
7d9cf3b The __canonical_* stuff for WRKOBJDIR is unnecessary. Just use PKGPA…
mycroft authored
410 BUILD_DIR?= ${WRKOBJDIR}/${PKGPATH}
367b458 Modifications for a read-only pkgsrc (but writable WRKOBJDIR).
agc authored
411 .else
5e3e3c7 Move the definition of BUILD_ROOT into bsd.pkg.mk, from the individual
agc authored
412 BUILD_ROOT= ${PKGSRCDIR}
367b458 Modifications for a read-only pkgsrc (but writable WRKOBJDIR).
agc authored
413 BUILD_DIR?= ${.CURDIR}
414 .endif # WRKOBJDIR
415
416 # If OBJMACHINE is set, use ${MACHINE_ARCH} in the working directory name
417 .ifdef OBJMACHINE
9ae5666 When OBJMACHINE and WRKOBJDIR set, be sure to also add the arch name to
hubertf authored
418 WRKDIR_BASENAME?= work.${MACHINE_ARCH}
367b458 Modifications for a read-only pkgsrc (but writable WRKOBJDIR).
agc authored
419 .else
9ae5666 When OBJMACHINE and WRKOBJDIR set, be sure to also add the arch name to
hubertf authored
420 WRKDIR_BASENAME?= work
367b458 Modifications for a read-only pkgsrc (but writable WRKOBJDIR).
agc authored
421 .endif
422
423 .ifdef NO_WRKDIR
424 WRKDIR?= ${BUILD_DIR}
425 .else
426 WRKDIR?= ${BUILD_DIR}/${WRKDIR_BASENAME}
9ae5666 When OBJMACHINE and WRKOBJDIR set, be sure to also add the arch name to
hubertf authored
427 .endif # !NO_WRKDIR
367b458 Modifications for a read-only pkgsrc (but writable WRKOBJDIR).
agc authored
428
f0e3be9 Make definition of OBJMACHINE in mk.conf work.
hubertf authored
429 .if defined(NO_WRKSUBDIR)
430 WRKSRC?= ${WRKDIR}
9ae5666 When OBJMACHINE and WRKOBJDIR set, be sure to also add the arch name to
hubertf authored
431 .else # NO_WRKSUBDIR
f0e3be9 Make definition of OBJMACHINE in mk.conf work.
hubertf authored
432 WRKSRC?= ${WRKDIR}/${DISTNAME}
9ae5666 When OBJMACHINE and WRKOBJDIR set, be sure to also add the arch name to
hubertf authored
433 .endif # NO_WRKSUBDIR
f0e3be9 Make definition of OBJMACHINE in mk.conf work.
hubertf authored
434
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
435 # A few aliases for *-install targets
61d4f49 Don't override INSTALL_* definitions in local Makefiles.
mellon authored
436 INSTALL_PROGRAM?= \
e009d2a Fix PR 4884 by replacing STRIP with STRIPFLAG.
hubertf authored
437 ${INSTALL} ${COPY} ${STRIPFLAG} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE}
61d4f49 Don't override INSTALL_* definitions in local Makefiles.
mellon authored
438 INSTALL_SCRIPT?= \
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
439 ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE}
61d4f49 Don't override INSTALL_* definitions in local Makefiles.
mellon authored
440 INSTALL_DATA?= \
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
441 ${INSTALL} ${COPY} -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE}
61d4f49 Don't override INSTALL_* definitions in local Makefiles.
mellon authored
442 INSTALL_MAN?= \
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
443 ${INSTALL} ${COPY} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE}
61d4f49 Don't override INSTALL_* definitions in local Makefiles.
mellon authored
444 INSTALL_PROGRAM_DIR?= \
2fcd7fe Add INSTALL_*_DIR macros.
hubertf authored
445 ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m ${BINMODE}
61d4f49 Don't override INSTALL_* definitions in local Makefiles.
mellon authored
446 INSTALL_SCRIPT_DIR?= \
2fcd7fe Add INSTALL_*_DIR macros.
hubertf authored
447 ${INSTALL_PROGRAM_DIR}
61d4f49 Don't override INSTALL_* definitions in local Makefiles.
mellon authored
448 INSTALL_DATA_DIR?= \
64d752d INSTALL_DATA_DIR should not install directories with mode 444
fvdl authored
449 ${INSTALL} -d -o ${SHAREOWN} -g ${SHAREGRP} -m ${BINMODE}
61d4f49 Don't override INSTALL_* definitions in local Makefiles.
mellon authored
450 INSTALL_MAN_DIR?= \
cd64ed7 Don't creade dirs mode 444, inspired by fvdl's last commit.
hubertf authored
451 ${INSTALL} -d -o ${MANOWN} -g ${MANGRP} -m ${BINMODE}
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
452
453 INSTALL_MACROS= BSD_INSTALL_PROGRAM="${INSTALL_PROGRAM}" \
454 BSD_INSTALL_SCRIPT="${INSTALL_SCRIPT}" \
455 BSD_INSTALL_DATA="${INSTALL_DATA}" \
2fcd7fe Add INSTALL_*_DIR macros.
hubertf authored
456 BSD_INSTALL_MAN="${INSTALL_MAN}" \
457 BSD_INSTALL_PROGRAM_DIR="${INSTALL_PROGRAM_DIR}" \
458 BSD_INSTALL_SCRIPT_DIR="${INSTALL_SCRIPT_DIR}" \
459 BSD_INSTALL_DATA_DIR="${INSTALL_DATA_DIR}" \
460 BSD_INSTALL_MAN_DIR="${INSTALL_MAN_DIR}"
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
461 MAKE_ENV+= ${INSTALL_MACROS}
462 SCRIPTS_ENV+= ${INSTALL_MACROS}
463
464 # The user can override the NO_PACKAGE by specifying this from
465 # the make command line
466 .if defined(FORCE_PACKAGE)
467 .undef NO_PACKAGE
468 .endif
469
8067991 Make any INSTALL or DEINSTALL scripts specifiable in the package
agc authored
470 COMMENT?= ${PKGDIR}/COMMENT
85d2418 Implement some parts of proposals posted to tech-pkg:
tv authored
471 DESCR= ${WRKDIR}/.DESCR
1ffa607 * Remove old PLIST-mi/md.shared/md.static that was only used for
hubertf authored
472 DESCR_SRC?= ${PKGDIR}/DESCR
8067991 Make any INSTALL or DEINSTALL scripts specifiable in the package
agc authored
473 PLIST= ${WRKDIR}/.PLIST
1ffa607 * Remove old PLIST-mi/md.shared/md.static that was only used for
hubertf authored
474 PLIST_SRC?= ${PKGDIR}/PLIST
2a0e4ad Add 'update' target to update a package and all depending packages.
rh authored
475 DLIST= ${WRKDIR}/.DLIST
476 DDIR= ${WRKDIR}/.DDIR
8067991 Make any INSTALL or DEINSTALL scripts specifiable in the package
agc authored
477
1ffa607 * Remove old PLIST-mi/md.shared/md.static that was only used for
hubertf authored
478
0c6bf26 s/PLIST_SUB/PLIST_SUBST/
sakamoto authored
479 # Set PLIST_SUBST to substitute "${variable}" to "value" in PLIST
74d9b13 Changes for building dynamic PLIST for perl packages:
jlam authored
480 PLIST_SUBST+= OPSYS=${OPSYS} \
481 OS_VERSION=${OS_VERSION} \
482 MACHINE_ARCH=${MACHINE_ARCH} \
483 MACHINE_GNU_ARCH=${MACHINE_GNU_ARCH} \
484 MACHINE_GNU_PLATFORM=${MACHINE_GNU_PLATFORM} \
485 LOWER_VENDOR=${LOWER_VENDOR} \
486 LOWER_OPSYS=${LOWER_OPSYS} \
6f89ba4 Surround the PERL5_* in PLIST_SUBST with .if defined(USE_PERL5) ... .…
jlam authored
487 PKGNAME=${PKGNAME}
ce66a23 Fix errors with not finding perl in another way.
jlam authored
488 .if defined(PERL5_SITELIB)
489 PLIST_SUBST+= PERL5_SITELIB=${PERL5_SITELIB:S/^${LOCALBASE}\///}
490 .endif
491 .if defined(PERL5_SITEARCH)
492 PLIST_SUBST+= PERL5_SITEARCH=${PERL5_SITEARCH:S/^${LOCALBASE}\///}
493 .endif
494 .if defined(PERL5_ARCHLIB)
495 PLIST_SUBST+= PERL5_ARCHLIB=${PERL5_ARCHLIB:S/^${LOCALBASE}\///}
6f89ba4 Surround the PERL5_* in PLIST_SUBST with .if defined(USE_PERL5) ... .…
jlam authored
496 .endif
bb5add8 Add support for PLIST_SUB variable. It is a list of "VAR=VALUE" pairs,
sakamoto authored
497
8067991 Make any INSTALL or DEINSTALL scripts specifiable in the package
agc authored
498 # Set INSTALL_FILE to be the name of any INSTALL file
499 .if !defined(INSTALL_FILE) && exists(${PKGDIR}/INSTALL)
500 INSTALL_FILE= ${PKGDIR}/INSTALL
501 .endif
502
503 # Set DEINSTALL_FILE to be the name of any DEINSTALL file
504 .if !defined(DEINSTALL_FILE) && exists(${PKGDIR}/DEINSTALL)
505 DEINSTALL_FILE= ${PKGDIR}/DEINSTALL
506 .endif
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
507
89a889b Make the REQ and MESSAGE files specifiable from package Makefiles,
agc authored
508 # Set MESSAGE_FILE to be the name of any MESSAGE file
509 .if !defined(MESSAGE_FILE) && exists(${PKGDIR}/MESSAGE)
510 MESSAGE_FILE= ${PKGDIR}/MESSAGE
511 .endif
512
42ce372 Add Solaris support to pkgsrc, using Christos Zoulas' NetBSD emulation
agc authored
513 .if (${OPSYS} == "SunOS")
514 AWK?= /usr/bin/nawk
515 BASENAME?= /usr/bin/basename
516 CAT?= /usr/bin/cat
517 CHMOD?= /usr/bin/chmod
518 CHOWN?= /usr/bin/chown
519 CHGRP?= /usr/bin/chgrp
520 CP?= /usr/bin/cp
2a0e4ad Add 'update' target to update a package and all depending packages.
rh authored
521 CUT?= /usr/bin/cut
7df4f96 Because "awk" keeps getting overflows on "arm32" while calculating the
tron authored
522 DC?= /usr/bin/dc
42ce372 Add Solaris support to pkgsrc, using Christos Zoulas' NetBSD emulation
agc authored
523 ECHO?= /usr/ucb/echo
524 EGREP?= /usr/xpg4/bin/egrep
525 FALSE?= /usr/bin/false
526 FILE?= /usr/bin/file
392b26b ${FIND} added
wiz authored
527 FIND?= /usr/bin/find
42ce372 Add Solaris support to pkgsrc, using Christos Zoulas' NetBSD emulation
agc authored
528 GREP?= /usr/bin/grep
8b6a68c Simplify EXTRACT_CMD definitions, and add GTAR definition.
agc authored
529 GTAR?= ${LOCALBASE}/bin/gtar
42ce372 Add Solaris support to pkgsrc, using Christos Zoulas' NetBSD emulation
agc authored
530 GUNZIP_CMD?= ${LOCALBASE}/bin/gunzip -f
09a566b Add an EXTRACT_USING_PAX definition, which, if defined, will use pax(1)
agc authored
531 GZCAT?= ${LOCALBASE}/bin/zcat
42ce372 Add Solaris support to pkgsrc, using Christos Zoulas' NetBSD emulation
agc authored
532 GZIP?= -9
533 GZIP_CMD?= ${LOCALBASE}/bin/gzip -nf ${GZIP}
eef6ff7 Revise previous multi-component-pathname fix: do not depend on the
rh authored
534 HEAD?= /usr/bin/head
42ce372 Add Solaris support to pkgsrc, using Christos Zoulas' NetBSD emulation
agc authored
535 ID?= /usr/xpg4/bin/id
536 IDENT?= ${LOCALBASE}/bin/ident
537 LDCONFIG?= /usr/bin/true
538 LN?= /usr/bin/ln
a6b7f85 Fix a problem with the print-pkg-size-this on Solaris.
veego authored
539 LS?= /usr/bin/ls
42ce372 Add Solaris support to pkgsrc, using Christos Zoulas' NetBSD emulation
agc authored
540 MKDIR?= /usr/bin/mkdir -p
c8bc763 Linux bits; now the package system works on Linux too.
christos authored
541 MTREE?= ${LOCALBASE}/bsd/bin/mtree
42ce372 Add Solaris support to pkgsrc, using Christos Zoulas' NetBSD emulation
agc authored
542 MV?= /usr/bin/mv
c8bc763 Linux bits; now the package system works on Linux too.
christos authored
543 PATCH?= ${LOCALBASE}/bin/patch -b
09a566b Add an EXTRACT_USING_PAX definition, which, if defined, will use pax(1)
agc authored
544 PAX?= /bin/pax
38f14fc Calculate current pkgtools version once (inline rather than via
abs authored
545 PKG_TOOLS_BIN?= ${LOCALBASE}/bsd/bin
42ce372 Add Solaris support to pkgsrc, using Christos Zoulas' NetBSD emulation
agc authored
546 RM?= /usr/bin/rm
547 RMDIR?= /usr/bin/rmdir
548 SED?= /usr/bin/sed
549 SETENV?= /usr/bin/env
550 SH?= /bin/ksh
7956f2b + Factor out the real-install target from the rest of the .USE ones.
agc authored
551 SU?= /usr/bin/su
42ce372 Add Solaris support to pkgsrc, using Christos Zoulas' NetBSD emulation
agc authored
552 TAIL?= /usr/xpg4/bin/tail
553 TEST?= /usr/bin/test
c8bc763 Linux bits; now the package system works on Linux too.
christos authored
554 TOUCH?= /usr/bin/touch
42ce372 Add Solaris support to pkgsrc, using Christos Zoulas' NetBSD emulation
agc authored
555 TR?= /usr/bin/tr
556 TRUE?= /usr/bin/true
fa6fc9e Avoid shell smarts: on NetBSD, type is a sh(1) builtin. If make(1) is
agc authored
557 TYPE?= /usr/bin/type
c8bc763 Linux bits; now the package system works on Linux too.
christos authored
558 .elif (${OPSYS} == "Linux")
559 AWK?= /usr/bin/awk
560 BASENAME?= /bin/basename
561 CAT?= /bin/cat
562 CHMOD?= /bin/chmod
563 CHOWN?= /usr/sbin/chown
564 CHGRP?= /usr/bin/chgrp
565 CP?= /bin/cp
2a0e4ad Add 'update' target to update a package and all depending packages.
rh authored
566 CUT?= /bin/cut
7df4f96 Because "awk" keeps getting overflows on "arm32" while calculating the
tron authored
567 DC?= /usr/bin/dc
c8bc763 Linux bits; now the package system works on Linux too.
christos authored
568 ECHO?= /bin/echo
569 EGREP?= /bin/egrep
a2d9ebc Correct the full pathname of false(1) on Linux.
agc authored
570 FALSE?= /bin/false
c8bc763 Linux bits; now the package system works on Linux too.
christos authored
571 FILE?= /usr/bin/file
392b26b ${FIND} added
wiz authored
572 FIND?= /usr/bin/find
759973f typo in the path for grep
christos authored
573 GREP?= /bin/grep
c8bc763 Linux bits; now the package system works on Linux too.
christos authored
574 GTAR?= /bin/tar
575 GUNZIP_CMD?= /usr/bin/gunzip -f
576 GZCAT?= /bin/zcat
577 GZIP?= -9
578 GZIP_CMD?= /usr/bin/gzip -nf ${GZIP}
eef6ff7 Revise previous multi-component-pathname fix: do not depend on the
rh authored
579 HEAD?= /usr/bin/head
c8bc763 Linux bits; now the package system works on Linux too.
christos authored
580 ID?= /usr/bin/id
581 IDENT?= /usr/bin/ident
582 LDCONFIG?= /sbin/ldconfig
583 LN?= /bin/ln
a6b7f85 Fix a problem with the print-pkg-size-this on Solaris.
veego authored
584 LS?= /bin/ls
c8bc763 Linux bits; now the package system works on Linux too.
christos authored
585 MKDIR?= /bin/mkdir -p
586 MTREE?= ${LOCALBASE}/bsd/bin/mtree
587 MV?= /bin/mv
7ebcd02 Introduce a variable called PATCH_FUZZ_FACTOR, default "", and use it
agc authored
588 PATCH?= /usr/bin/patch
c8bc763 Linux bits; now the package system works on Linux too.
christos authored
589 PAX?= /usr/local/bsd/bin/pax
38f14fc Calculate current pkgtools version once (inline rather than via
abs authored
590 PKG_TOOLS_BIN?= ${LOCALBASE}/bsd/bin
c8bc763 Linux bits; now the package system works on Linux too.
christos authored
591 RM?= /bin/rm
592 RMDIR?= /bin/rmdir
593 SED?= /bin/sed
594 SETENV?= /usr/bin/env
595 SH?= /bin/sh
596 SU?= /bin/su
597 TAIL?= /usr/bin/tail
bb27690 better linux support
christos authored
598 TEST?= /usr/bin/test
c8bc763 Linux bits; now the package system works on Linux too.
christos authored
599 TOUCH?= /bin/touch
600 TR?= /usr/bin/tr
601 TRUE?= /bin/true
602 TYPE?= type
42ce372 Add Solaris support to pkgsrc, using Christos Zoulas' NetBSD emulation
agc authored
603 .else
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
604 AWK?= /usr/bin/awk
605 BASENAME?= /usr/bin/basename
606 CAT?= /bin/cat
6408706 Add logic to check for pkg_install tools that are up to date.
agc authored
607 CHMOD?= /bin/chmod
608 CHOWN?= /usr/sbin/chown
609 CHGRP?= /usr/bin/chgrp
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
610 CP?= /bin/cp
2a0e4ad Add 'update' target to update a package and all depending packages.
rh authored
611 CUT?= /usr/bin/cut
7df4f96 Because "awk" keeps getting overflows on "arm32" while calculating the
tron authored
612 DC?= /usr/bin/dc
d672d8e Speedups!
hubertf authored
613 ECHO?= echo # Shell builtin
42ce372 Add Solaris support to pkgsrc, using Christos Zoulas' NetBSD emulation
agc authored
614 EGREP?= /usr/bin/egrep
d672d8e Speedups!
hubertf authored
615 FALSE?= false # Shell builtin
de8584f MANZ now handles symlinks properly.
tron authored
616 FILE?= /usr/bin/file
392b26b ${FIND} added
wiz authored
617 FIND?= /usr/bin/find
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
618 GREP?= /usr/bin/grep
8b6a68c Simplify EXTRACT_CMD definitions, and add GTAR definition.
agc authored
619 GTAR?= /usr/bin/tar
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
620 GUNZIP_CMD?= /usr/bin/gunzip -f
621 GZCAT?= /usr/bin/gzcat
622 GZIP?= -9
623 GZIP_CMD?= /usr/bin/gzip -nf ${GZIP}
eef6ff7 Revise previous multi-component-pathname fix: do not depend on the
rh authored
624 HEAD?= /usr/bin/head
42ce372 Add Solaris support to pkgsrc, using Christos Zoulas' NetBSD emulation
agc authored
625 ID?= /usr/bin/id
626 IDENT?= /usr/bin/ident
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
627 LDCONFIG?= /sbin/ldconfig
f4e645f - Add OpenBSD and FreeBSD Ids in the header
hubertf authored
628 LN?= /bin/ln
a6b7f85 Fix a problem with the print-pkg-size-this on Solaris.
veego authored
629 LS?= /bin/ls
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
630 MKDIR?= /bin/mkdir -p
c8bc763 Linux bits; now the package system works on Linux too.
christos authored
631 MTREE?= /usr/sbin/mtree
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
632 MV?= /bin/mv
7ebcd02 Introduce a variable called PATCH_FUZZ_FACTOR, default "", and use it
agc authored
633 PATCH?= /usr/bin/patch
09a566b Add an EXTRACT_USING_PAX definition, which, if defined, will use pax(1)
agc authored
634 PAX?= /bin/pax
38f14fc Calculate current pkgtools version once (inline rather than via
abs authored
635 PKG_TOOLS_BIN?= /usr/sbin
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
636 RM?= /bin/rm
637 RMDIR?= /bin/rmdir
638 SED?= /usr/bin/sed
639 SETENV?= /usr/bin/env
640 SH?= /bin/sh
7956f2b + Factor out the real-install target from the rest of the .USE ones.
agc authored
641 SU?= /usr/bin/su
42ce372 Add Solaris support to pkgsrc, using Christos Zoulas' NetBSD emulation
agc authored
642 TAIL?= /usr/bin/tail
d672d8e Speedups!
hubertf authored
643 TEST?= test # Shell builtin
c8bc763 Linux bits; now the package system works on Linux too.
christos authored
644 TOUCH?= /usr/bin/touch
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
645 TR?= /usr/bin/tr
d672d8e Speedups!
hubertf authored
646 TRUE?= true # Shell builtin
647 TYPE?= type # Shell builtin
42ce372 Add Solaris support to pkgsrc, using Christos Zoulas' NetBSD emulation
agc authored
648 .endif # !SunOS
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
649
dc5c2f6 Revert last change, it made pkg_info spew.
hubertf authored
650 PKG_ADD?= PKG_DBDIR=${PKG_DBDIR} ${PKG_TOOLS_BIN}/pkg_add
651 PKG_ADMIN?= PKG_DBDIR=${PKG_DBDIR} ${PKG_TOOLS_BIN}/pkg_admin
652 PKG_CREATE?= PKG_DBDIR=${PKG_DBDIR} ${PKG_TOOLS_BIN}/pkg_create
653 PKG_DELETE?= PKG_DBDIR=${PKG_DBDIR} ${PKG_TOOLS_BIN}/pkg_delete
654 PKG_INFO?= PKG_DBDIR=${PKG_DBDIR} ${PKG_TOOLS_BIN}/pkg_info
38f14fc Calculate current pkgtools version once (inline rather than via
abs authored
655
656 .if !defined(PKGTOOLS_VERSION)
657 .if !exists(${IDENT})
658 PKGTOOLS_VERSION=${PKGTOOLS_REQD}
659 .else
00d904d Make sure PKG_DBDIR is set for each call to pkg_info etc. by setting
hubertf authored
660 PKGTOOLS_VERSION!=${IDENT} ${PKG_TOOLS_BIN}/pkg_add ${PKG_TOOLS_BIN}/pkg_admin ${PKG_TOOLS_BIN}/pkg_create ${PKG_TOOLS_BIN}/pkg_delete ${PKG_TOOLS_BIN}/pkg_info | ${AWK} 'BEGIN {n = 0;}; $$1 ~ /\$$NetBSD/ && $$2 !~ /^crt0/ {gsub("/", "", $$4); if ($$4 > n) {n = $$4;}}; END {print n;}'
38f14fc Calculate current pkgtools version once (inline rather than via
abs authored
661 .endif
662 .endif
d672d8e Speedups!
hubertf authored
663 MAKEFLAGS+= PKGTOOLS_VERSION="${PKGTOOLS_VERSION}"
38f14fc Calculate current pkgtools version once (inline rather than via
abs authored
664
9aa73c7 Fix size-registering code.
hubertf authored
665 # Latest version of pkgtools required for this file.
37aab04 Bump PKGTOOLS_REQD to 20000202. As a consequence of this
hubertf authored
666 PKGTOOLS_REQD= 20000202
9aa73c7 Fix size-registering code.
hubertf authored
667
668 # Check that we're using up-to-date pkg_* tools with this file.
669 uptodate-pkgtools:
670 ${_PKG_SILENT}${_PKG_DEBUG} \
671 if [ ${PKGTOOLS_VERSION} -lt ${PKGTOOLS_REQD} ]; then \
672 case ${PKGNAME} in \
673 pkg_install-*) \
674 ;; \
675 *) \
d672d8e Speedups!
hubertf authored
676 ${ECHO} "Your package tools need to be updated to ${PKGTOOLS_REQD:C|(....)(..)(..)|\1/\2/\3|} versions."; \
677 ${ECHO} "The installed package tools were last updated on ${PKGTOOLS_VERSION:C|(....)(..)(..)|\1/\2/\3|}."; \
9aa73c7 Fix size-registering code.
hubertf authored
678 ${ECHO} "Please make and install the pkgsrc/pkgtools/pkg_install package."; \
679 ${FALSE} ;; \
680 esac \
681 fi
682
683 # Files to create for versioning and build information
684 BUILD_VERSION_FILE= ${WRKDIR}/.build_version
685 BUILD_INFO_FILE= ${WRKDIR}/.build_info
686
687 # Files containing size of pkg w/o and w/ all required pkgs
89455e5 rename Size* to .Size*
wiz authored
688 SIZE_PKG_FILE= ${WRKDIR}/.SizePkg
689 SIZE_ALL_FILE= ${WRKDIR}/.SizeAll
9aa73c7 Fix size-registering code.
hubertf authored
690
691 .ifndef PKG_ARGS
692 PKG_ARGS= -v -c ${COMMENT} -d ${DESCR} -f ${PLIST} -l
693 PKG_ARGS+= -b ${BUILD_VERSION_FILE} -B ${BUILD_INFO_FILE}
694 PKG_ARGS+= -s ${SIZE_PKG_FILE} -S ${SIZE_ALL_FILE}
4877d2e * More target renaming:
hubertf authored
695 PKG_ARGS+= -p ${PREFIX} -P "`${MAKE} ${MAKEFLAGS} run-depends-list PACKAGE_DEPENDS_QUICK=true|sort -u`"
9aa73c7 Fix size-registering code.
hubertf authored
696 .ifdef CONFLICTS
697 PKG_ARGS+= -C "${CONFLICTS}"
698 .endif
699 .ifdef INSTALL_FILE
700 PKG_ARGS+= -i ${INSTALL_FILE}
701 .endif
702 .ifdef DEINSTALL_FILE
703 PKG_ARGS+= -k ${DEINSTALL_FILE}
704 .endif
705 .ifdef MESSAGE_FILE
706 PKG_ARGS+= -D ${MESSAGE_FILE}
707 .endif
708 .ifndef NO_MTREE
709 PKG_ARGS+= -m ${MTREE_FILE}
710 .endif
711 .endif # !PKG_ARGS
712 PKG_SUFX?= .tgz
1ffa607 * Remove old PLIST-mi/md.shared/md.static that was only used for
hubertf authored
713 #PKG_SUFX?= .tbz # bzip2(1) pkgs
9aa73c7 Fix size-registering code.
hubertf authored
714 # where pkg_add records its dirty deeds.
a4a3135 Changes to make DESTDIR builds have a bit more chance to survive,
hubertf authored
715 PKG_DBDIR?= ${DESTDIR}/var/db/pkg
9aa73c7 Fix size-registering code.
hubertf authored
716
717 # shared/dynamic motif libs
73265d7 Don't use "MOTIFBASE" if "USE_MOTIF" was not defined. Patch supplied by
tron authored
718 .if defined(USE_MOTIF)
e1cd22b Add -lXp to MOTIFLIB, needed by openmotif.
mjl authored
719 MOTIFLIB?= -L${MOTIFBASE}/lib -L${X11BASE}/lib -L${LOCALBASE}/lib -Wl,-R${MOTIFBASE}/lib -Wl,-R${X11BASE}/lib -Wl,-R${LOCALBASE}/lib -lXm -lXp
73265d7 Don't use "MOTIFBASE" if "USE_MOTIF" was not defined. Patch supplied by
tron authored
720 .endif
9aa73c7 Fix size-registering code.
hubertf authored
721
04f7e63 Previous commit to bsd.pkg.mk caught some "SMART_MESSAGES" work - doc…
agc authored
722 # Define SMART_MESSAGES in /etc/mk.conf for messages giving the tree
723 # of depencies for building, and the current target.
fce3306 Fix PACKAGE_DEPENDS_QUICK when installing on Solaris - escape the
agc authored
724 .ifdef SMART_MESSAGES
725 _PKGSRC_IN?= ===> ${.TARGET} [${PKGNAME}${_PKGSRC_DEPS}] ===
726 .else
727 _PKGSRC_IN?= ===
728 .endif
729
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
730 # Used to print all the '===>' style prompts - override this to turn them off.
731 ECHO_MSG?= ${ECHO}
732
6348997 Introduce TRUE?=/usr/bin/true, and use it.
hubertf authored
733 # How to do nothing. Override if you, for some strange reason, would rather
734 # do something.
735 DO_NADA?= ${TRUE}
736
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
737 ALL_TARGET?= all
738 INSTALL_TARGET?= install
739
3689d63 Let make do the work:
agc authored
740 .if defined(USE_IMAKE) && !defined(NO_INSTALL_MANPAGES)
741 INSTALL_TARGET+= install.man
742 .endif
743
c502b71 Implement a new PASSIVE_FETCH definition, which can be set in the
agc authored
744 # If this host is behind a filtering firewall, use passive ftp(1)
745 .if defined(PASSIVE_FETCH)
746 FETCH_BEFORE_ARGS += -p
747 .endif
748
92a4e68 Fixup Motif-handling code to work again after X11PREFIX changes.
jlam authored
749 # Check if we got a real Motif, LessTif or no Motif at all.
c73bba2 Support using a preinstalled Motif installation instead of Lesstif ag…
tron authored
750 .if defined(USE_MOTIF)
92a4e68 Fixup Motif-handling code to work again after X11PREFIX changes.
jlam authored
751 .if defined(USE_MOTIF12)
282230b The "lesstif12" package is in directory "pkgsrc/x11/lesstif12" not
tron authored
752 LESSTIF_DEPENDS= lesstif12-*:../../x11/lesstif12
92a4e68 Fixup Motif-handling code to work again after X11PREFIX changes.
jlam authored
753 .else
754 LESSTIF_DEPENDS= lesstif-*:../../x11/lesstif
755 .endif
b4f3b59 Add a MOTIFBASE definition, to allow Motif libraries and headers to be
agc authored
756 .if exists(${MOTIFBASE}/include/Xm/Xm.h)
d305c43 hand IS_LESSTIF off to MAKEFLAGS, and don't (re)calculate if not nece…
hubertf authored
757 .if !defined(IS_LESSTIF)
b4f3b59 Add a MOTIFBASE definition, to allow Motif libraries and headers to be
agc authored
758 IS_LESSTIF!= ${EGREP} -c LESSTIF ${MOTIFBASE}/include/Xm/Xm.h || ${TRUE}
d305c43 hand IS_LESSTIF off to MAKEFLAGS, and don't (re)calculate if not nece…
hubertf authored
759 MAKEFLAGS+= IS_LESSTIF=${IS_LESSTIF}
760 .endif # !IS_LESSTIF
92a4e68 Fixup Motif-handling code to work again after X11PREFIX changes.
jlam authored
761 .if (${IS_LESSTIF} != "0") || \
762 (defined(USE_MOTIF12) && exists(${MOTIFBASE}/include/Xm/Gadget.h))
763 DEPENDS+= ${LESSTIF_DEPENDS}
c73bba2 Support using a preinstalled Motif installation instead of Lesstif ag…
tron authored
764 .endif
765 .else
92a4e68 Fixup Motif-handling code to work again after X11PREFIX changes.
jlam authored
766 DEPENDS+= ${LESSTIF_DEPENDS}
c73bba2 Support using a preinstalled Motif installation instead of Lesstif ag…
tron authored
767 .endif
00ecd87 Add USE_MESA and USE_GLX mechanism similar to USE_XPM that detects and
rh authored
768 .endif # USE_MOTIF
c73bba2 Support using a preinstalled Motif installation instead of Lesstif ag…
tron authored
769
ee19a9f Add support for new variable "USE_XPM" for packages which use the Xpm
tron authored
770 # Check if we got Xpm distributed with XFree86 4.0 or newer or if we
771 # need to use the package.
ae75934 Partially back out revision 1.612 because it causes endless loops in
tron authored
772 .if defined(USE_XPM)
df445e4 Rename ""__BUILTIN_XPM" to "IS_BUILTIN_XPM" and add it to "MAKEFLAGS" to
tron authored
773 .if !defined(IS_BUILTIN_XPM)
59c0900 Explicitly set "IS_BUILTIN_XPM" to "0" if the "xpm" library is not
tron authored
774 .if exists(${X11BASE}/include/X11/xpm.h)
df445e4 Rename ""__BUILTIN_XPM" to "IS_BUILTIN_XPM" and add it to "MAKEFLAGS" to
tron authored
775 IS_BUILTIN_XPM!= ${EGREP} -c NormalLibXpm ${X11BASE}/lib/X11/config/X11.tmpl || ${TRUE}
776 MAKEFLAGS+= IS_BUILTIN_XPM=${IS_BUILTIN_XPM}
59c0900 Explicitly set "IS_BUILTIN_XPM" to "0" if the "xpm" library is not
tron authored
777 .else
778 IS_BUILTIN_XPM= 0
779 .endif
df445e4 Rename ""__BUILTIN_XPM" to "IS_BUILTIN_XPM" and add it to "MAKEFLAGS" to
tron authored
780 .endif
781 .if (${IS_BUILTIN_XPM} == "0")
ee19a9f Add support for new variable "USE_XPM" for packages which use the Xpm
tron authored
782 DEPENDS+= xpm-3.4k:../../graphics/xpm
645a437 Fix a EVAL_PREFIX problem with XPM and xfree86 4.x
veego authored
783 XPMDIR_DEFAULT= ${X11PREFIX}
784 .else
785 XPMDIR_DEFAULT= ${X11BASE}
ee19a9f Add support for new variable "USE_XPM" for packages which use the Xpm
tron authored
786 .endif
00ecd87 Add USE_MESA and USE_GLX mechanism similar to USE_XPM that detects and
rh authored
787 .endif # USE_XPM
788
789 # If USE_MESA is set, depend on Mesa (or Mesa-glx if USE_GLX is defined and
790 # Mesa/GLX is not included in XFree86)
791 .if defined(USE_MESA)
792 .if (defined(USE_GLX) && ${HAVE_BUILTIN_MESA} == "NO")
793 DEPENDS+= Mesa-glx>=20000813:../../graphics/Mesa-glx
794 .else
795 DEPENDS+= Mesa>=3.2.1:../../graphics/Mesa
ee19a9f Add support for new variable "USE_XPM" for packages which use the Xpm
tron authored
796 .endif
00ecd87 Add USE_MESA and USE_GLX mechanism similar to USE_XPM that detects and
rh authored
797 .undef __BUILTIN_MESA
798 .endif # USE_MESA
ee19a9f Add support for new variable "USE_XPM" for packages which use the Xpm
tron authored
799
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
800 # Popular master sites
801 MASTER_SITE_XCONTRIB+= \
d77722c Completely replace "MASTER_SITE_SUBDIR" and "PATCH_SITE_SUBDIR" with
tron authored
802 ftp://crl.dec.com/pub/X11/contrib/ \
803 ftp://ftp.uni-paderborn.de/pub/X11/contrib/ \
804 ftp://ftp.x.org/contrib/
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
805
806 MASTER_SITE_GNU+= \
d77722c Completely replace "MASTER_SITE_SUBDIR" and "PATCH_SITE_SUBDIR" with
tron authored
807 ftp://ftp.gnu.org/pub/gnu/ \
45295e2 Update GNU mirror list.
tron authored
808 ftp://ftp.cs.columbia.edu/archives/gnu/prep/ \
809 ftp://ftp.gwdg.de/pub/gnu/ \
5a05f63 remove bogus 'ftp' before URL
wiz authored
810 ftp://ftp.progsoc.uts.edu.au/pub/gnu/
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
811
812 MASTER_SITE_PERL_CPAN+= \
d77722c Completely replace "MASTER_SITE_SUBDIR" and "PATCH_SITE_SUBDIR" with
tron authored
813 ftp://ftp.digital.com/pub/plan/perl/CPAN/modules/by-module/ \
72a9269 Add authoritative CPAN ftp site as a last resort in case packages have
david authored
814 ftp://ftp.freesoftware.com/pub/perl/CPAN/modules/by-module/ \
815 ftp://cpan.perl.org/CPAN/modules/by-module/
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
816
3ee0188 Change the 'update' target to skip non-existent (removed) directories.
rh authored
817 MASTER_SITE_R_CRAN+= \
818 http://cran.r-project.org/src/ \
819 ftp://cran.r-project.org/pub/R/src/ \
820 http://cran.at.r-project.org/src/ \
821 ftp://cran.at.r-project.org/pub/R/src/ \
822 http://cran.dk.r-project.org/src/ \
823 http://cran.ch.r-project.org/src/ \
824 http://cran.uk.r-project.org/src/ \
825 http://cran.us.r-project.org/src/ \
826 http://lib.stat.cmu.edu/R/CRAN/src/ \
827 ftp://ftp.biostat.washington.edu/mirrors/R/CRAN/src/ \
828 http://cran.stat.wisc.edu/src/ \
829 http://SunSITE.auc.dk/R/src/ \
830 http://www.stat.unipg.it/pub/stat/statlib/R/CRAN/src/ \
831 ftp://ftp.u-aizu.ac.jp/pub/lang/R/CRAN/src/ \
832 ftp://dola.snu.ac.kr/pub/R/CRAN/src/ \
833 http://stat.ethz.ch/CRAN/src/ \
834 http://www.stats.bris.ac.uk/R/src/
835
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
836 MASTER_SITE_TEX_CTAN+= \
d77722c Completely replace "MASTER_SITE_SUBDIR" and "PATCH_SITE_SUBDIR" with
tron authored
837 ftp://ftp.cdrom.com/pub/tex/ctan/ \
52a5ed0 Use "ftp.wustl.edu" instead of "wuarchive.wustl.edu".
tron authored
838 ftp://ftp.wustl.edu/packages/TeX/ \
d77722c Completely replace "MASTER_SITE_SUBDIR" and "PATCH_SITE_SUBDIR" with
tron authored
839 ftp://ftp.funet.fi/pub/TeX/CTAN/ \
840 ftp://ftp.tex.ac.uk/public/ctan/tex-archive/ \
841 ftp://ftp.dante.de/tex-archive/
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
842
843 MASTER_SITE_SUNSITE+= \
d77722c Completely replace "MASTER_SITE_SUBDIR" and "PATCH_SITE_SUBDIR" with
tron authored
844 ftp://sunsite.unc.edu/pub/Linux/ \
e4f4a6c Add mirror on "ftp.informatik.rwth-aachen.de" to "MASTER_SITE_SUNSITE".
tron authored
845 ftp://ftp.infomagic.com/pub/mirrors/linux/sunsite/ \
846 ftp://ftp.informatik.rwth-aachen.de/pub/comp/Linux/sunsite.unc.edu/
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
847
519a77c Fix typo in last commit.
tron authored
848 MASTER_SITE_GNOME+= \
dcdac6a Add "MASTER_SITE_GNOME" for GNOME related packages.
tron authored
849 ftp://ftp.gnome.org/pub/GNOME/ \
850 ftp://ftp.sunet.se/pub/X11/GNOME/ \
6933304 Replace empty GNOME mirror on "ftp.informatik.uni-bonn.de" by
tron authored
851 ftp://ftp.archive.de.uu.net/pub/X11/GNOME/ \
ff27b72 The GNOME mirror on "ftp.informatik.uni-bonn.de" is working again.
tron authored
852 ftp://ftp.tuwien.ac.at/hci/gnome.org/GNOME/ \
853 ftp://ftp.informatik.uni-bonn.de/pub/os/unix/gnome/
dcdac6a Add "MASTER_SITE_GNOME" for GNOME related packages.
tron authored
854
994990d Add new master site list "MASTER_SITE_SOURCEFORGE" for
tron authored
855 MASTER_SITE_SOURCEFORGE+= \
856 http://download.sourceforge.net/ \
857 ftp://ftp.tuwien.ac.at/opsys/linux/sourceforge/
858
84617fb re-add empty MASTER/PATCH_SITE which was removed in 1.254.
sakamoto authored
859 # Empty declaration to avoid "variable MASTER_SITES recursive" error
860 MASTER_SITES?=
861 PATCH_SITES?=
862
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
863 # The primary backup site.
371a5aa Don't put a // in MASTER_SITE_BACKUP if DIST_SUBDIR is empty/undefined.
mycroft authored
864 MASTER_SITE_BACKUP?= \
865 ftp://ftp.netbsd.org/pub/NetBSD/packages/distfiles/ \
866 ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/
f82ed56 Automatically set MASTER_SITE_LOCAL from MASTER_SITE_BACKUP, and make…
hubertf authored
867 .if defined(DIST_SUBDIR)
8a6c9b4 Don't apply ${DIST_SUBDIR} twice.
hubertf authored
868 _MASTER_SITE_BACKUP:= ${MASTER_SITE_BACKUP:=${DIST_SUBDIR}/}
869 . if defined(MASTER_SITE_OVERRIDE)
870 _MASTER_SITE_OVERRIDE:= ${MASTER_SITE_OVERRIDE:=${DIST_SUBDIR}/}
871 . endif # MASTER_SITE_OVERRIDE
872 .else # !DIST_SUBDIR
873 _MASTER_SITE_BACKUP:= ${MASTER_SITE_BACKUP}
874 . if defined(MASTER_SITE_OVERRIDE)
875 _MASTER_SITE_OVERRIDE:= ${MASTER_SITE_OVERRIDE}
876 . endif # MASTER_SITE_OVERRIDE
608d9dc Only add DIST_SUBDIR to MASTER_SITE_OVERRIDE if MASTER_SITE_OVERRIDE
hubertf authored
877 .endif # DIST_SUBDIR
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
878
879 # Where to put distfiles that don't have any other master site
880 MASTER_SITE_LOCAL?= \
f82ed56 Automatically set MASTER_SITE_LOCAL from MASTER_SITE_BACKUP, and make…
hubertf authored
881 ${MASTER_SITE_BACKUP:=LOCAL_PORTS/}
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
882
883 # I guess we're in the master distribution business! :) As we gain mirror
884 # sites for distfiles, add them to this list.
885 .if !defined(MASTER_SITE_OVERRIDE)
8a6c9b4 Don't apply ${DIST_SUBDIR} twice.
hubertf authored
886 MASTER_SITES+= ${_MASTER_SITE_BACKUP}
887 PATCH_SITES+= ${_MASTER_SITE_BACKUP}
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
888 .else
8a6c9b4 Don't apply ${DIST_SUBDIR} twice.
hubertf authored
889 MASTER_SITES:= ${_MASTER_SITE_OVERRIDE} ${MASTER_SITES}
890 PATCH_SITES:= ${_MASTER_SITE_OVERRIDE} ${PATCH_SITES}
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
891 .endif
8a6c9b4 Don't apply ${DIST_SUBDIR} twice.
hubertf authored
892
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
893 # Derived names so that they're easily overridable.
894 DISTFILES?= ${DISTNAME}${EXTRACT_SUFX}
895 PKGNAME?= ${DISTNAME}
896
cd03a22 Add back default MAINTAINER field.
agc authored
897 MAINTAINER?= packages@netbsd.org
898
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
899 ALLFILES?= ${DISTFILES} ${PATCHFILES}
8fb71f4 Speed up the evaluation of ${CKSUMFILES} vs. ${IGNOREFILES} a little …
tv authored
900 CKSUMFILES?= ${ALLFILES}
901 .for __tmp__ in ${IGNOREFILES}
902 CKSUMFILES:= ${CKSUMFILES:N${__tmp__}}
903 .endfor
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
904
070ed36 Fix MD5 checksum test in "do-fetch:" target to work with "DIST_SUBDIR".
tron authored
905 # List of all files, with ${DIST_SUBDIR} in front. Used for fetch and checksum.
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
906 .if defined(DIST_SUBDIR)
907 _CKSUMFILES?= ${CKSUMFILES:S/^/${DIST_SUBDIR}\//}
070ed36 Fix MD5 checksum test in "do-fetch:" target to work with "DIST_SUBDIR".
tron authored
908 _DISTFILES?= ${DISTFILES:S/^/${DIST_SUBDIR}\//}
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
909 _IGNOREFILES?= ${IGNOREFILES:S/^/${DIST_SUBDIR}\//}
070ed36 Fix MD5 checksum test in "do-fetch:" target to work with "DIST_SUBDIR".
tron authored
910 _PATCHFILES?= ${PATCHFILES:S/^/${DIST_SUBDIR}\//}
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
911 .else
912 _CKSUMFILES?= ${CKSUMFILES}
070ed36 Fix MD5 checksum test in "do-fetch:" target to work with "DIST_SUBDIR".
tron authored
913 _DISTFILES?= ${DISTFILES}
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
914 _IGNOREFILES?= ${IGNOREFILES}
070ed36 Fix MD5 checksum test in "do-fetch:" target to work with "DIST_SUBDIR".
tron authored
915 _PATCHFILES?= ${PATCHFILES}
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
916 .endif
917
918 # This is what is actually going to be extracted, and is overridable
919 # by user.
920 EXTRACT_ONLY?= ${DISTFILES}
921
cd03a22 Add back default MAINTAINER field.
agc authored
922 .if !defined(CATEGORIES) || !defined(DISTNAME)
f84b201 - Nuke LIB_DEPENDS pkg cruft. Add an error message if LIB_DEPENDS is…
tv authored
923 .BEGIN:
cd03a22 Add back default MAINTAINER field.
agc authored
924 @${ECHO_MSG} "CATEGORIES and DISTNAME are mandatory."
f84b201 - Nuke LIB_DEPENDS pkg cruft. Add an error message if LIB_DEPENDS is…
tv authored
925 @${FALSE}
a3b8afc MAINTAINER = packages@NetBSD.ORG
hubertf authored
926 .endif
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
927
f84b201 - Nuke LIB_DEPENDS pkg cruft. Add an error message if LIB_DEPENDS is…
tv authored
928 .if defined(LIB_DEPENDS)
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
929 .BEGIN:
d77722c Completely replace "MASTER_SITE_SUBDIR" and "PATCH_SITE_SUBDIR" with
tron authored
930 @${ECHO_MSG} "LIB_DEPENDS is deprecated and must be replaced with DEPENDS."
931 @${FALSE}
932 .endif
933
367f469 Stopgag fix to force people to unset PKG_PATH before doing pkgsrc
hubertf authored
934 .if defined(PKG_PATH)
935 .BEGIN:
936 @${ECHO_MSG} "Please unset PKG_PATH before doing pkgsrc works!"
937 @${FALSE}
938 .endif
939
d77722c Completely replace "MASTER_SITE_SUBDIR" and "PATCH_SITE_SUBDIR" with
tron authored
940 .if defined(MASTER_SITE_SUBDIR)
941 .BEGIN:
942 @${ECHO_MSG} 'MASTER_SITE_SUBDIR is deprecated and must be replaced with MASTER_SITES.'
943 @${FALSE}
944 .endif
945
946 .if defined(PATCH_SITE_SUBDIR)
947 .BEGIN:
948 @${ECHO_MSG} 'PATCH_SITE_SUBDIR is deprecated and must be replaced with PATCH_SITES.'
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
949 @${FALSE}
950 .endif
951
6feda59 Change {ONLY,NOT}_FOR_{ARCH,OPSYS} format to {ONLY,NOT}_FOR_PLATFORM
tv authored
952 .if defined(ONLY_FOR_ARCHS) || defined(NOT_FOR_ARCHS) \
953 || defined(ONLY_FOR_OPSYS) || defined(NOT_FOR_OPSYS)
954 .BEGIN:
955 @${ECHO_MSG} 'ONLY/NOT_FOR_ARCHS/OPSYS are deprecated and must be replaced with ONLY/NOT_FOR_PLATFORM.'
956 @${FALSE}
957 .endif
958
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
959 PKGREPOSITORYSUBDIR?= All
960 PKGREPOSITORY?= ${PACKAGES}/${PKGREPOSITORYSUBDIR}
961 PKGFILE?= ${PKGREPOSITORY}/${PKGNAME}${PKG_SUFX}
962
039c3f9 Don't invoke "${CONFIGURE_SCRIPT}" with leading "./" so that an absolute
tron authored
963 CONFIGURE_SCRIPT?= ./configure
4f58863 - Our default for FETCH_CMD is ftp, not fetch.
hubertf authored
964 CONFIGURE_ENV+= PATH=${PATH}:${LOCALBASE}/bin:${X11BASE}/bin
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
965
966 .if defined(GNU_CONFIGURE)
85d2418 Implement some parts of proposals posted to tech-pkg:
tv authored
967 CONFIGURE_ARGS+= --host=${MACHINE_GNU_PLATFORM} --prefix=${PREFIX}
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
968 HAS_CONFIGURE= yes
4f24318 Don't bother defining an internal _USE_LOCALBASE_FOR_X11 variable - it's
agc authored
969 .if ${X11PREFIX} == ${LOCALBASE}
17ac523 enable xpkgwedge bits -- it basically works now.
mrg authored
970 CONFIGURE_ARGS+= --x-libraries=${X11BASE}/lib --x-includes=${X11BASE}/include
971 .endif
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
972 .endif
973
974 # Passed to most of script invocations
4f58863 - Our default for FETCH_CMD is ftp, not fetch.
hubertf authored
975 SCRIPTS_ENV+= CURDIR=${.CURDIR} DISTDIR=${DISTDIR} \
970dfa8 move documentation to packages.7. also, remove ts=4 crap.
mrg authored
976 PATH=${PATH}:${LOCALBASE}/bin:${X11BASE}/bin \
977 WRKDIR=${WRKDIR} WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} \
978 SCRIPTDIR=${SCRIPTDIR} FILESDIR=${FILESDIR} \
979 PKGSRCDIR=${PKGSRCDIR} DEPENDS="${DEPENDS}" \
980 PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} X11BASE=${X11BASE}
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
981
982 .if defined(BATCH)
983 SCRIPTS_ENV+= BATCH=yes
984 .endif
985
986 .MAIN: all
987
94866e3 Add logic to handle shared objects correctly for ELF and a.out platfo…
agc authored
988 # Use aliases, so that all versions of English are acceptable
989 .if defined(LICENCE) && !defined(LICENSE)
990 LICENSE= ${LICENCE}
991 .endif
992
993 .if defined(ACCEPTABLE_LICENCES) && !defined(ACCEPTABLE_LICENSES)
994 ACCEPTABLE_LICENSES= ${ACCEPTABLE_LICENCES}
995 .endif
996
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
997 ################################################################
67feee0 This is NetBSD. s/port/package/g
agc authored
998 # Many ways to disable a package.
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
999 #
67feee0 This is NetBSD. s/port/package/g
agc authored
1000 # If we're in BATCH mode and the package is interactive, or we're
6f877bc Correct a factual error in the comment "ways to disable a package":
fredb authored
1001 # in interactive mode and the package is non-interactive, skip
1002 # all the important targets. The reason we have two modes is that
1003 # one might want to leave a build in BATCH mode running overnight,
1004 # then come back in the morning and do _only_ the interactive ones
1005 # that required your intervention.
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
1006 #
23b1b09 Revert last change. I only tested this on netbsd-1-4; it doesn't seem to
fredb authored
1007 # Ignore packages that can't be resold if building for a CDROM.
3c860ad Introduce a new category, "crypto", with a special property: If the user
fredb authored
1008 #
6f877bc Correct a factual error in the comment "ways to disable a package":
fredb authored
1009 # Don't build a package if it's restricted and we don't want to
1010 # get into that.
1011 #
af7d172 Add a new mechanism for handling "crypto" packages, as discussed
fredb authored
1012 # Don't build any package that utilizes strong cryptography, for
1013 # when the law of the land forbids it.
1014 #
6f877bc Correct a factual error in the comment "ways to disable a package":
fredb authored
1015 # Don't attempt to build packages against X if we don't have X.
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
1016 #
67feee0 This is NetBSD. s/port/package/g
agc authored
1017 # Don't build a package if it's broken.
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
1018 ################################################################
1019
1020 .if !defined(NO_IGNORE)
1021 .if (defined(IS_INTERACTIVE) && defined(BATCH))
a5d8a47 * Prevent " etc. in RESTRICTED (NO_{SRC,BIN}_ON_{CDROM,FTP}) and BROKEN
hubertf authored
1022 IGNORE+= "${PKGNAME} is an interactive package"
1023 .endif
1024 .if (!defined(IS_INTERACTIVE) && defined(INTERACTIVE))
1025 IGNORE+= "${PKGNAME} is not an interactive package"
1026 .endif
1027 .if (defined(NO_BIN_ON_CDROM) && defined(FOR_CDROM))
1028 IGNORE+= "${PKGNAME} may not be placed in binary form on a CDROM:" \
1029 " "${NO_BIN_ON_CDROM:Q}
1030 .endif
1031 .if (defined(NO_SRC_ON_CDROM) && defined(FOR_CDROM))
1032 IGNORE+= "${PKGNAME} may not be placed in source form on a CDROM:" \
1033 " "${NO_SRC_ON_CDROM:Q}
1034 .endif
1035 .if (defined(RESTRICTED) && defined(NO_RESTRICTED))
1036 IGNORE+= "${PKGNAME} is restricted:" \
1037 " "${RESTRICTED:Q}
1038 .endif
af7d172 Add a new mechanism for handling "crypto" packages, as discussed
fredb authored
1039 .if !(${MKCRYPTO} == "YES" || ${MKCRYPTO} == yes)
1040 . if (defined(CRYPTO) || defined(USE_SSL))
1041 IGNORE+= "${PKGNAME} may not be built, because it utilizes strong cryptography"
1042 . endif
1043 .endif
a5d8a47 * Prevent " etc. in RESTRICTED (NO_{SRC,BIN}_ON_{CDROM,FTP}) and BROKEN
hubertf authored
1044 .if ((defined(USE_IMAKE) || defined(USE_MOTIF) || \
7b16248 Replace all occurrences of USE_X11 with USE_X11BASE. This means "inst…
agc authored
1045 defined(USE_X11BASE) || defined(USE_X11)) && \
e3d5dbb If "${USE_MOTIF}" is set install package to "${X11BASE}" and check if
tron authored
1046 !exists(${X11BASE}))
a5d8a47 * Prevent " etc. in RESTRICTED (NO_{SRC,BIN}_ON_{CDROM,FTP}) and BROKEN
hubertf authored
1047 IGNORE+= "${PKGNAME} uses X11, but ${X11BASE} not found"
1048 .endif
1049 .if defined(BROKEN)
1050 IGNORE+= "${PKGNAME} is marked as broken:" ${BROKEN:Q}
1051 .endif
1052
43ff14b Restructure test for "${LICENCE}" so that "${ONLY_FOR_PLATFORM}" will
tron authored
1053 .if defined(LICENSE)
a5d8a47 * Prevent " etc. in RESTRICTED (NO_{SRC,BIN}_ON_{CDROM,FTP}) and BROKEN
hubertf authored
1054 . ifdef ACCEPTABLE_LICENSES
1055 . for _lic in ${ACCEPTABLE_LICENSES}
1056 . if ${LICENSE} == "${_lic}"
ac8a769 Add an ACCEPTABLE_LICENCES definition to /etc/mk.conf. This is a
agc authored
1057 _ACCEPTABLE= yes
a5d8a47 * Prevent " etc. in RESTRICTED (NO_{SRC,BIN}_ON_{CDROM,FTP}) and BROKEN
hubertf authored
1058 . endif # LICENSE == _lic
1059 . endfor # _lic
1060 . endif # ACCEPTABLE_LICENSES
1061 . ifndef _ACCEPTABLE
1062 IGNORE+= "${PKGNAME} has unacceptable license: ${LICENSE}." \
1063 " To build this package, add this line to your /etc/mk.conf:" \
1064 " ACCEPTABLE_LICENSES+=${LICENSE}"
1065 . endif # _ACCEPTABLE
ac9ab52 add some comments to make the code more readable, no functional changes
hubertf authored
1066 .endif # LICENSE
a5d8a47 * Prevent " etc. in RESTRICTED (NO_{SRC,BIN}_ON_{CDROM,FTP}) and BROKEN
hubertf authored
1067
0dac5d1 Move all settings of IGNORE into one spot. No need for the arch-checking
hubertf authored
1068 # Define __PLATFORM_OK only if the OS matches the pkg's allowed list.
43ff14b Restructure test for "${LICENCE}" so that "${ONLY_FOR_PLATFORM}" will
tron authored
1069 .if defined(ONLY_FOR_PLATFORM) && !empty(ONLY_FOR_PLATFORM)
a5d8a47 * Prevent " etc. in RESTRICTED (NO_{SRC,BIN}_ON_{CDROM,FTP}) and BROKEN
hubertf authored
1070 . for __tmp__ in ${ONLY_FOR_PLATFORM}
1071 . if ${MACHINE_PLATFORM:M${__tmp__}} != ""
0dac5d1 Move all settings of IGNORE into one spot. No need for the arch-checking
hubertf authored
1072 __PLATFORM_OK?= yes
a5d8a47 * Prevent " etc. in RESTRICTED (NO_{SRC,BIN}_ON_{CDROM,FTP}) and BROKEN
hubertf authored
1073 . endif # MACHINE_PLATFORM
1074 . endfor # __tmp__
43ff14b Restructure test for "${LICENCE}" so that "${ONLY_FOR_PLATFORM}" will
tron authored
1075 .else # !ONLY_FOR_PLATFORM
0dac5d1 Move all settings of IGNORE into one spot. No need for the arch-checking
hubertf authored
1076 __PLATFORM_OK?= yes
43ff14b Restructure test for "${LICENCE}" so that "${ONLY_FOR_PLATFORM}" will
tron authored
1077 .endif # ONLY_FOR_PLATFORM
1078 .for __tmp__ in ${NOT_FOR_PLATFORM}
a5d8a47 * Prevent " etc. in RESTRICTED (NO_{SRC,BIN}_ON_{CDROM,FTP}) and BROKEN
hubertf authored
1079 . if ${MACHINE_PLATFORM:M${__tmp__}} != ""
1080 . undef __PLATFORM_OK
1081 . endif # MACHINE_PLATFORM
43ff14b Restructure test for "${LICENCE}" so that "${ONLY_FOR_PLATFORM}" will
tron authored
1082 .endfor # __tmp__
1083 .if !defined(__PLATFORM_OK)
a5d8a47 * Prevent " etc. in RESTRICTED (NO_{SRC,BIN}_ON_{CDROM,FTP}) and BROKEN
hubertf authored
1084 IGNORE+= "${PKGNAME} is not available for ${MACHINE_PLATFORM}"
43ff14b Restructure test for "${LICENCE}" so that "${ONLY_FOR_PLATFORM}" will
tron authored
1085 .endif # !__PLATFORM_OK
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
1086
a5d8a47 * Prevent " etc. in RESTRICTED (NO_{SRC,BIN}_ON_{CDROM,FTP}) and BROKEN
hubertf authored
1087 #
1088 # Now print some error messages that we know we should ignore the pkg
1089 #
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
1090 .if defined(IGNORE)
a5d8a47 * Prevent " etc. in RESTRICTED (NO_{SRC,BIN}_ON_{CDROM,FTP}) and BROKEN
hubertf authored
1091 fetch checksum extract patch configure all build install deinstall package \
1092 install-depends check-depends:
2f9e82d This patch cleans up our message for unacceptable licenses:
hubertf authored
1093 .if defined(IGNORE_SILENT)
a5d8a47 * Prevent " etc. in RESTRICTED (NO_{SRC,BIN}_ON_{CDROM,FTP}) and BROKEN
hubertf authored
1094 @${DO_NADA}
1095 .else
1096 @for str in ${IGNORE} ; \
1097 do \
1098 ${ECHO} "${_PKGSRC_IN}> $$str" ; \
1099 done
4f685d3 - The comment above the _COOKIE settings says "don't change these!!", so
tv authored
1100 .endif
2f9e82d This patch cleans up our message for unacceptable licenses:
hubertf authored
1101 .if defined(IGNORE_FAIL)
a5d8a47 * Prevent " etc. in RESTRICTED (NO_{SRC,BIN}_ON_{CDROM,FTP}) and BROKEN
hubertf authored
1102 ${FALSE}
2f9e82d This patch cleans up our message for unacceptable licenses:
hubertf authored
1103 .endif
b0811b3 Re-move .if!defined(__ARCH_OK) to fix use of NO_IGNORE; document some…
hubertf authored
1104 .endif # IGNORE
1105 .endif # !NO_IGNORE
1106
fda657b + Add and document the PKG_RELATIVE_SYMLINKS option, which makes sure
agc authored
1107 # Add these defs to the ones dumped into +BUILD_DEFS
880a45c * Make sure PKGPATH gets added to BUILD_DEFS (I thought it was there…
hubertf authored
1108 BUILD_DEFS+= PKGPATH
fda657b + Add and document the PKG_RELATIVE_SYMLINKS option, which makes sure
agc authored
1109 BUILD_DEFS+= OPSYS OS_VERSION MACHINE_ARCH MACHINE_GNU_ARCH
d4d3dcb Add 'RESTRICTED' to ${BUILD_DEFS}, so that any restrictions are recorded
fredb authored
1110 BUILD_DEFS+= CPPFLAGS CFLAGS LDFLAGS
fda657b + Add and document the PKG_RELATIVE_SYMLINKS option, which makes sure
agc authored
1111 BUILD_DEFS+= CONFIGURE_ENV CONFIGURE_ARGS
d4d3dcb Add 'RESTRICTED' to ${BUILD_DEFS}, so that any restrictions are recorded
fredb authored
1112 BUILD_DEFS+= OBJECT_FMT LICENSE RESTRICTED
866552e * Replace MIRROR_DISTFILES with NO_SRC_ON_FTP
hubertf authored
1113 BUILD_DEFS+= NO_SRC_ON_FTP NO_SRC_ON_CDROM
1114 BUILD_DEFS+= NO_BIN_ON_FTP NO_BIN_ON_CDROM
fda657b + Add and document the PKG_RELATIVE_SYMLINKS option, which makes sure
agc authored
1115
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
1116 .if !target(all)
1117 all: build
1118 .endif
1119
1120 .if !defined(DEPENDS_TARGET)
3c07452 Use "reinstall" as default for DEPENDS_TARGET, to use any pkg already
hubertf authored
1121 .if make(package)
8c2dd40 Set DEPENDS_TARGET=package during a "make package", and propagate
kim authored
1122 DEPENDS_TARGET= package
a140b35 * Remove RUN_DEPENDS (left in packages.7 intentionally)
hubertf authored
1123 .elif make(update)
8da6282 Use UPDATE_TARGET (new) instead of DEPENDS_TARGET for 'make update'. …
rh authored
1124 DEPENDS_TARGET= update
c9509e1 Let DEPENDS_TARGET default to 'install' not 'reinstall' for 'make upd…
rh authored
1125 .else
3c07452 Use "reinstall" as default for DEPENDS_TARGET, to use any pkg already
hubertf authored
1126 DEPENDS_TARGET= reinstall
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
1127 .endif
f4e645f - Add OpenBSD and FreeBSD Ids in the header
hubertf authored
1128 .endif
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
1129
8da6282 Use UPDATE_TARGET (new) instead of DEPENDS_TARGET for 'make update'. …
rh authored
1130 .if !defined(UPDATE_TARGET)
1131 .if ${DEPENDS_TARGET} == "update"
1132 .if make(package)
1133 UPDATE_TARGET= package
1134 .else
1135 UPDATE_TARGET= install
1136 .endif
1137 .else
1138 UPDATE_TARGET= ${DEPENDS_TARGET}
1139 .endif
1140 .endif
1141
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
1142 ################################################################
1143 # The following are used to create easy dummy targets for
1144 # disabling some bit of default target behavior you don't want.
1145 # They still check to see if the target exists, and if so don't
1146 # do anything, since you might want to set this globally for a
67feee0 This is NetBSD. s/port/package/g
agc authored
1147 # group of packages in a Makefile.inc, but still be able to
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
1148 # override from an individual Makefile.
1149 ################################################################
1150
1151 # Disable checksum
c477018 Skip checksum step if the ${EXTRACT_COOKIE} exists (NFS speedup if build
tv authored
1152 .if (defined(NO_CHECKSUM) && !target(checksum)) || exists(${EXTRACT_COOKIE})
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
1153 checksum: fetch
1154 @${DO_NADA}
1155 .endif
1156
1157 # Disable extract
1158 .if defined(NO_EXTRACT) && !target(extract)
1159 extract: checksum
42ce372 Add Solaris support to pkgsrc, using Christos Zoulas' NetBSD emulation
agc authored
1160 ${_PKG_SILENT}${_PKG_DEBUG}${TOUCH} ${TOUCH_FLAGS} ${EXTRACT_COOKIE}
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
1161 checksum: fetch
1162 @${DO_NADA}
1163 makesum:
1164 @${DO_NADA}
1165 .endif
1166
1167 # Disable patch
1168 .if defined(NO_PATCH) && !target(patch)
1169 patch: extract
42ce372 Add Solaris support to pkgsrc, using Christos Zoulas' NetBSD emulation
agc authored
1170 ${_PKG_SILENT}${_PKG_DEBUG}${TOUCH} ${TOUCH_FLAGS} ${PATCH_COOKIE}
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
1171 .endif
1172
1173 # Disable configure
1174 .if defined(NO_CONFIGURE) && !target(configure)
1175 configure: patch
42ce372 Add Solaris support to pkgsrc, using Christos Zoulas' NetBSD emulation
agc authored
1176 ${_PKG_SILENT}${_PKG_DEBUG}${TOUCH} ${TOUCH_FLAGS} ${CONFIGURE_COOKIE}
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
1177 .endif
1178
1179 # Disable build
1180 .if defined(NO_BUILD) && !target(build)
1181 build: configure
42ce372 Add Solaris support to pkgsrc, using Christos Zoulas' NetBSD emulation
agc authored
1182 ${_PKG_SILENT}${_PKG_DEBUG}${TOUCH} ${TOUCH_FLAGS} ${BUILD_COOKIE}
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
1183 .endif
1184
1185 # Disable install
1186 .if defined(NO_INSTALL) && !target(install)
1187 install: build
42ce372 Add Solaris support to pkgsrc, using Christos Zoulas' NetBSD emulation
agc authored
1188 ${_PKG_SILENT}${_PKG_DEBUG}${TOUCH} ${TOUCH_FLAGS} ${INSTALL_COOKIE}
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
1189 .endif
1190
1191 # Disable package
1192 .if defined(NO_PACKAGE) && !target(package)
1193 package:
1194 .if defined(IGNORE_SILENT)
1195 @${DO_NADA}
1196 .else
fce3306 Fix PACKAGE_DEPENDS_QUICK when installing on Solaris - escape the
agc authored
1197 @${ECHO_MSG} "${_PKGSRC_IN}> ${PKGNAME} may not be packaged: ${NO_PACKAGE}."
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
1198 .endif
1199 .endif
1200
1201 # Disable describe
1202 .if defined(NO_DESCRIBE) && !target(describe)
1203 describe:
1204 @${DO_NADA}
1205 .endif
1206
1207 ################################################################
1208 # More standard targets start here.
1209 #
1210 # These are the body of the build/install framework. If you are
1211 # not happy with the default actions, and you can't solve it by
1212 # adding pre-* or post-* targets/scripts, override these.
1213 ################################################################
1214
1215 # Fetch
4289850 Combine fetch loops for distribution and patch files to reduce duplicate
tron authored
1216 _FETCH_FILE= \
1fccfd0 Don't try to fetch a file if there's a symbolic link in ${DISTDIR}.
agc authored
1217 if [ ! -f $$file -a ! -f $$bfile -a ! -h $$bfile ]; then \
f172a69 In informational messages to the user, use '=>' in preference to '>>',
agc authored
1218 ${ECHO_MSG} "=> $$bfile doesn't seem to exist on this system."; \
ca52748 Check if $DISTDIR is writable before downloading something
hubertf authored
1219 if [ ! -w ${_DISTDIR}/. ]; then \
1220 ${ECHO_MSG} "=> Can't download to ${_DISTDIR} (permission denied?)."; \
1221 exit 1; \
1222 fi; \
42784a8 + explain "Unacceptable license" message a bit better.
agc authored