On Wed, Feb 15, 2006 at 12:15:40PM +0100, Aurelien Jarno wrote:
> Hi,
> 
> Please find attached and updated version of this patch, against the
> latest SVN.
> 
> Bye,
> Aurelien
> 
> -- 
>   .''`.  Aurelien Jarno                   | GPG: 1024D/F1BCDB73
>  : :' :  Debian developer           | Electrical Engineer
>  `. `'   [EMAIL PROTECTED]         | [EMAIL PROTECTED]
>    `-    people.debian.org/~aurel32 | www.aurel32.net

> Index: debian/control.in/opt
> ===================================================================
> --- debian/control.in/opt     (révision 1173)
> +++ debian/control.in/opt     (copie de travail)
> @@ -56,3 +56,23 @@
>   Most notably, IBM's JDK. If you experience problems with such
>   applications, you will need to remove this package.
>  
> +Package: libc0.1-i686
> +Architecture: kfreebsd-i386
> +Section: libs
> +Priority: extra
> +Pre-Depends: @libc@ (= ${Source-Version})
> +Description: GNU C Library: Shared libraries [i686 optimized]
> + Contains the standard libraries that are used by nearly all programs on
> + the system. This package includes shared versions of the standard C
> + library and the standard math library, as well as many others.
> + .
> + This set of libraries is optimized for i686 machines, and will only be
> + used on an i686 class CPU (check the output of `uname -m').  This includes 
> + Pentium Pro, Pentium II/III/IV, Celeron CPU's and similar class CPU's
> + (including clones such as AMD Athlon/Opteron, VIA C3 Nehemiah, but not VIA 
> + C3 Ezla).  
> +  .
> + WARNING: Some third-party binaries may not work well with these libraries.
> + Most notably, IBM's JDK. If you experience problems with such
> + applications, you will need to remove this package.
> +
> Index: debian/control.in/main
> ===================================================================
> --- debian/control.in/main    (révision 1173)
> +++ debian/control.in/main    (copie de travail)
> @@ -1,7 +1,7 @@
>  Source: @glibc@
>  Section: libs
>  Priority: required
> -Build-Depends: gettext (>= 0.10.37-1), make (>= 3.80-1), dpkg-dev (>= 
> 1.13.5), debianutils (>= 1.13.1), tar (>= 1.13.11), bzip2, texinfo (>= 4.0), 
> linux-kernel-headers (>= 2.6.13+0rc3-2) [!hurd-i386], mig (>= 1.3-2) 
> [hurd-i386], hurd-dev (>= 20020608-1) [hurd-i386], gnumach-dev [hurd-i386], 
> texi2html, file, gcc-4.0 [!powerpc !m68k !hppa !hurd-i386], gcc-3.4 (>= 
> 3.4.4-6) [powerpc], gcc-3.4 [m68k hppa], gcc-3.3 [hurd-i386], autoconf, 
> binutils (>= 2.16.1cvs20051109-1), sed (>= 4.0.5-4), gawk, debhelper (>= 
> 4.1.76), libc6-dev-amd64 [i386], libc6-dev-ppc64 [powerpc], quilt
> +Build-Depends: gettext (>= 0.10.37-1), make (>= 3.80-1), dpkg-dev (>= 
> 1.13.5), debianutils (>= 1.13.1), tar (>= 1.13.11), bzip2, texinfo (>= 4.0), 
> linux-kernel-headers (>= 2.6.13+0rc3-2) [!hurd-i386 !kfreebsd-i386], mig (>= 
> 1.3-2) [hurd-i386], hurd-dev (>= 20020608-1) [hurd-i386], gnumach-dev 
> [hurd-i386], kfreebsd-kernel-headers (>= 0.01) [kfreebsd-i386], texi2html, 
> file, gcc-4.0 [!powerpc !m68k !hppa !hurd-i386], gcc-3.4 (>= 3.4.4-6) 
> [powerpc], gcc-3.4 [m68k hppa], gcc-3.3 [hurd-i386], autoconf, binutils (>= 
> 2.16.1cvs20051109-1), sed (>= 4.0.5-4), gawk, debhelper (>= 4.1.76), 
> libc6-dev-amd64 [i386], libc6-dev-ppc64 [powerpc], quilt
>  Build-Depends-Indep: perl, po-debconf
>  Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org>
>  Uploaders: Ben Collins <[EMAIL PROTECTED]>, GOTO Masanori <[EMAIL 
> PROTECTED]>, Philip Blundell <[EMAIL PROTECTED]>, Jeff Bailey <[EMAIL 
> PROTECTED]>, Daniel Jacobowitz <[EMAIL PROTECTED]>, Clint Adams <[EMAIL 
> PROTECTED]>, Denis Barbier <[EMAIL PROTECTED]>
> Index: debian/rules
> ===================================================================
> --- debian/rules      (révision 1173)
> +++ debian/rules      (copie de travail)
> @@ -45,6 +45,7 @@
>  DEB_HOST_ARCH         ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
>  DEB_HOST_GNU_CPU      ?= $(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
>  DEB_HOST_GNU_TYPE     ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
> +DEB_HOST_GNU_SYSTEM   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_SYSTEM)
>  DEB_HOST_ARCH_OS      ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
>  DEB_BUILD_ARCH        ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
>  DEB_BUILD_GNU_CPU     ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_CPU)
> Index: debian/sysdeps/kfreebsd-i386.mk
> ===================================================================
> --- debian/sysdeps/kfreebsd-i386.mk   (révision 0)
> +++ debian/sysdeps/kfreebsd-i386.mk   (révision 0)
> @@ -0,0 +1,11 @@
> +GLIBC_PASSES += i686
> +DEB_ARCH_REGULAR_PACKAGES += libc0.1-i686
> +
> +# We use -march=i686 and glibc's i686 routines use cmov, so require it.
> +# A Debian-local glibc patch adds cmov to the search path.
> +i686_add-ons = linuxthreads $(add-ons)
> +i686_configure_target=i686-kfreebsd
> +i686_configure_build=i686-kfreebsd
> +i686_extra_cflags = -march=i686 -mtune=i686 -g1 -O3
> +i686_LIBDIR = /i686/cmov
> +i686_extra_config_options = $(extra_config_options) --disable-profile 
> --with-tls --with-__thread --disable-compatible-utmp
> Index: debian/sysdeps/kfreebsd-gnu.mk
> ===================================================================
> --- debian/sysdeps/kfreebsd-gnu.mk    (révision 1173)
> +++ debian/sysdeps/kfreebsd-gnu.mk    (copie de travail)
> @@ -1,11 +0,0 @@
> -# This is for a Glibc-using FreeBSD system.
> -
> -GLIBC_OVERLAYS ?= $(shell ls glibc-linuxthreads* glibc-ports* glibc-libidn*)
> -
> -libc = libc1
> -
> -# Linuxthreads Config
> -threads = yes
> -libc_add-ons = linuxthreads $(add-ons)
> -
> -extra_config_options = $(extra_config_options) --disable-compatible-utmp 
> --enable-kernel-include=4.6
> Index: debian/sysdeps/kfreebsd.mk
> ===================================================================
> --- debian/sysdeps/kfreebsd.mk        (révision 0)
> +++ debian/sysdeps/kfreebsd.mk        (révision 0)
> @@ -0,0 +1,61 @@
> +GLIBC_OVERLAYS ?= $(shell ls glibc-linuxthreads* glibc-ports* glibc-libidn*)
> +MIN_KERNEL_SUPPORTED := 5.4.0
> +libc = libc0.1
> +
> +# Support multiple makes at once based on number of processors
> +# Common wisdom says parallel make can be up to 2n+1.
> +# Should we do that to get faster builds?
> +NJOBS:=$(shell getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1)
> +ifeq ($(NJOBS),-1)
> + NJOBS:=1
> +endif
> +
> +ifeq ($(NJOBS),0)
> + NJOBS=1
> +endif
> +
> +# Linuxthreads Config
> +threads = yes
> +libc_add-ons = linuxthreads $(add-ons)
> +libc_extra_config_options = $(extra_config_options) --with-tls 
> --with-__thread --disable-compatible-utmp
> +
> +ifndef KFREEBSD_SOURCE
> +  KFREEBSD_HEADERS := /usr/include
> +else
> +  KFREEBSD_HEADERS := $(KFREEBSD_SOURCE)/sys
> +endif
> +
> +# Minimum Kernel supported
> +with_headers = --with-headers=$(shell pwd)/debian/include 
> --enable-kernel=$(call xx,MIN_KERNEL_SUPPORTED)
> +
> +KERNEL_HEADER_DIR = $(stamp)mkincludedir
> +$(stamp)mkincludedir:
> +     rm -rf debian/include
> +     mkdir debian/include
> +     ln -s $(KFREEBSD_HEADERS)/machine debian/include
> +     ln -s $(KFREEBSD_HEADERS)/net debian/include
> +     ln -s $(KFREEBSD_HEADERS)/netatalk debian/include
> +     ln -s $(KFREEBSD_HEADERS)/netipx debian/include
> +     ln -s $(KFREEBSD_HEADERS)/osreldate.h debian/include
> +     ln -s $(KFREEBSD_HEADERS)/sys debian/include
> +     ln -s $(KFREEBSD_HEADERS)/vm debian/include
> +
> +     # To make configure happy if libc0.1-dev is not installed.
> +     touch debian/include/assert.h
> +
> +     touch $@
> +
> +# Also to make configure happy.
> +export CPPFLAGS = -isystem $(shell pwd)/debian/include
> +
> +# This round of ugliness decomposes the FreeBSD kernel version number
> +# into an integer so it can be easily compared and then does so.
> +CURRENT_KERNEL_VERSION=$(shell uname -r)
> +define kernel_check
> +(minimum=$$((`echo $(1) | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1 \* 
> 10000 + \2 \* 100 + \3/'`)); \
> +current=$$((`echo $(CURRENT_KERNEL_VERSION) | sed 
> 's/\([0-9]*\)\.\([0-9]*\).*/\1 \* 10000 + \2 \* 100/'`)); \
> +if [ $$current -lt $$minimum ]; then \
> +  false; \
> +fi)
> +endef
> +
> Index: debian/sysdeps/depflags.pl
> ===================================================================
> --- debian/sysdeps/depflags.pl        (révision 1173)
> +++ debian/sysdeps/depflags.pl        (copie de travail)
> @@ -33,6 +33,13 @@
>               'ppp (<= 2.2.0f-24)', 'libgdbmg1-dev (<= 1.7.3-24)');
>      push @{$libc_dev_c{'Depends'}}, 'linux-kernel-headers';
>  }
> +if ($DEB_HOST_GNU_SYSTEM eq "kfreebsd-gnu") {
> +    push @{$libc_c{'Suggests'}}, 'locales';
> +    push @{$libc_c{'Replaces'}}, 'libc0.1-dev (<< 2.3.2.ds1-14)';
> +    push @{$libc_dev_c{'Recommends'}}, 'c-compiler';
> +    push @{$libc_dev_c{'Replaces'}}, 'kfreebsd-kernel-headers (<< 0.11)';
> +    push @{$libc_dev_c{'Depends'}}, 'kfreebsd-kernel-headers (>= 0.11)';
> +}
>  
>  # ${glibc}-doc is suggested by $libc_c and $libc_dev_c.
>  push @{$libc_c{'Suggests'}}, "${glibc}-doc";
> Index: debian/sysdeps/linux.mk
> ===================================================================
> --- debian/sysdeps/linux.mk   (révision 1173)
> +++ debian/sysdeps/linux.mk   (copie de travail)
> @@ -39,7 +39,7 @@
>  nptl_MIN_KERNEL_SUPPORTED = 2.6.0
>  nptl_LIBDIR = /tls
>  
> -LINUX_HEADER_DIR = $(stamp)mkincludedir
> +KERNEL_HEADER_DIR = $(stamp)mkincludedir
>  $(stamp)mkincludedir:
>       rm -rf debian/include
>       mkdir debian/include
> Index: debian/rules.d/build.mk
> ===================================================================
> --- debian/rules.d/build.mk   (révision 1173)
> +++ debian/rules.d/build.mk   (copie de travail)
> @@ -13,7 +13,7 @@
>  
>  
>  $(patsubst %,mkbuilddir_%,$(GLIBC_PASSES)) :: mkbuilddir_% : 
> $(stamp)mkbuilddir_%
> -$(stamp)mkbuilddir_%: $(stamp)patch-stamp $(LINUX_HEADER_DIR)
> +$(stamp)mkbuilddir_%: $(stamp)patch-stamp $(KERNEL_HEADER_DIR)
>       @echo Making builddir for $(curpass)
>       test -d $(DEB_BUILDDIR) || mkdir $(DEB_BUILDDIR)
>       touch $@
> Index: debian/rules.d/control.mk
> ===================================================================
> --- debian/rules.d/control.mk (révision 1173)
> +++ debian/rules.d/control.mk (copie de travail)
> @@ -1,6 +1,6 @@
> -control_deps := $(addprefix debian/control.in/, libc6 libc6.1 libc0.3 libc1 
> sparc64 s390x ppc64 opt amd64)
> +control_deps := $(addprefix debian/control.in/, libc6 libc6.1 libc0.3 
> libc0.1 sparc64 s390x ppc64 opt amd64)
>  
> -threads_archs := alpha amd64 arm armeb i386 m68k mips mipsel powerpc sparc 
> ia64 hppa s390 sh3 sh4 sh3eb sh4eb freebsd-i386
> +threads_archs := alpha amd64 arm armeb i386 m68k mips mipsel powerpc sparc 
> ia64 hppa s390 sh3 sh4 sh3eb sh4eb kfreebsd-i386
>  
>  debian/control.in/libc6: debian/control.in/libc debian/rules.d/control.mk
>       sed -e '[EMAIL PROTECTED]@%libc6%g' \
> @@ -12,8 +12,8 @@
>  debian/control.in/libc0.3: debian/control.in/libc debian/rules.d/control.mk
>       sed -e '[EMAIL PROTECTED]@%libc0.3%g;[EMAIL 
> PROTECTED]@%hurd-i386%g;s/nscd, //' < $< > $@
>  
> -debian/control.in/libc1: debian/control.in/libc debian/rules.d/control.mk
> -     sed -e '[EMAIL PROTECTED]@%libc1%g;[EMAIL PROTECTED]@%freebsd-i386%g' < 
> $< > $@
> +debian/control.in/libc0.1: debian/control.in/libc debian/rules.d/control.mk
> +     sed -e '[EMAIL PROTECTED]@%libc0.1%g;[EMAIL 
> PROTECTED]@%kfreebsd-i386%g' < $< > $@
>  
>  debian/control: $(stamp)control
>  $(stamp)control: debian/control.in/main $(control_deps) \
> @@ -22,7 +22,7 @@
>       cat debian/control.in/libc6             >> [EMAIL PROTECTED]
>       cat debian/control.in/libc6.1           >> [EMAIL PROTECTED]
>       cat debian/control.in/libc0.3           >> [EMAIL PROTECTED]
> -     cat debian/control.in/libc1             >> [EMAIL PROTECTED]
> +     cat debian/control.in/libc0.1           >> [EMAIL PROTECTED]
>       cat debian/control.in/sparc64           >> [EMAIL PROTECTED]
>       cat debian/control.in/s390x             >> [EMAIL PROTECTED]
>       cat debian/control.in/amd64             >> [EMAIL PROTECTED]


-- 
  .''`.  Aurelien Jarno             | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   [EMAIL PROTECTED]         | [EMAIL PROTECTED]
   `-    people.debian.org/~aurel32 | www.aurel32.net
Index: debian/control.in/opt
===================================================================
--- debian/control.in/opt       (révision 1173)
+++ debian/control.in/opt       (copie de travail)
@@ -56,3 +56,23 @@
  Most notably, IBM's JDK. If you experience problems with such
  applications, you will need to remove this package.
 
+Package: libc0.1-i686
+Architecture: kfreebsd-i386
+Section: libs
+Priority: extra
+Pre-Depends: @libc@ (= ${Source-Version})
+Description: GNU C Library: Shared libraries [i686 optimized]
+ Contains the standard libraries that are used by nearly all programs on
+ the system. This package includes shared versions of the standard C
+ library and the standard math library, as well as many others.
+ .
+ This set of libraries is optimized for i686 machines, and will only be
+ used on an i686 class CPU (check the output of `uname -m').  This includes 
+ Pentium Pro, Pentium II/III/IV, Celeron CPU's and similar class CPU's
+ (including clones such as AMD Athlon/Opteron, VIA C3 Nehemiah, but not VIA 
+ C3 Ezla).  
+  .
+ WARNING: Some third-party binaries may not work well with these libraries.
+ Most notably, IBM's JDK. If you experience problems with such
+ applications, you will need to remove this package.
+
Index: debian/control.in/main
===================================================================
--- debian/control.in/main      (révision 1173)
+++ debian/control.in/main      (copie de travail)
@@ -1,7 +1,7 @@
 Source: @glibc@
 Section: libs
 Priority: required
-Build-Depends: gettext (>= 0.10.37-1), make (>= 3.80-1), dpkg-dev (>= 1.13.5), 
debianutils (>= 1.13.1), tar (>= 1.13.11), bzip2, texinfo (>= 4.0), 
linux-kernel-headers (>= 2.6.13+0rc3-2) [!hurd-i386], mig (>= 1.3-2) 
[hurd-i386], hurd-dev (>= 20020608-1) [hurd-i386], gnumach-dev [hurd-i386], 
texi2html, file, gcc-4.0 [!powerpc !m68k !hppa !hurd-i386], gcc-3.4 (>= 
3.4.4-6) [powerpc], gcc-3.4 [m68k hppa], gcc-3.3 [hurd-i386], autoconf, 
binutils (>= 2.16.1cvs20051109-1), sed (>= 4.0.5-4), gawk, debhelper (>= 
4.1.76), libc6-dev-amd64 [i386], libc6-dev-ppc64 [powerpc], quilt
+Build-Depends: gettext (>= 0.10.37-1), make (>= 3.80-1), dpkg-dev (>= 1.13.5), 
debianutils (>= 1.13.1), tar (>= 1.13.11), bzip2, texinfo (>= 4.0), 
linux-kernel-headers (>= 2.6.13+0rc3-2) [!hurd-i386 !kfreebsd-i386], mig (>= 
1.3-2) [hurd-i386], hurd-dev (>= 20020608-1) [hurd-i386], gnumach-dev 
[hurd-i386], kfreebsd-kernel-headers (>= 0.01) [kfreebsd-i386], texi2html, 
file, gcc-4.0 [!powerpc !m68k !hppa !hurd-i386], gcc-3.4 (>= 3.4.4-6) 
[powerpc], gcc-3.4 [m68k hppa], gcc-3.3 [hurd-i386], autoconf, binutils (>= 
2.16.1cvs20051109-1), sed (>= 4.0.5-4), gawk, debhelper (>= 4.1.76), 
libc6-dev-amd64 [i386], libc6-dev-ppc64 [powerpc], quilt
 Build-Depends-Indep: perl, po-debconf
 Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org>
 Uploaders: Ben Collins <[EMAIL PROTECTED]>, GOTO Masanori <[EMAIL PROTECTED]>, 
Philip Blundell <[EMAIL PROTECTED]>, Jeff Bailey <[EMAIL PROTECTED]>, Daniel 
Jacobowitz <[EMAIL PROTECTED]>, Clint Adams <[EMAIL PROTECTED]>, Denis Barbier 
<[EMAIL PROTECTED]>
Index: debian/rules
===================================================================
--- debian/rules        (révision 1173)
+++ debian/rules        (copie de travail)
@@ -45,6 +45,7 @@
 DEB_HOST_ARCH         ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
 DEB_HOST_GNU_CPU      ?= $(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
 DEB_HOST_GNU_TYPE     ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_HOST_GNU_SYSTEM   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_SYSTEM)
 DEB_HOST_ARCH_OS      ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
 DEB_BUILD_ARCH        ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
 DEB_BUILD_GNU_CPU     ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_CPU)
