[Glibc-bsd-commits] r3224 - in trunk: freebsd-libs/debian freebsd-libs/debian/patches kfreebsd-kernel-headers/debian kfreebsd-kernel-headers/debian/patches

Robert Millan rmh at alioth.debian.org
Mon Jan 10 15:04:26 UTC 2011


Author: rmh
Date: 2011-01-10 15:04:25 +0000 (Mon, 10 Jan 2011)
New Revision: 3224

Added:
   trunk/freebsd-libs/debian/patches/03_libsbuf.diff
Modified:
   trunk/freebsd-libs/debian/changelog
   trunk/freebsd-libs/debian/control
   trunk/freebsd-libs/debian/libsbuf-dev.install
   trunk/freebsd-libs/debian/patches/series
   trunk/freebsd-libs/debian/rules
   trunk/kfreebsd-kernel-headers/debian/changelog
   trunk/kfreebsd-kernel-headers/debian/install
   trunk/kfreebsd-kernel-headers/debian/patches/015_cam.diff
Log:
Build libsbuf-dev on non-kFreeBSD systems.  (Closes: #602766)

Modified: trunk/freebsd-libs/debian/changelog
===================================================================
--- trunk/freebsd-libs/debian/changelog	2011-01-10 08:38:40 UTC (rev 3223)
+++ trunk/freebsd-libs/debian/changelog	2011-01-10 15:04:25 UTC (rev 3224)
@@ -1,3 +1,9 @@
+freebsd-libs (8.1-6) UNRELEASED; urgency=low
+
+  * Build libsbuf-dev on non-kFreeBSD systems.  (Closes: #602766)
+
+ -- Robert Millan <rmh at debian.org>  Mon, 10 Jan 2011 16:01:31 +0100
+
 freebsd-libs (8.1-5) unstable; urgency=low
 
   * libusb2: fix USB devices detection. Closes: bug#594330.

Modified: trunk/freebsd-libs/debian/control
===================================================================
--- trunk/freebsd-libs/debian/control	2011-01-10 08:38:40 UTC (rev 3223)
+++ trunk/freebsd-libs/debian/control	2011-01-10 15:04:25 UTC (rev 3224)
@@ -3,15 +3,19 @@
 Priority: optional
 Maintainer: GNU/kFreeBSD Maintainers <debian-bsd at lists.debian.org>
 Uploaders: Aurelien Jarno <aurel32 at debian.org>
-Build-Depends: debhelper (>= 7), quilt, freebsd-buildutils, libbsd-dev (>= 0.1.4),
- libc0.1-dev (>= 2.10), libgdbm-dev, kfreebsd-kernel-headers (>= 0.51), libexpat-dev
+Build-Depends: debhelper (>= 7), quilt, freebsd-buildutils,
+ libbsd-dev (>= 0.1.4) [kfreebsd-any],
+ libc0.1-dev (>= 2.10) [kfreebsd-any],
+ libgdbm-dev [kfreebsd-any],
+ kfreebsd-kernel-headers (>= 0.51) [kfreebsd-any],
+ libexpat-dev [kfreebsd-any]
 # libexpat-dev: aka bsdxml. needed by libgeom
 Vcs-Browser: http://svn.debian.org/wsvn/glibc-bsd/trunk/freebsd-libs/
 Vcs-Svn: svn://svn.debian.org/glibc-bsd/trunk/freebsd-libs/
 Standards-Version: 3.9.1
 
 Package: libsbuf0
-Architecture: kfreebsd-any
+Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Description: FreeBSD string buffer library
  This library provide a way to handle string buffers. It contains
@@ -32,8 +36,9 @@
 
 Package: libsbuf-dev
 Section: libdevel
-Architecture: kfreebsd-any
+Architecture: any
 Depends: libsbuf0 (= ${binary:Version}), ${misc:Depends}, libc0.1-dev | libc-dev
+Replaces: kfreebsd-kernel-headers (<< 0.54)
 Description: Development files for libsbuf
  This package contains the header files and static library needed to
  compile applications that use libsbuf.

Modified: trunk/freebsd-libs/debian/libsbuf-dev.install
===================================================================
--- trunk/freebsd-libs/debian/libsbuf-dev.install	2011-01-10 08:38:40 UTC (rev 3223)
+++ trunk/freebsd-libs/debian/libsbuf-dev.install	2011-01-10 15:04:25 UTC (rev 3224)
@@ -1,2 +1,3 @@
 usr/lib/libsbuf.a
 usr/lib/libsbuf*.so
+sys/sys/sbuf.h		usr/include/sys

Added: trunk/freebsd-libs/debian/patches/03_libsbuf.diff
===================================================================
--- trunk/freebsd-libs/debian/patches/03_libsbuf.diff	                        (rev 0)
+++ trunk/freebsd-libs/debian/patches/03_libsbuf.diff	2011-01-10 15:04:25 UTC (rev 3224)
@@ -0,0 +1,44 @@
+--- a/lib/libsbuf/Makefile
++++ b/lib/libsbuf/Makefile
+@@ -4,6 +4,7 @@
+ SHLIBDIR?= /lib
+ SRCS=	subr_sbuf.c 
+ WARNS?= 2
++CFLAGS+= -I${.CURDIR}/../../sys
+ 
+ .PATH:	${.CURDIR}/../../sys/kern
+ 
+--- a/sys/kern/subr_sbuf.c
++++ b/sys/kern/subr_sbuf.c
+@@ -44,6 +44,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <sys/user.h> /* PAGE_SIZE */
+ #endif /* _KERNEL */
+ 
+ #include <sys/sbuf.h>
+--- a/sys/sys/sbuf.h
++++ b/sys/sys/sbuf.h
+@@ -31,8 +31,6 @@
+ #ifndef _SYS_SBUF_H_
+ #define	_SYS_SBUF_H_
+ 
+-#include <sys/_types.h>
+-
+ /*
+  * Structure definition
+  */
+@@ -64,10 +62,8 @@
+ int		 sbuf_bcpy(struct sbuf *, const void *, size_t);
+ int		 sbuf_cat(struct sbuf *, const char *);
+ int		 sbuf_cpy(struct sbuf *, const char *);
+-int		 sbuf_printf(struct sbuf *, const char *, ...)
+-	__printflike(2, 3);
+-int		 sbuf_vprintf(struct sbuf *, const char *, __va_list)
+-	__printflike(2, 0);
++int		 sbuf_printf(struct sbuf *, const char *, ...);
++int		 sbuf_vprintf(struct sbuf *, const char *, __va_list);
+ int		 sbuf_putc(struct sbuf *, int);
+ int		 sbuf_trim(struct sbuf *);
+ int		 sbuf_overflowed(struct sbuf *);

Modified: trunk/freebsd-libs/debian/patches/series
===================================================================
--- trunk/freebsd-libs/debian/patches/series	2011-01-10 08:38:40 UTC (rev 3223)
+++ trunk/freebsd-libs/debian/patches/series	2011-01-10 15:04:25 UTC (rev 3224)
@@ -1,5 +1,6 @@
 01_sys_cam.diff
 02_libcam.diff
+03_libsbuf.diff
 04_libkvm.diff
 05_libipx.diff
 06_libgeom.diff

Modified: trunk/freebsd-libs/debian/rules
===================================================================
--- trunk/freebsd-libs/debian/rules	2011-01-10 08:38:40 UTC (rev 3223)
+++ trunk/freebsd-libs/debian/rules	2011-01-10 15:04:25 UTC (rev 3224)
@@ -9,7 +9,7 @@
 # This has to be exported to make some magic below work.
 export DH_OPTIONS
 
-CFLAGS = -Wall -g -pipe -fPIC -I. -D_GNU_SOURCE -D'__FBSDID(string)='
+CFLAGS = -Wall -g -pipe -fPIC -I. -D_GNU_SOURCE -D'__FBSDID(string)=' -D__va_list=__builtin_va_list
 
 ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
 	CFLAGS += -O0
@@ -25,6 +25,7 @@
 DESTDIR=$(CURDIR)/debian/tmp
 PMAKE=COPTS="$(CFLAGS)" CFLAGS="$(CFLAGS)" NO_WERROR=1 NOGCCERROR=1 NOSHARED=NO NO_SHARED=NO DESTDIR=$(DESTDIR) make
 export SHLIB_MAJOR=0
+kernel=$(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
 
 get-orig-source:
 	rm -rf $(ORIGDIR)
@@ -37,6 +38,8 @@
 	svn cat $(SVN)/share/misc/usb_hid_usages > $(ORIGDIR)/lib/libusbhid/usb_hid_usages
 	mkdir -p $(ORIGDIR)/sys/kern && \
 	    svn cat $(SVN)/sys/kern/subr_sbuf.c > $(ORIGDIR)/sys/kern/subr_sbuf.c
+	mkdir -p $(ORIGDIR)/sys/sys && \
+	    svn cat $(SVN)/sys/sys/sbuf.h > $(ORIGDIR)/sys/sys/sbuf.h
 	# Remove unused files with non GPL compatible license (eg BSD 4 clauses)
 	rm -f $(ORIGDIR)/sys/cam/scsi/scsi_ch.*
 	rm -f $(ORIGDIR)/lib/libkvm/kvm_ia64.c
@@ -49,7 +52,11 @@
 	QUILT_PATCHES=debian/patches quilt push -a || test $$? = 2
 	touch $@
 
+ifeq ($(kernel), kfreebsd)
 build: build-cam build-geom build-sbuf build-ipx build-kiconv build-kvm build-usbhid build-usb build-devstat build-memstat build-netgraph
+else
+build: build-sbuf
+endif
 
 build-cam: build-cam-stamp
 build-cam-stamp: patch build-sbuf
@@ -109,6 +116,8 @@
 clean:
 	dh_testdir
 	dh_testroot
+	$(PMAKE) -C $(CURDIR)/lib/libsbuf clean
+ifeq ($(kernel), kfreebsd)
 	$(PMAKE) -C $(CURDIR)/lib/libcam clean
 	$(PMAKE) -C $(CURDIR)/lib/libnetgraph clean
 	$(PMAKE) -C $(CURDIR)/lib/libdevstat clean
@@ -117,9 +126,9 @@
 	$(PMAKE) -C $(CURDIR)/lib/libipx clean
 	$(PMAKE) -C $(CURDIR)/lib/libkiconv clean
 	$(PMAKE) -C $(CURDIR)/lib/libkvm clean
-	$(PMAKE) -C $(CURDIR)/lib/libsbuf clean
 	$(PMAKE) -C $(CURDIR)/lib/libusbhid clean
 	$(PMAKE) -C $(CURDIR)/lib/libusb clean
+endif
 	QUILT_PATCHES=debian/patches quilt pop -a -R || test $$? = 2
 	rm -rf .pc
 	rm -f *stamp
@@ -133,6 +142,7 @@
 
 	mkdir -p $(DESTDIR)/lib $(DESTDIR)/usr/lib $(DESTDIR)/usr/include $(DESTDIR)/usr/share/man/man3
 	$(PMAKE) -C $(CURDIR)/lib/libsbuf install SHLIBDIR=/usr/lib
+ifeq ($(kernel), kfreebsd)
 	$(PMAKE) -C $(CURDIR)/lib/libcam install SHLIBDIR=/usr/lib
 	$(PMAKE) -C $(CURDIR)/lib/libgeom install SHLIBDIR=/lib
 	$(PMAKE) -C $(CURDIR)/lib/libipx install SHLIBDIR=/usr/lib
@@ -148,6 +158,7 @@
 	install -m644 debian/libusb*.pc $(CURDIR)/debian/tmp/usr/lib/pkgconfig
 	mkdir -p $(CURDIR)/debian/tmp/usr/bin
 	install -m755 debian/libusb-config $(CURDIR)/debian/tmp/usr/bin
+endif
 
 	dh_install --list-missing
 
@@ -183,10 +194,12 @@
 #	dh_perl
 #	dh_python
 	dh_makeshlibs -a
+ifeq ($(kernel), kfreebsd)
 	dh_makeshlibs -plibgeom0 --add-udeb=libgeom0-udeb
 	dh_makeshlibs -plibipx2 --add-udeb=libipx2-udeb
 	dh_makeshlibs -plibsbuf0 --add-udeb=libsbuf0-udeb
 	dh_makeshlibs -plibusb2 --add-udeb=libusb2-udeb
+endif
 	dh_installdeb -a
 	dh_shlibdeps -a
 	dh_gencontrol -a

Modified: trunk/kfreebsd-kernel-headers/debian/changelog
===================================================================
--- trunk/kfreebsd-kernel-headers/debian/changelog	2011-01-10 08:38:40 UTC (rev 3223)
+++ trunk/kfreebsd-kernel-headers/debian/changelog	2011-01-10 15:04:25 UTC (rev 3224)
@@ -5,8 +5,9 @@
 
   [ Robert Millan ]
   * Add <sys/kerneldump.h> for savecore (freebsd-utils).
+  * Remove <sys/sbuf.h> (now provided by libsbuf-dev).
 
- -- Robert Millan <rmh at debian.org>  Sun, 19 Sep 2010 16:50:37 +0200
+ -- Robert Millan <rmh at debian.org>  Mon, 10 Jan 2011 16:02:23 +0100
 
 kfreebsd-kernel-headers (0.53) unstable; urgency=low
 

Modified: trunk/kfreebsd-kernel-headers/debian/install
===================================================================
--- trunk/kfreebsd-kernel-headers/debian/install	2011-01-10 08:38:40 UTC (rev 3223)
+++ trunk/kfreebsd-kernel-headers/debian/install	2011-01-10 15:04:25 UTC (rev 3224)
@@ -263,7 +263,6 @@
 sys/sys/rman.h                          usr/include/sys
 sys/sys/rtprio.h                        usr/include/sys
 sys/sys/runq.h                          usr/include/sys
-sys/sys/sbuf.h                          usr/include/sys
 sys/sys/sdt.h                           usr/include/sys
 sys/sys/selinfo.h                       usr/include/sys
 sys/sys/sigio.h                         usr/include/sys

Modified: trunk/kfreebsd-kernel-headers/debian/patches/015_cam.diff
===================================================================
--- trunk/kfreebsd-kernel-headers/debian/patches/015_cam.diff	2011-01-10 08:38:40 UTC (rev 3223)
+++ trunk/kfreebsd-kernel-headers/debian/patches/015_cam.diff	2011-01-10 15:04:25 UTC (rev 3224)
@@ -108,23 +108,6 @@
  
  /*
   * XXX: Should really be SPECNAMELEN
-Index: kfreebsd-source-8.0/sys/sys/sbuf.h
-===================================================================
---- kfreebsd-source-8.0.orig/sys/sys/sbuf.h	2009-11-12 15:49:03.000000000 +0000
-+++ kfreebsd-source-8.0/sys/sys/sbuf.h	2009-11-12 16:34:29.000000000 +0000
-@@ -64,10 +64,8 @@
- int		 sbuf_bcpy(struct sbuf *, const void *, size_t);
- int		 sbuf_cat(struct sbuf *, const char *);
- int		 sbuf_cpy(struct sbuf *, const char *);
--int		 sbuf_printf(struct sbuf *, const char *, ...)
--	__printflike(2, 3);
--int		 sbuf_vprintf(struct sbuf *, const char *, __va_list)
--	__printflike(2, 0);
-+int		 sbuf_printf(struct sbuf *, const char *, ...);
-+int		 sbuf_vprintf(struct sbuf *, const char *, va_list);
- int		 sbuf_putc(struct sbuf *, int);
- int		 sbuf_trim(struct sbuf *);
- int		 sbuf_overflowed(struct sbuf *);
 Index: kfreebsd-source-8.0/sys/sys/timespec.h
 ===================================================================
 --- kfreebsd-source-8.0.orig/sys/sys/timespec.h	2009-11-12 15:49:03.000000000 +0000




More information about the Glibc-bsd-commits mailing list