Check-in [9336a3ab25]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:New USES=perl5
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:9336a3ab259565bc3750c7ce4d46f725901c2b42
User & Date: bapt 2013-07-29 09:55:49
Context
2013-07-29
09:56
Committed in the ports tree check-in: 55413edca5 user: bapt tags: trunk
09:55
New USES=perl5 check-in: 9336a3ab25 user: bapt tags: trunk
2013-07-07
11:56
Chase the latest ports check-in: 513ab8e2dc user: bapt tags: trunk
Changes

Added perl5.mk.patch.















































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
Index: Uses/perl5.mk
===================================================================
diff --git a/head/Mk/bsd.perl.mk b/head/Mk/Uses/perl5.mk
copy from head/Mk/bsd.perl.mk@323865
copy to head/Mk/Uses/perl5.mk
--- a/head/Mk/bsd.perl.mk	(revision 0)
+++ b/head/Mk/Uses/perl5.mk	(working copy)
@@ -1,16 +1,9 @@
-#-*- tab-width: 4; -*-
-# ex:ts=4
-#
 # $FreeBSD$
 #
-# bsd.perl.mk - Support for Perl-based ports.
+# Provide support to use perl5
 #
-# Created by: Gabor Kovesdan <gabor@FreeBSD.org>
+# MAINTAINER: perl@FreeBSD.org
 #
-# For FreeBSD committers:
-# Please send all suggested changes to the maintainer instead of committing
-# them to SVN yourself.
-#
 # PERL5			- Set to full path of perl5, either in the system or
 #				  installed from a port.
 # PERL			- Set to full path of perl5, either in the system or
@@ -33,28 +26,31 @@
 # SITE_PERL		- Directory name where site specific perl packages go.
 #				  This value is added to PLIST_SUB.
 # USE_PERL5		- If set, this port uses perl5 in one or more of the extract,
-#				  patch, build, install or run phases.
-#
-# PERL_CONFIGURE	- Configure using Perl's MakeMaker.  Implies USE_PERL5.
-#
-# USE_PERL5_BUILD	- If set, this port uses perl5 in one or more of the
-#				  extract, patch, build or install phases.
-#
-# USE_PERL5_RUN		- If set, this port uses perl5 for running.
-#
-# PERL_MODBUILD		- Use Module::Build to configure, build and install port.
+#				  patch, build, install or run phases
 
-.if !defined(_POSTMKINCLUDED) && !defined(Perl_Pre_Include)
+.if !defined(_INCLUDE_USES_PERL5_MK)
+_INCLUDE_USES_PERL5_MK=	yes
 
-Perl_Pre_Include=			bsd.perl.mk
-PERL_Include_MAINTAINER=	perl@FreeBSD.org
+.if defined(perl5_ARGS)
+IGNORE=	Incorrect 'USES+=perl5:${gmake_ARGS}' perl5 takes no arguments
+.endif
 
+USE_PERL5?=	run
+
+.if exists(${LOCALBASE}/bin/perl5)
+.sinclude ${LOCALBASE}/etc/perl5_version
+.if !defined(PERL_VERSION)
+PERL_VERSION!=	perl -e 'printf "%vd\n", $^V;'
+.endif
+.else
 PERL_VERSION?=	5.14.4
