Le 11 sept. 07 à 22:19, Vincent Beffara a écrit :


Hello,

Hi,

I recently submitted glob2 version 0.8.23, and it was accepted in unstable.
Now a new mainstream version is available, which is 0.9.1.
The build system was changed in order to use scons.

The new package builds fine, and it works when I build it outside of fink. Now using fink, after building succesfully, I get an error when I try to
launch glob2, as it seems it does not find a file it is looking for.

My question is about the information I need to give when building the
package. I have attached the info file, and my problem is that I am not sure it is right to give options BINDIR=%i/bin and INSTALLDIR=%i/ share, as once the package is installed, glob2 will have to look in %p/ share, but may
be still looking in %i/share...

Yep, that's a typical problem, and the reason for the whole $DESTDIR
part of auto{make,conf}. The basic thing that works with make, i.e.
"make prefix=/sw ; make install prefix=/sw/src/root-glob2/sw" or
whatever the directory should be, doesn't work because SCons is too
smart, and will recompile at that point.

Looking at the SConstruct, you can see 2 relevant variables :

- INSTALLDIR : used at install time, so you want this to be
  /sw/src/root/whatever/sw/share, i.e. %i/share

- PACKAGE_DATA_DIR : this is where glob2 will look for files at runtime,
  so you want it to be /sw/share, i.e. %p/share

And the SConstruct file allows you to do just that: the default value of
PACKAGE_DATA_DIR is $INSTALL, which makes sense for a simple install,
but you can override it on the command-line, the same way you do
INSTALL. In other words:

scons INSTALLDIR=%i/share BINDIR=%i/bin PACKAGE_DATA_DIR=%p/ share

though you might have to move the relevant line near the one about

Thanks for the suggestion, but I failed to make it work.

I added the following lines in Sconstruct :

    opts.Add("DATA_DIR", "Data Directory", "/sw/share")

configfile.add("PACKAGE_DATA_DIR", "data directory", "\"" + env ["DATA_DIR"] + "\"")

and modified in the info file CompileScript :

scons CXXFLAGS="-I%p/include -I%p/include/boost-1_34_1 -I/usr/X11R6/ include " LINKFLAGS="-L%p/lib" osx="true" BINDIR=%i/bin INSTALLDIR=%i/ share DATA_DIR=%p/share

but there is actually no effect.

I also agree that commenting "exit 1" is not really clean, but as I do not understand why some .h are found and not the others, I will stay with this for now. I attach the new .info and .patch, and still hope they are a good starting point for someone.

Alexandre

 

Attachment: glob2-0.9.1.info
Description: Binary data

Attachment: glob2.patch
Description: Binary data


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to