Fix patching on Mac OSX; fix installing the library; fix some pkglint issues

This commit is contained in:
adam 2011-03-18 12:42:13 +00:00
parent 0f43fa0931
commit 3c59e9bcdd
8 changed files with 190 additions and 187 deletions

View file

@ -1,5 +1,4 @@
# $NetBSD: Makefile,v 1.30 2011/02/14 18:57:14 drochner Exp $
#
# $NetBSD: Makefile,v 1.31 2011/03/18 12:42:24 adam Exp $
DISTNAME= libebml-1.2.0
CATEGORIES= devel
@ -9,19 +8,26 @@ EXTRACT_SUFX= .tar.bz2
MAINTAINER= salo@NetBSD.org
HOMEPAGE= http://sourceforge.net/projects/ebml/
COMMENT= Extensible Binary Meta Language support library
LICENSE= gnu-lgpl-v2.1
PKG_DESTDIR_SUPPORT= user-destdir
PKG_INSTALLATION_TYPES= overwrite pkgviews
USE_TOOLS+= gmake
USE_LANGUAGES= c++
USE_LIBTOOL= yes
USE_LANGUAGES= c++
USE_LIBTOOL= yes
USE_TOOLS+= gmake
NO_CONFIGURE= yes
MAKEFLAGS+= prefix=${PREFIX:Q}
MAKE_ENV+= CXXFLAGS=${CXXFLAGS:M*:Q} RANLIB=${RANLIB:Q}
BUILD_DIRS= make/linux
BUILD_TARGET= sharedlib
INSTALL_TARGET= install_headers install_sharedlib
NO_CONFIGURE= yes
MAKEFLAGS+= prefix=${PREFIX}
MAKE_ENV+= CXXFLAGS=${CXXFLAGS:Q} RANLIB=${RANLIB:Q}
BUILD_DIRS= make/linux
BUILD_TARGET= sharedlib
INSTALL_TARGET= install_headers install_sharedlib
# remove CRs: fixes patching on Darwin and stops pkglint from complaining
pre-patch:
cd ${WRKSRC}/make/linux && \
${TR} -d '\r' < Makefile > Makefile.new && \
${MV} Makefile.new Makefile
.include "../../mk/bsd.pkg.mk"

View file

@ -1,15 +1,12 @@
# $NetBSD: buildlink3.mk,v 1.17 2011/02/14 18:57:14 drochner Exp $
#
# This Makefile fragment is included by packages that use libebml.
#
# $NetBSD: buildlink3.mk,v 1.18 2011/03/18 12:42:24 adam Exp $
BUILDLINK_TREE+= libebml
.if !defined(LIBEBML_BUILDLINK3_MK)
LIBEBML_BUILDLINK3_MK:=
BUILDLINK_API_DEPENDS.libebml+= libebml>=0.7.7
BUILDLINK_ABI_DEPENDS.libebml?= libebml>=1.2.0
BUILDLINK_API_DEPENDS.libebml+= libebml>=0.8
BUILDLINK_ABI_DEPENDS.libebml+= libebml>=1.2.0
BUILDLINK_PKGSRCDIR.libebml?= ../../devel/libebml
.endif # LIBEBML_BUILDLINK3_MK

View file

@ -1,6 +1,6 @@
$NetBSD: distinfo,v 1.18 2011/02/14 18:57:14 drochner Exp $
$NetBSD: distinfo,v 1.19 2011/03/18 12:42:24 adam Exp $
SHA1 (libebml-1.2.0.tar.bz2) = 4107fd6496b5aae3f0e7a96cb3008341a5b224bc
RMD160 (libebml-1.2.0.tar.bz2) = 213b7f9e18cf71f250d83d278ebd7e27220cdebc
Size (libebml-1.2.0.tar.bz2) = 60532 bytes
SHA1 (patch-aa) = f7ff6a5a059eb2f8f2550f2de4c0b6fbf94c8ce7
SHA1 (patch-aa) = 9467aaadd8fe6366ae9260b3ad0cdf242ac36d05

View file