Index: debian/sysdeps/kfreebsd-i386.mk
===================================================================
--- debian/sysdeps/kfreebsd-i386.mk     (révision 0)
+++ debian/sysdeps/kfreebsd-i386.mk     (révision 0)
@@ -0,0 +1,11 @@
+GLIBC_PASSES += i686
+DEB_ARCH_REGULAR_PACKAGES += libc0.1-i686
+
+# We use -march=i686 and glibc's i686 routines use cmov, so require it.
+# A Debian-local glibc patch adds cmov to the search path.
+i686_add-ons = linuxthreads $(add-ons)
+i686_configure_target=i686-kfreebsd
+i686_configure_build=i686-kfreebsd
+i686_extra_cflags = -march=i686 -mtune=i686 -g1 -O3
+i686_LIBDIR = /i686/cmov
+i686_extra_config_options = $(extra_config_options) --disable-profile 
--with-tls --with-__thread --disable-compatible-utmp
Index: debian/sysdeps/kfreebsd-gnu.mk
===================================================================
--- debian/sysdeps/kfreebsd-gnu.mk      (révision 1173)
+++ debian/sysdeps/kfreebsd-gnu.mk      (copie de travail)
@@ -1,11 +0,0 @@
-# This is for a Glibc-using FreeBSD system.
-
-GLIBC_OVERLAYS ?= $(shell ls glibc-linuxthreads* glibc-ports* glibc-libidn*)
-
-libc = libc1
-
-# Linuxthreads Config
-threads = yes
-libc_add-ons = linuxthreads $(add-ons)
-
-extra_config_options = $(extra_config_options) --disable-compatible-utmp 
--enable-kernel-include=4.6
Index: debian/sysdeps/kfreebsd.mk
===================================================================
--- debian/sysdeps/kfreebsd.mk  (révision 0)
+++ debian/sysdeps/kfreebsd.mk  (révision 0)
@@ -0,0 +1,61 @@
+GLIBC_OVERLAYS ?= $(shell ls glibc-linuxthreads* glibc-ports* glibc-libidn*)
+MIN_KERNEL_SUPPORTED := 5.4.0
+libc = libc0.1
+
+# Support multiple makes at once based on number of processors
+# Common wisdom says parallel make can be up to 2n+1.
+# Should we do that to get faster builds?
+NJOBS:=$(shell getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1)
+ifeq ($(NJOBS),-1)
+ NJOBS:=1
+endif
+
+ifeq ($(NJOBS),0)
+ NJOBS=1
+endif
+
+# Linuxthreads Config
+threads = yes
+libc_add-ons = linuxthreads $(add-ons)
+libc_extra_config_options = $(extra_config_options) --with-tls --with-__thread 
--disable-compatible-utmp
+
+ifndef KFREEBSD_SOURCE
+  KFREEBSD_HEADERS := /usr/include
+else
+  KFREEBSD_HEADERS := $(KFREEBSD_SOURCE)/sys
+endif
+
+# Minimum Kernel supported
+with_headers = --with-headers=$(shell pwd)/debian/include 
--enable-kernel=$(call xx,MIN_KERNEL_SUPPORTED)
+
+KERNEL_HEADER_DIR = $(stamp)mkincludedir
+$(stamp)mkincludedir:
+       rm -rf debian/include
+       mkdir debian/include
+       ln -s $(KFREEBSD_HEADERS)/machine debian/include
+       ln -s $(KFREEBSD_HEADERS)/net debian/include
+       ln -s $(KFREEBSD_HEADERS)/netatalk debian/include
+       ln -s $(KFREEBSD_HEADERS)/netipx debian/include
+       ln -s $(KFREEBSD_HEADERS)/osreldate.h debian/include
+       ln -s $(KFREEBSD_HEADERS)/sys debian/include
+       ln -s $(KFREEBSD_HEADERS)/vm debian/include
+
+       # To make configure happy if libc0.1-dev is not installed.
+       touch debian/include/assert.h
+
+       touch $@
+
+# Also to make configure happy.
+export CPPFLAGS = -isystem $(shell pwd)/debian/include
+
+# This round of ugliness decomposes the FreeBSD kernel version number
+# into an integer so it can be easily compared and then does so.
+CURRENT_KERNEL_VERSION=$(shell uname -r)
+define kernel_check
+(minimum=$$((`echo $(1) | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1 \* 
10000 + \2 \* 100 + \3/'`)); \
+current=$$((`echo $(CURRENT_KERNEL_VERSION) | sed 
's/\([0-9]*\)\.\([0-9]*\).*/\1 \* 10000 + \2 \* 100/'`)); \
+if [ $$current -lt $$minimum ]; then \
+  false; \
+fi)
+endef
+
Index: debian/sysdeps/depflags.pl
===================================================================
--- debian/sysdeps/depflags.pl  (révision 1173)
+++ debian/sysdeps/depflags.pl  (copie de travail)
@@ -33,6 +33,13 @@
                'ppp (<= 2.2.0f-24)', 'libgdbmg1-dev (<= 1.7.3-24)');
     push @{$libc_dev_c{'Depends'}}, 'linux-kernel-headers';
 }
