dk / Prima

prima.eu.org
Other
106 stars 27 forks source link

Question on Prima::Config #69

Closed jddurand closed 1 year ago

jddurand commented 1 year ago

During the install, Prima seems to manipulate Prima/Config.pm that will then contain explicit paths related to the current perl, I wonder if this will cause a problem in case we want the perl install to be relocatable. Cases I have identified are:

/C/cl-perl-5.37.6-32bit/site/lib/Prima/Config.pm:my $bin = q(C:\cl-perl-5.37.6-32bit\bin);
/C/cl-perl-5.37.6-32bit/site/lib/Prima/Config.pm:       incpaths              => [ "$lib/Prima/CORE","$lib/Prima/CORE/generic","C:/cl-perl-5.37.6-32bit/c/lib/pkgconfig/../../include/fribidi","C:/cl-perl-5.37.6-32bit/c/lib/pkgconfig/../../include","C:/cl-perl-5.37.6-32bit/c/include" ],
/C/cl-perl-5.37.6-32bit/site/lib/Prima/Config.pm:       ldpaths               => ["C:/cl-perl-5.37.6-32bit/c/lib/pkgconfig/../../lib","C:/cl-perl-5.37.6-32bit/c/lib","$lib/auto/Prima"],
/C/cl-perl-5.37.6-32bit/site/lib/Prima/Config.pm:       inc                   => "-I$lib/Prima/CORE -I$lib/Prima/CORE/generic -IC:/cl-perl-5.37.6-32bit/c/lib/pkgconfig/../../include/fribidi -IC:/cl-perl-5.37.6-32bit/c/lib/pkgconfig/../../include -IC:/cl-perl-5.37.6-32bit/c/include",

The first one, IMHO, may use %Config or another hack like it is done for $lib ? The others, I guess, are side effects of compilation flags and it is probably harmless to find them here - I can manage that myself in my scripts if needed.

I would be glad if you can confirm the impact of Config.pm v.s. perl relocatibility.

Thanks.

dk commented 1 year ago

Config.pm is needed for prima-depended modules to build correctly, and currently there are just few - Prima::IPA, Prima::OpenGL, Prima::Cairo and possibly a couple more. I agree that there is a concern if one relocates perl after compiling Prima but before compiling the extensions, but I wouldn't bother about it because that situation would be easier to solve just by compiling them all at once. Generally Config.pm received very little care because it is good enough to just work, but you are welcome to make a go on it. The problem is though that it needs to be tested on the usual suspects: strawberry, activestate, linux, cygwin, mac, and freebsd.

jddurand commented 1 year ago

Ok understood - thanks.