Author: rmh
Date: 2006-02-10 16:31:21 +0000 (Fri, 10 Feb 2006)
New Revision: 1158

Added:
   trunk/freebsd6-buildutils/debian/links
   trunk/freebsd6-buildutils/debian/patches/11_config_allow_override.diff
Modified:
   trunk/freebsd6-buildutils/debian/changelog
   trunk/freebsd6-buildutils/debian/control
   trunk/freebsd6-buildutils/debian/dirs
   trunk/freebsd6-buildutils/debian/patches/01_make_fixes.diff
   trunk/freebsd6-buildutils/debian/patches/03_glibc.diff
   trunk/freebsd6-buildutils/debian/rules
Log:
  * Fork 6.x branch.
  * Switch to libbsd.
    - control (Build-Depends): Add libbsd-dev.
    - rules: export LDADD=-lbsd
    - patches/03_glibc.diff:
      - usr.sbin/config/main.c: Nuke strl{cpy,cat} hack.
      - usr.sbin/mtree/excludes.c: Nuke fgetln hack.
      - usr.bin/make/Makefile: Stop adding LDADD=-lbsd (now passed from rules).
    - patches/11_config_allow_override.diff:
      - usr.sbin/config/Makefile: s/LDADD=/LDADD+=/g.
  * Make dash and gcc-3.4 the default "sh" and "cc".
    - control (Depends): Add gcc-3.4.
    - links: New.  Setup sh and cc symlinks.
  * Pass NO_SHARED=NO from debian/rules
    - rules
    - patches/01_make_fixes.diff: Nuke part that disables NO_SHARED.
  * patches/03_glibc.diff:
    - Remove s,sys/time.h/time.h,g (was it ever needed?)
    - Nuke LIST_* defines (should be in sys/queue.h, or find another
    solution, like s,sys/queue.h,bsd/queue.h,g)
  * rules:
    - Only apply patches with *.diff suffix.

Changes specific to svn version (not in changelog):

* Put stuff in /usr/lib/freebsd
  - control: Conflict and Provide freebsd-buildutils (instead of depending on 
it).
  - dirs: s/freebsd6/freebsd/g
  - rules: s/freebsd6/freebsd/g
* rules:  Re-enable awk and make.



Modified: trunk/freebsd6-buildutils/debian/changelog
===================================================================
--- trunk/freebsd6-buildutils/debian/changelog  2006-02-10 15:22:58 UTC (rev 
1157)
+++ trunk/freebsd6-buildutils/debian/changelog  2006-02-10 16:31:21 UTC (rev 
1158)
@@ -1,8 +1,29 @@
 freebsd6-buildutils (6.0-0.1) unstable; urgency=low
 
-  * FUCK!!
+  * Fork 6.x branch.
+  * Switch to libbsd.
+    - control (Build-Depends): Add libbsd-dev.
+    - rules: export LDADD=-lbsd
+    - patches/03_glibc.diff:
+      - usr.sbin/config/main.c: Nuke strl{cpy,cat} hack.
+      - usr.sbin/mtree/excludes.c: Nuke fgetln hack.
+      - usr.bin/make/Makefile: Stop adding LDADD=-lbsd (now passed from rules).
+    - patches/11_config_allow_override.diff:
+      - usr.sbin/config/Makefile: s/LDADD=/LDADD+=/g.
+  * Make dash and gcc-3.4 the default "sh" and "cc".
+    - control (Depends): Add gcc-3.4.
+    - links: New.  Setup sh and cc symlinks.
+  * Pass NO_SHARED=NO from debian/rules
+    - rules
+    - patches/01_make_fixes.diff: Nuke part that disables NO_SHARED.
+  * patches/03_glibc.diff:
+    - Remove s,sys/time.h/time.h,g (was it ever needed?)
+    - Nuke LIST_* defines (should be in sys/queue.h, or find another
+    solution, like s,sys/queue.h,bsd/queue.h,g)
+  * rules:
+    - Only apply patches with *.diff suffix.
 
- -- Robert Millan <[EMAIL PROTECTED]>  Fri, 16 Dec 2005 23:48:41 +0100
+ -- Robert Millan <[EMAIL PROTECTED]>  Fri, 10 Feb 2006 17:20:42 +0100
 
 freebsd5-buildutils (5.4-3) unstable; urgency=low
 

