Mailing List Archive

Re: First try at fixed ebuilds for perl on OSX
On Jul 23, 2004, at 4:13 AM, Mamoru KOMACHI wrote:

> Hi,
>
> At Thu, 22 Jul 2004 09:57:59 -0400,
> Joe Jezak wrote:
>
>> So it builds now, but there are a few issues remaining:
>
>> 2. Perl installs to /usr, overwriting the apple install. I didn't
>> even notice at first, so there's no apparent ill effects, yet I'm
>> still a little wary about just going ahead and doing this. Does
>> anyone have any suggestions or comments on this?


Following Joe Jezak's patches, I have built a working perl-5.8.5 on OS
X 10.3.5 that uses the Perl distribution install process to install
into Darwin system dirs ( such as /System/Library...)

Basically, we need to trust the Perl distribution more; it correctly
recognizes Mac OS X, but Gentoo ebuild specifies an arch of "-linux"
everywhere...

Another problem is gentoo ebuilds specifying "*.so" for shared libs
everywhere. Should be ".dylib" for Darwin.

Finally, the perl-module.eclass installs into "vendorarch" paths rather
than "sitearch" paths -- so we get an install into
/Network/Library/Perl instead of the site-specific /Library/Perl ---
actually, it was worse than that; perl-module.eclass was pre-pending an
extra "/usr" to the front of the paths for Perl modules, so I was
getting things installed into "/usr/usr/share/man" and
"/usr/Network/Library/Perl"...

I hacked things to get them working. Stupid patches are attached --
they should explain what I'm talking about, but they should NOT be
applied; we should have some sort of "if arch == macos" conditionals...
Re: First try at fixed ebuilds for perl on OSX [ In reply to ]
See bug #57677, http://bugs.gentoo.org/show_bug.cgi?id=57677,
especially from comments #14 to #23.

At Sun, 17 Oct 2004 18:10:54 -0600,
Boyd Waters wrote:

> Following Joe Jezak's patches, I have built a working perl-5.8.5 on OS
> X 10.3.5 that uses the Perl distribution install process to install
> into Darwin system dirs ( such as /System/Library...)
>
> Basically, we need to trust the Perl distribution more; it correctly
> recognizes Mac OS X, but Gentoo ebuild specifies an arch of "-linux"
> everywhere...
>
> Another problem is gentoo ebuilds specifying "*.so" for shared libs
> everywhere. Should be ".dylib" for Darwin.
>
> Finally, the perl-module.eclass installs into "vendorarch" paths rather
> than "sitearch" paths -- so we get an install into
> /Network/Library/Perl instead of the site-specific /Library/Perl ---
> actually, it was worse than that; perl-module.eclass was pre-pending an
> extra "/usr" to the front of the paths for Perl modules, so I was
> getting things installed into "/usr/usr/share/man" and
> "/usr/Network/Library/Perl"...
>
> I hacked things to get them working. Stupid patches are attached --
> they should explain what I'm talking about, but they should NOT be
> applied; we should have some sort of "if arch == macos" conditionals...

--
gentoo-osx@gentoo.org mailing list
Re: First try at fixed ebuilds for perl on OSX [ In reply to ]
On Oct 18, 2004, at 8:03 AM, Mamoru KOMACHI wrote:

> Boyd Waters wrote:
>
>> Following Joe Jezak's patches, I have built a working perl-5.8.5 on OS
>> X 10.3.5 that uses the Perl distribution install process to install
>> into Darwin system dirs ( such as /System/Library...)

> See bug #57677, http://bugs.gentoo.org/show_bug.cgi?id=57677,
> especially from comments #14 to #23.
>

Thanks for that pointer to the discussion on bugs.gentoo.org

I do not yet understand all of the issues involved, but here are my
opinions and results as a Perl/Mac/Gentoo user/developer:

My preference is to install a gentoo-compiled Perl that replaces the
Apple-supplied one. Changes should be made to perl ebuild to supply
conditional logic for non-Linux platforms. Using "-Darch=*-linux" is
simply wrong on Darwin, might be wrong on BSD.

I let Perl distribution determine the architecture and I get this
result for @INC:

