Change default perl version to 5.8.6
[dragonfly.git] / share / mk / bsd.port.mk
1 # $FreeBSD: src/share/mk/bsd.port.mk,v 1.303.2.2 2002/07/17 19:08:23 ru Exp $
2 # $DragonFly: src/share/mk/Attic/bsd.port.mk,v 1.28 2005/02/02 12:57:27 joerg Exp $
3
4 PORTSDIR?=      /usr/ports
5 DFPORTSDIR?=    /usr/dfports
6 PORTPATH!=      /usr/bin/relpath ${PORTSDIR} ${.CURDIR}
7
8 .if !defined(DFOSVERSION)
9 DFOSVERSION!=   /sbin/sysctl -n kern.osreldate
10 .endif
11
12 # Temporary Hack
13 #
14 OSVERSION ?= 480102
15 UNAME_s?= FreeBSD
16 UNAME_v?=FreeBSD 4.8-CURRENT
17 UNAME_r?=4.8-CURRENT
18
19 # override for bsd.port.mk
20 PERL_VERSION?=  5.8.6
21 PERL_VER?=      5.8.6
22
23 .makeenv UNAME_s
24 .makeenv UNAME_v
25 .makeenv UNAME_r
26 .makeenv OSVERSION
27
28 .if !exists(${DFPORTSDIR}/${PORTPATH}/Makefile)
29
30 .if defined(USE_RC_SUBR)
31 .undef USE_RC_SUBR
32 RC_SUBR=        /etc/rc.subr
33 .endif
34
35 .if defined(USE_GCC)
36 .  if ${USE_GCC} == 3.4
37 .undef USE_GCC
38 CCVER=  gcc34
39 .makeenv CCVER
40 .  endif
41 .endif
42
43 # If the port does not exist in /usr/dfports/<portpath> use the original
44 # FreeBSD port.  Also process as per normal if BEFOREPORTMK is set so
45 # any expected variables are set.
46 #
47 .include <bsd.own.mk>
48 .include "${PORTSDIR}/Mk/bsd.port.mk"
49
50 .else
51
52 .if !defined(BEFOREPORTMK)
53 .undef PORTSDIR
54 .endif
55
56 .undef BEFOREPORTMK
57 .undef AFTERPORTMK
58
59 # Otherwise retarget to the DragonFly override port.
60 #
61
62 TARGETS+=       all
63 TARGETS+=       build
64 TARGETS+=       checksum
65 TARGETS+=       clean
66 TARGETS+=       clean-for-cdrom
67 TARGETS+=       clean-for-cdrom-list
68 TARGETS+=       clean-restricted
69 TARGETS+=       clean-restricted-list
70 TARGETS+=       configure
71 TARGETS+=       deinstall
72 TARGETS+=       depend
73 TARGETS+=       depends
74 TARGETS+=       describe
75 TARGETS+=       distclean
76 TARGETS+=       extract
77 TARGETS+=       fetch
78 TARGETS+=       fetch-list
79 TARGETS+=       ignorelist
80 TARGETS+=       makesum
81 TARGETS+=       maintainer
82 TARGETS+=       package
83 TARGETS+=       realinstall
84 TARGETS+=       reinstall
85 TARGETS+=       install
86 TARGETS+=       tags
87
88 # WARNING!  Do not use the -B option.  This appears to propogate to the
89 # gmake (probably because both use the same environment variable, MAKEFLAGS,
90 # to pass make options) where as of version 3.80 -B means 'always-make',
91 # which forces all targets, which blows up gnu builds in the ports system
92 # because it appears to cause the configure.status target to loop.
93 #
94 .if !defined(_DFPORTS_REDIRECT)
95 _DFPORTS_REDIRECT=
96 .if !make(package-depends-list) && !make(all-depends-list) && \
97     !make(run-depends-list) && !make(build-depends-list) && \
98     !make(describe) && !make(package-name)
99 .BEGIN:
100         @echo "WARNING, USING DRAGONFLY OVERRIDE ${DFPORTSDIR}/${PORTPATH}"
101         cd ${DFPORTSDIR}/${PORTPATH} && ${MAKE} ${.TARGETS}
102 .else
103 .BEGIN:
104         @cd ${DFPORTSDIR}/${PORTPATH} && ${MAKE} ${.TARGETS} 
105 .endif
106 .endif
107
108 .if !empty(.TARGETS)
109 ${.TARGETS}:
110 .else
111 all:
112 .MAIN: all
113 .endif
114
115 # Hack to get Makefiles with conditional statements working
116 XFREE86_VERSION?=       4
117 ARCH?=                  i386
118 MACHINE_ARCH?=          i386
119 HAVE_GNOME?=
120 FILESDIR?=              ${.CURDIR}/files
121 X_WINDOW_SYSTEM?=       xfree86-4
122 CAT?=                   cat
123 PREFIX?=                /usr
124 PERL_LEVEL?=            5
125 LOCALBASE?=             /usr/local
126 SED?=                   /usr/bin/sed
127 ECHO_CMD?=              echo
128 GREP?=                  /usr/bin/grep
129 AWK?=                   /usr/bin/awk
130 UNAME?=                 /usr/bin/uname
131 EXPR?=                  /bin/expr
132 HAVE_SDL?=
133
134 PKG_SUFX?=              .tgz
135 PKGNAME!=               cd ${DFPORTSDIR}/${PORTPATH}; ${MAKE} -V PKGNAME
136 .for _CATEGORY in ${CATEGORIES}
137 PKGCATEGORY?=   ${_CATEGORY}
138 .endfor
139 _PORTDIRNAME=   ${.CURDIR:T}
140 PORTDIRNAME?=   ${_PORTDIRNAME}
141 PKGORIGIN?=             ${PKGCATEGORY}/${PORTDIRNAME}
142
143 PKGREPOSITORYSUBDIR?=   All
144 PKGREPOSITORY?=         ${PACKAGES}/${PKGREPOSITORYSUBDIR}
145 .if exists(${PACKAGES})
146 PKGFILE?=               ${PKGREPOSITORY}/${PKGNAME}${PKG_SUFX}
147 .else
148 PKGFILE?=               ${.CURDIR}/${PKGNAME}${PKG_SUFX}
149 .endif
150  
151 .endif
152