Modified: trunk/freebsd6-buildutils/debian/control
===================================================================
--- trunk/freebsd6-buildutils/debian/control    2006-02-10 15:22:58 UTC (rev 
1157)
+++ trunk/freebsd6-buildutils/debian/control    2006-02-10 16:31:21 UTC (rev 
1158)
@@ -3,12 +3,14 @@
 Priority: extra
 Maintainer: GNU/kFreeBSD Maintainers <[email protected]>
 Uploaders: Aurelien Jarno <[EMAIL PROTECTED]>, Guillem Jover <[EMAIL 
PROTECTED]>
-Build-Depends: patchutils (>= 0.2.25), debhelper (>= 4.1.0), pmake, flex, bison
+Build-Depends: patchutils (>= 0.2.25), debhelper (>= 4.1.0), pmake, flex, 
bison, libbsd-dev
 Standards-Version: 3.6.2
 
 Package: freebsd6-buildutils
 Architecture: any
-Depends: ${shlibs:Depends}, freebsd5-buildutils, bsdmainutils, dash, unzip, 
patchutils
+Depends: ${shlibs:Depends}, bsdmainutils, dash, unzip, patchutils, gcc-3.4
+Conflicts: freebsd5-buildutils, freebsd-buildutils
+Provides: freebsd-buildutils
 Description: Utilities for building FreeBSD 6.x sources
  This package contains the FreeBSD 6.x counterparts of some standard build
  utilities (make, yacc, lex ..)

Modified: trunk/freebsd6-buildutils/debian/dirs
===================================================================
--- trunk/freebsd6-buildutils/debian/dirs       2006-02-10 15:22:58 UTC (rev 
1157)
+++ trunk/freebsd6-buildutils/debian/dirs       2006-02-10 16:31:21 UTC (rev 
1158)
@@ -9,4 +9,4 @@
 usr/lib
 var/db
 usr/share/mk
-usr/lib/freebsd6
+usr/lib/freebsd

Added: trunk/freebsd6-buildutils/debian/links
===================================================================
--- trunk/freebsd6-buildutils/debian/links      2006-02-10 15:22:58 UTC (rev 
1157)
+++ trunk/freebsd6-buildutils/debian/links      2006-02-10 16:31:21 UTC (rev 
1158)
@@ -0,0 +1,2 @@
+bin/dash               usr/lib/freebsd/sh
+usr/bin/gcc-3.4                usr/lib/freebsd/cc

Modified: trunk/freebsd6-buildutils/debian/patches/01_make_fixes.diff
===================================================================
--- trunk/freebsd6-buildutils/debian/patches/01_make_fixes.diff 2006-02-10 
15:22:58 UTC (rev 1157)
+++ trunk/freebsd6-buildutils/debian/patches/01_make_fixes.diff 2006-02-10 
16:31:21 UTC (rev 1158)
@@ -169,17 +169,6 @@
  SHAREMODE?=   ${NOBINMODE}
  
  MANDIR?=      ${SHAREDIR}/man/man
-diff -ur ../foo.old/src/usr.bin/make/Makefile ./src/usr.bin/make/Makefile
---- ../foo.old/src/usr.bin/make/Makefile       2005-12-17 12:46:35.000000000 
+0100
-+++ ./src/usr.bin/make/Makefile        2005-12-17 12:49:11.000000000 +0100
-@@ -10,7 +10,6 @@
- 
- NO_WERROR=
- WARNS?=       6
--NO_SHARED?=   YES
- 
- CFLAGS+=-DMAKE_VERSION=\"5200408120\"
- .if defined(_UPGRADING)
 diff -ur ../foo.old/src/usr.bin/make/pathnames.h ./src/usr.bin/make/pathnames.h
 --- ../foo.old/src/usr.bin/make/pathnames.h    2005-03-11 14:02:38.000000000 
+0100
 +++ ./src/usr.bin/make/pathnames.h     2005-12-17 12:49:11.000000000 +0100

Modified: trunk/freebsd6-buildutils/debian/patches/03_glibc.diff
===================================================================
--- trunk/freebsd6-buildutils/debian/patches/03_glibc.diff      2006-02-10 
15:22:58 UTC (rev 1157)
+++ trunk/freebsd6-buildutils/debian/patches/03_glibc.diff      2006-02-10 
16:31:21 UTC (rev 1158)
@@ -1,18 +1,6 @@
 
   FIXME:  use libbsd instead (strlcpy, strvis, strunvis ...)
 
-diff -ur ../foo.old/src/usr.bin/make/main.c ./src/usr.bin/make/main.c
---- ../foo.old/src/usr.bin/make/main.c 2005-12-16 23:52:51.000000000 +0100
-+++ ./src/usr.bin/make/main.c  2005-12-16 23:53:18.000000000 +0100
-@@ -64,7 +64,7 @@
- #include <sys/param.h>
- #include <sys/stat.h>
- #include <sys/sysctl.h>
--#include <sys/time.h>
-+#include <time.h>
- #include <sys/queue.h>
- #include <sys/resource.h>
- #include <sys/utsname.h>
 diff -ur ../foo.old/src/usr.sbin/btxld/btx.h ./src/usr.sbin/btxld/btx.h
 --- ../foo.old/src/usr.sbin/btxld/btx.h        1999-08-28 03:15:41.000000000 
