[Glibc-bsd-commits] r3519 - in trunk/kfreebsd-9/debian: . patches

Robert Millan rmh at alioth.debian.org
Sat Jul 2 15:25:19 UTC 2011


Author: rmh
Date: 2011-07-02 15:25:19 +0000 (Sat, 02 Jul 2011)
New Revision: 3519

Modified:
   trunk/kfreebsd-9/debian/changelog
   trunk/kfreebsd-9/debian/control.in
   trunk/kfreebsd-9/debian/patches/003_glibc_dev_aicasm.diff
   trunk/kfreebsd-9/debian/patches/008_config.diff
   trunk/kfreebsd-9/debian/rules
Log:
  * Switch to use the libbsd-overlay.
    - Bump libbsd-dev Build-Depends to (>= 0.3.0).
    - Add pkg-config to Build-Depends.
    - Remove some now obsolete porting code.


Modified: trunk/kfreebsd-9/debian/changelog
===================================================================
--- trunk/kfreebsd-9/debian/changelog	2011-07-02 14:08:32 UTC (rev 3518)
+++ trunk/kfreebsd-9/debian/changelog	2011-07-02 15:25:19 UTC (rev 3519)
@@ -9,8 +9,12 @@
     Remove drivers for PCI sound devices as well, also autoloaded by devd and
     which weren't present in kfreebsd-8 anyway.
   * Allow building module-less kernels (needed for mipsel).
+  * Switch to use the libbsd-overlay.
+    - Bump libbsd-dev Build-Depends to (>= 0.3.0).
+    - Add pkg-config to Build-Depends.
+    - Remove some now obsolete porting code.
 
- -- Robert Millan <rmh at debian.org>  Sat, 02 Jul 2011 15:27:40 +0200
+ -- Robert Millan <rmh at debian.org>  Sat, 02 Jul 2011 17:25:03 +0200
 
 kfreebsd-9 (9.0~svn223502-1) experimental; urgency=low
 

Modified: trunk/kfreebsd-9/debian/control.in
===================================================================
--- trunk/kfreebsd-9/debian/control.in	2011-07-02 14:08:32 UTC (rev 3518)
+++ trunk/kfreebsd-9/debian/control.in	2011-07-02 15:25:19 UTC (rev 3519)
@@ -8,7 +8,7 @@
 Build-Depends: debhelper (>= 5.0.0), bzip2, sharutils, flex-old | flex,
  freebsd-buildutils (>= 8.1-2) [!kfreebsd-any] | freebsd-buildutils (>= 7) [kfreebsd-any],
  gcc- at gcc_version@, libdb-dev,
- libbsd-dev,
+ libbsd-dev (>= 0.3.0), pkg-config,
  libsbuf-dev, libsbuf-dev (>= 8.2-2) | kfreebsd-kernel-headers (<< 0.56),
  freebsd-buildutils (>= 8.2-4) [any-mipsel],
 Standards-Version: 3.9.2

Modified: trunk/kfreebsd-9/debian/patches/003_glibc_dev_aicasm.diff
===================================================================
--- trunk/kfreebsd-9/debian/patches/003_glibc_dev_aicasm.diff	2011-07-02 14:08:32 UTC (rev 3518)
+++ trunk/kfreebsd-9/debian/patches/003_glibc_dev_aicasm.diff	2011-07-02 15:25:19 UTC (rev 3519)
@@ -1,3 +1,6 @@
+
+Sent to freebsd-hackers (2011-07-02)
+
 --- a/sys/dev/aic7xxx/aicasm/Makefile
 +++ b/sys/dev/aic7xxx/aicasm/Makefile
 @@ -3,6 +3,10 @@
@@ -16,16 +19,19 @@
  CLEANFILES+= ${GENHDRS} ${YSRCS:R:C/(.*)/\1.output/g}
  DPADD=	${LIBL}
 -LDADD=	-ll
-+LDADD=	-ll -ldb
++LDADD=	-ll -ldb -lbsd
  WARNS?=	5
 +NO_WERROR?=	1
  
  # Correct path for kernel builds
  # Don't rely on the kernel's .depend file
-@@ -24,8 +29,12 @@
+@@ -24,8 +29,15 @@
  DEPENDFILE=	.depend_aicasm
  .endif
  
++LIBBSD_CFLAGS!=	pkg-config --cflags libbsd-overlay
++CFLAGS+=	${LIBBSD_CFLAGS}
++
 +# This would discard implicit include flags in upstream GCC
 +.if ${OPSYS} == "FreeBSD"
  NOSTDINC=	-nostdinc
@@ -35,35 +41,22 @@
  .ifdef MAKESRCPATH
  CFLAGS+= -I${MAKESRCPATH}
  .endif