+if ($DEB_HOST_GNU_SYSTEM eq "kfreebsd-gnu") {
+    push @{$libc_c{'Suggests'}}, 'locales';
+    push @{$libc_c{'Replaces'}}, 'libc0.1-dev (<< 2.3.2.ds1-14)';
+    push @{$libc_dev_c{'Recommends'}}, 'c-compiler';
+    push @{$libc_dev_c{'Replaces'}}, 'kfreebsd-kernel-headers (<< 0.11)';
+    push @{$libc_dev_c{'Depends'}}, 'kfreebsd-kernel-headers (>= 0.11)';
+}
 
 # ${glibc}-doc is suggested by $libc_c and $libc_dev_c.
 push @{$libc_c{'Suggests'}}, "${glibc}-doc";
Index: debian/sysdeps/linux.mk
===================================================================
--- debian/sysdeps/linux.mk     (révision 1173)
+++ debian/sysdeps/linux.mk     (copie de travail)
@@ -39,7 +39,7 @@
 nptl_MIN_KERNEL_SUPPORTED = 2.6.0
 nptl_LIBDIR = /tls
 
-LINUX_HEADER_DIR = $(stamp)mkincludedir
+KERNEL_HEADER_DIR = $(stamp)mkincludedir
 $(stamp)mkincludedir:
        rm -rf debian/include
        mkdir debian/include