+0200
 +++ ./src/usr.sbin/btxld/btx.h 2005-12-16 23:52:43.000000000 +0100
@@ -47,89 +35,6 @@
  
  struct elfh {
      Elf32_Ehdr e;             /* ELF header */
-diff -ur ../foo.old/src/usr.sbin/config/main.c ./src/usr.sbin/config/main.c
---- ../foo.old/src/usr.sbin/config/main.c      2005-12-16 23:52:51.000000000 
+0100
-+++ ./src/usr.sbin/config/main.c       2005-12-16 23:52:43.000000000 +0100
-@@ -87,6 +87,79 @@
-       struct hdr_list *h_next;
- } *htab;
- 
-+#ifndef __FreeBSD__
-+/*
-+ * Copy src to string dst of size siz.  At most siz-1 characters
-+ * will be copied.  Always NUL terminates (unless siz == 0).
-+ * Returns strlen(src); if retval >= siz, truncation occurred.
-+ */
-+size_t strlcpy(dst, src, siz)
-+      char *dst;
-+      const char *src;
-+      size_t siz;
-+{
-+      char *d = dst;
-+      const char *s = src;
-+      size_t n = siz;
-+
-+      /* Copy as many bytes as will fit */
-+      if (n != 0 && --n != 0) {
-+              do {
-+                      if ((*d++ = *s++) == 0)
-+                              break;
-+              } while (--n != 0);
-+      }
-+
-+      /* Not enough room in dst, add NUL and traverse rest of src */
-+      if (n == 0) {
-+              if (siz != 0)
-+                      *d = '\0';              /* NUL-terminate dst */
-+              while (*s++)
-+                      ;
-+      }
-+
-+      return(s - src - 1);    /* count does not include NUL */
-+}
-+
-+/*
-+ * Appends src to string dst of size siz (unlike strncat, siz is the
-+ * full size of dst, not space left).  At most siz-1 characters
-+ * will be copied.  Always NUL terminates (unless siz <= strlen(dst)).
-+ * Returns strlen(src) + MIN(siz, strlen(initial dst)).
-+ * If retval >= siz, truncation occurred.
-+ */
-+size_t
-+strlcat(dst, src, siz)
-+      char *dst;
-+      const char *src;
-+      size_t siz;
-+{
-+      char *d = dst;
-+      const char *s = src;
-+      size_t n = siz;
-+      size_t dlen;
-+
-+      /* Find the end of dst and adjust bytes left but don't go past end */
-+      while (n-- != 0 && *d != '\0')
-+              d++;
-+      dlen = d - dst;
-+      n = siz - dlen;
-+
-+      if (n == 0)
-+              return(dlen + strlen(s));
-+      while (*s != '\0') {
-+              if (n != 1) {
-+                      *d++ = *s;
-+                      n--;
-+              }
-+              s++;
-+      }
-+      *d = '\0';
-+
-+      return(dlen + (s - src));       /* count does not include NUL */
-+}
-+#endif
-+
- /*
-  * Config builds a set of files for building a UNIX
-  * system given a description of the desired system.
 diff -ur ../foo.old/src/usr.sbin/mtree/Makefile ./src/usr.sbin/mtree/Makefile
 --- ../foo.old/src/usr.sbin/mtree/Makefile     2005-03-29 13:44:17.000000000 
+0200
 +++ ./src/usr.sbin/mtree/Makefile      2005-12-16 23:53:50.000000000 +0100
@@ -213,59 +118,6 @@
  
        if (iflag || S_ISDIR(p->fts_statp->st_mode))
                offset = printf("%*s%s", indent, "", escaped_name);
-diff -ur ../foo.old/src/usr.sbin/mtree/excludes.c 
./src/usr.sbin/mtree/excludes.c
---- ../foo.old/src/usr.sbin/mtree/excludes.c   2003-10-21 10:27:05.000000000 
+0200
-+++ ./src/usr.sbin/mtree/excludes.c    2005-12-16 23:52:43.000000000 +0100
-@@ -27,6 +27,8 @@
-  * SUCH DAMAGE.
-  */
- 
-+#define _GNU_SOURCE /* getline */
-+
- #include <sys/cdefs.h>
- __FBSDID("$FreeBSD: ./src/usr.sbin/mtree/excludes.c,v 1.8 2003/10/21 08:27:05 
phk Exp $");
- 
-@@ -43,6 +45,20 @@
- #include "mtree.h"            /* XXX for extern.h */
- #include "extern.h"
- 
-+#ifdef __GLIBC__
-+char *
-+fgetln (FILE *stream, size_t *len)
-+{
-+      char *line=NULL;
-+
-+      getline (&line, len, stream);
-+
-+      (*len)--; /* get rid of the trailing \0, fgetln
-+      does not have it */
-+      return line;
-+}
-+#endif
-+
- /*
-  * We're assuming that there won't be a whole lot of excludes,
-  * so it's OK to use a stupid algorithm.
-@@ -102,6 +118,19 @@
-       /* fnmatch(3) has a funny return value convention... */
- #define MATCH(g, n) (fnmatch((g), (n), FNM_PATHNAME) == 0)
- 
-+#ifndef LIST_FIRST
-+#define       LIST_FIRST(head)        ((head)->lh_first)
-+#endif
-+#ifndef LIST_NEXT
-+#define       LIST_NEXT(elm, field)   ((elm)->field.le_next)
-+#endif
-+#ifndef LIST_FOREACH
-+#define       LIST_FOREACH(var, head, field)                          \
-+      for ((var) = LIST_FIRST((head));                                \
-+          (var);                                                      \
-+          (var) = LIST_NEXT((var), field))
-+#endif
-+
-       LIST_FOREACH(e, &excludes, link) {
-               if ((e->pathname && MATCH(e->glob, path))
-                   || MATCH(e->glob, fname))
 diff -ur ../foo.old/src/usr.sbin/mtree/spec.c ./src/usr.sbin/mtree/spec.c
 --- ../foo.old/src/usr.sbin/mtree/spec.c       2005-12-16 23:52:51.000000000 
+0100
 +++ ./src/usr.sbin/mtree/spec.c        2005-12-16 23:52:43.000000000 +0100
@@ -314,16 +166,6 @@
                        break;
  #ifdef ST_MTIM
                case F_TIME:
---- src/usr.bin/make/Makefile~ 2005-12-17 11:53:50.000000000 +0100
-+++ src/usr.bin/make/Makefile  2005-12-17 11:55:56.000000000 +0100
-@@ -4,6 +4,7 @@
- 
- PROG= make
- CFLAGS+=-I${.CURDIR}
-+LDADD += -lbsd # arc4random
- SRCS= arch.c buf.c cond.c dir.c for.c hash.c hash_tables.c job.c      \
-       lst.c main.c make.c parse.c proc.c shell.c str.c suff.c targ.c  \
-       util.c var.c
 --- src/usr.sbin/mtree/specspec.c~     2005-12-17 11:59:50.000000000 +0100
 +++ src/usr.sbin/mtree/specspec.c      2005-12-17 12:04:11.000000000 +0100
 @@ -83,8 +83,6 @@
@@ -342,19 +184,7 @@
  
        fprintf(stderr, "usage: %s [-n count] [-x] [prefix [suffix]]\n",
 -          getprogname());
-+          argv[0]);
++          NULL);
        exit(1);
  }
  
