gd2 fails on perl5

robert delius royar apple at frinabulax.org
Wed Jan 14 04:29:30 PST 2009


Wed, 14 Jan 2009 (20:26 +1100 UTC) Joshua Root wrote:

> Joshua Root wrote:
>> Bradley Giesbrecht wrote:
>>> BlackBook: brad$ ls /usr/share/bin/
>>> c2ph       dprofpp    h2ph       libnetcfg  perlcc     perlthanks
>>> pod2html   pod2text   podselect  pstruct    xsubpp
>>> corelist   enc2xs     h2xs       pear_osx   perldoc    piconv
>>> pod2latex  pod2usage  prove      s2p
>>> cpan       find2perl  instmodsh  perlbug    perlivp    pl2pm
>>> pod2man    podchecker psed       splain
>>> BlackBook: brad$
>>
>> How about `ls -ld /usr/share/bin /opt/local /opt/local/bin`?
>
> Also the debug output for a port that is installing into /usr would be
> helpful. E.g. `sudo port -d install perl5.8`.
>
> - Josh
How about the following that clearly shows that the port does not 
properly sanitize against this problem:
[Long lines ahead; expect line mangling.]
grendel% port patch perl5.8
--->  Fetching perl5.8
--->  Attempting to fetch perl-5.8.9.tar.bz2 from http://www.cpan.org/src/
--->  Verifying checksum(s) for perl5.8
--->  Extracting perl5.8
grendel% grep -R /share/bin /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_perl5.8
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_perl5.8/work/perl-5.8.9/Configure:  $test -d /usr/share/bin     && dflt=/usr/share/bin

So the maintainer might add
-D scriptdir='${prefix}/share/scripts'
to the configure.args values.  I am leary of replacing a large, working 
perl 5.8.8 Macports installation to see if this is the correct.  The 
problem only shows up if a users has a directory (not a link) in
/usr/share/scripts
/usr/share/bin
/usr/local/script or
/usr/local/scripts
Lines 8791-8808 of Configure
: determine where public executable scripts go
set scriptdir scriptdir
eval $prefixit
case "$scriptdir" in
'')
 	dflt="$bin"
 	: guess some guesses
 	$test -d /usr/share/scripts && dflt=/usr/share/scripts
 	$test -d /usr/share/bin     && dflt=/usr/share/bin
 	$test -d /usr/local/script  && dflt=/usr/local/script
 	$test -d /usr/local/scripts && dflt=/usr/local/scripts
 	$test -d $prefixexp/script  && dflt=$prefixexp/script
 	set dflt
 	eval $prefixup
 	;;
*)  dflt="$scriptdir"
 	;;
esac

Actually, it would make sense, if possible (at least with an upgrade 
installation) to check the current configuration for perl5.8 and set 
those values to be the same in the new one.  I use perl extensively, but 
I am not proficient at configuring it. The maintainer might figure out 
something by parsing the output of `perl -V` searching for the values 
for "config_args".  Perhaps this is already being done?

Here is a patch for the Portfile:

--- /opt/local/var/macports/sources/rsync.macports.org/release/ports/lang/perl5.8/Portfile.~1~  2009-01-07 06:48:14.000000000 -0500
+++ /opt/local/var/macports/sources/rsync.macports.org/release/ports/lang/perl5.8/Portfile      2009-01-14 07:01:14.000000000 -0500
@@ -40,6 +40,7 @@
  configure.args \
      -des \
      -D prefix='${prefix}' \
+    -D scriptdir='${prefix}/share/scripts' \
      -D cppflags="\${CPPFLAGS}" \
      -D ldflags="\${LDFLAGS}" \
      -D vendorprefix='${prefix}' \

-- 
Dr. Robert Delius Royar                   Associate Professor of English
Morehead State University                             Morehead, Kentucky



More information about the macports-users mailing list