On 11/9/05, Sebastien Maret <[EMAIL PROTECTED]> wrote:
> I have a script that does that in my experimental branch
> (experimental/bmaret/finkdep). It uses otool to find the libraries on
> which depends the program or the library, and search for the packages
> that provides these libraries by looking at the .list files in
> %s/var/lib/dpkg/info/. It outputs the Depends and BuildDepends in Info
> format.


Very, very nice! You should definitely publicize this tool. Perhaps on
the wiki we can start a list of unofficial scripts like this that are
useful in the packaging process.

After trying it on some random inputs, I've found a couple error conditions:

1.
% finkdep.py /sw/bin/esd
Traceback (most recent call last):
  File "/Users/drbacher/bin/finkdep.py", line 210, in ?
    linkShlib = getLinkShlib(shlib)
  File "/Users/drbacher/bin/finkdep.py", line 79, in getLinkShlib
      if (os.path.islink(shlibDirName + splitBaseName[0] + '.' + shlibExt)):
IndexError: list index out of range

% file /sw/bin/esd
/sw/bin/esd: Mach-O executable ppc

% otool -L /sw/bin/esd
/sw/bin/esd:
        /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio
(compatibility version 1.0.0, current version 1.0.0)
   /usr/lib/libwrap.7.dylib (compatibility version 7.0.0, current version 7.6.0)
   /sw/lib/libesd.0.dylib (compatibility version 3.0.0, current version 3.35.0)
   /sw/lib/libaudiofile.0.dylib (compatibility version 1.0.0, current
version 1.2.0)
   /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 88.2.1)
   /usr/lib/libmx.A.dylib (compatibility version 1.0.0, current version 92.0.0)

2.
% finkdep.py /sw/bin/gpg
finkdep: Could not find the symbolic link pointing on /sw/lib/libusb-0.1.4.dylib
Depends: <<
  bzip2-shlibs, gettext, libiconv, libusb-shlibs,
  readline5-shlibs
<<
BuildDepends: <<
  bzip2-dev, gettext-dev, libiconv-dev, readline5
<<

It seems to generate the right dependencies, but I don't understand
the error message .. the libusb symlinks are consistent.

% ls -l /sw/lib/libusb*
-rwxr-xr-x   1 root  admin  46212 May 25 19:38 /sw/lib/libusb-0.1.4.4.0.dylib*
lrwxr-xr-x   1 root  admin     22 Aug 18 22:15
/sw/lib/libusb-0.1.4.dylib@ -> libusb-0.1.4.4.0.dylib
-rw-r--r--   1 root  admin  66288 May 25 19:38 /sw/lib/libusb.a
lrwxr-xr-x   1 root  admin     22 Aug 18 22:15 /sw/lib/libusb.dylib@
-> libusb-0.1.4.4.0.dylib
-rwxr-xr-x   1 root  admin    812 May 25 19:38 /sw/lib/libusb.la*

Cheers!
-dave
--
David Bacher  _..  ._  ..._  .
[EMAIL PROTECTED]


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to