---- src/usr.bin/file2c/file2c.c~       2005-12-17 12:07:42.000000000 +0100
-+++ src/usr.bin/file2c/file2c.c        2005-12-17 12:10:00.000000000 +0100
-@@ -18,8 +18,7 @@
- usage(void)
- {
- 
--      fprintf(stderr, "usage: %s [-n count] [-x] [prefix [suffix]]\n",
--          argv[0]);
-+      fprintf(stderr, "usage: file2c [-n count] [-x] [prefix [suffix]]\n");
-       exit(1);
- }
- 

Added: trunk/freebsd6-buildutils/debian/patches/11_config_allow_override.diff
===================================================================
--- trunk/freebsd6-buildutils/debian/patches/11_config_allow_override.diff      
2006-02-10 15:22:58 UTC (rev 1157)
+++ trunk/freebsd6-buildutils/debian/patches/11_config_allow_override.diff      
2006-02-10 16:31:21 UTC (rev 1158)
@@ -0,0 +1,11 @@
+--- src/usr.sbin/config/Makefile~      2006-02-10 17:08:36.000000000 +0100
++++ src/usr.sbin/config/Makefile       2006-02-10 17:10:54.000000000 +0100
+@@ -10,7 +10,7 @@
+ CFLAGS+= -I. -I${.CURDIR}
+ 
+ DPADD=        ${LIBL}
+-LDADD=        -ll
++LDADD+=       -ll
+ 
+ mkmakefile.o: configvers.h
+ 

