[ Not subscribed to deity@l.d.o, please Cc: me on replies, in theory the ] [ M-F-T header should be right... ] As discussed w/ doogie on IRC, apt-ftparchive uses the ftw() function, which is provided by libftw as a workaround on some non-glibc platforms. The following patch adjusts the build system and debian files to cope with this; the patch as it stands links against libftw statically, but at the last moment I realized that this may not, actually, be required, since the only resulting package that would gain a new Depends from dynamic linking is apt-utils (which is Priority: optional) - and the origional argument for static linking was to keep apt from Depending on an optional library, or inflating the priority of libftw. Changing '--with-ftw=static' to simply '--with-ftw' should, as far as I know, cause a dynamic link, unless I screwed up the configure.in changes. Per doogie, I'm sending it as static-by-default, for further comments. -- Joel Baker <fenton@debian.org>
diff -urN apt.orig/buildlib/environment.mak.in apt/buildlib/environment.mak.in --- apt.orig/buildlib/environment.mak.in 2003-02-09 21:31:08.000000000 +0000 +++ apt/buildlib/environment.mak.in 2003-02-24 04:14:30.000000000 +0000 @@ -47,6 +47,7 @@ PYTHONINCLUDE = @PYTHONINCLUDE@ DB2LIB = @DB2LIB@ INTLLIBS = @INTLLIBS@ +FTWLIB = @FTWLIB@ # Shim Headerfile control HAVE_C9X = @HAVE_C9X@ diff -urN apt.orig/configure.in apt/configure.in --- apt.orig/configure.in 2003-02-02 08:57:23.000000000 +0000 +++ apt/configure.in 2003-02-24 04:37:30.000000000 +0000 @@ -179,4 +179,19 @@ AC_SUBST(USE_NLS) AC_PATH_PROG(BASH, bash) +dnl Check for needing libftw +FTWLIB= +AC_ARG_WITH(ftw, +[ --with-ftw use libftw for the ftw function], + [use_ftw=$withval], + [use_ftw=no]) +if test "$use_ftw" != "no" ; then + if test "$use_ftw" = "static" ; then + FTWLIB="-Wl,-Bstatic -lftw -Wl,-Bdynamic" + else + FTWLIB=-lftw + fi +fi +AC_SUBST(FTWLIB) + AC_OUTPUT(environment.mak:buildlib/environment.mak.in makefile:buildlib/makefile.in,make -s dirs) diff -urN apt.orig/debian/control apt/debian/control --- apt.orig/debian/control 2003-02-03 03:10:48.000000000 +0000 +++ apt/debian/control 2003-02-24 04:51:43.000000000 +0000 @@ -4,7 +4,7 @@ Maintainer: APT Development Team <deity@lists.debian.org> Uploaders: Jason Gunthorpe <jgg@debian.org>, Adam Heath <doogie@debian.org> Standards-Version: 3.5.8.0 -Build-Depends: debhelper (>= 2), docbook-utils (>= 0.6.12-1), libdb2-dev, gettext (>= 0.11.5) +Build-Depends: debhelper (>= 2), docbook-utils (>= 0.6.12-1), libdb2-dev, libftw-dev [netbsd-i386], gettext (>= 0.11.5) Package: apt Architecture: any diff -urN apt.orig/debian/rules apt/debian/rules --- apt.orig/debian/rules 2003-02-02 22:00:24.000000000 +0000 +++ apt/debian/rules 2003-02-24 04:14:18.000000000 +0000 @@ -26,6 +26,11 @@ confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) endif +# This is to enable libftw on architectures that need it +ifeq ($(DEB_HOST_GNU_SYSTEM),netbsdelf-gnu) + confflags += --with-ftw=static +endif + # See below -include build/environment.mak diff -urN apt.orig/ftparchive/makefile apt/ftparchive/makefile --- apt.orig/ftparchive/makefile 2001-02-20 07:03:18.000000000 +0000 +++ apt/ftparchive/makefile 2003-02-24 04:43:35.000000000 +0000 @@ -9,6 +9,11 @@ ifdef DB2LIB PROGRAM=apt-ftparchive SLIBS = -lapt-pkg -lapt-inst $(DB2LIB) + +ifdef FTWLIB +SLIBS += $(FTWLIB) +endif # ifdef FTWLIB + LIB_MAKES = apt-pkg/makefile apt-inst/makefile SOURCE = apt-ftparchive.cc cachedb.cc writer.cc contents.cc override.cc \ multicompress.cc
Attachment:
pgpeMawH8nA8z.pgp
Description: PGP signature