> $ perl -e 'foreach (@INC) {print "$_\n";}'
> /etc/perl
> /Library/Perl/5.8.5/darwin-thread-multi-2level
> /Library/Perl/5.8.5
> /Library/Perl/5.8.1/darwin-thread-multi-2level
> /Library/Perl/5.8.1
> /Library/Perl
> /Network/Library/Perl/5.8.5/darwin-thread-multi-2level
> /Network/Library/Perl/5.8.5
> /Network/Library/Perl
> /System/Library/Perl/5.8.5/darwin-thread-multi-2level
> /System/Library/Perl/5.8.5
> /usr/local/lib/site_perl
> /Library/Perl/5.8.1/darwin-thread-multi-2level
> /Library/Perl/5.8.1
> .


( I have yet to run into problems, but I have not yet done much
testing. There is a warning regarding prebinding support for shared-lib
perl in the Perl distribution docs; it encourages the use of static
perl for performance reasons... )


The change that I made to perl-module.eclass to obtain a clean install
of perl was quite simple, two lines:

> 57c57
> < PREFIX=/usr INSTALLDIRS=vendor DESTDIR=${D}
> ---
> > INSTALLDIRS=site DESTDIR=${D}
> 126c126
> < for FILE in `find ${D} -type f |grep -v '.so'`; do
> ---
> > for FILE in `find ${D} -type f |grep -v '.dylib'`; do

Of course, such a change should be wrapped in a test for a Darwin
architecture.

If we wish for gentoo-alt to mean anything -- then we should find a
reasonable way to add conditional arch support when needed.

~ boyd