-PERL_VER?=	${PERL_VERSION:C/\.[0-9]+$//}
+.endif
 
-.if !defined(PERL_LEVEL) && defined(PERL_VERSION)
-perl_major=		${PERL_VERSION:C|^([1-9]+).*|\1|}
-_perl_minor=	00${PERL_VERSION:C|^([1-9]+)\.([0-9]+).*|\2|}
+PERL_VER?=	${PERL5_VERSION:C/\.[0-9]+$//}
+
+# Define the want perl first if defined
+.if ${USE_PERL5:M5*}
+want_perl_sign=	${USE_PERL5:M5*:C|^[0-9.]+||}
 perl_minor=		${_perl_minor:C|^.*(...)|\1|}
 .if ${perl_minor} >= 100
 perl_minor=		${PERL_VERSION:C|^([1-9]+)\.([0-9][0-9][0-9]).*|\2|}
@@ -86,24 +82,11 @@
 PERL5=		${LOCALBASE}/bin/perl${PERL_VERSION}
 PERL=		${LOCALBASE}/bin/perl
 
-# Decide where to look for the version string
-.ifdef USE_PERL5
-USE_PERL5_STRING=	${USE_PERL5}
-.elifdef USE_PERL5_BUILD
-USE_PERL5_STRING=	${USE_PERL5_BUILD}
-.elifdef USE_PERL5_RUN
-USE_PERL5_STRING=	${USE_PERL5_RUN}
-.elifdef PERL_MODBUILD
-USE_PERL5_STRING=	${PERL_MODBUILD}
-.elifdef PERL_CONFIGURE
-USE_PERL5_STRING=	${PERL_CONFIGURE}
-.else
-USE_PERL5_STRING=	yes  # currently unreachable
-.endif
 
-.if ${USE_PERL5_STRING:L} != "yes"
-want_perl_sign=		${USE_PERL5_STRING:C|^[0-9.]+||}
-want_perl_ver=		${USE_PERL5_STRING:S|${want_perl_sign}$||}
+# Define the want perl first if defined
+.if ${USE_PERL5:M5*}
+want_perl_sign=		${USE_PERL5:M5*:C|^[0-9.]+||}
+want_perl_ver=		${USE_PERL5:M5*:S|${want_perl_sign}$||}
 want_perl_major=	${want_perl_ver:C|\..*||}
 _want_perl_minor=	${want_perl_ver:S|^${want_perl_major}||:S|^.||:C|\..*||}
 _want_perl_patch=	${want_perl_ver:S|^${want_perl_major}||:S|^.${_want_perl_minor}||:S|^.||:C|\..*||}
@@ -111,6 +94,9 @@
 want_perl_patch=	${_want_perl_patch:S|^|00|:C|.*(..)|\1|}
 USE_PERL5_LEVEL=	${want_perl_major}${want_perl_minor}${want_perl_patch}
 
+# All but version
+_USE_PERL5=	${USE_PERL5:N5*}
+
 # Mask unspecified components. E.g. this way "5" will match any "5.x.x".
 .if empty(_want_perl_minor)
 masked_PERL_LEVEL=	${PERL_LEVEL:C|(.....)$|00000|}
@@ -140,19 +126,19 @@
 .endif
 .endif #${USE_PERL5_STRING:L} != "yes"
 
-.endif # !defined(_POSTMKINCLUDED) && !defined(Perl_Pre_Include)
+_USES_POST+=	perl5
+.endif
 
-.if defined(_POSTMKINCLUDED) && !defined(Perl_Post_Include)
+.if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_PERL5_POST_MK)
+_INCLUDE_USES_PERL5_POST_MK=	yes
 
-Perl_Post_Include=		bsd.perl.mk
-
 PLIST_SUB+=	PERL_VERSION=${PERL_VERSION} \
-			PERL_VER=${PERL_VER} \
-			PERL_ARCH=${PERL_ARCH} \
-			SITE_PERL=${SITE_PERL_REL}
+		PERL_VER=${PERL_VER} \
+		PERL_ARCH=${PERL_ARCH} \
+		SITE_PERL=${SITE_PERL_REL}
 
-.if defined(PERL_MODBUILD)
-PERL_CONFIGURE=		yes
+.if ${_USE_PERL5:Mmodbuild}
+_USE_PERL5+=		configure
 CONFIGURE_SCRIPT?=	Build.PL
 .if ${PORTNAME} != Module-Build
 BUILD_DEPENDS+=		${SITE_PERL}/Module/Build.pm:${PORTSDIR}/devel/p5-Module-Build
@@ -160,19 +146,19 @@
 ALL_TARGET?=
 PL_BUILD?=		Build
 CONFIGURE_ARGS+= \
-	create_packlist=0 \
-	install_path=lib="${PREFIX}/${SITE_PERL_REL}" \
-	install_path=arch="${PREFIX}/${SITE_PERL_REL}/${PERL_ARCH}" \
-	install_path=script="${PREFIX}/bin" \
-	install_path=bin="${PREFIX}/bin" \
-	install_path=libdoc="${MAN3PREFIX}/man/man3" \
-	install_path=bindoc="${MAN1PREFIX}/man/man1"
-.elif defined(PERL_CONFIGURE)
+		create_packlist=0 \
+		install_path=lib="${PREFIX}/${SITE_PERL_REL}" \
+		install_path=arch="${PREFIX}/${SITE_PERL_REL}/${PERL_ARCH}" \
+		install_path=script="${PREFIX}/bin" \
+		install_path=bin="${PREFIX}/bin" \
+		install_path=libdoc="${MAN3PREFIX}/man/man3" \
+		install_path=bindoc="${MAN1PREFIX}/man/man1"
+.elif ${_USE_PERL5:Mconfigure}
 CONFIGURE_ARGS+=	INSTALLDIRS="site"
-.endif # defined(PERL_MODBUILD)
+.endif # modbuild
 
-.if defined(PERL_CONFIGURE)
-USE_PERL5?=	yes
+.if ${_USE_PERL5:Mconfigure}
+_USE_PERL5+=	build run
 # Disable AutoInstall from attempting to install from CPAN directly in
 # the case of missing dependencies.  This causes the build to loop on
 # the build cluster asking for interactive input.
@@ -180,26 +166,31 @@
 .if defined(BATCH) && !defined(IS_INTERACTIVE)
 CONFIGURE_ENV+=	PERL_MM_USE_DEFAULT="YES"
 .endif # defined(BATCH) && !defined(IS_INTERACTIVE)
-.endif # defined(PERL_CONFIGURE)
+.endif # configure
 
-.if defined(USE_PERL5) || defined(USE_PERL5_BUILD)
+.if ${_USE_PERL5:Mextract}
 EXTRACT_DEPENDS+=	${PERL5}:${PORTSDIR}/lang/${PERL_PORT}
+.endif
+
+.if ${_USE_PERL5:Mpatch}
 PATCH_DEPENDS+=		${PERL5}:${PORTSDIR}/lang/${PERL_PORT}
+.endif
+
+.if ${_USE_PERL5:Mbuild}
 BUILD_DEPENDS+=		${PERL5}:${PORTSDIR}/lang/${PERL_PORT}
 .endif
-.if defined(USE_PERL5) || defined(USE_PERL5_RUN)
+
+.if ${_USE_PERL5:Mrun}
 RUN_DEPENDS+=		${PERL5}:${PORTSDIR}/lang/${PERL_PORT}
 .endif
 
-.if defined(PERL_CONFIGURE)
+.if ${_USE_PERL5:Mconfigure}
 CONFIGURE_ARGS+=	CC="${CC}" CCFLAGS="${CFLAGS}" PREFIX="${PREFIX}" \
 			INSTALLPRIVLIB="${PREFIX}/lib" INSTALLARCHLIB="${PREFIX}/lib"
 CONFIGURE_SCRIPT?=	Makefile.PL
 MAN3PREFIX?=		${PREFIX}/lib/perl5/${PERL_VER}
 .undef HAS_CONFIGURE
-.endif # defined(PERL_CONFIGURE)
 
-.if defined(PERL_CONFIGURE)
 .if !target(do-configure)
 # XXX MCL had to duplicate the first block; implies more refactoring needed
 do-configure:
@@ -210,24 +201,24 @@
 	@cd ${CONFIGURE_WRKSRC} && \
 		${SETENV} ${CONFIGURE_ENV} \
 		${PERL5} ./${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS}
-.if !defined(PERL_MODBUILD)
+.if !${_USE_PERL5:Mmodbuild}
 	@cd ${CONFIGURE_WRKSRC} && \
 		${PERL5} -pi -e 's/ doc_(perl|site|\$$\(INSTALLDIRS\))_install$$//' Makefile
-.endif # !defined(PERL_MODBUILD)
+.endif # ! modbuild
 .endif # !target(do-configure)
-.endif # defined(PERL_CONFIGURE)
+.endif # configure
 
-.if defined(PERL_MODBUILD)
+.if ${_USE_PERL5:Mmodbuild}
 .if !target(do-build)
 do-build:
 	@(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PERL5} ${PL_BUILD} ${MAKE_ARGS} ${ALL_TARGET})
 .endif # !target(do-build)
 
