Initial import libblkid 2.18

The libblkid library is used to identify block devices (disks) as to their
content (e.g. filesystem type) as well as extracting additional information
such as filesystem labels/volume names, unique identifiers/serial numbers, etc.
A common use is to allow use of LABEL= and UUID= tags instead of hard-coding
specific block device names into configuration files.

From util-linux-ng.
This commit is contained in:
markd 2011-01-08 20:43:38 +00:00
parent c00b0e2dec
commit 5efb745928
12 changed files with 260 additions and 0 deletions

7
devel/libblkid/DESCR Normal file
View file

@ -0,0 +1,7 @@
The libblkid library is used to identify block devices (disks) as to their
content (e.g. filesystem type) as well as extracting additional information
such as filesystem labels/volume names, unique identifiers/serial numbers, etc.
A common use is to allow use of LABEL= and UUID= tags instead of hard-coding
specific block device names into configuration files.
From util-linux-ng.

39
devel/libblkid/Makefile Normal file
View file

@ -0,0 +1,39 @@
# $NetBSD: Makefile,v 1.1.1.1 2011/01/08 20:43:38 markd Exp $
#
DISTNAME= util-linux-ng-2.18
PKGNAME= libblkid-2.18
CATEGORIES= devel
MASTER_SITES= http://www.kernel.org/pub/linux/utils/util-linux-ng/v2.18/
EXTRACT_SUFX= .tar.bz2
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://kernel.org/~kzak/util-linux-ng/
COMMENT= Library to handle device identification and token extraction
LICENSE= gnu-lgpl-v2.1
PKG_DESTDIR_SUPPORT= user-destdir
USE_TOOLS+= pkg-config
USE_LIBTOOL= yes
GNU_CONFIGURE= yes
PKGCONFIG_OVERRIDE+= shlibs/blkid/blkid.pc.in
CONFIGURE_ARGS+= --without-ncurses
CONFIGURE_ARGS+= --disable-mount
CONFIGURE_ARGS+= --disable-fsck
CONFIGURE_ARGS+= --disable-libuuid
CONFIGURE_ARGS+= --disable-uuidd
CONFIGURE_ARGS+= --disable-libmount
CONFIGURE_ARGS+= --disable-agetty
CONFIGURE_ARGS+= --disable-cramfs
CONFIGURE_ARGS+= --disable-switch_root
CONFIGURE_ARGS+= --disable-pivot_root
CONFIGURE_ARGS+= --disable-fallocate
CONFIGURE_ARGS+= --disable-unshare
CONFIGURE_ARGS+= --disable-rename
CONFIGURE_ARGS+= --disable-schedutils
CONFIGURE_ARGS+= --disable-wall
.include "../../devel/libuuid/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

5
devel/libblkid/PLIST Normal file
View file

@ -0,0 +1,5 @@
@comment $NetBSD: PLIST,v 1.1.1.1 2011/01/08 20:43:38 markd Exp $
include/blkid/blkid.h
lib/libblkid.la
lib/pkgconfig/blkid.pc
man/man3/libblkid.3

View file

@ -0,0 +1,14 @@
# $NetBSD: buildlink3.mk,v 1.1.1.1 2011/01/08 20:43:38 markd Exp $
BUILDLINK_TREE+= libblkid
.if !defined(LIBBLKID_BUILDLINK3_MK)
LIBBLKID_BUILDLINK3_MK:=
BUILDLINK_API_DEPENDS.libblkid+= libblkid>=2.18
BUILDLINK_PKGSRCDIR.libblkid?= ../../devel/libblkid
.include "../../devel/libuuid/buildlink3.mk"
.endif # LIBBLKID_BUILDLINK3_MK
BUILDLINK_TREE+= -libblkid

12
devel/libblkid/distinfo Normal file
View file

@ -0,0 +1,12 @@
$NetBSD: distinfo,v 1.1.1.1 2011/01/08 20:43:38 markd Exp $
SHA1 (util-linux-ng-2.18.tar.bz2) = 154db0512caae0b6e90eee4b7312d4caf3d6b978
RMD160 (util-linux-ng-2.18.tar.bz2) = 4781871a8f86195b886e81d364d41a57d67869e3
Size (util-linux-ng-2.18.tar.bz2) = 7669676 bytes
SHA1 (patch-aa) = 83f8038278928899def6db0f28e3f13b78effbc4
SHA1 (patch-ab) = bb5caeb2308fd0009d5fce20f7cea96dcdf609c7
SHA1 (patch-ac) = 48483270d348c466da6f7bcf822e461377830474
SHA1 (patch-ad) = 36def63e59aff1c045d1821380b3d0191628d897
SHA1 (patch-ae) = df77e8c6da425609309505fd447b66ade05426a3
SHA1 (patch-af) = ba6e34b5635437e755192064bfc5865bfa9c913a
SHA1 (patch-ag) = 1898774d311562938281f825b50a0e9aa44a447d

View file

@ -0,0 +1,54 @@
$NetBSD: patch-aa,v 1.1.1.1 2011/01/08 20:43:39 markd Exp $
sh doesn't like the empty case
--- configure.orig 2010-06-30 12:53:01.000000000 +0000
+++ configure
@@ -18952,11 +18952,6 @@ sed 's/^/| /' conftest.$ac_ext >&5
syscall=no
- if test "x$linux_os" = xyes; then
- case $host_cpu in
-
- esac
- fi
fi
@@ -19082,11 +19077,6 @@ sed 's/^/| /' conftest.$ac_ext >&5
syscall=no
- if test "x$linux_os" = xyes; then
- case $host_cpu in
-
- esac
- fi
fi
@@ -19489,11 +19479,6 @@ sed 's/^/| /' conftest.$ac_ext >&5
syscall=no
- if test "x$linux_os" = xyes; then
- case $host_cpu in
-
- esac
- fi
fi
@@ -19701,11 +19686,6 @@ sed 's/^/| /' conftest.$ac_ext >&5
syscall=no
- if test "x$linux_os" = xyes; then
- case $host_cpu in
-
- esac
- fi
fi

