On Thu, Nov 07, 2013 at 12:57:25AM -0500, Brad Smith wrote:
> On Thu, Nov 07, 2013 at 03:11:28AM +0100, Juan Francisco Cantero Hurtado
> wrote:
> > Changes:
> > - Only use gmake for lzlib.
> > - Change the tarballs from .gz to .lz, except for lunzip (read the
> > comment in Makefile.inc).
> > - Bump everything.
> > - Add a little change to the patch of lzlib.
> >
> > Steps to test the changes:
> > - pkg_delete clzip lunzip lzip lziprecover lzlib pdlzip plzip
> > - cd /usr/port/archivers/lzip
> > - apply the patch
> > - make clean=all
> > - make test
> >
> > OK?
>
> Here is an updated diff to fix some mistakes with library port. Most
> of the patching there was wrong. There was some confusion between
> the libraries project revision number and the shared libraries ABI
> versioning. Have the various lzip binaries installed stripped as
> appropriate.
Thanks a lot for the help!. FYI, the changes to the lib were suggested
by upstream because I'm pretty useless when work with the library
versioning of any package. I'll take a look later today.
>
> OK.
>
>
> Index: Makefile.inc
> ===================================================================
> RCS file: /cvs/ports/archivers/lzip/Makefile.inc,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 Makefile.inc
> --- Makefile.inc 14 Oct 2013 21:23:32 -0000 1.1.1.1
> +++ Makefile.inc 7 Nov 2013 05:46:06 -0000
> @@ -10,11 +10,13 @@ MAINTAINER = Juan Francisco Cantero Hur
>
> MASTER_SITES ?= ${MASTER_SITE_SAVANNAH:=lzip/} \
> ${MASTER_SITE_SAVANNAH:=lzip/old/}
> +# Upstream also releases the tarballs compressed with gz but to use the
> +# lz version of the tarballs for the lzip project give us a quick and simple
> +# test to detect problems with the lzip format on every OpenBSD platform.
> +EXTRACT_SUFX ?= .tar.lz
>
> DIST_SUBDIR = lzip
>
> -USE_GMAKE = Yes
> -
> CONFIGURE_STYLE = simple
> CONFIGURE_ARGS += CC="${CC}" CXX="${CXX}" \
> CPPFLAGS="-I${LOCALBASE}/include" \
> @@ -23,5 +25,9 @@ CONFIGURE_ARGS += CC="${CC}" CXX="${CXX}
> --prefix=${PREFIX} \
> --infodir=${PREFIX}/info \
> --mandir=${PREFIX}/man
> +
> +.ifndef DEBUG
> +INSTALL_TARGET ?= install-strip
> +.endif
>
> TEST_TARGET = check
> Index: clzip/Makefile
> ===================================================================
> RCS file: /cvs/ports/archivers/lzip/clzip/Makefile,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 Makefile
> --- clzip/Makefile 14 Oct 2013 21:23:32 -0000 1.1.1.1
> +++ clzip/Makefile 7 Nov 2013 05:46:06 -0000
> @@ -3,6 +3,7 @@
> COMMENT = C implementation of lzip
>
> DISTNAME = clzip-1.5
> +REVISION = 0
>
> HOMEPAGE = http://lzip.nongnu.org/clzip.html
>
> Index: clzip/distinfo
> ===================================================================
> RCS file: /cvs/ports/archivers/lzip/clzip/distinfo,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 distinfo
> --- clzip/distinfo 14 Oct 2013 21:23:32 -0000 1.1.1.1
> +++ clzip/distinfo 7 Nov 2013 05:46:06 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (lzip/clzip-1.5.tar.gz) = zqC6xx59Hi6VwtA+mAkNz3M47bzYB37/M1A3pUuH0N4=
> -SIZE (lzip/clzip-1.5.tar.gz) = 79947
> +SHA256 (lzip/clzip-1.5.tar.lz) = 6LPH6jPUXOJYU/EIjNqzJb3hxOd11n9SbSVZMhfvxGk=
> +SIZE (lzip/clzip-1.5.tar.lz) = 59899
> Index: lunzip/Makefile
> ===================================================================
> RCS file: /cvs/ports/archivers/lzip/lunzip/Makefile,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 Makefile
> --- lunzip/Makefile 14 Oct 2013 21:23:32 -0000 1.1.1.1
> +++ lunzip/Makefile 7 Nov 2013 05:46:06 -0000
> @@ -3,6 +3,7 @@
> COMMENT = decompressor written in C for lzip files
>
> DISTNAME = lunzip-1.4
> +REVISION = 0
>
> HOMEPAGE = http://lzip.nongnu.org/lunzip.html
>
> @@ -10,5 +11,8 @@ HOMEPAGE = http://lzip.nongnu.org/lunzi
> PERMIT_PACKAGE_CDROM = Yes
>
> WANTLIB = c
> +
> +# All other lzip ports use .tar.lz by default.
> +EXTRACT_SUFX = .tar.gz
>
> .include <bsd.port.mk>
> Index: lzip/Makefile
> ===================================================================
> RCS file: /cvs/ports/archivers/lzip/lzip/Makefile,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 Makefile
> --- lzip/Makefile 14 Oct 2013 21:23:33 -0000 1.1.1.1
> +++ lzip/Makefile 7 Nov 2013 05:46:06 -0000
> @@ -3,6 +3,7 @@
> COMMENT = lossless data compressor
>
> DISTNAME = lzip-1.15
> +REVISION = 0
>
> HOMEPAGE = http://lzip.nongnu.org/lzip.html
>
> Index: lzip/distinfo
> ===================================================================
> RCS file: /cvs/ports/archivers/lzip/lzip/distinfo,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 distinfo
> --- lzip/distinfo 14 Oct 2013 21:23:33 -0000 1.1.1.1
> +++ lzip/distinfo 7 Nov 2013 05:46:06 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (lzip/lzip-1.15.tar.gz) = fNP82mj8mQDvz3eEMT473RMD/vGgVG25cj9eVWTdBbY=
> -SIZE (lzip/lzip-1.15.tar.gz) = 97409
> +SHA256 (lzip/lzip-1.15.tar.lz) = FFdiv9avWvlSJXJsbd3RFjSKvtwCrn5o+0O/2dLpLP0=
> +SIZE (lzip/lzip-1.15.tar.lz) = 66164
> Index: lziprecover/Makefile
> ===================================================================
> RCS file: /cvs/ports/archivers/lzip/lziprecover/Makefile,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 Makefile
> --- lziprecover/Makefile 14 Oct 2013 21:23:33 -0000 1.1.1.1
> +++ lziprecover/Makefile 7 Nov 2013 05:46:06 -0000
> @@ -3,6 +3,7 @@
> COMMENT = data recovery tool and decompressor for lzip files
>
> DISTNAME = lziprecover-1.15
> +REVISION = 0
>
> HOMEPAGE = http://lzip.nongnu.org/lziprecover.html
>
> Index: lziprecover/distinfo
> ===================================================================
> RCS file: /cvs/ports/archivers/lzip/lziprecover/distinfo,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 distinfo
> --- lziprecover/distinfo 14 Oct 2013 21:23:33 -0000 1.1.1.1
> +++ lziprecover/distinfo 7 Nov 2013 05:46:06 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (lzip/lziprecover-1.15.tar.gz) =
> Kt8N/HegsvkyV9nz8RcfwREhtD2lX6U3FUWbf6k/FmE=
> -SIZE (lzip/lziprecover-1.15.tar.gz) = 82763
> +SHA256 (lzip/lziprecover-1.15.tar.lz) =
> xJqUTZzHJ5E51ACfw8CehIzAYU1jmfZa8O15CUnUCnw=
> +SIZE (lzip/lziprecover-1.15.tar.lz) = 61153
> Index: lzlib/Makefile
> ===================================================================
> RCS file: /cvs/ports/archivers/lzip/lzlib/Makefile,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 Makefile
> --- lzlib/Makefile 14 Oct 2013 21:23:34 -0000 1.1.1.1
> +++ lzlib/Makefile 7 Nov 2013 05:46:06 -0000
> @@ -3,16 +3,22 @@
> COMMENT = lzip compression library
>
> DISTNAME = lzlib-1.5
> +REVISION = 0
>
> -SHARED_LIBS += lz 0.0 # 1.5
> +SHARED_LIBS += lz 1.0 # 1.5
>
> HOMEPAGE = http://lzip.nongnu.org/lzlib.html
>
> # GPLv3+ with special exception
> PERMIT_PACKAGE_CDROM = Yes
>
> -CONFIGURE_ENV += LIBlz_VERSION=${LIBlz_VERSION}
> +MAKE_ENV += LIBlz_VERSION=${LIBlz_VERSION}
> +
> +USE_GMAKE = Yes
>
> CONFIGURE_ARGS += ${CONFIGURE_SHARED}
> +
> +# The Makkefile tries to strip a shared lib with the install target.
> +INSTALL_TARGET = install
>
> .include <bsd.port.mk>
> Index: lzlib/distinfo
> ===================================================================
> RCS file: /cvs/ports/archivers/lzip/lzlib/distinfo,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 distinfo
> --- lzlib/distinfo 14 Oct 2013 21:23:34 -0000 1.1.1.1
> +++ lzlib/distinfo 7 Nov 2013 05:46:06 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (lzip/lzlib-1.5.tar.gz) = 3eSBLEDCEOH9DJulQgilEgzAAwwB0S/4XTLetKC6B8g=
> -SIZE (lzip/lzlib-1.5.tar.gz) = 105488
> +SHA256 (lzip/lzlib-1.5.tar.lz) = m5YU6uFEgQfsChbDx3qxcrgV0sB1MscjEVVnmUdBmhw=
> +SIZE (lzip/lzlib-1.5.tar.lz) = 80651
> Index: lzlib/patches/patch-Makefile_in
> ===================================================================
> RCS file: /cvs/ports/archivers/lzip/lzlib/patches/patch-Makefile_in,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 patch-Makefile_in
> --- lzlib/patches/patch-Makefile_in 14 Oct 2013 21:23:34 -0000 1.1.1.1
> +++ lzlib/patches/patch-Makefile_in 7 Nov 2013 05:46:06 -0000
> @@ -2,9 +2,54 @@ $OpenBSD: patch-Makefile_in,v 1.1.1.1 20
>
> Backport from lzlib-1.6-pre1.
>
> ---- Makefile.in.orig Sun Sep 15 01:22:37 2013
> -+++ Makefile.in Tue Oct 8 18:04:59 2013
> -@@ -93,9 +93,8 @@ install-bin : all
> +--- Makefile.in.orig Sat Sep 14 19:22:37 2013
> ++++ Makefile.in Thu Nov 7 00:38:42 2013
> +@@ -7,6 +7,7 @@ INSTALL_DATA = $(INSTALL) -p -m 644
> + INSTALL_DIR = $(INSTALL) -d -m 755
> + LDCONFIG = /sbin/ldconfig
> + SHELL = /bin/sh
> ++disable_ldconfig = yes
> +
> + objs = carg_parser.o main.o
> +
> +@@ -20,14 +21,14 @@ all : $(progname) $(progname_shared)
> + lib$(libname).a : lzlib.o
> + $(AR) -rcs $@ $<
> +
> +-lib$(libname).so.$(pkgversion) : lzlib_sh.o
> +- $(CC) -shared -Wl,--soname=lib$(libname).so.$(soversion) -o $@ $<
> ++lib$(libname).so.$(LIBlz_VERSION) : lzlib_sh.o
> ++ $(CC) -shared -fPIC -o $@ $<
> +
> + $(progname) : $(objs) lib$(libname).a
> + $(CC) $(LDFLAGS) -o $@ $(objs) lib$(libname).a
> +
> +-$(progname)_shared : $(objs) lib$(libname).so.$(pkgversion)
> +- $(CC) $(LDFLAGS) -o $@ $(objs) lib$(libname).so.$(pkgversion)
> ++$(progname)_shared : $(objs) lib$(libname).so.$(LIBlz_VERSION)
> ++ $(CC) $(LDFLAGS) -o $@ $(objs) lib$(libname).so.$(LIBlz_VERSION)
> +
> + $(progname)_profiled : $(objs) lib$(libname).a
> + $(CC) $(LDFLAGS) -pg -o $@ $(objs) lib$(libname).a
> +@@ -45,7 +46,7 @@ main.o : main.c
> + $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
> +
> + lzlib_sh.o : lzlib.c
> +- $(CC) -fpic -fPIC $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
> ++ $(CC) -fPIC $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
> +
> + lzdeps = lzlib.h lzip.h cbuffer.c decoder.h decoder.c encoder.h encoder.c
> +
> +@@ -84,7 +85,7 @@ install-bin : all
> + $(INSTALL_DATA) $(VPATH)/$(libname)lib.h
> "$(DESTDIR)$(includedir)/$(libname)lib.h"
> + $(INSTALL_DATA) ./lib$(libname).a "$(DESTDIR)$(libdir)/lib$(libname).a"
> + if [ -n "$(progname_shared)" ] ; then \
> +- $(INSTALL_PROGRAM) ./lib$(libname).so.$(pkgversion)
> "$(DESTDIR)$(libdir)/lib$(libname).so.$(pkgversion)" ; \
> ++ $(INSTALL_PROGRAM) ./lib$(libname).so.$(LIBlz_VERSION)
> "$(DESTDIR)$(libdir)/lib$(libname).so.$(LIBlz_VERSION)" ; \
> + if [ -e "$(DESTDIR)$(libdir)/lib$(libname).so.$(soversion)" ] ; then \
> + rm -f "$(DESTDIR)$(libdir)/lib$(libname).so.$(soversion)" ; \
> + run_ldconfig=no ; \
> +@@ -93,9 +94,8 @@ install-bin : all
> if [ -e "$(DESTDIR)$(libdir)/lib$(libname).so" ] ; then \
> rm -f "$(DESTDIR)$(libdir)/lib$(libname).so" ; \
> fi ; \
> @@ -16,3 +61,12 @@ Backport from lzlib-1.6-pre1.
> fi
>
> install-info :
> +@@ -124,7 +124,7 @@ uninstall-bin :
> + -rm -f "$(DESTDIR)$(libdir)/lib$(libname).a"
> + -rm -f "$(DESTDIR)$(libdir)/lib$(libname).so"
> + -rm -f "$(DESTDIR)$(libdir)/lib$(libname).so.$(soversion)"
> +- -rm -f "$(DESTDIR)$(libdir)/lib$(libname).so.$(pkgversion)"
> ++ -rm -f "$(DESTDIR)$(libdir)/lib$(libname).so.$(LIBlz_VERSION)"
> +
> + uninstall-info :
> + -install-info --info-dir="$(DESTDIR)$(infodir)" --remove
> "$(DESTDIR)$(infodir)/$(pkgname).info"
> Index: lzlib/patches/patch-configure
> ===================================================================
> RCS file: lzlib/patches/patch-configure
> diff -N lzlib/patches/patch-configure
> --- lzlib/patches/patch-configure 14 Oct 2013 21:23:34 -0000 1.1.1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,12 +0,0 @@
> -$OpenBSD: patch-configure,v 1.1.1.1 2013/10/14 21:23:34 juanfra Exp $
> ---- configure.orig Tue Oct 8 01:32:24 2013
> -+++ configure Tue Oct 8 01:32:41 2013
> -@@ -6,7 +6,7 @@
> - # to copy, distribute and modify it.
> -
> - pkgname=lzlib
> --pkgversion=1.5
> -+pkgversion=${LIBlz_VERSION}
> - soversion=1
> - progname=minilzip
> - progname_shared=
> Index: lzlib/patches/patch-lzlib_h
> ===================================================================
> RCS file: lzlib/patches/patch-lzlib_h
> diff -N lzlib/patches/patch-lzlib_h
> --- lzlib/patches/patch-lzlib_h 14 Oct 2013 21:23:34 -0000 1.1.1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,12 +0,0 @@
> -$OpenBSD: patch-lzlib_h,v 1.1.1.1 2013/10/14 21:23:34 juanfra Exp $
> ---- lzlib.h.orig Tue Oct 8 01:33:14 2013
> -+++ lzlib.h Tue Oct 8 01:33:31 2013
> -@@ -29,7 +29,7 @@
> - extern "C" {
> - #endif
> -
> --static const char * const LZ_version_string = "1.5";
> -+static const char * const LZ_version_string = "0.0";
> -
> - enum LZ_Errno { LZ_ok = 0, LZ_bad_argument, LZ_mem_error,
> - LZ_sequence_error, LZ_header_error, LZ_unexpected_eof,
> Index: pdlzip/Makefile
> ===================================================================
> RCS file: /cvs/ports/archivers/lzip/pdlzip/Makefile,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 Makefile
> --- pdlzip/Makefile 14 Oct 2013 21:23:34 -0000 1.1.1.1
> +++ pdlzip/Makefile 7 Nov 2013 05:46:06 -0000
> @@ -3,6 +3,7 @@
> COMMENT = public domain implementation of the lzip data compressor
>
> DISTNAME = pdlzip-1.5
> +REVISION = 0
>
> HOMEPAGE = http://lzip.nongnu.org/pdlzip.html
>
> Index: pdlzip/distinfo
> ===================================================================
> RCS file: /cvs/ports/archivers/lzip/pdlzip/distinfo,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 distinfo
> --- pdlzip/distinfo 14 Oct 2013 21:23:34 -0000 1.1.1.1
> +++ pdlzip/distinfo 7 Nov 2013 05:46:06 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (lzip/pdlzip-1.5.tar.gz) =
> DC41TP5i80qy4SrGn0UkLYvvz9vcpkWmLwOaZtPmM2c=
> -SIZE (lzip/pdlzip-1.5.tar.gz) = 64443
> +SHA256 (lzip/pdlzip-1.5.tar.lz) =
> muRK2bFilx1oDQdrfPZMrldTIgTThhPj3IWEgNE1W1Y=
> +SIZE (lzip/pdlzip-1.5.tar.lz) = 56335
> Index: plzip/Makefile
> ===================================================================
> RCS file: /cvs/ports/archivers/lzip/plzip/Makefile,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 Makefile
> --- plzip/Makefile 14 Oct 2013 21:23:34 -0000 1.1.1.1
> +++ plzip/Makefile 7 Nov 2013 05:46:06 -0000
> @@ -3,13 +3,14 @@
> COMMENT = multi-threaded data compressor based on lzlib
>
> DISTNAME = plzip-1.1
> +REVISION = 0
>
> HOMEPAGE = http://lzip.nongnu.org/plzip.html
>
> # GPLv3+
> PERMIT_PACKAGE_CDROM = Yes
>
> -WANTLIB = c m pthread stdc++ lz
> +WANTLIB = c lz m pthread stdc++
>
> LIB_DEPENDS = archivers/lzip/lzlib
>
> Index: plzip/distinfo
> ===================================================================
> RCS file: /cvs/ports/archivers/lzip/plzip/distinfo,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 distinfo
> --- plzip/distinfo 14 Oct 2013 21:23:34 -0000 1.1.1.1
> +++ plzip/distinfo 7 Nov 2013 05:46:06 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (lzip/plzip-1.1.tar.gz) = d9k1/IP/5qPmie3WdEEpGpTb/EaGU+ujNSSQnvXHH2M=
> -SIZE (lzip/plzip-1.1.tar.gz) = 71881
> +SHA256 (lzip/plzip-1.1.tar.lz) = tcUEAgLfY9Zhwjv+/I6qtNyLbhYGtnURbuW1YEEDn60=
> +SIZE (lzip/plzip-1.1.tar.lz) = 53672
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
--
Juan Francisco Cantero Hurtado http://juanfra.info