diff options
-rw-r--r-- | cross/libtool-base/DESCR | 10 | ||||
-rw-r--r-- | cross/libtool-base/Makefile | 99 |
2 files changed, 109 insertions, 0 deletions
diff --git a/cross/libtool-base/DESCR b/cross/libtool-base/DESCR new file mode 100644 index 00000000000..81aa2fd4301 --- /dev/null +++ b/cross/libtool-base/DESCR @@ -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. diff --git a/cross/libtool-base/Makefile b/cross/libtool-base/Makefile new file mode 100644 index 00000000000..e7f127ab15b --- /dev/null +++ b/cross/libtool-base/Makefile @@ -0,0 +1,99 @@ +# $NetBSD: Makefile,v 1.1 2013/05/09 23:32:02 riastradh Exp $ + +# XXX This is kludgerific copypasta of devel/libtool-base/Makefile for +# cross-compilation. Please make it go away! + +########################################################################### +########################################################################### +# +# 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" + +# XXX Tweaked for cross-compilation. +#PKGNAME= ${DISTNAME:S/-/-base-/} +PKGNAME= ${DISTNAME:S/^libtool-/cross-libtool-base-${MACHINE_ARCH}-/} +PKGREVISION= 1 +SVR4_PKGNAME= ltoob + +COMMENT= Generic shared library support script (the script itself) + +CONFLICTS+= libtool<=1.3.5nb11 + +# XXX Added for cross-compilation. +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++ +CONFIGURE_ARGS+= --disable-ltdl-install + +USE_TOOLS+= echo + +# XXX Added for cross-compilation. +PLIST_SRC= ../../devel/libtool-base/PLIST +FILESDIR= ../../devel/libtool-base/files + +.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 + +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" |