Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 May 2014 17:30:55 +0200 (CEST)
From:      Tijl Coosemans <tijl@FreeBSD.org>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/190179: [patch] archivers/minizip: enable libminizip.so
Message-ID:  <201405241530.s4OFUsa6092510@kalimero.tijl.coosemans.org>
Resent-Message-ID: <201405241540.s4OFe0YA024949@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         190179
>Category:       ports
>Synopsis:       [patch] archivers/minizip: enable libminizip.so
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat May 24 15:40:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Tijl Coosemans
>Release:        FreeBSD 11.0-CURRENT i386
>Organization:
>Environment:
>Description:
The patch below enables building the libminizip library which will be
used by multimedia/vlc.  The patch contains the following changes:
- Use the standard MASTER_SITE for zlib.
- Replace PLIST_FILES with a separate pkg-plist.
- Instead of using the bundled "Makefile" set USE_AUTOTOOLS to generate
  a new Makefile from Makefile.am that allows building libminizip.so.
  Also remove MAKE_ARGS, do-install and patch-contrib-minizip-Makefile.
- Silence post-patch.
- Adjust regression-test.
>How-To-Repeat:
>Fix:

--- minizip.patch begins here ---
Index: archivers/minizip/Makefile
===================================================================
--- archivers/minizip/Makefile	(revision 355000)
+++ archivers/minizip/Makefile	(working copy)
@@ -3,24 +3,25 @@
 
 PORTNAME=	minizip
 PORTVERSION=	1.2.8
+PORTREVISION=	1
 CATEGORIES=	archivers
-MASTER_SITES=	https://github.com/madler/zlib/archive/ \
-		LOCAL/mandree/${PORTNAME}
-DISTNAME=	v${PORTVERSION}
-DIST_SUBDIR=	${PORTNAME}
+MASTER_SITES=	SF/libpng/zlib/${PORTVERSION}
+DISTNAME=	zlib-${PORTVERSION}
 
 MAINTAINER=	coder@tuxfamily.org
-COMMENT=	Minizip and miniunz programs from Zlib contributions
+COMMENT=	Zip library and programs from Zlib distribution
 
 LICENSE=	ZLIB
 
-USES=		zip
-PLIST_FILES=	bin/minizip bin/miniunz \
-		man/man1/miniunzip.1.gz man/man1/minizip.1.gz
-MAKE_ARGS=	CFLAGS="${CPPFLAGS} ${CFLAGS} -include sys/stat.h -include stdint.h"
+USES=		libtool pathfix tar:xz
+PATHFIX_MAKEFILEIN=	Makefile.am
+USE_AUTOTOOLS=	libtoolize aclocal autoconf automake
+AUTOMAKE_ARGS=	-a -c -f
+CONFIGURE_ARGS=	--enable-demos
+INSTALL_TARGET=	install-strip
 WRKSRC=		${WRKDIR}/zlib-${PORTVERSION}/contrib/minizip
 
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
 
 # work around missing typedef in 8.X's libz configuration
 .if ${OSVERSION} < 900000
@@ -28,16 +29,20 @@ CPPFLAGS+=	-Dz_crc_t=uint32_t
 .endif
 
 post-patch:
-	${REINPLACE_CMD} -e 's/#ifdef unix \|\| __APPLE__/#ifdef unix/' ${WRKSRC}/mini???.c
+	@${REINPLACE_CMD} 's/#ifdef unix || __APPLE__/#ifdef unix/' ${WRKSRC}/mini???.c
 
