Add cross/libtool-base package (cross-libtool-base-${MACHINE_ARCH}). This is a provisional kludge to enable cross-compilation of packages using libtool. It requires manual intervention: you must build it as a target package, and then install the target package on the host with `pkg_add -m ${TARGET_ARCH}'. Index: cross/libtool-base/DESCR =================================================================== RCS file: cross/libtool-base/DESCR diff -N cross/libtool-base/DESCR --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ cross/libtool-base/DESCR 23 Apr 2013 13:29:14 -0000 @@ -0,0 +1,10 @@ +This is GNU Libtool, a generic library support script. Libtool hides +the complexity of using shared libraries behind a consistent, portable +interface. + +To use libtool, add the new generic library building commands to your +Makefile, Makefile.in, or Makefile.am. + +This package includes the libtool script and support files. + +This is the cross-compilation version of libtool. Index: cross/libtool-base/Makefile =================================================================== RCS file: cross/libtool-base/Makefile diff -N cross/libtool-base/Makefile --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ cross/libtool-base/Makefile 23 Apr 2013 13:29:14 -0000 @@ -0,0 +1,94 @@ +# copypasta from devel/libtool-base/Makefile, tweaked slightly + +# $NetBSD: Makefile,v 1.98 2012/07/26 12:04:04 bsiegert Exp $ + +########################################################################### +########################################################################### +# +# HEADS UP! DO NOT CHANGE THE VERSION OR PKGREVISION WITHOUT READING THIS: +# +########################################################################### +########################################################################### +# +# This package is maintained specially in order to preserve pkgsrc +# specific OS changes that diverge from the "out of the box" libtool. +# In order to keep this package in a maintainable condition, the .m4 files +# must be manipulated in order to generate the patch-* files. +# +# See devel/libtool/patches/manual.README for instructions on how to make +# these patch files properly; otherwise your changes WILL be lost on the +# next libtool update. +# +# DO NOT MAKE CHANGES TO patch-ab OR patch-ad WITHOUT FOLLOWING THESE +# INSTRUCTIONS. There are no exceptions to this rule. +# +########################################################################### +########################################################################### + +.include "../../devel/libtool/Makefile.common" + +# [TRC 20130325: Tweak for cross-build.] +PKGNAME= ${DISTNAME:S/^libtool-/cross-libtool-base-${MACHINE_ARCH}-/} +SVR4_PKGNAME= ltoob + +COMMENT= Generic shared library support script (the script itself) + +CONFLICTS+= libtool<=1.3.5nb11 + +# [TRC 20130325: Set for cross-build.] +USE_CROSSBASE= yes + +TEST_TARGET= check + +OVERRIDE_DIRDEPTH.install-sh= 1 + +.if ${OPSYS} == "AIX" + +# always build libraries and executables that use the runtime linker. +# in addition, disable libtool locking, as the test is broken on AIX, +# and results in files being locked indefinitely. +LDFLAGS+= -Wl,-brtl +CONFIGURE_ARGS+= --disable-libtool-lock + +.elif ${OPSYS} == "IRIX" + +# The MIPSpro compiler doesn't support -c with -o, but the locking +# workaround is itself broken. Disable it unconditionally. +CONFIGURE_ARGS+= --disable-libtool-lock + +.elif ${OPSYS} == "SunOS" +CFLAGS+= ${_COMPILER_ABI_FLAG.${ABI}} +.endif + +# We are going to want libtool to find the same versions of the C, C++, +# and Fortran compilers. +# +USE_LANGUAGES= c c++ fortran77 +CONFIGURE_ARGS+= --disable-ltdl-install + +USE_TOOLS+= echo + +.PHONY: fix-libtool +fix-libtool: + cd ${WRKSRC}; for f in libtool; do \ + ${SED} -e "s,-L${BUILDLINK_DIR}/lib,," $$f > $$f.new; \ + if [ -x $$f ]; then ${CHMOD} +x $$f.new; fi; \ + ${MV} -f $$f.new $$f; \ + done + +post-build: fix-libtool + +# [TRC 20130325: Hack for cross-build.] +FILESDIR= ../../devel/libtool-base/files +post-build: + @${SED} -e "s|@PREFIX@|"${PREFIX:Q}"|g" \ + -e "s|@SH@|"${SH:Q}"|g" \ + ${FILESDIR}/shlibtool.in > ${WRKSRC}/shlibtool + +post-install: + ${INSTALL_SCRIPT} ${WRKSRC}/shlibtool ${DESTDIR}${PREFIX}/bin/shlibtool + +BUILDLINK_DEPMETHOD.dlcompat= build + +.include "../../mk/dlopen.buildlink3.mk" +.include "../../mk/bsd.pkg.mk" Index: cross/libtool-base/PLIST =================================================================== RCS file: cross/libtool-base/PLIST diff -N cross/libtool-base/PLIST --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ cross/libtool-base/PLIST 23 Apr 2013 13:29:14 -0000 @@ -0,0 +1,55 @@ +@comment $NetBSD$ +bin/libtool +bin/libtoolize +bin/shlibtool +man/man1/libtool.1 +man/man1/libtoolize.1 +share/aclocal/argz.m4 +share/aclocal/libtool.m4 +share/aclocal/ltdl.m4 +share/aclocal/ltoptions.m4 +share/aclocal/ltsugar.m4 +share/aclocal/ltversion.m4 +share/aclocal/lt~obsolete.m4 +share/libtool/config/compile +share/libtool/config/config.guess +share/libtool/config/config.sub +share/libtool/config/depcomp +share/libtool/config/install-sh +share/libtool/config/ltmain.sh +share/libtool/config/missing +share/libtool/libltdl/COPYING.LIB +share/libtool/libltdl/Makefile.am +share/libtool/libltdl/Makefile.in +share/libtool/libltdl/Makefile.inc +share/libtool/libltdl/README +share/libtool/libltdl/aclocal.m4 +share/libtool/libltdl/argz.c +share/libtool/libltdl/argz_.h +share/libtool/libltdl/config-h.in +share/libtool/libltdl/configure +share/libtool/libltdl/configure.ac +share/libtool/libltdl/libltdl/lt__alloc.h +share/libtool/libltdl/libltdl/lt__dirent.h +share/libtool/libltdl/libltdl/lt__glibc.h +share/libtool/libltdl/libltdl/lt__private.h +share/libtool/libltdl/libltdl/lt__strl.h +share/libtool/libltdl/libltdl/lt_dlloader.h +share/libtool/libltdl/libltdl/lt_error.h +share/libtool/libltdl/libltdl/lt_system.h +share/libtool/libltdl/libltdl/slist.h +share/libtool/libltdl/loaders/dld_link.c +share/libtool/libltdl/loaders/dlopen.c +share/libtool/libltdl/loaders/dyld.c +share/libtool/libltdl/loaders/load_add_on.c +share/libtool/libltdl/loaders/loadlibrary.c +share/libtool/libltdl/loaders/preopen.c +share/libtool/libltdl/loaders/shl_load.c +share/libtool/libltdl/lt__alloc.c +share/libtool/libltdl/lt__dirent.c +share/libtool/libltdl/lt__strl.c +share/libtool/libltdl/lt_dlloader.c +share/libtool/libltdl/lt_error.c +share/libtool/libltdl/ltdl.c +share/libtool/libltdl/ltdl.h +share/libtool/libltdl/slist.c Index: devel/libtool/Makefile.common =================================================================== RCS file: /cvsroot/pkgsrc/devel/libtool/Makefile.common,v retrieving revision 1.79 diff -p -u -r1.79 Makefile.common --- devel/libtool/Makefile.common 12 Apr 2013 13:44:08 -0000 1.79 +++ devel/libtool/Makefile.common 23 Apr 2013 13:29:15 -0000 @@ -41,8 +41,8 @@ PKG_INSTALLATION_TYPES= overwrite pkgvie GNU_CONFIGURE= yes -DISTINFO_FILE= ${.CURDIR}/../libtool/distinfo -PATCHDIR= ${.CURDIR}/../libtool/patches +DISTINFO_FILE= ${.CURDIR}/../../devel/libtool/distinfo +PATCHDIR= ${.CURDIR}/../../devel/libtool/patches AUTOMAKE_OVERRIDE= NO @@ -60,12 +60,15 @@ CONFIGURE_ENV+= lt_cv_path_LD=${LD:Q} CONFIGURE_ENV+= lt_cv_path_SED=${SED:Q} # The configure script doesn't seem to be working out the need for -p -# or -B, so tell it +# or -B, so tell it. For cross-compilation, force it to use the normal +# NM and not the one in ${BUILDLINK_DIR}. # .if ${OPSYS} == "SunOS" || ${OPSYS} == "HPUX" CONFIGURE_ENV+= lt_cv_path_NM="nm -p" .elif ${OPSYS} == "IRIX" || ${OPSYS} == "OSF1" CONFIGURE_ENV+= lt_cv_path_NM="nm -B" +.else +CONFIGURE_ENV+= lt_cv_path_NM=${NM:Q} .endif CONFIGURE_ENV+= RANLIB=${RANLIB:Q}