---- a/sys/dev/aic7xxx/aicasm/aicasm.h
-+++ b/sys/dev/aic7xxx/aicasm/aicasm.h
-@@ -42,8 +42,9 @@
-  * $FreeBSD$
-  */
- 
--#ifdef __linux__
--#include "../queue.h"
-+#include <sys/param.h>		/* __GLIBC__ */
-+#ifdef __GLIBC__
-+#include <bsd/sys/queue.h>
- #else
- #include <sys/queue.h>
- #endif
 --- a/sys/dev/aic7xxx/aicasm/aicasm_gram.y
 +++ b/sys/dev/aic7xxx/aicasm/aicasm_gram.y
-@@ -52,8 +52,9 @@
+@@ -51,12 +51,7 @@
+ #include <stdlib.h>
  #include <string.h>
  #include <sysexits.h>
- 
+-
 -#ifdef __linux__
 -#include "../queue.h"
-+#include <sys/param.h>		/* __GLIBC__ */
-+#ifdef __GLIBC__
-+#include <bsd/sys/queue.h>
- #else
+-#else
  #include <sys/queue.h>
- #endif
-@@ -1534,7 +1535,7 @@
+-#endif
+ 
+ #include "aicasm.h"
+ #include "aicasm_symbol.h"
+@@ -1534,7 +1529,7 @@
  }
  
  static void