-do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${WRKSRC}/miniunz ${STAGEDIR}${PREFIX}/bin/
+post-install:
 	${INSTALL_MAN} ${WRKSRC}/*.1 ${STAGEDIR}${PREFIX}/man/man1
 
 regression-test:
-	${RM} -f ${WRKDIR}/test.zip && (cd ${WRKSRC} && ./${PORTNAME} ${WRKDIR}/test.zip *)
-	${RM} -rf ${WRKDIR}/regression-test && ${MKDIR} ${WRKDIR}/regression-test
-	${WRKSRC}/miniunz ${WRKDIR}/test.zip -d ${WRKDIR}/regression-test
-	diff -ur >/dev/null ${WRKSRC} ${WRKDIR}/regression-test
+	${RM} -rf ${WRKDIR}/regression-test1
+	${MKDIR} ${WRKDIR}/regression-test1
+	${MV} ${WRKSRC}/*.[cho] ${WRKDIR}/regression-test1
+	${RM} -f ${WRKDIR}/test.zip
+	(cd ${WRKDIR}/regression-test1 && ${WRKSRC}/minizip ${WRKDIR}/test.zip *)
+	${RM} -rf ${WRKDIR}/regression-test2
+	${MKDIR} ${WRKDIR}/regression-test2
+	${WRKSRC}/miniunzip ${WRKDIR}/test.zip -d ${WRKDIR}/regression-test2
+	${DIFF} -ur ${WRKDIR}/regression-test1 ${WRKDIR}/regression-test2 > /dev/null
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
Index: archivers/minizip/distinfo
===================================================================
--- archivers/minizip/distinfo	(revision 355000)
+++ archivers/minizip/distinfo	(working copy)
@@ -1,2 +1,2 @@
-SHA256 (minizip/v1.2.8.zip) = da78eabfef55cbab21776d4cca207cf7e0dde483b4dd3590e525421667bfb6a7
-SIZE (minizip/v1.2.8.zip) = 724598
+SHA256 (zlib-1.2.8.tar.xz) = 831df043236df8e9a7667b9e3bb37e1fcb1220a0f163b6de2626774b9590d057
+SIZE (zlib-1.2.8.tar.xz) = 450776
Index: archivers/minizip/files/patch-contrib-minizip-Makefile
===================================================================
--- archivers/minizip/files/patch-contrib-minizip-Makefile	(revision 355000)
+++ archivers/minizip/files/patch-contrib-minizip-Makefile	(working copy)
@@ -1,28 +0,0 @@
---- Makefile.orig	2013-04-29 02:23:49.000000000 +0200
-+++ Makefile	2013-12-10 10:06:34.000000000 +0100
-@@ -1,8 +1,9 @@
- CC=cc
--CFLAGS=-O -I../..
-+CFLAGS=-O -I/usr/local
-+LDFLAGS=-L/usr/lib -lz
- 
--UNZ_OBJS = miniunz.o unzip.o ioapi.o ../../libz.a
--ZIP_OBJS = minizip.o zip.o   ioapi.o ../../libz.a
-+UNZ_OBJS = miniunz.o unzip.o ioapi.o
-+ZIP_OBJS = minizip.o zip.o   ioapi.o
- 
- .c.o:
- 	$(CC) -c $(CFLAGS) $*.c
-@@ -10,10 +11,10 @@
- all: miniunz minizip
- 
- miniunz:  $(UNZ_OBJS)
--	$(CC) $(CFLAGS) -o $@ $(UNZ_OBJS)
-+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(UNZ_OBJS)
- 
- minizip:  $(ZIP_OBJS)
--	$(CC) $(CFLAGS) -o $@ $(ZIP_OBJS)
-+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(ZIP_OBJS)
- 
- test:	miniunz minizip
- 	./minizip test readme.txt
Index: archivers/minizip/pkg-plist
===================================================================
--- archivers/minizip/pkg-plist	(revision 0)
+++ archivers/minizip/pkg-plist	(working copy)
@@ -0,0 +1,15 @@
+bin/miniunzip
+bin/minizip
+include/minizip/crypt.h
+include/minizip/ioapi.h
+include/minizip/mztools.h
+include/minizip/unzip.h
+include/minizip/zip.h
+lib/libminizip.a
+lib/libminizip.so
+lib/libminizip.so.1
+lib/libminizip.so.1.0.0
+libdata/pkgconfig/minizip.pc
+man/man1/miniunzip.1.gz
+man/man1/minizip.1.gz
+@dirrm include/minizip

Property changes on: archivers/minizip/pkg-plist
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: fbsd:nokeywords
## -0,0 +1 ##
+yes
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
--- minizip.patch ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405241530.s4OFUsa6092510>