gd2 fails on perl5
Bradley Giesbrecht
brad at pixilla.com
Wed Jan 14 14:01:43 PST 2009
On Jan 14, 2009, at 4:29 AM, robert delius royar wrote:
> 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
Adding scritpdir works as expected.
Thank you Dr. Royar.
I see Bryan fixed this in r45373. Thank you Bryan.
bash-3.2# env
SHELL=/bin/bash
TERM=xterm-color
USER=root
SUDO_USER=brad
SUDO_UID=501
SSH_AUTH_SOCK=/tmp/501/nl.uu.phil.SSHAgent.socket
__CF_USER_TEXT_ENCODING=0x1F5:0:0
PATH=/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/
X11/bin
PWD=/Users/brad/ports/lang/perl5.8
LANG=en_US.UTF-8
SHLVL=1
SUDO_COMMAND=/bin/bash
HOME=/Users/brad
LOGNAME=root
SUDO_GID=501
DISPLAY=/tmp/launch-UjAiw0/:0
_=/usr/bin/env
OLDPWD=/Users/brad/ports/lang/perl5.10
bash-3.2# port installed
No ports are installed.
bash-3.2# ls /usr/share/bin/
pear_osx
bash-3.2# grep scriptdir Portfile
-D scriptdir='${prefix}/share/scripts' \
bash-3.2# port install perl5
---> 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
---> Configuring perl5.8
---> Building perl5.8
---> Staging perl5.8 into destroot
---> Installing perl5.8 @5.8.9_1
---> Activating perl5.8 @5.8.9_1
---> Cleaning perl5.8
---> Fetching perl5
---> Verifying checksum(s) for perl5
---> Extracting perl5
---> Configuring perl5
---> Building perl5
---> Staging perl5 into destroot
---> Installing perl5 @5.8.9_0
---> Activating perl5 @5.8.9_0
---> Cleaning perl5
bash-3.2# ls /usr/share/bin/
pear_osx
bash-3.2# ls -l /opt/local/share/scripts/
total 1272
-rwxr-xr-x 2 root admin 36613 Jan 14 13:53 c2ph
//Brad
More information about the macports-users
mailing list