summaryrefslogtreecommitdiff
path: root/devel/zlib
diff options
context:
space:
mode:
authorhubertf <hubertf@pkgsrc.org>2001-02-03 06:42:17 +0000
committerhubertf <hubertf@pkgsrc.org>2001-02-03 06:42:17 +0000
commit0a11d404e3da0c79f90e76672a6bcef8932ed469 (patch)
tree54af85699ede0e21b01011e878e50ae50e5f665a /devel/zlib
parent5eb6965be4f1974b9441056671ebea34b089d4f5 (diff)
downloadpkgsrc-0a11d404e3da0c79f90e76672a6bcef8932ed469.tar.gz
``Why drink and drive when you can smoke and fly''
(Use libtool to build this if it's installed; does not require port of NetBSD's share/mk for bootstrapping; old BSD-mk based build is still available as fallback if no libtool is found)
Diffstat (limited to 'devel/zlib')
-rw-r--r--devel/zlib/Makefile20
-rw-r--r--devel/zlib/files/lt.mk46
2 files changed, 63 insertions, 3 deletions
diff --git a/devel/zlib/Makefile b/devel/zlib/Makefile
index d497b9edd50..b7838ad657f 100644
--- a/devel/zlib/Makefile
+++ b/devel/zlib/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2001/01/21 20:42:17 tron Exp $
+# $NetBSD: Makefile,v 1.6 2001/02/03 06:42:17 hubertf Exp $
DISTNAME= zlib-1.1.3
CATEGORIES= devel
@@ -9,9 +9,23 @@ HOMEPAGE= ftp://ftp.freesoftware.com/pub/infozip/zlib/index.html
ONLY_FOR_PLATFORM= SunOS-*-* # in base NetBSD system
+.include "../../mk/bsd.prefs.mk"
+.if exists(${LOCALBASE}/bin/libtool)
+USE_LIBTOOL= yes
+MAKEFILE= lt.mk
+PLIST_SRC= ${WRKDIR}/.PLIST_SRC
+
+post-extract:
+ ${CP} ${FILESDIR}/lt.mk ${WRKSRC}
+ ${SED} \
+ -e '/libz_pic.a/d' \
+ -e '/libz_p.a/d' \
+ <${PKGDIR}/PLIST >${PLIST_SRC}
+
+.else
MAKEFILE= bsd.mk
-MAKE_ENV+= NOLINT=yes
+.endif
-INSTALL_TARGET= install includes
+MAKE_ENV+= NOLINT=yes
.include "../../mk/bsd.pkg.mk"
diff --git a/devel/zlib/files/lt.mk b/devel/zlib/files/lt.mk
new file mode 100644
index 00000000000..499d884e8ac
--- /dev/null
+++ b/devel/zlib/files/lt.mk
@@ -0,0 +1,46 @@
+# Original NetBSD: Makefile,v 1.13 1999/07/09 07:07:13 garbled Exp
+
+# libtool-using Makefile for libz, derived deom bsd.mk for Solaris - HF
+
+LIB= z
+MKMAN= no
+
+SRCS= adler32.c compress.c crc32.c deflate.c gzio.c infblock.c \
+ infcodes.c inffast.c inflate.c inftrees.c infutil.c trees.c uncompr.c \
+ zutil.c
+
+CPPFLAGS+= -I${.CURDIR}
+
+CLEANFILES+= minigzip
+
+INCS= zconf.h zlib.h
+INCSDIR=${PREFIX}/include
+LIBDIR=${PREFIX}/lib
+
+SHLIB_MAJOR= 0
+SHLIB_MINOR= 1
+
+test: minigzip
+ echo hello world | ./minigzip | ./minigzip -d
+
+# Note: CFLAGS ommitted by intention!
+# This is to verify that zlib.h works standalone.
+minigzip : minigzip.c libz.la
+ ${LIBTOOL} $(CC) -o minigzip ${.CURDIR}/minigzip.c libz.la
+
+
+
+all: minigzip
+
+.SUFFIXES: .lo .c
+.c.lo:
+ ${LIBTOOL} ${CC} -c $*.c
+lib${LIB}.la: ${SRCS:.c=.lo}
+ ${LIBTOOL} ${CC} -o lib${LIB}.la ${SRCS:.c=.lo} \
+ -rpath ${LIBDIR} \
+ -version-info ${SHLIB_MAJOR}:${SHLIB_MINOR}
+install:
+ ${BSD_INSTALL_DATA_DIR} ${INCSDIR}
+ ${BSD_INSTALL_DATA} zconf.h zlib.h ${INCSDIR}
+ ${LIBTOOL} ${BSD_INSTALL_DATA} libz.la ${LIBDIR}
+