Jeff Bailey wrote:
I have glibc 2.3 packaged on freebsd-i386 now, although it has some quite large patches. I'll make a diff for the debian build scripts.

Please send this as soon as you're able. Since gotom and I are both hacking on the build environment, I don't want to stray so far that I can't tell how to apply the patch.

Done. The attached patch is against cvs checkout from this morning. I left out the arch specific patches to glibc itself. They're still pretty large.


The major change is that the package should be libc1 on
freebsd-i386.  This is because glibc upstream decided that soname
should be 1. (Recent native libc is .4 or .5.) There are also a
couple cases where I alter linux vs. hurd tests in
debian/rules. (e.g. ifeq gnu to ifneq linux.)

All good - The rules already handle three different SOVERSIONS (6, 6.1, and 0.3) for Debian. Abstracting the linux/hurd/freebsd tests further can only be good, too.

I'm only working on freebsd-i386, but Bruno seems to be porting glibc to Alpha as well. So theoretically, someone could port to freebsd-alpha. It won't be me, unless somebody wants to donate an Alpha. Mine broke, and it was only a multia, anyway. :(


---Nathan
diff -urN -x CVS -x tar.bz2 -x patches glibc-package/debian/rules 
glibc1-2.3/debian/rules
--- glibc-package/debian/rules  2002-10-03 10:06:02.000000000 -0400
+++ glibc1-2.3/debian/rules     2002-10-03 18:41:28.000000000 -0400
@@ -64,7 +64,7 @@
 clean: debian/control setperms
        rm -rf glibc-$(VERSION)
        rm -f debian/libc/DEBIAN/shlibs
-       rm -f debian/control.in/libc{6,6.1,0.3}
+       rm -f debian/control.in/libc{6,6.1,0.3,1}
        rm -f debian/files debian/substvars log-*
        rm -f unpacked-source patched-source patched-sourceT -r patched
        rm -f `find debian -name 'libc*' -type l`
@@ -110,7 +110,7 @@
 $(stamp_configure): $(stamp_unpack) $(stamp_patch)
        $(make_directory) $(objdir) $(stampdir)
        chmod 755 glibc-$(VERSION)/scripts/cpp # XXX Hack!
-ifneq ($(DEB_HOST_GNU_SYSTEM),gnu)
+ifeq ($(DEB_HOST_GNU_SYSTEM),linux)
        @if [ "$(num_headers)" != "1" ]; then \
                echo; \
                echo "Either you have more than one set of kernel headers in 
/usr/src"; \
@@ -133,7 +133,7 @@
        echo "infodir = $(infodir)"       >> $(objdir)/configparms
        echo "libexecdir = $(libexecdir)" >> $(objdir)/configparms
        echo "LIBGD = no"                 >> $(objdir)/configparms
-ifeq ($(DEB_HOST_GNU_SYSTEM),gnu)
+ifneq ($(DEB_HOST_GNU_SYSTEM),linux)
        echo "slibdir = /lib"             >> $(objdir)/configparms
        echo "rootsbindir = /sbin"        >> $(objdir)/configparms
        echo "sysconfdir = /etc"          >> $(objdir)/configparms
diff -urN -x CVS -x tar.bz2 -x patches glibc-package/debian/rules.d/control.mk 
glibc1-2.3/debian/rules.d/control.mk
--- glibc-package/debian/rules.d/control.mk     2002-09-17 02:01:57.000000000 
-0400
+++ glibc1-2.3/debian/rules.d/control.mk        2002-10-03 18:46:34.000000000 
-0400
@@ -1,6 +1,6 @@
-control_deps := $(addprefix debian/control.in/, libc6 libc6.1 libc0.3 sparc64 
opt)
+control_deps := $(addprefix debian/control.in/, libc6 libc6.1 libc0.3 libc1 
sparc64 opt)
 
-threads_archs := alpha arm i386 m68k mips mipsel powerpc sparc ia64 hppa s390 
sh3 sh4 sh3eb sh4eb
+threads_archs := alpha arm i386 m68k mips mipsel powerpc sparc ia64 hppa s390 
sh3 sh4 sh3eb sh4eb freebsd-i386
 
 debian/control.in/libc6: debian/control.in/libc debian/rules.d/control.mk
        sed -e '[EMAIL PROTECTED]@%libc6%g' \
@@ -12,6 +12,9 @@
 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: debian/control.in/main $(DEB_HOST_GNU_TYPE) $(control_deps) \
                   debian/sysdeps/soname.mk debian/sysdeps/config.mk \
                   debian/rules.d/control.mk debian/sysdeps/depflags.pl
@@ -19,6 +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/sparc64           >> [EMAIL PROTECTED]
        cat debian/control.in/opt               >> [EMAIL PROTECTED]
        sed -e '[EMAIL PROTECTED]@%$(libc)%g;[EMAIL PROTECTED]@%$(glibc)%g' \
diff -urN -x CVS -x tar.bz2 -x patches glibc-package/debian/sysdeps/freebsd.mk 
glibc1-2.3/debian/sysdeps/freebsd.mk
--- glibc-package/debian/sysdeps/freebsd.mk     1969-12-31 19:00:00.000000000 
-0500
+++ glibc1-2.3/debian/sysdeps/freebsd.mk        2002-10-07 15:45:16.000000000 
-0400
@@ -0,0 +1,5 @@
+threads = yes
+config-os = freebsd-gnu
+add-ons = linuxthreads
+NO_TEST = yes
+extra_config_options := --disable-compatible-utmp --enable-kernel-include=4.6
diff -urN -x CVS -x tar.bz2 -x patches glibc-package/debian/sysdeps/paths.mk 
glibc1-2.3/debian/sysdeps/paths.mk
--- glibc-package/debian/sysdeps/paths.mk       2002-07-25 10:37:02.000000000 
-0400
+++ glibc1-2.3/debian/sysdeps/paths.mk  2002-10-03 18:44:49.000000000 -0400
@@ -7,8 +7,8 @@
 docdir=$(prefix)/share/doc
 mandir=$(prefix)/share/man
 sbindir=$(prefix)/sbin
-ifeq ($(DEB_HOST_GNU_SYSTEM),linux)
- libexecdir=$(prefix)/lib
-else
+ifeq ($(DEB_HOST_GNU_SYSTEM),gnu)
  libexecdir=$(prefix)/libexec
+else
+ libexecdir=$(prefix)/lib
 endif
diff -urN -x CVS -x tar.bz2 -x patches glibc-package/debian/sysdeps/soname.mk 
glibc1-2.3/debian/sysdeps/soname.mk
--- glibc-package/debian/sysdeps/soname.mk      2002-07-25 10:37:02.000000000 
-0400
+++ glibc1-2.3/debian/sysdeps/soname.mk 2002-10-03 18:34:42.000000000 -0400
@@ -9,7 +9,11 @@
     ifeq ($(DEB_HOST_GNU_SYSTEM),gnu)
       libc = libc0.3
     else
-      libc = libc6
+      ifeq ($(DEB_HOST_GNU_SYSTEM),freebsd)
+        libc = libc1
+      else
+        libc = libc6
+      endif
     endif
   endif
 endif

Reply via email to