Use in-tree versions. The replacement Makefile can be used for direct
builds in bootstrap tools as well.
This commit is contained in:
parent
e4fd1dd6dd
commit
7694ac3615
3 changed files with 44 additions and 61 deletions
|
@ -1,23 +1,35 @@
|
|||
# $NetBSD: Makefile,v 1.37 2007/06/08 18:39:24 wiz Exp $
|
||||
# $NetBSD: Makefile,v 1.38 2007/08/02 13:22:20 joerg Exp $
|
||||
|
||||
DISTNAME= zlib-1.2.3
|
||||
CATEGORIES= devel
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=libpng/} \
|
||||
http://www.gzip.org/zlib/
|
||||
|
||||
MAINTAINER= pkgsrc-users@NetBSD.org
|
||||
MAINTAINER= joerg@NetBSD.org
|
||||
HOMEPAGE= http://www.zlib.net/
|
||||
COMMENT= General purpose data compression library
|
||||
|
||||
DISTFILES= # empty
|
||||
EXTRACT_ONLY= # empty
|
||||
|
||||
PKG_DESTDIR_SUPPORT= user-destdir
|
||||
PKG_INSTALLATION_TYPES= overwrite pkgviews
|
||||
|
||||
USE_LIBTOOL= yes
|
||||
HAS_CONFIGURE= yes
|
||||
|
||||
INSTALLATION_DIRS= include lib ${PKGMANDIR}/man3
|
||||
|
||||
MAKE_ENV+= PKGSRC_LDFLAGS=${LDFLAGS:Q}
|
||||
.include "../../mk/bsd.prefs.mk"
|
||||
|
||||
TEST_TARGET= check
|
||||
CFLAGS+= ${CPPFLAGS}
|
||||
|
||||
do-extract:
|
||||
${CP} -r ${FILESDIR} ${WRKSRC}
|
||||
|
||||
do-install:
|
||||
${LIBTOOL} --mode=install ${INSTALL_LIB} ${WRKSRC}/libz.la ${DESTDIR}${PREFIX}/lib
|
||||
${INSTALL_MAN} ${WRKSRC}/zlib.3 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man3
|
||||
${INSTALL_DATA} ${WRKSRC}/zconf.h ${DESTDIR}${PREFIX}/include
|
||||
${INSTALL_DATA} ${WRKSRC}/zlib.h ${DESTDIR}${PREFIX}/include
|
||||
|
||||
.include "../../mk/bsd.pkg.mk"
|
||||
|
|
27
devel/zlib/files/Makefile
Normal file
27
devel/zlib/files/Makefile
Normal file
|
@ -0,0 +1,27 @@
|
|||
# $NetBSD: Makefile,v 1.1 2007/08/02 13:22:20 joerg Exp $
|
||||
#
|
||||
# Replacement Makefile for bzip2.
|
||||
#
|
||||
|
||||
OBJS= adler32.o compress.o crc32.o deflate.o gzio.o \
|
||||
infback.o inffast.o inflate.o inftrees.o trees.o \
|
||||
uncompr.o zutil.o
|
||||
LOBJS= ${OBJS:R:S/$/.lo/g}
|
||||
|
||||
all: libz.la
|
||||
|
||||
libz.la: ${LOBJS}
|
||||
${LIBTOOL} --mode=link ${CC} ${LDFLAGS} ${CFLAGS} -o ${.TARGET} \
|
||||
${LOBJS} -version-info 1:2 -rpath ${PREFIX}/lib
|
||||
|
||||
libz.a: ${OBJS}
|
||||
${AR} cq ${.TARGET} ${OBJS}
|
||||
${RANLIB} ${.TARGET}
|
||||
|
||||
.SUFFIXES: .c .o .lo
|
||||
|
||||
.c.o:
|
||||
${CC} -c ${CFLAGS} -o ${.TARGET} ${.IMPSRC}
|
||||
|
||||
.c.lo:
|
||||
${LIBTOOL} --mode=compile ${CC} -c ${CFLAGS} -o ${.TARGET} ${.IMPSRC}
|
|
@ -1,56 +0,0 @@
|
|||
$NetBSD: patch-aa,v 1.11 2007/05/15 19:39:12 heinz Exp $
|
||||
|
||||
--- Makefile.in.orig 2005-07-18 04:25:21.000000000 +0200
|
||||
+++ Makefile.in
|
||||
@@ -16,7 +16,6 @@
|
||||
# To install in $HOME instead of /usr/local, use:
|
||||
# make install prefix=$HOME
|
||||
|
||||
-CC=cc
|
||||
|
||||
CFLAGS=-O
|
||||
#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
|
||||
@@ -54,10 +53,9 @@ OBJA =
|
||||
|
||||
TEST_OBJS = example.o minigzip.o
|
||||
|
||||
-all: example$(EXE) minigzip$(EXE)
|
||||
|
||||
check: test
|
||||
-test: all
|
||||
+test: all example minigzip
|
||||
@LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \
|
||||
echo hello world | ./minigzip | ./minigzip -d || \
|
||||
echo ' *** minigzip test FAILED ***' ; \
|
||||
@@ -77,19 +75,24 @@ match.o: match.S
|
||||
mv _match.o match.o
|
||||
rm -f _match.s
|
||||
|
||||
-$(SHAREDLIBV): $(OBJS)
|
||||
- $(LDSHARED) -o $@ $(OBJS)
|
||||
- rm -f $(SHAREDLIB) $(SHAREDLIBM)
|
||||
- ln -s $@ $(SHAREDLIB)
|
||||
- ln -s $@ $(SHAREDLIBM)
|
||||
+all: $(OBJS)
|
||||
+ ${LIBTOOL} --mode=link ${CC} ${CPPFLAGS} ${CFLAGS} ${PKGSRC_LDFLAGS} -o libz.la ${OBJS:.o=.lo} -rpath ${PREFIX}/lib -version-info 1:2
|
||||
+
|
||||
+.c.o:
|
||||
+ ${LIBTOOL} --mode=compile ${CC} ${CPPFLAGS} ${CFLAGS} -c $<
|
||||
|
||||
example$(EXE): example.o $(LIBS)
|
||||
- $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS)
|
||||
+ ${LIBTOOL} --mode=link ${CC} ${CPPFLAGS} ${CFLAGS} ${PKGSRC_LDFLAGS} -o $@ $>
|
||||
|
||||
minigzip$(EXE): minigzip.o $(LIBS)
|
||||
- $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS)
|
||||
+ ${LIBTOOL} --mode=link ${CC} ${CPPFLAGS} ${CFLAGS} ${PKGSRC_LDFLAGS} -o $@ $>
|
||||
|
||||
install: $(LIBS)
|
||||
+ ${BSD_INSTALL_DATA} zconf.h zlib.h ${DESTDIR}${PREFIX}/include
|
||||
+ ${BSD_INSTALL_DATA} zlib.3 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man3
|
||||
+ ${LIBTOOL} --mode=install ${BSD_INSTALL_LIB} libz.la ${DESTDIR}${PREFIX}/lib
|
||||
+
|
||||
+installold: $(LIBS)
|
||||
-@if [ ! -d $(exec_prefix) ]; then mkdir -p $(exec_prefix); fi
|
||||
-@if [ ! -d $(includedir) ]; then mkdir -p $(includedir); fi
|
||||
-@if [ ! -d $(libdir) ]; then mkdir -p $(libdir); fi
|
Loading…
Reference in a new issue