Hi.

I'm evaluating IDN right now and made a spec file patch for glibc to make it 
IDN aware.

Get this file:

http://josefsson.org/libidn/releases/libidn-0.3.2.tar.gz
http://josefsson.org/libidn/releases/libidn-0.3.2.tar.gz.asc

And use the attached patch.

I didn't know how to do to include documentation and such, but this is a 
start. I will announce packages shortly, it takes a while to build this 
beast...

Cheers.
-- 
Regards // Oden Eriksson, Deserve-IT.com
--- glibc.spec	2003-10-10 11:19:46.000000000 +0200
+++ glibc.spec.oden	2003-10-10 11:20:43.000000000 +0200
@@ -6,7 +6,11 @@
 
 # <version>-<release> tags for glibc main package
 %define glibcversion	2.3.2
-%define glibcrelease	14mdk
+%define glibcrelease	15mdk
+
+# http://www.gnu.org/software/libidn/
+%define idn_version	0.3.2
+
 # <version>-<release> tags from kernel package where headers were
 # actually extracted from
 %define kheaders_ver	2.4.22
@@ -80,6 +84,7 @@
 %define build_utils	1
 %define build_i18ndata	1
 %define build_timezone	1
+%define build_idn	1
 
 # Disable a few defaults when cross-compiling a glibc
 %if "%{name}" != "glibc"
@@ -93,6 +98,7 @@
 %define build_utils	0
 %define build_i18ndata	0
 %define build_timezone	0
+%define build_idn	0
 %endif
 
 # Allow --with[out] <feature> at rpm command line build
@@ -112,7 +118,7 @@
 Epoch:		6
 License:	LGPL
 Group:		System/Libraries
-Url:		http://www.gnu.org/software/glibc/
+URL:		http://www.gnu.org/software/glibc/
 
 # Red Hat tarball
 Source0:	%{source_package}.tar.bz2
@@ -128,6 +134,9 @@
 # service --full-restart-all from initscripts 6.91-18mdk
 Source13:	glibc-post-upgrade
 
+# http://www.gnu.org/software/libidn/
+Source14:	libidn-%{idn_version}.tar.bz2
+
 Buildroot:	%{_tmppath}/glibc-%{PACKAGE_VERSION}-root
 Obsoletes:	zoneinfo, libc-static, libc-devel, libc-profile, libc-headers,
 Obsoletes: 	linuxthreads, gencat, locale, glibc-localedata
@@ -492,6 +501,22 @@
 EOF
 chmod +x find_requires.sh
 
+# http://www.gnu.org/software/libidn/
+%if %{build_idn}
+tar -jxf %{SOURCE14}
+perl -pi -e 's/idn-int.h/stdint.h/' libidn-%{idn_version}/lib/{idna,stringprep,punycode}.h
+cp -r libidn-%{idn_version}/lib libidn
+ln -sf ../libidn/idna.h include/idna.h
+cp libidn-%{idn_version}/libc/{Makefile,configure,Banner,Versions} libidn/
+#cp libidn-%{idn_version}/libc/getaddrinfo.c sysdeps/posix/
+#cp libidn-%{idn_version}/libc/netdb.h resolv/
+touch libidn/libidn.texi
+cp libidn-%{idn_version}/FAQ FAQ.idn
+cp libidn-%{idn_version}/ChangeLog ChangeLog.idn
+cp libidn-%{idn_version}/README README.idn
+rm -rf libidn-%{idn_version}
+%endif
+
 %build
 #
 # BuildGlibc <arch> [<extra_configure_options>+]
@@ -1141,6 +1166,10 @@
 %doc COPYING COPYING.LIB
 %doc documentation/* README.libm
 %doc hesiod/README.hesiod
+%if %{build_idn}
+%doc FAQ.idn ChangeLog.idn README.idn
+%endif
+
 %if "%{name}" == "glibc"
 %{_mandir}/man3/*
 %endif
@@ -1304,6 +1333,9 @@
 %endif
 
 %changelog
+* Fri Oct 10 2003 Oden Eriksson <[EMAIL PROTECTED]> 2.3.2-15mdk
+- added IDN support (S14)
+
 * Fri Aug 29 2003 Gwenole Beauchesne <[EMAIL PROTECTED]> 2.3.2-14mdk
 - Patch40: Avoid */lib/i686 compiled libraries to be loaded if the
   host doesn't support CMOV instructions

Reply via email to