Extract perl related stuff from bsd.port.mk into bsd.perl.mk. No functionality change. Only code moving. New file: bsd.perl.mk Fix: # -*- mode: Makefile; tab-width: 4; -*- # ex: ts=4 # # $FreeBSD: $ # ## # USE_PERL5 - Says that the port uses perl5 for building and running. # USE_PERL5_BUILD - Says that the port uses perl5 for building. # USE_PERL5_RUN - Says that the port uses perl5 for running. # 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 # installed from a port, but without the version number. # Use this if you need to replace "#!" lines in scripts. # PERL_VERSION - Full version of perl5 (see below for current value). # PERL_VER - Short version of perl5 (see below for current value). # PERL_LEVEL - Perl version as an integer of the form MNNNPP, where # M is major version, N is minor version, and P is # the patch level. E.g., PERL_VERSION=5.6.1 would give # a PERL_LEVEL of 500601. This can be used in comparisons # to determine if the version of perl is high enough, # whether a particular dependency is needed, etc. # PERL_ARCH - Directory name of architecture dependent libraries # (value: ${ARCH}-freebsd). # PERL_PORT - Name of the perl port that is installed # (value: perl5) # SITE_PERL - Directory name where site specific perl packages go. # This value is added to PLIST_SUB. ## .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_minor= ${_perl_minor:C|^.*(...)|\1|} .if ${perl_minor} >= 100 perl_minor= ${PERL_VERSION:C|^([1-9]+)\.([0-9][0-9][0-9]).*|\2|} perl_patch= ${PERL_VERSION:C|^.*(..)|\1|} .else # ${perl_minor} < 100 _perl_patch= 0${PERL_VERSION:C|^([1-9]+)\.([0-9]+)\.*|0|} perl_patch= ${_perl_patch:C|^.*(..)|\1|} .endif # ${perl_minor} < 100 PERL_LEVEL= ${perl_major}${perl_minor}${perl_patch} .else PERL_LEVEL=0 .endif # !defined(PERL_LEVEL) && defined(PERL_VERSION) .if ${OSVERSION} >= 500032 PERL_VERSION?= 5.6.1 PERL_VER?= 5.6.1 PERL_ARCH?= mach .else .if ${OSVERSION} >= 500007 PERL_VERSION?= 5.6.0 PERL_VER?= 5.6.0 PERL_ARCH?= mach .else .if ${OSVERSION} >= 300000 PERL_VERSION?= 5.00503 .else PERL_VERSION?= 5.00502 .endif PERL_VER?= 5.005 PERL_ARCH?= ${ARCH}-freebsd .endif .endif .if ${PERL_LEVEL} >= 500800 PERL_PORT?= perl5.8 .else PERL_PORT?= perl5 .endif SITE_PERL?= ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER} PLIST_SUB+= PERL_VERSION=${PERL_VERSION} \ PERL_VER=${PERL_VER} \ PERL_ARCH=${PERL_ARCH} \ SITE_PERL=${SITE_PERL:S|^${LOCALBASE}/||} .if defined(PERL_CONFIGURE) USE_PERL5= yes USE_REINPLACE=yes .endif .if exists(/usr/bin/perl5) && ${OSVERSION} >= 300000 && ${OSVERSION} < 500036 .if !exists(/usr/bin/perl${PERL_VERSION}) && ( defined(USE_PERL5) || \ defined(USE_PERL5_BUILD) || defined(USE_PERL5_RUN) ) pre-everything:: @${ECHO_CMD} "Error: you don't have the right version of perl in /usr/bin." @${FALSE} .endif PERL5= /usr/bin/perl${PERL_VERSION} PERL= /usr/bin/perl .else PERL5= ${LOCALBASE}/bin/perl${PERL_VERSION} PERL= ${LOCALBASE}/bin/perl .if defined(USE_PERL5) || defined(USE_PERL5_BUILD) BUILD_DEPENDS+= ${PERL5}:${PORTSDIR}/lang/${PERL_PORT} .endif .if defined(USE_PERL5) || defined(USE_PERL5_RUN) RUN_DEPENDS+= ${PERL5}:${PORTSDIR}/lang/${PERL_PORT} .endif .endif .if defined(PERL_CONFIGURE) CONFIGURE_ARGS+= CC="${CC}" CCFLAGS="${CFLAGS}" PREFIX="${PREFIX}" \ INSTALLPRIVLIB="${PREFIX}/lib" INSTALLARCHLIB="${PREFIX}/lib" CONFIGURE_SCRIPT?= Makefile.PL MAN3PREFIX?= ${PREFIX}/lib/perl5/${PERL_VERSION} .undef HAS_CONFIGURE .endif .if defined(PERL_CONFIGURE) .if !target(do-configure) do-configure: @if [ -f ${SCRIPTDIR}/configure ]; then \ cd ${.CURDIR} && ${SETENV} ${SCRIPTS_ENV} ${SH} \ ${SCRIPTDIR}/configure; \ fi @cd ${CONFIGURE_WRKSRC} && \ ${SETENV} ${CONFIGURE_ENV} \ ${PERL5} ./${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS} @cd ${CONFIGURE_WRKSRC} && \ ${PERL5} -pi -e 's/ doc_(perl|site|\$$\(INSTALLDIRS\))_install$$//' Makefile .endif .endif --- bsd.perl.mk ends here -----Bb41nVphmpOfjYLYo4IE67DVALnmo6av8qBzVM5iI9gCzJuJ Content-Type: text/plain; name="remove_perl.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="remove_perl.patch" --- bsd.port.mk.1.460 Thu Jul 31 09:21:16 2003 +++ bsd.port.mk Wed Aug 13 04:02:05 2003 @@ -306,29 +306,6 @@ # CPPFLAGS and LDFLAGS in CONFIGURE_ENV. # Default: not set. ## -# USE_PERL5 - Says that the port uses perl5 for building and running. -# USE_PERL5_BUILD - Says that the port uses perl5 for building. -# USE_PERL5_RUN - Says that the port uses perl5 for running. -# 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 -# installed from a port, but without the version number. -# Use this if you need to replace "#!" lines in scripts. -# PERL_VERSION - Full version of perl5 (see below for current value). -# PERL_VER - Short version of perl5 (see below for current value). -# PERL_LEVEL - Perl version as an integer of the form MNNNPP, where -# M is major version, N is minor version, and P is -# the patch level. E.g., PERL_VERSION=5.6.1 would give -# a PERL_LEVEL of 500601. This can be used in comparisons -# to determine if the version of perl is high enough, -# whether a particular dependency is needed, etc. -# PERL_ARCH - Directory name of architecture dependent libraries -# (value: ${ARCH}-freebsd). -# PERL_PORT - Name of the perl port that is installed -# (value: perl5) -# SITE_PERL - Directory name where site specific perl packages go. -# This value is added to PLIST_SUB. -## # USE_BISON - Says that the port uses bison for building. ## # USE_IMAKE - Says that the port uses imake. Implies USE_X_PREFIX. @@ -958,22 +935,6 @@ PREFIX?= ${LOCALBASE} .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_minor= ${_perl_minor:C|^.*(...)|\1|} -.if ${perl_minor} >= 100 -perl_minor= ${PERL_VERSION:C|^([1-9]+)\.([0-9][0-9][0-9]).*|\2|} -perl_patch= ${PERL_VERSION:C|^.*(..)|\1|} -.else # ${perl_minor} < 100 -_perl_patch= 0${PERL_VERSION:C|^([1-9]+)\.([0-9]+)\.*|0|} -perl_patch= ${_perl_patch:C|^.*(..)|\1|} -.endif # ${perl_minor} < 100 -PERL_LEVEL= ${perl_major}${perl_minor}${perl_patch} -.else -PERL_LEVEL=0 -.endif # !defined(PERL_LEVEL) && defined(PERL_VERSION) - .if defined(USE_OPENSSL) .if ${OSVERSION} >= 400014 .if !exists(/usr/lib/libcrypto.so) @@ -1032,6 +993,10 @@ .include "${PORTSDIR}/Mk/bsd.ruby.mk" .endif +.if defined(USE_PERL) || defined(PERL_CONFIGURE) +.include "${PORTSDIR}/Mk/bsd.perl.mk" +.endif + .if defined(USE_QT) || defined(USE_QT2) || defined(USE_QT_VER) || defined(USE_KDELIBS_VER) || defined(USE_KDEBASE_VER) .include "${PORTSDIR}/Mk/bsd.kde.mk" .endif @@ -1413,64 +1378,6 @@ .endif .endif -.if ${OSVERSION} >= 500032 -PERL_VERSION?= 5.6.1 -PERL_VER?= 5.6.1 -PERL_ARCH?= mach -.else -.if ${OSVERSION} >= 500007 -PERL_VERSION?= 5.6.0 -PERL_VER?= 5.6.0 -PERL_ARCH?= mach -.else -.if ${OSVERSION} >= 300000 -PERL_VERSION?= 5.00503 -.else -PERL_VERSION?= 5.00502 -.endif -PERL_VER?= 5.005 -PERL_ARCH?= ${ARCH}-freebsd -.endif -.endif - -.if ${PERL_LEVEL} >= 500800 -PERL_PORT?= perl5.8 -.else -PERL_PORT?= perl5 -.endif - -SITE_PERL?= ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER} - -PLIST_SUB+= PERL_VERSION=${PERL_VERSION} \ - PERL_VER=${PERL_VER} \ - PERL_ARCH=${PERL_ARCH} \ - SITE_PERL=${SITE_PERL:S|^${LOCALBASE}/||} - -.if defined(PERL_CONFIGURE) -USE_PERL5= yes -USE_REINPLACE=yes -.endif - -.if exists(/usr/bin/perl5) && ${OSVERSION} >= 300000 && ${OSVERSION} < 500036 -.if !exists(/usr/bin/perl${PERL_VERSION}) && ( defined(USE_PERL5) || \ - defined(USE_PERL5_BUILD) || defined(USE_PERL5_RUN) ) -pre-everything:: - @${ECHO_CMD} "Error: you don't have the right version of perl in /usr/bin." - @${FALSE} -.endif -PERL5= /usr/bin/perl${PERL_VERSION} -PERL= /usr/bin/perl -.else -PERL5= ${LOCALBASE}/bin/perl${PERL_VERSION} -PERL= ${LOCALBASE}/bin/perl -.if defined(USE_PERL5) || defined(USE_PERL5_BUILD) -BUILD_DEPENDS+= ${PERL5}:${PORTSDIR}/lang/${PERL_PORT} -.endif -.if defined(USE_PERL5) || defined(USE_PERL5_RUN) -RUN_DEPENDS+= ${PERL5}:${PORTSDIR}/lang/${PERL_PORT} -.endif -.endif - .if defined(USE_XLIB) .if ${XFREE86_VERSION} == 3 # Don't try to build XFree86-3 even if ALWAYS_BUILD_DEPENDS is defined -- @@ -2207,14 +2114,6 @@ LATEST_LINK?= ${PKGBASE} PKGLATESTFILE= ${PKGLATESTREPOSITORY}/${LATEST_LINK}${PKG_SUFX} -.if defined(PERL_CONFIGURE) -CONFIGURE_ARGS+= CC="${CC}" CCFLAGS="${CFLAGS}" PREFIX="${PREFIX}" \ - INSTALLPRIVLIB="${PREFIX}/lib" INSTALLARCHLIB="${PREFIX}/lib" -CONFIGURE_SCRIPT?= Makefile.PL -MAN3PREFIX?= ${PREFIX}/lib/perl5/${PERL_VERSION} -.undef HAS_CONFIGURE -.endif - CONFIGURE_SCRIPT?= configure CONFIGURE_TARGET?= ${MACHINE_ARCH}-portbld-freebsd${OSREL} CONFIGURE_LOG?= config.log @@ -2860,13 +2759,6 @@ ${ECHO_CMD} " on your system (e.g. an \`ls ${PKG_DBDIR}\`).") | /usr/bin/fmt 75 79 ; \ ${FALSE}; \ fi) -.endif -.if defined(PERL_CONFIGURE) - @cd ${CONFIGURE_WRKSRC} && \ - ${SETENV} ${CONFIGURE_ENV} \ - ${PERL5} ./${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS} - @cd ${CONFIGURE_WRKSRC} && \ - ${PERL5} -pi -e 's/ doc_(perl|site|\$$\(INSTALLDIRS\))_install$$//' Makefile .endif .if defined(USE_IMAKE) @(cd ${CONFIGURE_WRKSRC}; ${SETENV} ${MAKE_ENV} ${XMKMF})
Responsible Changed From-To: freebsd-ports-bugs->portmgr Over to portmgr for review and testing.
This patch breaks perl5 and perl5.8 ports install. Here is a little and trivial patchset to that ports to fix it. ---- Sem.
Sorry, the patch has a little but bad typo. .if defined(USR_PERL) instead of .if defined(USE_PERL5) sorry. Here is a right patch to bsd.port.mk ---- Sem.
Sergey Matveychuk wrote: > Sorry, the patch has a little but bad typo. > .if defined(USR_PERL) > instead of > .if defined(USE_PERL5) > > sorry. Here is a right patch to bsd.port.mk Oops! Sorry again. I've attached an old patch :( Next try... ---- Sem.
State Changed From-To: open->analyzed Patches being tested on bento.
On Sat, 2003-08-16 at 17:59, Sergey Matveychuk wrote: > Sergey Matveychuk wrote: > > Sorry, the patch has a little but bad typo. > > .if defined(USR_PERL) > > instead of > > .if defined(USE_PERL5) > > > > sorry. Here is a right patch to bsd.port.mk > > Oops! Sorry again. I've attached an old patch :( > Next try... FYI, this patch breaks quite a few ports that don't set USE_PERL5 or PERL_CONFIGURE correctly before bsd.port.pre.mk. I'm fixing them on the fly now, but you may want to cook up some patches for maintainers to look at. Joe > > ---- > Sem. > > ______________________________________________________________________ > --- bsd.port.mk.1.460 Thu Jul 31 09:21:16 2003 > +++ bsd.port.mk Wed Aug 13 04:02:05 2003 > @@ -306,29 +306,6 @@ > # CPPFLAGS and LDFLAGS in CONFIGURE_ENV. > # Default: not set. > ## > -# USE_PERL5 - Says that the port uses perl5 for building and running. > -# USE_PERL5_BUILD - Says that the port uses perl5 for building. > -# USE_PERL5_RUN - Says that the port uses perl5 for running. > -# 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 > -# installed from a port, but without the version number. > -# Use this if you need to replace "#!" lines in scripts. > -# PERL_VERSION - Full version of perl5 (see below for current value). > -# PERL_VER - Short version of perl5 (see below for current value). > -# PERL_LEVEL - Perl version as an integer of the form MNNNPP, where > -# M is major version, N is minor version, and P is > -# the patch level. E.g., PERL_VERSION=5.6.1 would give > -# a PERL_LEVEL of 500601. This can be used in comparisons > -# to determine if the version of perl is high enough, > -# whether a particular dependency is needed, etc. > -# PERL_ARCH - Directory name of architecture dependent libraries > -# (value: ${ARCH}-freebsd). > -# PERL_PORT - Name of the perl port that is installed > -# (value: perl5) > -# SITE_PERL - Directory name where site specific perl packages go. > -# This value is added to PLIST_SUB. > -## > # USE_BISON - Says that the port uses bison for building. > ## > # USE_IMAKE - Says that the port uses imake. Implies USE_X_PREFIX. > @@ -958,22 +935,6 @@ > PREFIX?= ${LOCALBASE} > .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_minor= ${_perl_minor:C|^.*(...)|\1|} > -.if ${perl_minor} >= 100 > -perl_minor= ${PERL_VERSION:C|^([1-9]+)\.([0-9][0-9][0-9]).*|\2|} > -perl_patch= ${PERL_VERSION:C|^.*(..)|\1|} > -.else # ${perl_minor} < 100 > -_perl_patch= 0${PERL_VERSION:C|^([1-9]+)\.([0-9]+)\.*|0|} > -perl_patch= ${_perl_patch:C|^.*(..)|\1|} > -.endif # ${perl_minor} < 100 > -PERL_LEVEL= ${perl_major}${perl_minor}${perl_patch} > -.else > -PERL_LEVEL=0 > -.endif # !defined(PERL_LEVEL) && defined(PERL_VERSION) > - > .if defined(USE_OPENSSL) > .if ${OSVERSION} >= 400014 > .if !exists(/usr/lib/libcrypto.so) > @@ -1032,6 +993,10 @@ > .include "${PORTSDIR}/Mk/bsd.ruby.mk" > .endif > > +.if defined(USE_PERL5) || defined(PERL_CONFIGURE) > +.include "${PORTSDIR}/Mk/bsd.perl.mk" > +.endif > + > .if defined(USE_QT) || defined(USE_QT2) || defined(USE_QT_VER) || defined(USE_KDELIBS_VER) || defined(USE_KDEBASE_VER) > .include "${PORTSDIR}/Mk/bsd.kde.mk" > .endif > @@ -1413,64 +1378,6 @@ > .endif > .endif > > -.if ${OSVERSION} >= 500032 > -PERL_VERSION?= 5.6.1 > -PERL_VER?= 5.6.1 > -PERL_ARCH?= mach > -.else > -.if ${OSVERSION} >= 500007 > -PERL_VERSION?= 5.6.0 > -PERL_VER?= 5.6.0 > -PERL_ARCH?= mach > -.else > -.if ${OSVERSION} >= 300000 > -PERL_VERSION?= 5.00503 > -.else > -PERL_VERSION?= 5.00502 > -.endif > -PERL_VER?= 5.005 > -PERL_ARCH?= ${ARCH}-freebsd > -.endif > -.endif > - > -.if ${PERL_LEVEL} >= 500800 > -PERL_PORT?= perl5.8 > -.else > -PERL_PORT?= perl5 > -.endif > - > -SITE_PERL?= ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER} > - > -PLIST_SUB+= PERL_VERSION=${PERL_VERSION} \ > - PERL_VER=${PERL_VER} \ > - PERL_ARCH=${PERL_ARCH} \ > - SITE_PERL=${SITE_PERL:S|^${LOCALBASE}/||} > - > -.if defined(PERL_CONFIGURE) > -USE_PERL5= yes > -USE_REINPLACE=yes > -.endif > - > -.if exists(/usr/bin/perl5) && ${OSVERSION} >= 300000 && ${OSVERSION} < 500036 > -.if !exists(/usr/bin/perl${PERL_VERSION}) && ( defined(USE_PERL5) || \ > - defined(USE_PERL5_BUILD) || defined(USE_PERL5_RUN) ) > -pre-everything:: > - @${ECHO_CMD} "Error: you don't have the right version of perl in /usr/bin." > - @${FALSE} > -.endif > -PERL5= /usr/bin/perl${PERL_VERSION} > -PERL= /usr/bin/perl > -.else > -PERL5= ${LOCALBASE}/bin/perl${PERL_VERSION} > -PERL= ${LOCALBASE}/bin/perl > -.if defined(USE_PERL5) || defined(USE_PERL5_BUILD) > -BUILD_DEPENDS+= ${PERL5}:${PORTSDIR}/lang/${PERL_PORT} > -.endif > -.if defined(USE_PERL5) || defined(USE_PERL5_RUN) > -RUN_DEPENDS+= ${PERL5}:${PORTSDIR}/lang/${PERL_PORT} > -.endif > -.endif > - > .if defined(USE_XLIB) > .if ${XFREE86_VERSION} == 3 > # Don't try to build XFree86-3 even if ALWAYS_BUILD_DEPENDS is defined -- > @@ -2207,14 +2114,6 @@ > LATEST_LINK?= ${PKGBASE} > PKGLATESTFILE= ${PKGLATESTREPOSITORY}/${LATEST_LINK}${PKG_SUFX} > > -.if defined(PERL_CONFIGURE) > -CONFIGURE_ARGS+= CC="${CC}" CCFLAGS="${CFLAGS}" PREFIX="${PREFIX}" \ > - INSTALLPRIVLIB="${PREFIX}/lib" INSTALLARCHLIB="${PREFIX}/lib" > -CONFIGURE_SCRIPT?= Makefile.PL > -MAN3PREFIX?= ${PREFIX}/lib/perl5/${PERL_VERSION} > -.undef HAS_CONFIGURE > -.endif > - > CONFIGURE_SCRIPT?= configure > CONFIGURE_TARGET?= ${MACHINE_ARCH}-portbld-freebsd${OSREL} > CONFIGURE_LOG?= config.log > @@ -2860,13 +2759,6 @@ > ${ECHO_CMD} " on your system (e.g. an \`ls ${PKG_DBDIR}\`).") | /usr/bin/fmt 75 79 ; \ > ${FALSE}; \ > fi) > -.endif > -.if defined(PERL_CONFIGURE) > - @cd ${CONFIGURE_WRKSRC} && \ > - ${SETENV} ${CONFIGURE_ENV} \ > - ${PERL5} ./${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS} > - @cd ${CONFIGURE_WRKSRC} && \ > - ${PERL5} -pi -e 's/ doc_(perl|site|\$$\(INSTALLDIRS\))_install$$//' Makefile > .endif > .if defined(USE_IMAKE) > @(cd ${CONFIGURE_WRKSRC}; ${SETENV} ${MAKE_ENV} ${XMKMF}) -- PGP Key : http://www.marcuscom.com/pgp.asc
I'v descover some ports set PERL_CONFIGURE before bsd.port.pre.mk. It's wrong and PERL_CONFIGURE must be moved above bsd.port.pre.mk. Here is a full list of this ports: converters/p5-Convert-Morse databases/p5-Mysql databases/p5-DBD-mysql devel/p5-Dialog devel/p5-Devel-Peek mail/p5-Mail-SpamAssassin math/p5-Math-Currency math/p5-Math-FixedPrecision net/p5-Net-SNMP shells/vshnu www/checkbot www/p5-CGI-Cache www/mod_frontpage I've attached a new bsd.perl.mk file that prevent include it twice. ---- Sem.
Sorry. Remove a debug line '@echo perl do-configure' from bsd.perl.mk please. -- Sem.
Here is a good bsd.perl.mk ---- Sem.
It looks like I can't override do-configure *after* bsd.port.pre.mk now when PERL_CONFIGURE is set, there should be a pre- and post-part. And what is wrong with: .include <bsd.port.pre.mk> .if (we-have-the-right-perl-version-installed) #enable perl support USE_PERL= yes ... .endif to autodetect if I want to add perl support to a port?
Oliver Eikemeier wrote: > It looks like I can't override do-configure *after* bsd.port.pre.mk > now when PERL_CONFIGURE is set, there should be a pre- and post-part. > > And what is wrong with: > > .include <bsd.port.pre.mk> > > .if (we-have-the-right-perl-version-installed) > #enable perl support > USE_PERL= yes > ... > .endif > > to autodetect if I want to add perl support to a port? I think more port style will: USE_PERL=yes BROKEN_WITH_PERL=5.005 # not implemented yet But I agree, I need more testing with pre/post stage. Remember, it's my first echelon of patches? :) --- Sem.
Sergey Matveychuk wrote: > Oliver Eikemeier wrote: > >> It looks like I can't override do-configure *after* bsd.port.pre.mk >> now when PERL_CONFIGURE is set, there should be a pre- and post-part. >> >> And what is wrong with: >> >> .include <bsd.port.pre.mk> >> >> .if (we-have-the-right-perl-version-installed) >> #enable perl support >> USE_PERL= yes >> ... >> .endif >> >> to autodetect if I want to add perl support to a port? > > I think more port style will: > USE_PERL=yes > BROKEN_WITH_PERL=5.005 # not implemented yet I don't think BROKEN_WITH_* is very useful. If I want to break my port, I can do that myself and _give a reason_. But what I wanted to demonstrate is conditionally adding perl support to an application, not breaking it. > But I agree, I need more testing with pre/post stage. > Remember, it's my first echelon of patches? :) Ready for the next wave...
Oliver Eikemeier wrote: > I don't think BROKEN_WITH_* is very useful. If I want to break my port, > I can do that myself and _give a reason_. Nope. You misunderstood. BROKEN_WITH_* marks ports only if some condition satisfied. E.g. BROKEN_WITH_MYSQL (see comments in bsd.port.mk): BROKEN_WITH_MYSQL=41 mean port will not build if you have mysql4.1 installed, but just ignores if you use 3.23 or 4.0. --- Sem.
Sergey Matveychuk wrote: > Oliver Eikemeier wrote: > >> I don't think BROKEN_WITH_* is very useful. If I want to break my port, >> I can do that myself and _give a reason_. > > Nope. You misunderstood. BROKEN_WITH_* marks ports only if some > condition satisfied. E.g. BROKEN_WITH_MYSQL (see comments in > bsd.port.mk): BROKEN_WITH_MYSQL=41 mean port will not build if you have > mysql4.1 installed, but just ignores if you use 3.23 or 4.0. But why? Can I fix it by installing MySQL 4.0? Can I fix it by deinstalling MySQL? Does the port support MySQL 3.23? I think I got the idea, it just doesn't seem to be very useful to me. USE_MYSQL= 4.0+ would mean that I need at least version 4.0 of MySQL, and I can issue an error message when I can't install this version because it conflicts with the already installed version 3.23. But "This port doesn't work with MySQL version 41" is pretty uninformative. I want at least "This port needs MySQL version 3.23 or 4.0".
Oliver Eikemeier wrote: > But why? Can I fix it by installing MySQL 4.0? Can I fix it by deinstalling It was not me who contrive it :) > MySQL? Does the port support MySQL 3.23? I think I got the idea, it just > doesn't seem to be very useful to me. > > USE_MYSQL= 4.0+ > > would mean that I need at least version 4.0 of MySQL, and I can issue an It's resonable, but like my example before, some ports may be broken with 4.1 because of API's change and work fine with 3.23 and 4.0. Here is BROKEN_WITH_* quite fine. --- Sem.
Sergey Matveychuk wrote: > Oliver Eikemeier wrote: > >> But why? Can I fix it by installing MySQL 4.0? Can I fix it by >> deinstalling > > It was not me who contrive it :) > >> MySQL? Does the port support MySQL 3.23? I think I got the idea, it just >> doesn't seem to be very useful to me. >> >> USE_MYSQL= 4.0+ > > > would mean that I need at least version 4.0 of MySQL, and I can issue an > > It's resonable, but like my example before, some ports may be broken > with 4.1 because of API's change and work fine with 3.23 and 4.0. Here > is BROKEN_WITH_* quite fine. Nope, because I (as a user) don't know how to fix it. The port has to tell me "I work with 3.23 and 4.0, but not with 4.1". Otherwise I might assume I have to wait for 4.2. Or try with 4.0, only to discover that the port needs 3.23. I don't think we need a marco for this, though, because there should be few such cases. So I don't think BROKEN_WITH_* is a good idea.
On Wed, 2003-11-12 at 12:05, Oliver Eikemeier wrote: > Sergey Matveychuk wrote: > > > Oliver Eikemeier wrote: > > > >> But why? Can I fix it by installing MySQL 4.0? Can I fix it by > >> deinstalling > > > > It was not me who contrive it :) > > > >> MySQL? Does the port support MySQL 3.23? I think I got the idea, it just > >> doesn't seem to be very useful to me. > >> > >> USE_MYSQL= 4.0+ > > > > > would mean that I need at least version 4.0 of MySQL, and I can issue an > > > > It's resonable, but like my example before, some ports may be broken > > with 4.1 because of API's change and work fine with 3.23 and 4.0. Here > > is BROKEN_WITH_* quite fine. > > Nope, because I (as a user) don't know how to fix it. The port has to tell me > "I work with 3.23 and 4.0, but not with 4.1". Otherwise I might assume I have > to wait for 4.2. Or try with 4.0, only to discover that the port needs 3.23. > > I don't think we need a marco for this, though, because there should be few > such cases. So I don't think BROKEN_WITH_* is a good idea. I agree. I like the way the Java ports handle this. The way we do it now is along the same lines: .if ${PERL_LEVEL} < 500600 IGNORE= blah-blah requires Perl 5.6.x or higher .endif Joe -- PGP Key : http://www.marcuscom.com/pgp.asc
Joe Marcus Clarke wrote: > I agree. I like the way the Java ports handle this. The way we do it > now is along the same lines: > > .if ${PERL_LEVEL} < 500600 > IGNORE= blah-blah requires Perl 5.6.x or higher > .endif OK. It's quite easy to implement: __prefix=${USE_PERL:C/[^[:digit:].]+$//} __suffix=${USE_PERL:C/^[0-9.]+//} __need_perl=${__prefix:C/\.//g:C/^([0-9])/\1./} __have_perl=${PERL_VER:C/\.//g:C/^([0-9])/\1./} .if ${__suffix} == "" && ${__have_perl} != ${__need_perl} IGNORE= You need perl ${__prefix} exectly .endif .if ${__suffix} == "+" && ${__have_perl} < ${__need_perl} IGNORE= You need perl ${__prefix} or grater .endif .if ${__suffix} == "-" && ${__have_perl} > ${__need_perl} IGNORE= You need perl ${__prefix} or less .endif But I think BROKEN_WITH_* we need anyway just in case. --- Sem.
Sergey Matveychuk wrote: > Joe Marcus Clarke wrote: > >> I agree. I like the way the Java ports handle this. The way we do it >> now is along the same lines: >> >> .if ${PERL_LEVEL} < 500600 >> IGNORE= blah-blah requires Perl 5.6.x or higher >> .endif > > OK. It's quite easy to implement: > __prefix=${USE_PERL:C/[^[:digit:].]+$//} > __suffix=${USE_PERL:C/^[0-9.]+//} > __need_perl=${__prefix:C/\.//g:C/^([0-9])/\1./} > __have_perl=${PERL_VER:C/\.//g:C/^([0-9])/\1./} > > .if ${__suffix} == "" && ${__have_perl} != ${__need_perl} > IGNORE= You need perl ${__prefix} exectly > .endif > .if ${__suffix} == "+" && ${__have_perl} < ${__need_perl} > IGNORE= You need perl ${__prefix} or grater > .endif > .if ${__suffix} == "-" && ${__have_perl} > ${__need_perl} > IGNORE= You need perl ${__prefix} or less > .endif > > But I think BROKEN_WITH_* we need anyway just in case. I'll be totally happy with only USE_PERL= yes/5.6/5.6+/5.8/5.8+ everthing else should be handled manually. How many port do we have that need something else?
Oliver Eikemeier wrote: > I'll be totally happy with only > > USE_PERL= yes/5.6/5.6+/5.8/5.8+ > > everthing else should be handled manually. How many port do we have > that need something else? OK. I'll ask marcus@: what about tradition where we used to see: USE_*= yes/undefined WANT_*_VER= <version> ? I think USE_*= <version> looks better. --- Sem.
On Wed, 2003-11-12 at 22:33, Sergey Matveychuk wrote: > Oliver Eikemeier wrote: > > > I'll be totally happy with only > > > > USE_PERL= yes/5.6/5.6+/5.8/5.8+ > > > > everthing else should be handled manually. How many port do we have > > that need something else? > > OK. I'll ask marcus@: what about tradition where we used to see: > USE_*= yes/undefined > WANT_*_VER= <version> > ? > > I think USE_*= <version> looks better. I tend to agree. Like I said, I kind of like the way Java handles this kind of thing. And since Perl has more than two versions, it kind of makes sense to do it this way. Joe > > --- > Sem. -- PGP Key : http://www.marcuscom.com/pgp.asc
Joe Marcus Clarke wrote: > On Wed, 2003-11-12 at 22:33, Sergey Matveychuk wrote: > >>Oliver Eikemeier wrote: >> >> >>>I'll be totally happy with only >>> >>>USE_PERL= yes/5.6/5.6+/5.8/5.8+ >>> >>>everthing else should be handled manually. How many port do we have >>>that need something else? >> >>OK. I'll ask marcus@: what about tradition where we used to see: >>USE_*= yes/undefined >>WANT_*_VER= <version> >>? >> >>I think USE_*= <version> looks better. > > > I tend to agree. Like I said, I kind of like the way Java handles this > kind of thing. And since Perl has more than two versions, it kind of > makes sense to do it this way. I told about a common ports style. Not only perl. Well, I'll Cc kris@. AFAIR he sticks a conservative view. Kris, what do you think? Anyway we can do backward compatibility. --- Sem.
What's the current status of this PR?
kuriyama@FreeBSD.org wrote: > What's the current status of this PR? > tobez@ is thinking still. This PR brakes some bad formed perl ports. (w/o USE_PERL5 or bad placed it, etc.) They must be fixed first. -- Sem.
I've fixed some ports and some of others are alread fixed. Rest of broken ports are: devel/p5-Dialog mail/p5-Mail-SpamAssassin shells/vshnu www/checkbot www/p5-CGI-Cache www/mod_frontpage I'll fix them when I find a time for it...
kuriyama@FreeBSD.org wrote: > I've fixed some ports and some of others are alread fixed. > > Rest of broken ports are: We need to split bsd.perl.mk on PRE and POST for this. Here is a patch. -- Sem.
What's the status of this PR? The audit trail mentions that certain ports are known to need a patch to work with this PR; have patches been committed? If not, can you please submit them as a followup? If there is still interest in working on this, once I have a more complete patch I can perform another build to locate ports that require further work. Kris
Kris Kennaway wrote: > What's the status of this PR? The audit trail mentions that certain > ports are known to need a patch to work with this PR; have patches > been committed? If not, can you please submit them as a followup? If > there is still interest in working on this, once I have a more > complete patch I can perform another build to locate ports that > require further work. > > Kris AFAIR kuriyama@ fixed almost all perl ports. He had troubles with a couple of them. After I've split bsd.perl.mk on pre- and post- parts (the second patch) fixing them is trivial. I think the patch needs to test on bento again to find out broken ports. But the patch is really obsoleted a little (a couple variables I guess, not much perl-related stuff will committed) and I need to review it. I'll do it as soon as I can (may be this evening or this weekend). --- Sem.
On Thu, Jun 17, 2004 at 12:24:21PM +0400, Sergey Matveychuk wrote: > Kris Kennaway wrote: > >What's the status of this PR? The audit trail mentions that certain > >ports are known to need a patch to work with this PR; have patches > >been committed? If not, can you please submit them as a followup? If > >there is still interest in working on this, once I have a more > >complete patch I can perform another build to locate ports that > >require further work. > > > >Kris > > AFAIR kuriyama@ fixed almost all perl ports. He had troubles with a > couple of them. After I've split bsd.perl.mk on pre- and post- parts > (the second patch) fixing them is trivial. > > I think the patch needs to test on bento again to find out broken ports. > But the patch is really obsoleted a little (a couple variables I guess, > not much perl-related stuff will committed) and I need to review it. > I'll do it as soon as I can (may be this evening or this weekend). Great. Once you're ready I'll throw it on pointyhat and give you the list of broken ports. Kris
I was wrong that the patch obsoleted a little. I almost complete rewrote it and refined a lot with my current experience. Attachments are: patch for bsd.port.mk, bsd.perl.mk itself and patches for three perl ports I know will broken (I think all other was fixed before). So I'll wait for your report after running port build. --- Sem.
On Thu, Jun 17, 2004 at 07:13:25PM +0400, Sergey Matveychuk wrote: > I was wrong that the patch obsoleted a little. > I almost complete rewrote it and refined a lot with my current experience. > > Attachments are: patch for bsd.port.mk, bsd.perl.mk itself and patches > for three perl ports I know will broken (I think all other was fixed > before). > > So I'll wait for your report after running port build. This patch doesn't pass 'make index': Generating INDEX - please wait.."Makefile", line 96: Malformed conditional (${PERL_LEVEL} < 500601) "Makefile", line 96: Need an operator "Makefile", line 98: if-less endif "Makefile", line 98: Need an operator make: fatal errors encountered -- cannot continue ===> chinese/metalist failed *** Error code 1 "Makefile", line 27: Malformed conditional (${PERL_LEVEL} < 500600) "Makefile", line 27: Need an operator "Makefile", line 29: if-less endif "Makefile", line 29: Need an operator make: fatal errors encountered -- cannot continue ===> audio/mp3riot failed *** Error code 1 2 errors Kris
Patches here. -- Sem.
More patches. It's weird for me. All this ports was fixed by kuriyama@! I have no ideas why he didn't commit his work :(( -- Sem.
On Sat, Jun 26, 2004 at 10:56:57AM +0400, Sergey Matveychuk wrote: > Patches here. Does this fix the build completely? Those were just the first two failures, and there are probably lots more. Kris
On Sat, Jun 26, 2004 at 07:23:40PM +0400, Sergey Matveychuk wrote: > More patches. > > It's weird for me. All this ports was fixed by kuriyama@! > I have no ideas why he didn't commit his work :(( Thanks, I'm now testing this again. I had to add a couple more USE_PERL5=yes to make index build. Results as they appear, stay tuned.. Kris
Here is an adapted patch for modern bsd.port.mk and suitable bsd.perl.mk. -- Sem.
Here is a patch for all bad formed ports I've found. -- Sem.
The reason for the PR was to take perl related stuff out of bsd.port.mk. It would make possible to change it without interfering with not perl depended ports. One and a half year has gone. I've tried to keep it up to date and to fix ports it makes broken (most bad formed perl depended ports). There was plans for perl ports improvements after the PR committed but I forgot most now. Now it's out of date. I have neither physical nor mental power to care of it later. So it should be closed if nobody wants to care of it. If you do and you have any questions, write me, I'll answer any of them. -- Sem.
State Changed From-To: analyzed->suspended This is a good idea in principle, but it needs more work to implement. Suspend in case an interested party comes along later. http://www.freebsd.org/cgi/query-pr.cgi?pr=55515 Manually adding to audit trail by linimon: at the portmgr meeting at BSDCan 2007, we agreed that this is still a worthwhile idea, if we can find someone to implement it.
Short response to note, that I'm addressing this issue in the SoC 2007 program. -- Gabor Kovesdan FreeBSD Volunteer EMAIL: gabor@FreeBSD.org .:|:. gabor@kovesdan.org WEB: http://people.FreeBSD.org/~gabor .:|:. http://kovesdan.org
State Changed From-To: suspended->closed A bsd.perl.mk related to the ideas proposed by sem@ has been committed, based on work submitted by gabor in ports/115730 as part of the Google Summer of Code 2007. Because of the fact that it is perfectly legitimate for a port to want to set a conditional dependency on perl based on OPTIONS, for now bsd.perl.mk is unconditionally included, and some of the default settings remain in bsd.port.mk. This is intended to be an intermediate step of doing what sem@ originally proposed. pav@ has suggested a WANT_PERL mechanism to deal with these kinds of ports. Thanks go to marcus and kris for doing earlier testing, and kuriyama and others for additional work along the way. Special thanks go to sem@ for persistence; this was a hard problem to solve and there's still a ways to go yet. I'm sorry that it took as long as it did to clear through the backlog and get to this one.