Index: debian/rules.d/build.mk
===================================================================
--- debian/rules.d/build.mk     (révision 1173)
+++ debian/rules.d/build.mk     (copie de travail)
@@ -13,7 +13,7 @@
 
 
 $(patsubst %,mkbuilddir_%,$(GLIBC_PASSES)) :: mkbuilddir_% : 
$(stamp)mkbuilddir_%
-$(stamp)mkbuilddir_%: $(stamp)patch-stamp $(LINUX_HEADER_DIR)
+$(stamp)mkbuilddir_%: $(stamp)patch-stamp $(KERNEL_HEADER_DIR)
        @echo Making builddir for $(curpass)
        test -d $(DEB_BUILDDIR) || mkdir $(DEB_BUILDDIR)
        touch $@
Index: debian/rules.d/control.mk
===================================================================
--- debian/rules.d/control.mk   (révision 1173)
+++ debian/rules.d/control.mk   (copie de travail)
@@ -1,6 +1,6 @@
-control_deps := $(addprefix debian/control.in/, libc6 libc6.1 libc0.3 libc1 
sparc64 s390x ppc64 opt amd64)
+control_deps := $(addprefix debian/control.in/, libc6 libc6.1 libc0.3 libc0.1 
sparc64 s390x ppc64 opt amd64)
 
