On Thu, Feb 16, 2006, Bill Campbell wrote: > I just ran into an issue build the jpeg package on OS X where it > needs to have shared libraries enabled, which in turn requires > having a copy of ./libtool in the build directory to build the > shared libraries. > > One problem is that there is no configure.ac or configure.in in > the dorectory so aclocal and libtoolize. It worked when I copied > the %{l_prefix}/bin/libtool script into the directory, which > probably comes under the term Crude Hacks(tm). > > I would like to make the jpeg package depend on the libtool > package, but I don't really know how to define conditionals in > the top part of a SPEC file that match patterns. It's easy > enough in the scripted parts to use ``case "%{l_target t}"'''. > > I have seen some %defines that execute shell scripts, but these > seem even more of a kludge -- not to mention I would have to dig > through some ancient Caldera SRPMS to remember how they work.
Theoretically it would be possible to use something like '%if "%{l_target -t}" == "..."' inside a *.spec file but this has two problems: (1) you can compare only against a fixed string (which is not practical) and (2) it will horribly break the existing FTP service XML/RDF generator ("openpkg index") parsing tools ("openpkg build") as they do not understand those types of conditions. Currently the only possibility I see would be create an option "with_shared", depend on "libtool" under "with_shared=yes" and use a 'case "%{l_target t}"' inside the %build section in combination with a wrapping '%if "%{with_shared}" == "yes"' to activate the stuff. Not elegant, I know. But we are contraint by the RPM features and the post-processing tools. But BTW, what is the reason that we need shared libraries for JPEG under MacOS X? Ralf S. Engelschall [EMAIL PROTECTED] www.engelschall.com ______________________________________________________________________ The OpenPKG Project www.openpkg.org Developer Communication List openpkg-dev@openpkg.org