@ -1,65 +1,65 @@
$NetBSD: patch-aa,v 1.12 2011/02/14 18:57:14 drochner Exp $
$NetBSD: patch-aa,v 1.13 2011/03/18 12:42:24 adam Exp $
--- make/linux/Makefile.orig 2011-01-29 11:45:50.000000000 +0000
--- make/linux/Makefile.orig 2011-03-18 12:15:07.000000000 +0000
+++ make/linux/Makefile
@@ -16,16 +16,16 @@ prefix=/boot/home/config
else
prefix=/usr/local
endif
-libdir=$(prefix)/lib
-includedir=$(prefix)/include/ebml
+libdir=$(DESTDIR)$(PREFIX)/lib
+includedir=$(DESTDIR)$(PREFIX)/include/ebml
# Programs
CROSS =
-CXX = $(CROSS)g++
+#CXX = $(CROSS)g++
LD = $(CXX)
-AR = $(CROSS)ar
-RANLIB = $(CROSS)ranlib
-INSTALL = install
+#AR = $(CROSS)ar
+#RANLIB = $(CROSS)ranlib
+INSTALL = $(BSD_INSTALL)
INSTALL_OPTS = -m 644
INSTALL_OPTS_LIB = -m 644
INSTALL_DIR_OPTS = -m 755
@@ -48,7 +48,7 @@ LIBS=
# Names
LIBRARY=libebml.a
-LIBRARY_SO=libebml.so
+LIBRARY_SO=libebml.la
LIBRARY_SO_VER=libebml.so.3
# source-files
@@ -84,16 +84,14 @@ lib:
$(CXX) -c $(COMPILEFLAGS) -o $@ $<
%.lo: %$(EXTENSION)
- $(CXX) -c $(COMPILEFLAGS) -fPIC -o $@ $<
+ $(LIBTOOL) --mode=compile $(CXX) -c $(COMPILEFLAGS) -o $@ $<
$(LIBRARY): $(objects)
$(AR) rcvu $@ $(objects)
$(RANLIB) $@
$(LIBRARY_SO): $(objects_so)
- $(CXX) -shared -Wl,-soname,$(LIBRARY_SO_VER) -o $(LIBRARY_SO_VER) $(objects_so)
- rm -f $(LIBRARY_SO)
- ln -s $(LIBRARY_SO_VER) $(LIBRARY_SO)
+ $(LIBTOOL) --mode=link $(CXX) -o $(LIBRARY_SO) $(objects_so) -rpath $(PREFIX)/lib -version-info 0
clean:
rm -f $(objects) $(objects_so)
@@ -137,8 +135,7 @@ install_staticlib: $(LIBRARY)
install_sharedlib: $(LIBRARY_SO)
$(INSTALL) $(INSTALL_DIR_OPTS) -d $(libdir)
- $(INSTALL) $(INSTALL_OPTS_LIB) $(LIBRARY_SO_VER) $(libdir)
- ln -fs $(LIBRARY_SO_VER) $(libdir)/$(LIBRARY_SO)
+ $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_OPTS_LIB) $(LIBRARY_SO) $(libdir)
ifneq ($(wildcard .depend),)
@@ -16,16 +16,16 @@ prefix=/boot/home/config
else
prefix=/usr/local
endif
-libdir=$(prefix)/lib
-includedir=$(prefix)/include/ebml
+libdir=$(DESTDIR)$(PREFIX)/lib
+includedir=$(DESTDIR)$(PREFIX)/include/ebml
# Programs
CROSS =
-CXX = $(CROSS)g++
+#CXX = $(CROSS)g++
LD = $(CXX)
-AR = $(CROSS)ar
-RANLIB = $(CROSS)ranlib
-INSTALL = install
+#AR = $(CROSS)ar
+#RANLIB = $(CROSS)ranlib
+INSTALL = $(BSD_INSTALL)
INSTALL_OPTS = -m 644
INSTALL_OPTS_LIB = -m 644
INSTALL_DIR_OPTS = -m 755
@@ -48,7 +48,7 @@ LIBS=
# Names
LIBRARY=libebml.a
-LIBRARY_SO=libebml.so
+LIBRARY_SO=libebml.la
LIBRARY_SO_VER=libebml.so.3
# source-files
@@ -84,16 +84,14 @@ lib:
$(CXX) -c $(COMPILEFLAGS) -o $@ $<
%.lo: %$(EXTENSION)
- $(CXX) -c $(COMPILEFLAGS) -fPIC -o $@ $<
+ $(LIBTOOL) --mode=compile $(CXX) -c $(COMPILEFLAGS) -o $@ $<
$(LIBRARY): $(objects)
$(AR) rcvu $@ $(objects)
$(RANLIB) $@
$(LIBRARY_SO): $(objects_so)
- $(CXX) -shared -Wl,-soname,$(LIBRARY_SO_VER) -o $(LIBRARY_SO_VER) $(objects_so)
- rm -f $(LIBRARY_SO)
- ln -s $(LIBRARY_SO_VER) $(LIBRARY_SO)
+ $(LIBTOOL) --mode=link $(CXX) -o $(LIBRARY_SO) $(objects_so) -rpath $(PREFIX)/lib -version-info 0
clean:
rm -f $(objects) $(objects_so)
@@ -137,8 +135,7 @@ install_staticlib: $(LIBRARY)
install_sharedlib: $(LIBRARY_SO)
$(INSTALL) $(INSTALL_DIR_OPTS) -d $(libdir)
- $(INSTALL) $(INSTALL_OPTS_LIB) $(LIBRARY_SO_VER) $(libdir)
- ln -fs $(LIBRARY_SO_VER) $(libdir)/$(LIBRARY_SO)
+ $(LIBTOOL) --mode=install $(BSD_INSTALL_LIB) $(LIBRARY_SO) $(libdir)
ifneq ($(wildcard .depend),)