View file

@ -0,0 +1,17 @@
$NetBSD: patch-ab,v 1.1.1.1 2011/01/08 20:43:39 markd Exp $
Dont try to build things we don't care about
--- Makefile.in.orig 2010-06-30 12:53:07.000000000 +0000
+++ Makefile.in
@@ -311,8 +311,8 @@ ul_libmount_la = $(top_builddir)/shlibs/
# mount.h is generated by ./configure script and stored in build directory
ul_libmount_incdir = $(ul_libmount_builddir)
-SUBDIRS = include disk-utils fdisk getopt lib shlibs login-utils \
- misc-utils po schedutils sys-utils text-utils tests \
+SUBDIRS = include shlibs \
+ po \
$(am__append_1) $(am__append_2) $(am__append_3)
RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o \
-name CVS -o -name .pc -o -name .hg -o -name .git \) -prune -o

View file

@ -0,0 +1,27 @@
$NetBSD: patch-ac,v 1.1.1.1 2011/01/08 20:43:39 markd Exp $
Byte order defines for other than linux
--- include/bitops.h.orig 2010-02-04 11:53:56.000000000 +0000
+++ include/bitops.h
@@ -2,7 +2,20 @@
#define BITOPS_H
#include <stdint.h>
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+#include <sys/endian.h>
+#define __BYTE_ORDER _BYTE_ORDER
+#define __LITTLE_ENDIAN _LITTLE_ENDIAN
+#define __BIG_ENDIAN _BIG_ENDIAN
+#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
+#else
#include <endian.h>
+#endif
/*
* Bit map related macros. Usually provided by libc.

View file

@ -0,0 +1,24 @@
$NetBSD: patch-ad,v 1.1.1.1 2011/01/08 20:43:39 markd Exp $
No loff_t in NetBSD
--- shlibs/blkid/src/superblocks/zfs.c.orig 2010-05-19 21:36:25.000000000 +0000
+++ shlibs/blkid/src/superblocks/zfs.c
@@ -66,7 +66,7 @@ struct nvlist {
#define nvdebug(fmt, ...) do { } while(0)
/*#define nvdebug(fmt, a...) printf(fmt, ##a)*/
-static void zfs_extract_guid_name(blkid_probe pr, loff_t offset)
+static void zfs_extract_guid_name(blkid_probe pr, blkid_loff_t offset)
{
struct nvlist *nvl;
struct nvpair *nvp;
@@ -164,7 +164,7 @@ static int probe_zfs(blkid_probe pr, con
uint64_t swab_magic = swab64(UBERBLOCK_MAGIC);
struct zfs_uberblock *ub;
int swab_endian;
- loff_t offset;
+ blkid_loff_t offset;
int tried;
int found;

View file

@ -0,0 +1,27 @@
$NetBSD: patch-ae,v 1.1.1.1 2011/01/08 20:43:39 markd Exp $
Byte order defines for other than linux
--- lib/md5.c.orig 2010-03-18 22:11:23.000000000 +0000
+++ lib/md5.c
@@ -14,7 +14,20 @@
* needed on buffers full of bytes, and then call MD5Final, which
* will fill a supplied 16-byte array with the digest.
*/
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+#include <sys/endian.h>
+#define __BYTE_ORDER _BYTE_ORDER
+#define __LITTLE_ENDIAN _LITTLE_ENDIAN
+#define __BIG_ENDIAN _BIG_ENDIAN
+#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
+#else
#include <endian.h>
+#endif
#include <string.h> /* for memcpy() */
#include "md5.h"

View file

@ -0,0 +1,19 @@
$NetBSD: patch-af,v 1.1.1.1 2011/01/08 20:43:39 markd Exp $
Dont add installed libuuid to dependecies but link it in
--- shlibs/blkid/src/Makefile.in.orig 2010-06-30 12:53:06.000000000 +0000
+++ shlibs/blkid/src/Makefile.in
@@ -382,7 +382,11 @@ libblkid_la_LIBADD = superblocks/libblki
partitions/libblkid_partitions.la \
$(common_ldadd)
-libblkid_la_DEPENDENCIES = $(libblkid_la_LIBADD) blkid.sym blkid.h.in
+libblkid_la_LIBADDx = superblocks/libblkid_superblocks.la \
+ topology/libblkid_topology.la \
+ partitions/libblkid_partitions.la
+
+libblkid_la_DEPENDENCIES = $(libblkid_la_LIBADDx) blkid.sym blkid.h.in
libblkid_la_LDFLAGS = -Wl,--version-script=$(ul_libblkid_srcdir)/blkid.sym \
-version-info $(LIBBLKID_VERSION_INFO)

View file

@ -0,0 +1,15 @@
$NetBSD: patch-ag,v 1.1.1.1 2011/01/08 20:43:39 markd Exp $
samples are linux specific and not installed anyway so dont build
--- shlibs/blkid/Makefile.in.orig 2010-06-30 12:53:05.000000000 +0000
+++ shlibs/blkid/Makefile.in
@@ -313,7 +313,7 @@ ul_libmount_la = $(top_builddir)/shlibs/
# mount.h is generated by ./configure script and stored in build directory
ul_libmount_incdir = $(ul_libmount_builddir)
-SUBDIRS = src samples $(am__append_1)
+SUBDIRS = src $(am__append_1)
# pkg-config stuff
pkgconfigdir = $(usrlib_execdir)/pkgconfig