Modified: trunk/freebsd6-buildutils/debian/rules
===================================================================
--- trunk/freebsd6-buildutils/debian/rules      2006-02-10 15:22:58 UTC (rev 
1157)
+++ trunk/freebsd6-buildutils/debian/rules      2006-02-10 16:31:21 UTC (rev 
1158)
@@ -7,14 +7,15 @@
 
 # These are used for cross-compiling and for saving the configure script
 # from having to guess our platform (since we know it already)
-DEB_BUILD_GNU_TYPE      := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-DEB_BUILD_GNU_CPU       := $(shell dpkg-architecture -qDEB_BUILD_GNU_CPU)
-DEB_HOST_ARCH_CPU        := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
+DEB_BUILD_GNU_TYPE     := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+DEB_BUILD_GNU_CPU      := $(shell dpkg-architecture -qDEB_BUILD_GNU_CPU)
+DEB_HOST_ARCH_CPU      := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
 
 PMAKE=pmake
 CFLAGS=-O2 -g -Wall -DMACHINE_ARCH='\"$(DEB_HOST_ARCH_CPU)\"'
-MAKE_BUILD_FLAGS= COPTS="$(CFLAGS)" NO_WERROR=1 NOGCCERROR=1 NOSHARED=NO
+MAKE_BUILD_FLAGS= COPTS="$(CFLAGS)" NO_WERROR=1 NOGCCERROR=1 NOSHARED=NO 
NO_SHARED=NO
 YACC=$(CURDIR)/build-tree/src/usr.bin/yacc/yacc
+export LDADD=-lbsd
 
 package=freebsd6-buildutils
 
@@ -25,7 +26,8 @@
        find build-tree -type d -name CVS | xargs rm -rf
        find build-tree -type f | (while read i ; do sed -i $$i -e 
"/^__FBSDID/d" ; done)
        set -e ; cd build-tree && \
-               for i in $(CURDIR)/debian/patches/* ; do \
+               for i in $(CURDIR)/debian/patches/*.diff ; do \
+                 echo "--- Patch $$i ---" ; \
                  patch -p0 < $$i ; \
                done
        touch unpack-stamp
@@ -37,6 +39,12 @@
        cd build-tree/src/usr.bin/yacc ; \
                $(PMAKE) $(MAKE_BUILD_FLAGS)
 
+       cd build-tree/src/contrib/one-true-awk ; \
+               $(YACC) -d -o awkgram.c ../../contrib/one-true-awk/awkgram.y
+       cd build-tree/src/usr.bin/awk ; \
+               ln -sf ../../contrib/one-true-awk/awkgram.h ytab.h ; \
+               $(PMAKE) $(MAKE_BUILD_FLAGS)
+
        cd build-tree/src/usr.bin/cksum ; $(PMAKE) $(MAKE_BUILD_FLAGS)
 
        cd build-tree/src/usr.bin/lex ; \
@@ -44,6 +52,9 @@
                $(YACC) -d -o parse.c parse.y ; \
                $(PMAKE) $(MAKE_BUILD_FLAGS)
 
+       cd build-tree/src/usr.bin/make ; \
+               $(PMAKE) $(MAKE_BUILD_FLAGS)
+
        cd build-tree/src/usr.bin/mkdep ; $(PMAKE) $(MAKE_BUILD_FLAGS)
 
        cd build-tree/src/usr.sbin/config ; \
@@ -78,6 +89,10 @@
        cp -af $(CURDIR)/build-tree/ports \
                $(CURDIR)/debian/$(package)/usr/share/$(package)
 
+       # rename awk
+       mv $(CURDIR)/debian/$(package)/usr/bin/nawk \
+               $(CURDIR)/debian/$(package)/usr/bin/awk
+
        # remove trash
        rm -rf  $(CURDIR)/debian/$(package)/usr/include \
                $(CURDIR)/debian/$(package)/usr/share/man \
@@ -87,9 +102,9 @@
        mv \
                $(CURDIR)/debian/$(package)/usr/bin/* \
                $(CURDIR)/debian/$(package)/usr/sbin/* \
-               $(CURDIR)/debian/$(package)/usr/lib/freebsd6/
+               $(CURDIR)/debian/$(package)/usr/lib/freebsd/
        for i in `cd $(CURDIR)/debian/$(package)/usr/lib/freebsd && ls` ; do \
-               ln -s ../lib/freebsd6/$$i \
+               ln -s ../lib/freebsd/$$i \
                $(CURDIR)/debian/$(package)/usr/bin/freebsd-$$i ; \
        done
        rmdir $(CURDIR)/debian/$(package)/usr/sbin


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to