View file

@ -1,5 +1,4 @@
# $NetBSD: Makefile,v 1.25 2011/02/23 15:41:48 apb Exp $
#
# $NetBSD: Makefile,v 1.26 2011/03/18 12:42:13 adam Exp $
DISTNAME= libmatroska-1.1.0
CATEGORIES= multimedia devel
@ -9,24 +8,28 @@ EXTRACT_SUFX= .tar.bz2
MAINTAINER= salo@NetBSD.org
HOMEPAGE= http://www.matroska.org/
COMMENT= Extensible open standard Audio/Video container format
LICENSE= gnu-lgpl-v2.1
PKG_DESTDIR_SUPPORT= user-destdir
PKG_INSTALLATION_TYPES= overwrite pkgviews
USE_TOOLS+= gmake
USE_LANGUAGES= c++
USE_LIBTOOL= yes
USE_LANGUAGES= c++
USE_LIBTOOL= yes
USE_TOOLS+= gmake
NO_CONFIGURE= yes
MAKEFLAGS+= prefix=${PREFIX:Q}
MAKE_ENV+= CXXFLAGS=${CXXFLAGS:M*:Q} RANLIB=${RANLIB:Q}
BUILD_DIRS= make/linux
BUILD_TARGET= sharedlib
INSTALL_TARGET= install_headers install_sharedlib
TEST_TARGET= test
NO_CONFIGURE= yes
MAKEFLAGS+= prefix=${PREFIX}
MAKE_ENV+= CXXFLAGS=${CXXFLAGS:Q} RANLIB=${RANLIB:Q}
BUILD_DIRS= make/linux
BUILD_TARGET= sharedlib
INSTALL_TARGET= install_headers install_sharedlib
TEST_TARGET= test
# remove CRs: fixes patching on Darwin and stops pkglint from complaining
pre-patch:
cd ${WRKSRC}/make/linux && \
${TR} -d '\r' < Makefile > Makefile.new && \
${MV} Makefile.new Makefile
# needed for libtoolization
BUILDLINK_API_DEPENDS.libebml+= libebml>=0.8
.include "../../devel/libebml/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

View file

@ -1,7 +1,4 @@
# $NetBSD: buildlink3.mk,v 1.19 2011/02/14 19:00:45 drochner Exp $
#
# This Makefile fragment is included by packages that use libmatroska.
#
# $NetBSD: buildlink3.mk,v 1.20 2011/03/18 12:42:13 adam Exp $
BUILDLINK_TREE+= libmatroska
@ -9,7 +6,7 @@ BUILDLINK_TREE+= libmatroska
LIBMATROSKA_BUILDLINK3_MK:=
BUILDLINK_API_DEPENDS.libmatroska+= libmatroska>=0.8.0
BUILDLINK_ABI_DEPENDS.libmatroska?= libmatroska>=1.1.0
BUILDLINK_ABI_DEPENDS.libmatroska+= libmatroska>=1.1.0
BUILDLINK_PKGSRCDIR.libmatroska?= ../../multimedia/libmatroska
.include "../../devel/libebml/buildlink3.mk"

View file

@ -1,6 +1,6 @@
$NetBSD: distinfo,v 1.18 2011/02/14 19:00:45 drochner Exp $
$NetBSD: distinfo,v 1.19 2011/03/18 12:42:13 adam Exp $
SHA1 (libmatroska-1.1.0.tar.bz2) = ffc7d0b757854f9eb8c32e51f2fedadc796ef617
RMD160 (libmatroska-1.1.0.tar.bz2) = 8da0bd5bd83e6b158b714b554f35f82c05181e9d
Size (libmatroska-1.1.0.tar.bz2) = 80469 bytes
SHA1 (patch-ac) = 69e511efd34597894a926d830549f09a3a449ad6
SHA1 (patch-ac) = 8f7dd83d9ff04b29a918f97e65ef64a49310b6b6

