develooper Front page | perl.perl5.porters | Postings from May 2016

Looking for advice for Perl configuration in MacPorts

Thread Next
From:
Mojca Miklavec
Date:
May 10, 2016 10:10
Subject:
Looking for advice for Perl configuration in MacPorts
Message ID:
CALBOmsbGsbq0Uwf-=HkFka9==PLfw-2LPLAE9mHmQVbhkVTcuA@mail.gmail.com
Hello,

I took over maintainership of perl5 in MacPorts recently and inherited
a number of configuration commands (the full list is below or at
https://trac.macports.org/browser/trunk/dports/lang/perl5/Portfile?rev=148407).
These worked fine for 5.8 all the way up to 5.22.

But the same flags failed for 5.24:
    https://rt.perl.org/Ticket/Display.html?id=128093
    https://trac.macports.org/ticket/51330
It turned out that -DPERL_DARWIN flag was missing somehow, thanks to
-Dccflags="$CFLAGS" which overwrote automatically determined flags
(including -DPERL_DARWIN).

So what I probably need to do is replace
   {-Dcppflags="$CPPFLAGS"} \
   {-Dccflags="$CFLAGS"} \
   {-Dldflags="$LDFLAGS"} \
with
   {-Acppflags="$CPPFLAGS"} \
   {-Accflags="$CFLAGS"} \
   {-Aldflags="$LDFLAGS"} \

The very weird thing though is that "perl5.22 -V" shows

  Compiler:
    cc='/usr/bin/clang', ccflags ='-pipe -Os  -fno-common
-DPERL_DARWIN -I/opt/local/include -fno-strict-aliasing
-fstack-protector -I/opt/local/include -DPERL_USE_SAFE_PUTENV',
    optimize='-O3',
    cppflags='-I/opt/local/include -pipe -Os  -fno-common
-DPERL_DARWIN -I/opt/local/include -fno-strict-aliasing
-fstack-protector -I/opt/local/include'

So I don't quite understand when the flags get stripped and when not.

In any case I would like to ask for a review of the flags or any other
suggestions.

Full list of flags:
    -des \
    -Dprefix='${prefix}' \
    -Dscriptdir='${prefix}/bin' \
   {-Dcppflags="$CPPFLAGS"} \
   {-Dccflags="$CFLAGS"} \
   {-Dldflags="$LDFLAGS"} \
    -Dvendorprefix='${prefix}' \
    -Dusemultiplicity=y \
    -Dusethreads \
    -Duseshrplib \
   {-Dcc="$CC"} \
   {-Dld="env MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET $CC"} \
    -Dman1ext=1pm \
    -Dman3ext=3pm \
    -Dman1dir='${prefix}/share/man/man1p' \
    -Dman3dir='${prefix}/share/man/man3p' \
    -Dsitebin='${prefix}/libexec/perl${perl5.major}/sitebin' \
    -Dsiteman1dir='${prefix}/share/perl${perl5.major}/siteman/man1' \
    -Dsiteman3dir='${prefix}/share/perl${perl5.major}/siteman/man3' \
    -Dvendorbin='${prefix}/libexec/perl${perl5.major}' \
    -Dvendorman1dir='${prefix}/share/perl${perl5.major}/man/man1' \
    -Dvendorman3dir='${prefix}/share/perl${perl5.major}/man/man3' \
    -Dpager='/usr/bin/less -sR' \
    -Dperlpath="${perl5.bin}" \
    -Dstartperl="#!${perl5.bin}"

Thank you,
    Mojca

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About