OK, found out why the validator didn't catch the earlier problem. The install_name of the library isn't versioned:
$ otool -L /sw64/lib/libclxclient.3.6.1.dylib
/sw64/lib/libclxclient.3.6.1.dylib:
/sw64/lib/libclxclient.dylib (compatibility version 3.0.0, current version 3.6.1)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.10)
/usr/X11/lib/libXft.2.dylib (compatibility version 4.0.0, current version 4.13.0)
/usr/X11/lib/libX11.6.dylib (compatibility version 9.0.0, current version 9.0.0)
/sw64/lib/freetype219/lib/libfreetype.6.dylib (compatibility version 13.0.0, current version 13.2.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
I'm assuming that you _wanted_ %p/lib/libclxclient.3.dylib to be the install_name here instead.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
We were talking about this on IRC, and it's probably best that the updates get made into a new package, e.g. called clxclient3. You could then have clxclient3-shlibs Replace clxclient-shlibs, and clxclient3 Conflict and Replace clxclient3. We'd go ahead and get rid of the original clxclient at the same time.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This worked for me on 10.7 with the following changes:
Bumped to clxclient 3.9.0
I changed the last perl pie to switch "unknown" to "x86_64" since
PPC is no longer a Fink supported arch
The change makes sure that it doesn't try to install into %p/lib64
Changed the dependencies on clthreads(-shlibs) to clthreads2(-shlibs). clthreads is currently not present in the 10.7 tree. A minor change in the clthreads.info was needed to get clthreads to build the dylib properly (give it a properly versioned install_name), and that fix was best served by renaming the package as clthreads2 in the 10.7 tree.
Unset CPPFLAGS so that -I%p/include wasn't added to the very front of the compiler command. This prevents the build process from using its installed headers vs the build headers.
Removed "-undefined suppress" from the linker to make sure everything was being linked properly.
This showed that "-lclthreads" had to be added to LDFLAGS so it would link with the lcthreads library (otherwise it would fail with missing symbols).
Removed the Conflicts from clxclient3-shlibs. For the shlibs SplitOff, you only want to Replace the old package.
Fixed the Depends fields.
My .info file is attached. I've also attached the clthreads2.info file since that is not yet in the 10.7 tree.
The shlibs package needs DocFiles--at least the COPYING file which contains the license.
I'm not sure why the validator didn't catch it, but you aren't supposed to have unversioned .dylibs in a -shlibs package:
Fiona:~ hansen$ dpkg -c /sw/fink/debs/clxclient-shlibs_3.6.1-1_darwin-i386.deb
drwxr-xr-x root/admin 0 2011-05-16 21:28 ./
drwxr-xr-x root/admin 0 2011-05-16 21:28 ./sw/
drwxr-xr-x root/admin 0 2011-05-16 21:28 ./sw/lib/
-rwxr-xr-x root/admin 96596 2011-05-16 21:28 ./sw/lib/libclxclient.3.6.1.dylib
drwxr-xr-x root/admin 0 2011-05-16 21:28 ./sw/share/
drwxr-xr-x root/admin 0 2011-05-16 21:28 ./sw/share/doc/
drwxr-xr-x root/admin 0 2011-05-16 21:28 ./sw/share/doc/clxclient-shlibs/
-rw-r--r-- root/admin 40 2011-05-16 21:28 ./sw/share/doc/clxclient-shlibs/AUTHORS
-rw-r--r-- root/admin 26436 2011-05-16 21:28 ./sw/share/doc/clxclient-shlibs/COPYING
lrwxr-xr-x root/admin 0 2011-05-16 21:28 ./sw/lib/libclxclient.3.dylib -> libclxclient.3.6.1.dylib
Fiona:~ hansen$ dpkg -c /sw/fink/debs/clxclient-shlibs_3.6.1-3_darwin-i386.deb
drwxr-xr-x root/admin 0 2011-05-16 21:49 ./
drwxr-xr-x root/admin 0 2011-05-16 21:49 ./sw/
drwxr-xr-x root/admin 0 2011-05-16 21:49 ./sw/lib/
-rwxr-xr-x root/admin 96596 2011-05-16 21:49 ./sw/lib/libclxclient.3.6.1.dylib
lrwxr-xr-x root/admin 0 2011-05-16 21:49 ./sw/lib/libclxclient.3.dylib -> libclxclient.3.6.1.dylib
lrwxr-xr-x root/admin 0 2011-05-16 21:49 ./sw/lib/libclxclient.dylib -> libclxclient.3.6.1.dylib
And you definitely don't want an unversioned dylib in the Shlibs field.
uploaded a new version to address your comments
OK, found out why the validator didn't catch the earlier problem. The install_name of the library isn't versioned:
$ otool -L /sw64/lib/libclxclient.3.6.1.dylib
/sw64/lib/libclxclient.3.6.1.dylib:
/sw64/lib/libclxclient.dylib (compatibility version 3.0.0, current version 3.6.1)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.10)
/usr/X11/lib/libXft.2.dylib (compatibility version 4.0.0, current version 4.13.0)
/usr/X11/lib/libX11.6.dylib (compatibility version 9.0.0, current version 9.0.0)
/sw64/lib/freetype219/lib/libfreetype.6.dylib (compatibility version 13.0.0, current version 13.2.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
I'm assuming that you _wanted_ %p/lib/libclxclient.3.dylib to be the install_name here instead.
Great! You fixed that.
Some relatively minor things:
1) You need a GCC: 4.0 field, by policy, since the package uses g++
2) The package needs a BuildDepend on xft2-dev and the -shlibs needs to Depend: xft2-shlibs
One major thing:
Since you're changing the install_name of the library, by the shared library policy that change normally entails making a new package.
However, given that nothing in Fink currently uses this, I think we can let that slide.
We were talking about this on IRC, and it's probably best that the updates get made into a new package, e.g. called clxclient3. You could then have clxclient3-shlibs Replace clxclient-shlibs, and clxclient3 Conflict and Replace clxclient3. We'd go ahead and get rid of the original clxclient at the same time.
here's the clxclient3.info
This worked for me on 10.7 with the following changes:
-I%p/include
wasn't added to the very front of the compiler command. This prevents the build process from using its installed headers vs the build headers."-undefined suppress"
from the linker to make sure everything was being linked properly."-lclthreads"
had to be added to LDFLAGS so it would link with the lcthreads library (otherwise it would fail with missing symbols).Conflicts
from clxclient3-shlibs. For the shlibs SplitOff, you only want to Replace the old package.My .info file is attached. I've also attached the clthreads2.info file since that is not yet in the 10.7 tree.