View file

@ -1,87 +1,87 @@
$NetBSD: patch-ac,v 1.10 2011/02/14 19:00:45 drochner Exp $
$NetBSD: patch-ac,v 1.11 2011/03/18 12:42:14 adam Exp $
--- make/linux/Makefile.orig 2011-01-29 11:48:16.000000000 +0000
+++ make/linux/Makefile
@@ -16,16 +16,16 @@ prefix=/boot/home/config
else
prefix=/usr/local
endif
-libdir=$(prefix)/lib
-includedir=$(prefix)/include/matroska
+libdir=$(PREFIX)/lib
+includedir=$(PREFIX)/include/matroska
# Programs
CROSS =
-CXX = $(CROSS)g++
+#CXX = $(CROSS)g++
LD = $(CXX)
-AR = $(CROSS)ar
-RANLIB = $(CROSS)ranlib
-INSTALL = install
+#AR = $(CROSS)ar
+#RANLIB = $(CROSS)ranlib
+INSTALL = $(BSD_INSTALL)
INSTALL_OPTS = -m 644
INSTALL_OPTS_LIB = -m 644
INSTALL_DIR_OPTS = -m 755
@@ -53,7 +53,7 @@ MUX_LIBS=-lmatroska -lebml $(LIBICONV)
# Names
LIBRARY=libmatroska.a
-LIBRARY_SO=libmatroska.so
+LIBRARY_SO=libmatroska.la
LIBRARY_SO_VER=libmatroska.so.3
# source-files
@@ -92,16 +92,14 @@ lib:
$(CXX) -c $(COMPILEFLAGS) -o $@ $<
%.lo: %$(EXTENSION)
- $(CXX) -c $(COMPILEFLAGS) -fPIC -o $@ $<
+ $(LIBTOOL) --mode=compile $(CXX) -c $(COMPILEFLAGS) -o $@ $<
$(LIBRARY): $(objects)
$(AR) rcvu $@ $(objects)
$(RANLIB) $@
$(LIBRARY_SO): $(objects_so)
- $(CXX) -shared -Wl,-soname,$(LIBRARY_SO_VER) -o $(LIBRARY_SO_VER) $(objects_so) -lebml
- rm -f $(LIBRARY_SO)
- ln -s $(LIBRARY_SO_VER) $(LIBRARY_SO)
+ $(LIBTOOL) --mode=link $(CXX) -o $(LIBRARY_SO) $(objects_so) -lebml -rpath $(PREFIX)/lib -version-info 0
clean: cleantest
rm -f $(objects) $(objects_so)
@@ -16,16 +16,16 @@ prefix=/boot/home/config
else
prefix=/usr/local
endif
-libdir=$(prefix)/lib
-includedir=$(prefix)/include/matroska
+libdir=$(PREFIX)/lib
+includedir=$(PREFIX)/include/matroska
# Programs
CROSS =
-CXX = $(CROSS)g++
+#CXX = $(CROSS)g++
LD = $(CXX)
-AR = $(CROSS)ar
-RANLIB = $(CROSS)ranlib
-INSTALL = install
+#AR = $(CROSS)ar
+#RANLIB = $(CROSS)ranlib
+INSTALL = $(BSD_INSTALL)
INSTALL_OPTS = -m 644
INSTALL_OPTS_LIB = -m 644
INSTALL_DIR_OPTS = -m 755
@@ -53,7 +53,7 @@ MUX_LIBS=-lmatroska -lebml $(LIBICONV)
# Names
LIBRARY=libmatroska.a
-LIBRARY_SO=libmatroska.so
+LIBRARY_SO=libmatroska.la
LIBRARY_SO_VER=libmatroska.so.3
# source-files
@@ -92,16 +92,14 @@ lib:
$(CXX) -c $(COMPILEFLAGS) -o $@ $<
%.lo: %$(EXTENSION)
- $(CXX) -c $(COMPILEFLAGS) -fPIC -o $@ $<
+ $(LIBTOOL) --mode=compile $(CXX) -c $(COMPILEFLAGS) -o $@ $<
$(LIBRARY): $(objects)
$(AR) rcvu $@ $(objects)
$(RANLIB) $@
$(LIBRARY_SO): $(objects_so)
- $(CXX) -shared -Wl,-soname,$(LIBRARY_SO_VER) -o $(LIBRARY_SO_VER) $(objects_so) -lebml
- rm -f $(LIBRARY_SO)
- ln -s $(LIBRARY_SO_VER) $(LIBRARY_SO)
+ $(LIBTOOL) --mode=link $(CXX) -o $(LIBRARY_SO) $(objects_so) -lebml -rpath $(PREFIX)/lib -version-info 0
clean: cleantest
rm -f $(objects) $(objects_so)
@@ -153,23 +151,22 @@ install: install_staticlib install_share
endif
install_headers:
- $(INSTALL) $(INSTALL_DIR_OPTS) -d $(includedir)
+ $(INSTALL) $(INSTALL_DIR_OPTS) -d $(DESTDIR)$(includedir)
for i in $(INCLUDE_DIR)/*.h; do \
- $(INSTALL) $(INSTALL_OPTS) $$i $(includedir) ; \
+ $(INSTALL) $(INSTALL_OPTS) $$i $(DESTDIR)$(includedir) ; \
done
- $(INSTALL) $(INSTALL_DIR_OPTS) -d $(includedir)/c
+ $(INSTALL) $(INSTALL_DIR_OPTS) -d $(DESTDIR)$(includedir)/c
for i in $(INCLUDE_DIR)/c/*.h; do \
- $(INSTALL) $(INSTALL_OPTS) $$i $(includedir)/c ; \
+ $(INSTALL) $(INSTALL_OPTS) $$i $(DESTDIR)$(includedir)/c ; \
done
install_staticlib: $(LIBRARY)
- $(INSTALL) $(INSTALL_DIR_OPTS) -d $(libdir)
- $(INSTALL) $(INSTALL_OPTS_LIB) $(LIBRARY) $(libdir)
+ $(INSTALL) $(INSTALL_DIR_OPTS) -d $(DESTDIR)$(libdir)
+ $(INSTALL) $(INSTALL_OPTS_LIB) $(LIBRARY) $(DESTDIR)$(libdir)
install_sharedlib: $(LIBRARY_SO)
- $(INSTALL) $(INSTALL_DIR_OPTS) -d $(libdir)
- $(INSTALL) $(INSTALL_OPTS_LIB) $(LIBRARY_SO_VER) $(libdir)
- ln -fs $(LIBRARY_SO_VER) $(libdir)/$(LIBRARY_SO)
+ $(INSTALL) $(INSTALL_DIR_OPTS) -d $(DESTDIR)$(libdir)
+ $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_OPTS_LIB) $(LIBRARY_SO) $(DESTDIR)$(libdir)
ifneq ($(wildcard .depend),)
include .depend
endif
install_headers:
- $(INSTALL) $(INSTALL_DIR_OPTS) -d $(includedir)
+ $(INSTALL) $(INSTALL_DIR_OPTS) -d $(DESTDIR)$(includedir)
for i in $(INCLUDE_DIR)/*.h; do \
- $(INSTALL) $(INSTALL_OPTS) $$i $(includedir) ; \
+ $(INSTALL) $(INSTALL_OPTS) $$i $(DESTDIR)$(includedir) ; \
done
- $(INSTALL) $(INSTALL_DIR_OPTS) -d $(includedir)/c
+ $(INSTALL) $(INSTALL_DIR_OPTS) -d $(DESTDIR)$(includedir)/c
for i in $(INCLUDE_DIR)/c/*.h; do \
- $(INSTALL) $(INSTALL_OPTS) $$i $(includedir)/c ; \
+ $(INSTALL) $(INSTALL_OPTS) $$i $(DESTDIR)$(includedir)/c ; \
done
install_staticlib: $(LIBRARY)
- $(INSTALL) $(INSTALL_DIR_OPTS) -d $(libdir)
- $(INSTALL) $(INSTALL_OPTS_LIB) $(LIBRARY) $(libdir)
+ $(INSTALL) $(INSTALL_DIR_OPTS) -d $(DESTDIR)$(libdir)
+ $(INSTALL) $(INSTALL_OPTS_LIB) $(LIBRARY) $(DESTDIR)$(libdir)
install_sharedlib: $(LIBRARY_SO)
- $(INSTALL) $(INSTALL_DIR_OPTS) -d $(libdir)
- $(INSTALL) $(INSTALL_OPTS_LIB) $(LIBRARY_SO_VER) $(libdir)
- ln -fs $(LIBRARY_SO_VER) $(libdir)/$(LIBRARY_SO)
+ $(INSTALL) $(INSTALL_DIR_OPTS) -d $(DESTDIR)$(libdir)
+ $(LIBTOOL) --mode=install $(BSD_INSTALL_LIB) $(LIBRARY_SO) $(DESTDIR)$(libdir)
ifneq ($(wildcard .depend),)
include .depend