-.if !defined(USE_GMAKE)
+.if !${USES:Mgmake}
 .if !target(do-install)
 do-install:
 	@(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PERL5} ${PL_BUILD} ${MAKE_ARGS} ${INSTALL_TARGET})
 .endif # !target(do-install)
-.endif # !defined(USE_GMAKE)
-.endif # defined(PERL_MODBUILD)
-.endif # defined(_POSTMKINCLUDED) && !defined(Perl_Post_Include)
+.endif # ! USES=gmake
+.endif # modbuild
+.endif # defined(_POSTMKINCLUDED)
Index: bsd.perl.mk
===================================================================
diff --git a/head/Mk/bsd.perl.mk b/head/Mk/bsd.perl.mk
--- a/head/Mk/bsd.perl.mk	(revision 323865)
+++ b/head/Mk/bsd.perl.mk	(working copy)
@@ -43,6 +43,7 @@
 # USE_PERL5_RUN		- If set, this port uses perl5 for running.
 #
 # PERL_MODBUILD		- Use Module::Build to configure, build and install port.
+.if !${USES:Mperl5}
 
 .if !defined(_POSTMKINCLUDED) && !defined(Perl_Pre_Include)
 
@@ -231,3 +232,4 @@
 .endif # !defined(USE_GMAKE)
 .endif # defined(PERL_MODBUILD)
 .endif # defined(_POSTMKINCLUDED) && !defined(Perl_Post_Include)
+.endif