On Thu, Aug 12, 2004 at 12:57:43AM -0400, Jack Howarth wrote:
>     I am trying to create a -mpi variant of the fftw package using the
> Type field. I have managed to create a fftw.info that will build either
> fftw/fftw-shlibs or fftw-mpi/fftw-mpi-shlibs depending on what (fftw
> or fftw-mpi) is passed to 'fink install'. However am baffled on what
> options I have to solve the problem with the Files: and Shlibs: fields.

These two variants sound like they implement the same functions (from
the caller's perspective). I know they have different filenames, which
means both could co-exist and when compiling a program one chooses
which to link and hence which will always be used at runtime.  I
wonder if those could be made with the same filename instead? That way
they'd be drop-in replacements for each other, and then the choice
would be made at *runtime* which to use. But anyway...

> I need someway to be able to wrapper the mpi based shared libs on those
> lines with (%type_raw[-mpi] = -mpi) or such, Is there any undocumented
> method for doing this or have I ran smack up against the limitations
> of current fink.

You've hit a limitation of current fink. The only thing documented for
this situation are two notes buried in the source code in Fink
CVS. Where we handle Files:

  # FIXME:
  #   * prefix conditional syntax

And where we handle Shlibs:

  # FIXME-dmacks:
  #    * Make sure each file is actually present in $destdir
  #    * Remove file if package isn't listed as a provider
  #      (needed since only some variants may provide but we don't
  #      have any condiitonal syntax in Shlibs)

Now that we have a real-world case where it would be useful, I guess
we should implement them, huh? Feel free to open a Feature Requests
tracker item assigned to me or watch the ChangeLog and/or CVS commits
for status updates.

> Below is the fftw.info spec which I came up with so far.
>
> Package: fftw%type_pkg[-mpi]
> Type: -mpi (boolean)
[...]
> SplitOff: <<
>   Package: %N-shlibs
>   Files: lib/libdfftw.*.dylib lib/libdfftw_threads.*.dylib lib/libdrfftw.*.dylib 
> lib/libdrfftw_threads.*.dylib lib/libsfftw.*.dylib lib/libsfftw_threads.*.dylib 
> lib/libsrfftw.*.dylib lib/libsrfftw_threads.*.dylib lib/libsrfftw_mpi.*.dylib 
> lib/libdrfftw_mpi.*.dylib lib/libdfftw_mpi.*.dylib lib/libsfftw_mpi.*.dylib

Files just moves files from the install dir of the main package (%I)
to that of the SplitOff (%i) by handing each item listed to /bin/mv.
Is there some shell glob that would accomplish what you want? Seems
pretty fragile. Better, what about instead of listing these optional
files in Files, having an InstallScript in this SplitOff that has so
if/else logic to move the appropriate files. That, coupled with the
above not-yet-implemented feature would mean instead of these Shlibs:

>    %p/lib/libsrfftw.2.dylib 3.0.0 %n (>= 2.1.3-12)
>    %p/lib/libsrfftw_mpi.2.dylib 3.0.0 %n (>= 2.1.3-12)

you could have:

     %p/lib/libsrfftw.2.dylib 3.0.0 fftw-shlibs (>= 2.1.3-12)
     %p/lib/libsrfftw_mpi.2.dylib 3.0.0 fftw-mpi-shlibs (>= 2.1.3-12)

and each one would only get applied to the correct variant.

dan

-- 
Daniel Macks
[EMAIL PROTECTED]
http://www.netspace.org/~dmacks



-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Fink-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to