-threads_archs := alpha amd64 arm armeb i386 m68k mips mipsel powerpc sparc 
ia64 hppa s390 sh3 sh4 sh3eb sh4eb freebsd-i386
+threads_archs := alpha amd64 arm armeb i386 m68k mips mipsel powerpc sparc 
ia64 hppa s390 sh3 sh4 sh3eb sh4eb kfreebsd-i386
 
 debian/control.in/libc6: debian/control.in/libc debian/rules.d/control.mk
        sed -e '[EMAIL PROTECTED]@%libc6%g' \
@@ -12,8 +12,8 @@
 debian/control.in/libc0.3: debian/control.in/libc debian/rules.d/control.mk
        sed -e '[EMAIL PROTECTED]@%libc0.3%g;[EMAIL 
PROTECTED]@%hurd-i386%g;s/nscd, //' < $< > $@
 
-debian/control.in/libc1: debian/control.in/libc debian/rules.d/control.mk
-       sed -e '[EMAIL PROTECTED]@%libc1%g;[EMAIL PROTECTED]@%freebsd-i386%g' < 
$< > $@
+debian/control.in/libc0.1: debian/control.in/libc debian/rules.d/control.mk
+       sed -e '[EMAIL PROTECTED]@%libc0.1%g;[EMAIL 
PROTECTED]@%kfreebsd-i386%g' < $< > $@
 
 debian/control: $(stamp)control
 $(stamp)control: debian/control.in/main $(control_deps) \
@@ -22,7 +22,7 @@
        cat debian/control.in/libc6             >> [EMAIL PROTECTED]
        cat debian/control.in/libc6.1           >> [EMAIL PROTECTED]
        cat debian/control.in/libc0.3           >> [EMAIL PROTECTED]
-       cat debian/control.in/libc1             >> [EMAIL PROTECTED]
+       cat debian/control.in/libc0.1           >> [EMAIL PROTECTED]
        cat debian/control.in/sparc64           >> [EMAIL PROTECTED]
        cat debian/control.in/s390x             >> [EMAIL PROTECTED]
        cat debian/control.in/amd64             >> [EMAIL PROTECTED]

Reply via email to