Subject: cyrus-sasl2 vs. LTCONFIG_OVERRIDE
To: None <tech-pkg@netbsd.org>
From: Stephen Degler <stephen@degler.net>
List: tech-pkg
Date: 11/11/2002 23:40:25
This is a multi-part message in MIME format.
--------------060508090405080704070401
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Hello,
I've been working on the cyrus-sasl2 package, because it doesn't support
plugins as it stands (pkg/19001). One of the problems I encountered occurs
because the configure script expects that ltconfig actually be run and update
values in config.cache. So LTCONFIG_OVERRIDE breaks this package. In
pkg/19001 I provided some patches with crude work arounds, but clearly they
are not suitable for inclusion.
Playing around, I've tried another approach that reimplements
LTCONFIG_OVERRIDE in bsd.pkg.mk. It creates a ltconfig wrapper that generates
a libtool compatable with the one normally used. Configure is happy because
it can depend on the side effects of ltconfig, and the libtool generated is
compatable (virtually identical) with what would normally be invoked.
Is it likely that other software packages depend on side effects like this?
Does this sound like a reasonable solution for the general case?
The down side is that this may create a dependency between libtool and bsd.pkg.mk.
Thanks,
skd
--------------060508090405080704070401
Content-Type: text/plain;
name="bsd.pkg.mk.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="bsd.pkg.mk.patch"
--- bsd.pkg.mk.orig Sun Nov 10 18:43:01 2002
+++ bsd.pkg.mk Mon Nov 11 23:25:30 2002
@@ -1832,8 +1832,42 @@
${_PKG_SILENT}${_PKG_DEBUG} \
if [ -f ${ltconfig} ]; then \
${RM} -f ${ltconfig}; \
- ${ECHO} "${RM} -f libtool; ${LN} -s ${PKGLIBTOOL} libtool" \
- > ${ltconfig}; \
+ ${ECHO} 'for arg in $$*' >> ${ltconfig}; \
+ ${ECHO} 'do' >> ${ltconfig}; \
+ ${ECHO} 'case $$arg in \
+ --no-reexec) ;; \
+ --srcdir=*) ;; \
+ *ltmain.sh) \
+ arglist="$$arglist \
+ ${LOCALBASE}/share/libtool/ltmain.sh" ;; \
+ *) arglist="$$arglist $$arg" ;; esac \
+ done; ' >> ${ltconfig}; \
+ ${ECHO} -n 'AR="ar" AR_FLAGS="" LTCC="cc" CC="cc" \
+ CFLAGS="-O2" CPPFLAGS=" " \
+ MAGIC_CMD="" LD="/usr/bin/ld" LDFLAGS="" \
+ LIBS="" LN_S="ln -s" NM="/usr/bin/nm -B" \
+ RANLIB="ranlib" STRIP="strip" \
+ AS="" DLLTOOL="" OBJDUMP="" \
+ objext="" exeext="" reload_flag="-r" \
+ deplibs_check_method="match_pattern /lib[^/]+(\\.so|_pic\\.a)\$$" \
+ file_magic_cmd="" ' >> ${ltconfig}; \
+ ${ECHO} "${LOCALBASE}/share/libtool/ltconfig \
+ --srcdir=${LOCALBASE}/share/libtool \
+ --enable-dlopen \$$arglist" >> ${ltconfig}; \
+ ${ECHO} -n 'AR="ar" AR_FLAGS="" LTCC="cc" CC="c++" \
+ CFLAGS="-O2" CPPFLAGS=" " \
+ MAGIC_CMD="" LD="/usr/bin/ld" LDFLAGS="" \
+ LIBS="" LN_S="ln -s" NM="/usr/bin/nm -B" \
+ RANLIB="ranlib" STRIP="strip" \
+ AS="" DLLTOOL="" OBJDUMP="" \
+ objext="" exeext="" reload_flag="-r" \
+ deplibs_check_method="match_pattern /lib[^/]+(\\.so|_pic\\.a)\$$" \
+ file_magic_cmd="" ' >> ${ltconfig}; \
+ ${ECHO} "${LOCALBASE}/share/libtool/ltconfig \
+ --srcdir=${LOCALBASE}/share/libtool \
+ --enable-dlopen --add-tag=CXX \
+ ${LOCALBASE}/share/libtool/ltcf-cxx.sh \
+ $$arglist" >> ${ltconfig}; \
${CHMOD} +x ${ltconfig}; \
fi
. endfor
--------------060508090405080704070401--