PortGroup perl5 dependencies for non-module ports

Rainer Müller raimue at macports.org
Thu Jan 10 06:23:06 PST 2013


Hello,

I tried to use the perl5 port group to create a port for an application,
not a module. The port group insists on using the version of perl
extracted from the currently installed ${prefix}/bin/perl. Actually this
is the renaming of p5-app-ack, #37595 [1].

  name                ack
  perl5.branches      5.12
  perl5.setup         ack 1.96 App

With this, it's still trying to use ${prefix}/bin/perl:

$ port -q installed perl5
  perl5 @5.12.4_0+perl5_16 (active)
$ port -q info --depends_lib devel/ack
port:perl5.16, port:p5.16-file-next

I found a possible solution in the port biblatex-biber:

  name                    ack
  perl5.branches          5.12
  perl5.default_branch    5.12
  perl5.setup             ack 1.96 App

Why do I have to set both perl5.branches and perl5.default_branches for
this? I assume the auto-detection of the default branch is wrong as it
decides to use something not listed in perl5.branches.


Some other ports using the perl5 port group outside of perl/p5-* suffer
from the same problem:

$ port -q installed perl5
  perl5 @5.12.4_0+perl5_16 (active)
$ port -q info --depends_lib ikiwiki
port:perl5.16, port:p5.12-cgi-formbuilder, port:p5.12-cgi-session, [...]
$ port -q info --depends_lib psh
port:perl5.16, port:p5.12-term-readline-gnu, port:p5.12-bsd-resource

The port group is even mixing the versions 5.16 and 5.12 here.

Rainer

[1] https://trac.macports.org/ticket/37595
-------------- next part --------------
# $Id: Portfile 99228 2012-10-29 22:52:59Z jmr at macports.org $

PortSystem 1.0
PortGroup perl5 1.0

name                ack
perl5.setup         ack 1.96 App
perl5.major         5.12
perl5.version       5.12
categories          devel
platforms           darwin
supported_archs     noarch
license             Artistic-2
maintainers         gkg.net:mschout openmaintainer
description         A grep replacement that ignores .svn/CVS/blib directories
long_description    ack is a tool like grep, aimed at programmers with large \
                    trees of heterogeneous source code.
homepage            http://betterthangrep.com/

checksums           rmd160  36cb15996f2b0d0d3a27ab10281c589f693b05a9 \
                    sha256  bb9d29842d8c5c1ec7ad9b577707aca0e1d278e8e21560dbed76ea3b5aa6cb64

# Override perl5 portgroup which sets this incorrectly
depends_lib         port:perl${perl5.major}

depends_lib-append  port:p${perl5.major}-file-next


More information about the macports-dev mailing list