@@ -72,78 +65,102 @@
  {
  	struct macro_arg *marg;
  	int retval;
+--- a/sys/dev/aic7xxx/aicasm/aicasm_symbol.c
++++ b/sys/dev/aic7xxx/aicasm/aicasm_symbol.c
+@@ -44,10 +44,11 @@
+ 
+ #include <sys/types.h>
+ 
+-#ifdef __linux__
+-#include "aicdb.h"
++#include <sys/param.h>		/* BSD */
++#ifdef BSD
++#include <db.h>			/* BSD native libdb */
+ #else
+-#include <db.h>
++#include <db_185.h>		/* Sleepycat 1.85 compat */
+ #endif
+ #include <ctype.h>
+ #include <fcntl.h>
+--- a/sys/dev/aic7xxx/aicasm/aicasm.c
++++ b/sys/dev/aic7xxx/aicasm/aicasm.c
+@@ -53,7 +53,7 @@
+ #include <sysexits.h>
+ #include <unistd.h>
+ 
+-#if linux
++#ifdef __GLIBC__
+ #include <endian.h>
+ #else
+ #include <machine/endian.h>
+--- a/sys/dev/aic7xxx/aicasm/aicasm.h
++++ b/sys/dev/aic7xxx/aicasm/aicasm.h
+@@ -42,11 +42,7 @@
+  * $FreeBSD$
+  */
+ 
+-#ifdef __linux__
+-#include "../queue.h"
+-#else
+ #include <sys/queue.h>
+-#endif
+ 
+ #ifndef TRUE
+ #define TRUE 1
 --- a/sys/dev/aic7xxx/aicasm/aicasm_macro_gram.y
 +++ b/sys/dev/aic7xxx/aicasm/aicasm_macro_gram.y
-@@ -52,8 +52,9 @@
+@@ -51,12 +51,7 @@
+ #include <stdlib.h>
  #include <string.h>
  #include <sysexits.h>
- 
+-
 -#ifdef __linux__
 -#include "../queue.h"
-+#include <sys/param.h>		/* __GLIBC__ */
-+#ifdef __GLIBC__
-+#include <bsd/sys/queue.h>
- #else
+-#else
  #include <sys/queue.h>
- #endif
+-#endif
+ 
+ #include "aicasm.h"
+ #include "aicasm_symbol.h"
 --- a/sys/dev/aic7xxx/aicasm/aicasm_macro_scan.l
 +++ b/sys/dev/aic7xxx/aicasm/aicasm_macro_scan.l
-@@ -51,8 +51,10 @@
+@@ -51,11 +51,7 @@
  #include <stdio.h>
  #include <string.h>
  #include <sysexits.h>
 -#ifdef __linux__
 -#include "../queue.h"
-+
-+#include <sys/param.h>		/* __GLIBC__ */
-+#ifdef __GLIBC__
-+#include <bsd/sys/queue.h>
- #else
+-#else
  #include <sys/queue.h>
- #endif
+-#endif
+ 
+ #include "aicasm.h"
+ #include "aicasm_symbol.h"
 --- a/sys/dev/aic7xxx/aicasm/aicasm_scan.l
 +++ b/sys/dev/aic7xxx/aicasm/aicasm_scan.l
-@@ -51,8 +51,10 @@
+@@ -51,11 +51,7 @@
  #include <stdio.h>
  #include <string.h>
  #include <sysexits.h>
 -#ifdef __linux__
 -#include "../queue.h"
-+
-+#include <sys/param.h>		/* __GLIBC__ */
-+#ifdef __GLIBC__
-+#include <bsd/sys/queue.h>
- #else
+-#else
  #include <sys/queue.h>
- #endif
---- a/sys/dev/aic7xxx/aicasm/aicasm_symbol.c
-+++ b/sys/dev/aic7xxx/aicasm/aicasm_symbol.c
-@@ -44,10 +44,11 @@
+-#endif
  
- #include <sys/types.h>
- 
--#ifdef __linux__
--#include "aicdb.h"
-+#include <sys/param.h>		/* BSD */
-+#ifdef BSD
-+#include <db.h>			/* BSD native libdb */
- #else
--#include <db.h>
-+#include <db_185.h>		/* Sleepycat 1.85 compat */
- #endif
- #include <ctype.h>
- #include <fcntl.h>
+ #include "aicasm.h"
+ #include "aicasm_symbol.h"
 --- a/sys/dev/aic7xxx/aicasm/aicasm_symbol.h
 +++ b/sys/dev/aic7xxx/aicasm/aicasm_symbol.h
-@@ -42,8 +42,9 @@
+@@ -42,11 +42,7 @@
   * $FreeBSD$
   */
  
 -#ifdef __linux__
 -#include "../queue.h"
-+#include <sys/param.h>		/* __GLIBC__ */
-+#ifdef __GLIBC__
-+#include <bsd/sys/queue.h>
- #else
+-#else
  #include <sys/queue.h>
- #endif
+-#endif
+ 
+ typedef enum {
+ 	UNINITIALIZED,

Modified: trunk/kfreebsd-9/debian/patches/008_config.diff
===================================================================
--- trunk/kfreebsd-9/debian/patches/008_config.diff	2011-07-02 14:08:32 UTC (rev 3518)
+++ trunk/kfreebsd-9/debian/patches/008_config.diff	2011-07-02 15:25:19 UTC (rev 3519)
@@ -1,41 +1,9 @@
 
-Author: rmh
-Status: gotta uncomment WARNS (see #351366), and find a portable way to add
-  "-lbsd".  after this it can be sent upstream.
+Sent to freebsd-hackers (2011-07-02)
 
---- a/usr.sbin/config/config.h
-+++ b/usr.sbin/config/config.h
-@@ -34,7 +34,7 @@
-  * Config.
-  */
- #include <sys/types.h>
--#include <sys/queue.h>
-+#include <bsd/sys/queue.h>
- #include <stdlib.h>
- #include <string.h>
- 
 --- a/usr.sbin/config/main.c
 +++ b/usr.sbin/config/main.c
-@@ -41,12 +41,17 @@
-   "$FreeBSD$";
- #endif /* not lint */
- 
-+#include <stdarg.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <sys/sbuf.h>
- #include <sys/file.h>
- #include <sys/mman.h>
--#include <sys/param.h>
-+#include <sys/param.h> /* BSD */
-+
-+#ifndef BSD
-+#include <bsd/string.h> /* strlcpy, strlcat */
-+#endif
- 
- #include <assert.h>
- #include <ctype.h>
-@@ -591,7 +596,11 @@
+@@ -591,7 +591,11 @@
  	if ((dirp = opendir(p)) == NULL)
  		err(EX_OSERR, "opendir %s", p);
  	while ((dp = readdir(dirp)) != NULL) {
@@ -49,13 +17,9 @@
  			continue;
 --- a/usr.sbin/config/Makefile
 +++ b/usr.sbin/config/Makefile
-@@ -9,10 +9,10 @@
- kernconf.c: kernconf.tmpl
- 	file2c 'char kernconfstr[] = {' ',0};' < ${.CURDIR}/kernconf.tmpl > kernconf.c
+@@ -12,7 +12,7 @@
+ CFLAGS+= -I. -I${.CURDIR}
  
--CFLAGS+= -I. -I${.CURDIR}
-+CFLAGS+= -I. -I${.CURDIR} -D_GNU_SOURCE
- 
  DPADD=	${LIBL} ${LIBSBUF}
 -LDADD=	-ll -lsbuf
 +LDADD=	-ll -lsbuf -lbsd

Modified: trunk/kfreebsd-9/debian/rules
===================================================================
--- trunk/kfreebsd-9/debian/rules	2011-07-02 14:08:32 UTC (rev 3518)
+++ trunk/kfreebsd-9/debian/rules	2011-07-02 15:25:19 UTC (rev 3519)
@@ -139,7 +139,7 @@
 config-stamp: src
 	rm -rf config
 	cp -af src/usr.sbin/config config
-	CFLAGS="-D__va_list=__builtin_va_list" $(MAKE) -C config
+	CFLAGS="-D__va_list=__builtin_va_list $(shell pkg-config --cflags libbsd-overlay)" $(MAKE) -C config
 	touch $@
 
 build-arch: $(foreach flavor,$(flavours),build-flavor-$(flavor)-stamp)




More information about the Glibc-bsd-commits mailing list