[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: The broken libjpeg-6b is in RH 5.1

jdassen@wi.leidenuniv.nl wrote:
>   In Debian, packages are built with inter-library dependencies (mostly
>   by changing configure.in and regenerating configure).

With lesstif, I found a way to do this without touching configure.in.
I have this code in debian/rules, right after the call to configure:

# libtool -rpath workaround based on a suggestion by Yann Dirson
# <dirson@debian.org>
# It is supposed to be inserted in configure.in, but I didn't want
# to re-run autoconf (since that bloats the Debian diff unnecessarily),
# so I just patch libtool after running configure.  -- Richard Braakman
# <dark@xs4all.nl>
# The version of libtool included with LessTif unfortunately insists on
# linking with -rpath, i.e. hardwiring locations. This is not desirable.
# The dummy define is improbable enough not to conflict with anything; it is
# just here to fool libtool by making it believe it gave some useful info to
# gcc.
	sed < libtool > libtool-2 \
	's/^hardcode_libdir_flag_spec.*$$/hardcode_libdir_flag_spec=" -D__LIBTOOL_IS_A_FOOL__ "/'
	mv libtool-2 libtool
	chmod 755 libtool
# More hackery: this will also patch the generated libtool to explicitly
# link libraries against the libraries they depend on.  (particularly libc)
	sed < libtool > libtool-3 '/^archive_cmds="/s/"$$/ \\$$deplibs"/'
	mv libtool-3 libtool
	chmod 755 libtool

This works because lesstif's configure script does nothing with
libtool except generate it.  It addresses both problems (rpath and
inter-library dependencies).  It could be done with one sed invocation,
but I figured it was cleaner to separate the two patches.

I plan to update Lintian's "libtool-rpath-workaround.txt" file to
describe this approach.

Richard Braakman

To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Reply to: