pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/libvolume_id convert to use libtool



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3162bdc48d37
branches:  trunk
changeset: 552497:3162bdc48d37
user:      dbj <dbj%pkgsrc.org@localhost>
date:      Sun Jan 04 23:10:06 2009 +0000

description:
convert to use libtool
additional fixes to compile on osx

diffstat:

 devel/libvolume_id/Makefile         |  18 ++-------
 devel/libvolume_id/PLIST            |   6 +--
 devel/libvolume_id/distinfo         |  11 +++--
 devel/libvolume_id/patches/patch-aa |  13 ++++--
 devel/libvolume_id/patches/patch-ab |  13 ++++--
 devel/libvolume_id/patches/patch-ac |   8 ++--
 devel/libvolume_id/patches/patch-ad |  24 +++++++++++-
 devel/libvolume_id/patches/patch-ae |  67 +++++++++++++++++++++++++++++++++++++
 8 files changed, 120 insertions(+), 40 deletions(-)

diffs (244 lines):

diff -r b1dd23cdd70f -r 3162bdc48d37 devel/libvolume_id/Makefile
--- a/devel/libvolume_id/Makefile       Sun Jan 04 23:06:29 2009 +0000
+++ b/devel/libvolume_id/Makefile       Sun Jan 04 23:10:06 2009 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.2 2008/11/26 07:47:56 hasso Exp $
+# $NetBSD: Makefile,v 1.3 2009/01/04 23:10:06 dbj Exp $
 #
 
 DISTNAME=              libvolume_id-0.81.0
+PKGREVISION=           1
 CATEGORIES=            sysutils
 MASTER_SITES=          http://www.marcuscom.com/downloads/
 EXTRACT_SUFX=          .tar.bz2
@@ -12,19 +13,8 @@
 
 PKG_DESTDIR_SUPPORT=   user-destdir
 INSTALLATION_DIRS=     include lib lib/pkgconfig 
-USE_TOOLS+=            gmake pkg-config ranlib
+USE_TOOLS+=            gmake pkg-config
 
-MAKE_ENV+=             E=@${ECHO}
-MAKE_ENV+=             RANLIB=ranlib
-MAKE_ENV+=             AR=ar
-MAKE_ENV+=             Q=@
-MAKE_ENV+=             prefix=${PREFIX}
-
-do-install:
-       ${INSTALL_DATA} ${WRKSRC}/libvolume_id.pc ${DESTDIR}${PREFIX}/lib/pkgconfig/libvolume_id.pc
-       ${INSTALL_DATA} ${WRKSRC}/libvolume_id.h ${DESTDIR}${PREFIX}/include/libvolume_id.h
-       ${INSTALL_DATA} ${WRKSRC}/libvolume_id.a ${DESTDIR}${PREFIX}/lib/libvolume_id.a
-       ${INSTALL_LIB} ${WRKSRC}/libvolume_id.so.0 ${DESTDIR}${PREFIX}/lib/libvolume_id.so.0
-       ${LN} -sf ${PREFIX}/lib/libvolume_id.so.0 ${DESTDIR}${PREFIX}/lib/libvolume_id.so
+USE_LIBTOOL=yes
 
 .include "../../mk/bsd.pkg.mk"
diff -r b1dd23cdd70f -r 3162bdc48d37 devel/libvolume_id/PLIST
--- a/devel/libvolume_id/PLIST  Sun Jan 04 23:06:29 2009 +0000
+++ b/devel/libvolume_id/PLIST  Sun Jan 04 23:10:06 2009 +0000
@@ -1,6 +1,4 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2008/11/22 13:48:23 jmcneill Exp $
+@comment $NetBSD: PLIST,v 1.2 2009/01/04 23:10:06 dbj Exp $
 include/libvolume_id.h
-lib/libvolume_id.a
-lib/libvolume_id.so
-lib/libvolume_id.so.0
+lib/libvolume_id.la
 lib/pkgconfig/libvolume_id.pc
diff -r b1dd23cdd70f -r 3162bdc48d37 devel/libvolume_id/distinfo
--- a/devel/libvolume_id/distinfo       Sun Jan 04 23:06:29 2009 +0000
+++ b/devel/libvolume_id/distinfo       Sun Jan 04 23:10:06 2009 +0000
@@ -1,9 +1,10 @@
-$NetBSD: distinfo,v 1.2 2008/11/23 16:07:16 hasso Exp $
+$NetBSD: distinfo,v 1.3 2009/01/04 23:10:06 dbj Exp $
 
 SHA1 (libvolume_id-0.81.0.tar.bz2) = e6d61d734dab9a305637ba8379ca04df3fd4e398
 RMD160 (libvolume_id-0.81.0.tar.bz2) = f0dfe8aab157f155b242eff6e20b29c65bb279b5
 Size (libvolume_id-0.81.0.tar.bz2) = 23274 bytes
-SHA1 (patch-aa) = 8850ccda617472ad46cb3386e4a016e11222b49c
-SHA1 (patch-ab) = 5c44d5f2877d37b53b8b243c248b520462f221a7
-SHA1 (patch-ac) = 33287bf3c1a92a75df2ac2aa8a6cdac357bd0c71
-SHA1 (patch-ad) = 20e5d03294d50ef9a26eed0ae49fda085a2e5e2a
+SHA1 (patch-aa) = f1bc3a47df3d98bba4b08e96f957e11f56155c18
+SHA1 (patch-ab) = f9f80eeeb67b8f8babf777bf59226249b03576b8
+SHA1 (patch-ac) = 4a47119e7d84093970747cdc699c49236df7bd35
+SHA1 (patch-ad) = c09ecb39f154c37e72dfb6bb6241ec33d77c0b60
+SHA1 (patch-ae) = 82d0bdd10818ed75eb1c555891c093eddbffaa7a
diff -r b1dd23cdd70f -r 3162bdc48d37 devel/libvolume_id/patches/patch-aa
--- a/devel/libvolume_id/patches/patch-aa       Sun Jan 04 23:06:29 2009 +0000
+++ b/devel/libvolume_id/patches/patch-aa       Sun Jan 04 23:10:06 2009 +0000
@@ -1,13 +1,16 @@
-$NetBSD: patch-aa,v 1.2 2008/11/23 16:07:16 hasso Exp $
+$NetBSD: patch-aa,v 1.3 2009/01/04 23:10:06 dbj Exp $
 
---- ddf_raid.c.orig    2008-11-22 08:33:28.000000000 -0500
-+++ ddf_raid.c
-@@ -22,7 +22,7 @@
+--- ddf_raid.c.orig    2007-12-26 17:05:32.000000000 -0800
++++ ddf_raid.c 2008-12-28 16:50:36.000000000 -0800
+@@ -22,9 +22,9 @@
  #include <string.h>
  #include <errno.h>
  #include <ctype.h>
 -#ifdef __FreeBSD__
 +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
  #include <sys/endian.h>
- #else
+-#else
++#elif !defined(__APPLE__)
  #include <byteswap.h>
+ #endif /* __FreeBSD__ */
+ 
diff -r b1dd23cdd70f -r 3162bdc48d37 devel/libvolume_id/patches/patch-ab
--- a/devel/libvolume_id/patches/patch-ab       Sun Jan 04 23:06:29 2009 +0000
+++ b/devel/libvolume_id/patches/patch-ab       Sun Jan 04 23:10:06 2009 +0000
@@ -1,13 +1,16 @@
-$NetBSD: patch-ab,v 1.2 2008/11/23 16:07:16 hasso Exp $
+$NetBSD: patch-ab,v 1.3 2009/01/04 23:10:06 dbj Exp $
 
