Skip site navigation (1)Skip section navigation (2)
Date:      15 Aug 2001 16:45:39 -0700
From:      Ken McGlothlen <mcglk@artlogix.com>
To:        ports@freebsd.org
Subject:   Re: lang/perl5?!
Message-ID:  <87snes51lo.fsf@ralf.artlogix.com>
In-Reply-To: <20010815192832.A94345@databits.net>
References:  <20010815234603.C41670@heechee.tobez.org> <87zo9052nz.fsf_-_@ralf.artlogix.com> <20010815192832.A94345@databits.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Pete Fritchman <petef@databits.net> writes:

| Read the whole Makefile:
| 
| # This will need to be "fixed" in ../../Mk/bsd.port.mk as well.
| PERL_VER=       5.6.1
| 
| So, you need to make PERL_VER=5.6.1 in /usr/ports/Mk/bsd.port.mk.
| 
| You'll probably want to set PERL_VERSION to 5.6.1 too...

Thanks for pointing that out.  As far as I can tell, the relevant section
starts on line 859 of /usr/ports/Mk/bsd.port.mk, and goes something like this:

        .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

So what's the best way to "fix" that?  So far, it's hardwired into the Makefile
based on the version of FreeBSD you're running (from sysctl -n kern.osreldate).

This strikes me a bit strange.  Why not ask Perl directly with `perl -v`?  And
why doesn't the Makefile for lang/perl5 override these automatically for the
build and install?

It just seems screwy to me.  (And also, off the topic:  I didn't know that
FreeBSD 5.0 was based on a Mach kernel.  Is it?)

If this were rewritten so that typing "make" would do this:

        # cd /usr/ports/lang/perl5/
        # make
        ====> Perl 5.005_03 is already in the system (/usr/bin/perl)!
        To install Perl 5.6.1 into /usr/local/bin (which may cause problems
        with locally written scripts), use "make FORCE=1"
        # _

Then this would be a much simpler matter than hacking Makefiles.  I personally
don't care one way or the other---I can navigate these things---but I worry
more about novice sysadmins in this regard who are nonetheless happy Perl
hackers.

So back to the main question:  what's the best way to "fix" that?  Change it to
something like this?

        PERL_VER=               5.6.1
        PERL_VERSION=           5.6.1
        PERL_ARCH=              i386-freebsd

        .ifndef ${PERL_VER}
        .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


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87snes51lo.fsf>