--
gentoo-osx@gentoo.org mailing list
Re: First try at fixed ebuilds for perl on OSX [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I agree. I would like gentoo to replace apple's perl with its own
version.

On Oct 18, 2004, at 3:31 PM, Boyd Waters wrote:

>
> On Oct 18, 2004, at 8:03 AM, Mamoru KOMACHI wrote:
>
>> Boyd Waters wrote:
>>
>>> Following Joe Jezak's patches, I have built a working perl-5.8.5 on
>>> OS
>>> X 10.3.5 that uses the Perl distribution install process to install
>>> into Darwin system dirs ( such as /System/Library...)
>
>> See bug #57677, http://bugs.gentoo.org/show_bug.cgi?id=57677,
>> especially from comments #14 to #23.
>>
>
> Thanks for that pointer to the discussion on bugs.gentoo.org
>
> I do not yet understand all of the issues involved, but here are my
> opinions and results as a Perl/Mac/Gentoo user/developer:
>
> My preference is to install a gentoo-compiled Perl that replaces the
> Apple-supplied one. Changes should be made to perl ebuild to supply
> conditional logic for non-Linux platforms. Using "-Darch=*-linux" is
> simply wrong on Darwin, might be wrong on BSD.
>
> I let Perl distribution determine the architecture and I get this
> result for @INC:
>
>> $ perl -e 'foreach (@INC) {print "$_\n";}'
>> /etc/perl
>> /Library/Perl/5.8.5/darwin-thread-multi-2level
>> /Library/Perl/5.8.5
>> /Library/Perl/5.8.1/darwin-thread-multi-2level
>> /Library/Perl/5.8.1
>> /Library/Perl
>> /Network/Library/Perl/5.8.5/darwin-thread-multi-2level
>> /Network/Library/Perl/5.8.5
>> /Network/Library/Perl
>> /System/Library/Perl/5.8.5/darwin-thread-multi-2level
>> /System/Library/Perl/5.8.5
>> /usr/local/lib/site_perl
>> /Library/Perl/5.8.1/darwin-thread-multi-2level
>> /Library/Perl/5.8.1
>> .
>
>
> ( I have yet to run into problems, but I have not yet done much
> testing. There is a warning regarding prebinding support for
> shared-lib perl in the Perl distribution docs; it encourages the use
> of static perl for performance reasons... )
>
>
> The change that I made to perl-module.eclass to obtain a clean install
> of perl was quite simple, two lines:
>
>> 57c57
>> < PREFIX=/usr INSTALLDIRS=vendor DESTDIR=${D}
>> ---
>> > INSTALLDIRS=site DESTDIR=${D}
>> 126c126
>> < for FILE in `find ${D} -type f |grep -v '.so'`; do
>> ---
>> > for FILE in `find ${D} -type f |grep -v '.dylib'`; do
>
> Of course, such a change should be wrapped in a test for a Darwin
> architecture.
>
> If we wish for gentoo-alt to mean anything -- then we should find a
> reasonable way to add conditional arch support when needed.
>
> ~ boyd
>
>
> --
> gentoo-osx@gentoo.org mailing list
>
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFBdFLyjT8HAJRHzi0RAnPQAJ4jspEsWsl9/yqN1rmAin49twzbygCeI3+0
fJKhR8ZVmICrUelBQS7wZh4=
=4XQi
-----END PGP SIGNATURE-----


--
gentoo-osx@gentoo.org mailing list
Re: First try at fixed ebuilds for perl on OSX [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Right now, I have a little shell script that allows you to switch the
files that conflict (the binaries and man pages) depending on which
version of perl you want to use. This is probably the only solution
that will make most people happy, however, I'm not sure where to put the
~ files when not in use. If anyone has any suggestions, I'd be happy to
hear them.

We *do* need to keep the @INC reversal as the perl maintainers for
Gentoo will *not* support any perl bugs unless we keep their perl changes.

- -Joe

Alexander Plank wrote:
| I agree. I would like gentoo to replace apple's perl with its own version.
|
| On Oct 18, 2004, at 3:31 PM, Boyd Waters wrote:
|
|>>
|>> On Oct 18, 2004, at 8:03 AM, Mamoru KOMACHI wrote:
|>>
|>>> Boyd Waters wrote:
|>>>
|>>>> Following Joe Jezak's patches, I have built a working perl-5.8.5 on OS
|>>>> X 10.3.5 that uses the Perl distribution install process to install
|>>>> into Darwin system dirs ( such as /System/Library...)
|>>
|>>
|>>> See bug #57677, http://bugs.gentoo.org/show_bug.cgi?id=57677,
|>>> especially from comments #14 to #23.
|>>>
|>>
|>> Thanks for that pointer to the discussion on bugs.gentoo.org
|>>
|>> I do not yet understand all of the issues involved, but here are my
|>> opinions and results as a Perl/Mac/Gentoo user/developer:
|>>
|>> My preference is to install a gentoo-compiled Perl that replaces the
|>> Apple-supplied one. Changes should be made to perl ebuild to supply
|>> conditional logic for non-Linux platforms. Using "-Darch=*-linux" is
|>> simply wrong on Darwin, might be wrong on BSD.
|>>
|>> I let Perl distribution determine the architecture and I get this
|>> result for @INC:
|>>
|>>> $ perl -e 'foreach (@INC) {print "$_\n";}'
|>>> /etc/perl
|>>> /Library/Perl/5.8.5/darwin-thread-multi-2level
|>>> /Library/Perl/5.8.5
|>>> /Library/Perl/5.8.1/darwin-thread-multi-2level
|>>> /Library/Perl/5.8.1
|>>> /Library/Perl
|>>> /Network/Library/Perl/5.8.5/darwin-thread-multi-2level
|>>> /Network/Library/Perl/5.8.5
|>>> /Network/Library/Perl
|>>> /System/Library/Perl/5.8.5/darwin-thread-multi-2level
|>>> /System/Library/Perl/5.8.5
|>>> /usr/local/lib/site_perl
|>>> /Library/Perl/5.8.1/darwin-thread-multi-2level
|>>> /Library/Perl/5.8.1
|>>> .
|>>
|>>
|>>
|>> ( I have yet to run into problems, but I have not yet done much
|>> testing. There is a warning regarding prebinding support for
|>> shared-lib perl in the Perl distribution docs; it encourages the use
|>> of static perl for performance reasons... )
|>>
|>>
|>> The change that I made to perl-module.eclass to obtain a clean install
|>> of perl was quite simple, two lines:
|>>
|>>> 57c57
|>>> < PREFIX=/usr INSTALLDIRS=vendor DESTDIR=${D}
|>>> ---
|>>> > INSTALLDIRS=site DESTDIR=${D}
|>>> 126c126
|>>> < for FILE in `find ${D} -type f |grep -v '.so'`; do
|>>> ---
|>>> > for FILE in `find ${D} -type f |grep -v '.dylib'`; do
|>>
|>>
|>> Of course, such a change should be wrapped in a test for a Darwin
|>> architecture.
|>>
|>> If we wish for gentoo-alt to mean anything -- then we should find a
|>> reasonable way to add conditional arch support when needed.
|>>
|>> ~ boyd
|>>
|>>
|>> --
|>> gentoo-osx@gentoo.org mailing list
|>>
|>>
|>>

- --
gentoo-osx@gentoo.org mailing list



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBdF0nwGq7BLLARfoRAj08AJ9P5gHO9grzQmQKESip6F2I62wkxQCfbBVk
WYZQ9ljvSPeGHLA2cJltAqM=
=6bmB
-----END PGP SIGNATURE-----

--
gentoo-osx@gentoo.org mailing list
Re: First try at fixed ebuilds for perl on OSX [ In reply to ]
On Oct 18, 2004, at 6:17 PM, Joseph Jezak wrote:

> I'm not sure where to put the
> ~ files when not in use. If anyone has any suggestions, I'd be happy
> to
> hear them.

Would it be possible to follow the implementation of gcc version
management?

Look at /usr/libexec/gcc/darwin/ppc

We could create /usr/libexec/perl/darwin/ppc/5.8.1/apple/ and put the
original /usr/bin/perl... files in there. Likewise for
../5.8.5/powerpc-linux-thread-multi

Then links in /usr/bin to the appropriate files in /usr/libexec... hard
or symlinks?

Shove the unused things in there...

>
> We *do* need to keep the @INC reversal as the perl maintainers for
> Gentoo will *not* support any perl bugs unless we keep their perl
> changes.
>

I don't see any problems with @INC reversal so far.

(Is there any way to apply @INC reversal to a binary perl after it is
installed? I suspect not.)

~ boyd


--
gentoo-osx@gentoo.org mailing list
Re: First try at fixed ebuilds for perl on OSX [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Boyd Waters wrote:
|
| On Oct 18, 2004, at 6:17 PM, Joseph Jezak wrote:
|
|> I'm not sure where to put the
|> ~ files when not in use. If anyone has any suggestions, I'd be happy to
|> hear them.
|
|
| Would it be possible to follow the implementation of gcc version
| management?
|
| Look at /usr/libexec/gcc/darwin/ppc
|
| We could create /usr/libexec/perl/darwin/ppc/5.8.1/apple/ and put the
| original /usr/bin/perl... files in there. Likewise for
| ../5.8.5/powerpc-linux-thread-multi

This is basically what I was thinking, I don't see any problem with the
idea. We still need to discuss what happens if Apple decides to upgrade
their version of perl through an update, have they ever done this? Is
this a concern?

| Then links in /usr/bin to the appropriate files in /usr/libexec... hard
| or symlinks?
|

I think symlinks are fine, but I'm not sure. Doesn't make that much of
a difference though.

| Shove the unused things in there...
|
|>
|> We *do* need to keep the @INC reversal as the perl maintainers for
|> Gentoo will *not* support any perl bugs unless we keep their perl
|> changes.
|>
|
| I don't see any problems with @INC reversal so far.

The @INC reversal is really the only reason why we need to use Gentoo's
version of perl, that's all I was suggesting.

| (Is there any way to apply @INC reversal to a binary perl after it is
| installed? I suspect not.)
|

Not as far as I know.

| ~ boyd
|
|
| --
| gentoo-osx@gentoo.org mailing list
|

gcc-config is more complex than what I've got at the moment, do we need
that much functionality? Can we get by with just a simple
executable/man-page swapper?

Thanks for taking the time to discuss this. :)
- -Joe
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBdJeKwGq7BLLARfoRAo3MAKDItmdMhrwNrom0XqkTHxi0DyEruACfZrks
+H3OqCBTMFMdLga5zE6x3F4=
=EWc/
-----END PGP SIGNATURE-----

--
gentoo-osx@gentoo.org mailing list
Re: First try at fixed ebuilds for perl on OSX [ In reply to ]
Various Perl module ebuilds are not inheriting from perl-module.eclass,
so my two-liner patch to that top-level file was not sufficient to
avoid a real mess.

Here's how I hacked things up to apply the fixes to offending ebuilds:

> cd /usr/portage/dev-perl
>
> find . -type f -name '*.ebuild' |xargs grep -l 'INSTALLDIRS=vendor' |
> xargs perl -pi.bak -e 's/INSTALLDIRS=vendor/INSTALLDIRS=site/go'
>
> find . -type f -name '*.ebuild' |xargs grep -l 'PREFIX=/usr' | xargs
> perl -pi.bak -e 's,PREFIX=/usr,PREFIX=\${D}/usr,go'

Worst offenders were of the second sort -- those which inadvertently
installed unmanaged-by-portage files into /usr/usr

It's worse than I thought... ;-)

~ boyd


--
gentoo-osx@gentoo.org mailing list