---- linux_raid.c.orig  2008-11-22 08:33:51.000000000 -0500
-+++ linux_raid.c
-@@ -22,7 +22,7 @@
+--- linux_raid.c.orig  2007-12-26 17:03:43.000000000 -0800
++++ linux_raid.c       2008-12-28 17:45:50.000000000 -0800
+@@ -22,9 +22,9 @@
  #include <string.h>
  #include <errno.h>
  #include <ctype.h>
 -#ifdef __FreeBSD__
 +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
  #include <sys/endian.h>
- #else
+-#else
++#elif !defined(__APPLE__)
  #include <byteswap.h>
+ #endif /* __FreeBSD__ */
+ 
diff -r b1dd23cdd70f -r 3162bdc48d37 devel/libvolume_id/patches/patch-ac
--- a/devel/libvolume_id/patches/patch-ac       Sun Jan 04 23:06:29 2009 +0000
+++ b/devel/libvolume_id/patches/patch-ac       Sun Jan 04 23:10:06 2009 +0000
@@ -1,13 +1,13 @@
-$NetBSD: patch-ac,v 1.2 2008/11/23 16:07:16 hasso Exp $
+$NetBSD: patch-ac,v 1.3 2009/01/04 23:10:06 dbj Exp $
 
---- util.c.orig        2008-11-22 08:34:15.000000000 -0500
-+++ util.c
+--- util.c.orig        2007-12-26 16:56:15.000000000 -0800
++++ util.c     2008-12-28 17:46:24.000000000 -0800
 @@ -28,7 +28,7 @@
  #include "libvolume_id.h"
  #include "util.h"
  
 -#ifdef __FreeBSD__
