diff options
Diffstat (limited to 'devel/zlib')
-rw-r--r-- | devel/zlib/Makefile | 8 | ||||
-rw-r--r-- | devel/zlib/buildlink.mk | 2 | ||||
-rw-r--r-- | devel/zlib/buildlink2.mk | 59 |
3 files changed, 65 insertions, 4 deletions
diff --git a/devel/zlib/Makefile b/devel/zlib/Makefile index 36f003ab084..74a15eb8e65 100644 --- a/devel/zlib/Makefile +++ b/devel/zlib/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.13 2002/08/07 13:25:36 wiz Exp $ +# $NetBSD: Makefile,v 1.14 2002/08/25 18:38:51 jlam Exp $ DISTNAME= zlib-1.1.4 CATEGORIES= devel @@ -13,13 +13,15 @@ COMMENT= General purpose data compression library BUILD_DEPENDS+= libtool-base>=${LIBTOOL_VERSION}:../../devel/libtool-base +USE_BUILDLINK2= # defined NOT_FOR_PLATFORM= NetBSD-1.[4-9]*-* # in base NetBSD system # To avoid circular dependences we must not use "USE_LIBTOOL" but # depend on the "libtool-base" package manually. +# LIBTOOL= ${LOCALBASE}/bin/libtool -CONFIGURE_ENV+= LIBTOOL="${LIBTOOL} ${LIBTOOL_FLAGS}" -MAKE_ENV+= LIBTOOL="${LIBTOOL} ${LIBTOOL_FLAGS}" +CONFIGURE_ENV+= LIBTOOL="${BUILDLINK_LIBTOOL} ${LIBTOOL_FLAGS}" +MAKE_ENV+= LIBTOOL="${BUILDLINK_LIBTOOL} ${LIBTOOL_FLAGS}" MAKEFILE= lt.mk post-extract: diff --git a/devel/zlib/buildlink.mk b/devel/zlib/buildlink.mk index 3c8a1a08588..11fb9328b50 100644 --- a/devel/zlib/buildlink.mk +++ b/devel/zlib/buildlink.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink.mk,v 1.9 2002/08/07 13:25:37 wiz Exp $ +# $NetBSD: buildlink.mk,v 1.10 2002/08/25 18:38:51 jlam Exp $ # # This Makefile fragment is included by packages that use zlib. # diff --git a/devel/zlib/buildlink2.mk b/devel/zlib/buildlink2.mk new file mode 100644 index 00000000000..1f952241cbe --- /dev/null +++ b/devel/zlib/buildlink2.mk @@ -0,0 +1,59 @@ +# $NetBSD: buildlink2.mk,v 1.2 2002/08/25 18:38:52 jlam Exp $ + +.if !defined(ZLIB_BUILDLINK2_MK) +ZLIB_BUILDLINK2_MK= # defined + +.include "../../mk/bsd.prefs.mk" + +BUILDLINK_DEPENDS.zlib?= zlib>=1.1.3 +BUILDLINK_PKGSRCDIR.zlib?= ../../devel/zlib + +.if defined(USE_ZLIB) +_NEED_ZLIB= YES +.else +. if exists(/usr/include/zlib.h) +_NEED_ZLIB= NO +. else +_NEED_ZLIB= YES +. endif +# +# Solaris has a broken (for the purposes of pkgsrc) version of zlib. +# +_INCOMPAT_ZLIB= SunOS-*-* + +# +# Some NetBSD versions shipped with versions lower than 1.1.3. +# +_INCOMPAT_ZLIB+= NetBSD-0.*-* NetBSD-1.[012]*-* +_INCOMPAT_ZLIB+= NetBSD-1.3-* NetBSD-1.3.*-* NetBSD-1.3[A-H]-* + +INCOMPAT_ZLIB?= # empty +. for _pattern_ in ${_INCOMPAT_ZLIB} ${INCOMPAT_ZLIB} +. if !empty(MACHINE_PLATFORM:M${_pattern_}) +_NEED_ZLIB= YES +. endif +. endfor +.endif + +.if ${_NEED_ZLIB} == "YES" +BUILDLINK_PACKAGES+= zlib +EVAL_PREFIX+= BUILDLINK_PREFIX.zlib=zlib +BUILDLINK_PREFIX.zlib_DEFAULT= ${LOCALBASE} +.else +BUILDLINK_PREFIX.zlib= /usr +.endif + +BUILDLINK_FILES.zlib= include/zconf.h +BUILDLINK_FILES.zlib+= include/zlib.h +BUILDLINK_FILES.zlib+= lib/libz.* + +BUILDLINK_TARGETS+= zlib-buildlink + +.if ${_NEED_ZLIB} == "NO" +LIBTOOL_ARCHIVE_UNTRANSFORM_SED+= \ + -e "s|${LOCALBASE}/lib/libz.la|-L${BUILDLINK_PREFIX.zlib}/lib -lz|g" +.endif + +zlib-buildlink: _BUILDLINK_USE + +.endif # ZLIB_BUILDLINK2_MK |