-+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
++#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__APPLE__)
  static size_t strnlen (const char *s, size_t maxlen)
  {
        size_t i;
diff -r b1dd23cdd70f -r 3162bdc48d37 devel/libvolume_id/patches/patch-ad
--- a/devel/libvolume_id/patches/patch-ad       Sun Jan 04 23:06:29 2009 +0000
+++ b/devel/libvolume_id/patches/patch-ad       Sun Jan 04 23:10:06 2009 +0000
@@ -1,7 +1,7 @@
-$NetBSD: patch-ad,v 1.2 2008/11/23 16:07:17 hasso Exp $
+$NetBSD: patch-ad,v 1.3 2009/01/04 23:10:06 dbj Exp $
 
---- util.h.orig        2008-11-22 08:32:52.000000000 -0500
-+++ util.h
+--- util.h.orig        2007-12-26 16:51:05.000000000 -0800
++++ util.h     2008-12-28 17:47:48.000000000 -0800
 @@ -19,7 +19,7 @@
  #  include <config.h>
  #endif
@@ -11,3 +11,21 @@
  #include <sys/endian.h>
  
  #define __BYTE_ORDER            _BYTE_ORDER
+@@ -29,6 +29,17 @@
+ #define bswap_16                bswap16
+ #define bswap_32                bswap32
+ #define bswap_64                bswap64
++#elif defined(__APPLE__)
++#include <machine/endian.h>
++#include <libkern/OSByteOrder.h>
++
++#define __BYTE_ORDER            BYTE_ORDER
++#define __LITTLE_ENDIAN         LITTLE_ENDIAN
++#define __BIG_ENDIAN            BIG_ENDIAN
++
++#define bswap_16                OSSwapInt16
++#define bswap_32                OSSwapInt32
++#define bswap_64                OSSwapInt64
+ #else
+ #include <endian.h>
+ #include <byteswap.h>
diff -r b1dd23cdd70f -r 3162bdc48d37 devel/libvolume_id/patches/patch-ae
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/libvolume_id/patches/patch-ae       Sun Jan 04 23:10:06 2009 +0000
@@ -0,0 +1,67 @@
+$NetBSD: patch-ae,v 1.1 2009/01/04 23:10:06 dbj Exp $
+
+--- Makefile.orig      2007-12-26 16:52:36.000000000 -0800
++++ Makefile   2009-01-04 15:05:52.000000000 -0800
+@@ -59,12 +59,19 @@ HEADERS=                   \
+       libvolume_id.h          \
+       util.h
+ 
+-all: libvolume_id.a $(SHLIB) libvolume_id.pc
++all: libvolume_id.la libvolume_id.pc
+ .PHONY: all
+ .DEFAULT: all
+ 
+ .SUFFIXES:
+ 
++libvolume_id.la: $(OBJS:.o=.lo)
++      $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) $(CFLAGS) -o $@ \
++          $^ -version-info $(SHLIB_CUR):$(SHLIB_REV):$(SHLIB_AGE) -rpath $(PREFIX)/lib
++
++%.lo: %.c
++      $(LIBTOOL) --mode=compile $(CC) -c $(CFLAGS) -o $@ $<
++
+ %.o: %.c
+       $(E) "  CC      " $@
+       $(Q) $(CC) -c $(CFLAGS) $< -o $@
+@@ -88,27 +95,22 @@ $(SHLIB): $(HEADERS) exported_symbols $(
+               $(addprefix .shlib/,$(OBJS))
+ 
+ libvolume_id.pc:
+-      $(E) "  GENPC   " $@
+-      $(Q) echo "libdir=${usrlibdir}" >> $@
+-      $(Q) echo "includedir=${includedir}" >> $@
+-      $(Q) echo "" >> $@
+-      $(Q) echo "Name: libvolume_id" >> $@
+-      $(Q) echo "Description: Filesystem label and uuid access" >> $@
+-      $(Q) echo "Version: $(SHLIB_CUR).$(SHLIB_REV).$(SHLIB_AGE)" >> $@
+-      $(Q) echo "Libs: -L\$${libdir} -lvolume_id" >> $@
+-      $(Q) echo "Cflags: -I\$${includedir}" >> $@
++      echo "prefix=$(PREFIX)" >> $@
++      echo "exec_prefix=\$${prefix}" >> $@
++      echo "libdir=\$${exec_prefix}/lib" >> $@
++      echo "includedir=\$${exec_prefix}/include" >> $@
++      echo "" >> $@
++      echo "Name: libvolume_id" >> $@
++      echo "Description: Filesystem label and uuid access" >> $@
++      echo "Version: $(SHLIB_CUR).$(SHLIB_REV).$(SHLIB_AGE)" >> $@
++      echo "" >> $@
++      echo "Libs: -L\$${libdir} -lvolume_id" >> $@
++      echo "Cflags: -I\$${includedir}" >> $@
+ 
+ install: all
+-      $(INSTALL_DATA) -D libvolume_id.h $(DESTDIR)$(includedir)/libvolume_id.h
+-      $(INSTALL_LIB) -D $(SHLIB) $(DESTDIR)$(libdir)/$(SHLIB)
+-      mkdir -p $(DESTDIR)$(usrlibdir)/
+-      ln -sf $(SHLIB) $(DESTDIR)$(libdir)/libvolume_id.so.$(SHLIB_CUR)
+-ifeq ($(libdir),$(usrlibdir))
+-      ln -sf $(SHLIB) $(DESTDIR)$(usrlibdir)/libvolume_id.so
+-else
+-      ln -sf $(libdir)/$(SHLIB) $(DESTDIR)$(usrlibdir)/libvolume_id.so
+-endif
+-      $(INSTALL_DATA) -D libvolume_id.pc $(DESTDIR)$(usrlibdir)/pkgconfig/libvolume_id.pc
++      $(LIBTOOL) --mode=install $(INSTALL_LIB) libvolume_id.la $(DESTDIR)$(PREFIX)/lib
++      $(INSTALL_DATA) libvolume_id.h $(DESTDIR)$(PREFIX)/include
++      $(INSTALL_DATA) libvolume_id.pc $(DESTDIR)$(PREFIX)/lib/pkgconfig
+ .PHONY: install
+ 
+ uninstall:



Home | Main Index | Thread Index | Old Index