]> git.pld-linux.org Git - packages/glibc.git/blobdiff - glibc.spec
- disable profile subpackage if built with nptl
[packages/glibc.git] / glibc.spec
index 22eba88711244c645b5c802d102223de32760e52..5612bfda70943ac2f931aa16b16204d412ec861d 100644 (file)
@@ -1,6 +1,6 @@
 #
 # You can define min_kernel macro by "rpm --define 'min_kernel version'"
-# default is 2.2.0 (no changes up to 2.3.25)
+# default is 2.4.6
 #
 # Conditional build:
 %bcond_without fp              # build without frame pointer (pass \--enable-omitfp)
@@ -9,6 +9,10 @@
                                # glibc-kernel-headers (evil, breakage etc., don't use)
 %bcond_without dist_kernel     # for above, allow non-distribution kernel
 %bcond_with    idn             # build with included libidn
+%bcond_with    nptl            # use nptl instead of linuxthreads
+%bcond_without  tls            # do not use tls
+%bcond_without  tests          # do not perform "make test"
+
 #
 # TODO:
 # - localedb-gen man pages(?)
 #      posix zoneinfo dir removed, /etc/rc.d/init.d/timezone must be changed
 #      in order to use this version!
 #
-%{!?min_kernel:%global         min_kernel      2.2.0}
-%define        gkh_version     7:2.6.0.2
+
+%{!?min_kernel:%global          min_kernel      2.4.6}
+
+%if %{with nptl}
+%ifarch i686 athlon amd64 ia64 s390 s390x sparcv9 ppc ppc64
+%if "%{min_kernel}" < "2.6.0"
+%global                min_kernel      2.6.0
+%endif
+%else
+%undefine with_nptl
+%endif
+%endif
+
+%if %{with tls}
+%ifnarch i686 athlon amd64 ia64 s390 s390x alpha alphaev6 sparc sparcv9 ppc ppc64
+%undefine with_tls
+%endif
+%endif
+
+%define        gkh_version     7:2.6.0.3
 Summary:       GNU libc
 Summary(de):   GNU libc
 Summary(es):   GNU libc
@@ -30,15 +52,18 @@ Summary(ru):        GNU libc 
 Summary(tr):   GNU libc
 Summary(uk):   GNU libc ×ÅÒÓ¦§ 2.3
 Name:          glibc
-Version:       2.3.2
-Release:       13
+Version:       2.3.3
+Release:       0.20040101.3%{?with_nptl:+nptl}
 Epoch:         6
 License:       LGPL
 Group:         Libraries
-Source0:       ftp://sources.redhat.com/pub/glibc/releases/%{name}-%{version}.tar.bz2
-# Source0-md5: ede969aad568f48083e413384f20753c
-Source1:       ftp://sources.redhat.com/pub/glibc/releases/%{name}-linuxthreads-%{version}.tar.bz2
-# Source1-md5: 894b8969cfbdf787c73e139782167607
+# 20040101 snapshot
+#Source0:      ftp://sources.redhat.com/pub/glibc/releases/%{name}-%{version}.tar.bz2
+Source0:       %{name}-%{version}.tar.bz2
+# Source0-md5: b4e3f037a0b36afc705af344033a91c7
+#Source1:      ftp://sources.redhat.com/pub/glibc/releases/%{name}-linuxthreads-%{version}.tar.bz2
+Source1:       %{name}-linuxthreads-%{version}.tar.bz2
+# Source1-md5: 97c30992592f854a67107579dcef61dd
 Source2:       nscd.init
 Source3:       nscd.sysconfig
 Source4:       nscd.logrotate
@@ -49,8 +74,6 @@ Source6:      http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-ma
 # borrowed from util-linux
 Source7:       sln.8
 Source8:       %{name}-localedb-gen
-Source10:      http://josefsson.org/libidn/releases/libidn-0.3.0rc3.tar.gz
-# Source10-md5:        ded0b439efe16dd29ce5a24d3d3dcebf
 Patch0:                %{name}-info.patch
 Patch1:                %{name}-initgroups-overflow.patch
 Patch2:                %{name}-pld.patch
@@ -62,22 +85,18 @@ Patch9:             %{name}-paths.patch
 Patch10:       %{name}-vaargs.patch
 Patch11:       %{name}-getaddrinfo-workaround.patch
 Patch12:       %{name}-postshell.patch
-Patch13:       %{name}-pl.po-update.patch
 Patch14:       %{name}-missing-nls.patch
 Patch16:       %{name}-java-libc-wait.patch
-Patch17:       %{name}-morelocales.patch
 Patch18:       %{name}-lthrds_noomit.patch
 Patch19:       %{name}-no_opt_override.patch
-Patch20:       %{name}-gcc33.patch
-#Patch21:      %{name}-sanity.patch
-Patch22:       %{name}-secureexec.patch
 Patch23:       %{name}-kernel_includes.patch
-Patch24:       %{name}-sparc64_pause.patch
-Patch25:       %{name}-linuxthreads.patch
+Patch24:       %{name}-includes.patch
 Patch26:       %{name}-alpha-fix-as-syntax.patch
 Patch27:       %{name}-soinit-EH_FRAME.patch
-Patch28:       %{name}-alpha-pwrite.patch
-Patch29:       %{name}-alpha-tv64.patch
+Patch28:       %{name}-fix-asserts.patch
+Patch30:       %{name}-sparc-errno_fix.patch
+Patch31:       %{name}-make.patch
+Patch32:       %{name}-tests-io-tmp.patch
 URL:           http://www.gnu.org/software/libc/
 BuildRequires: automake
 BuildRequires: binutils >= 2.13.90.0.2
@@ -682,13 +701,13 @@ Requires: %{name} = %{epoch}:%{version}-%{release}
 %endif
 
 %description -n %{name}64
-64-bit GNU libc libraries for sparc64 architecture.
+64-bit GNU libc libraries for 64bit architecture.
 
 %description -n %{name}64 -l es
-Bibliotecas GNU libc de 64 bits para la arquitectura sparc64.
+Bibliotecas GNU libc de 64 bits para la arquitectura 64bit.
 
 %description -n %{name}64 -l pl
-Biblioteki 64-bitowe GNU libc dla architektury sparc64.
+Biblioteki 64-bitowe GNU libc dla architektury 64bit.
 
 %package -n %{name}64-devel
 Summary:       Development files for 64-bit GNU libc libraries
@@ -698,16 +717,16 @@ Group:            Development/Libraries
 Requires:      %{name}-devel = %{epoch}:%{version}-%{release}
 
 %description -n %{name}64-devel
-Development files for 64-bit GNU libc libraries for sparc64
+Development files for 64-bit GNU libc libraries for 64bit
 architecture.
 
 %description -n %{name}64-devel -l es
 Ficheros de desarrollo para las bibliotecas GNU libc de 64 bits para la
-arquitectura sparc64.
+arquitectura 64bit.
 
 %description -n %{name}64-devel -l pl
 Pliki do programowania z u¿yciem 64-bitowych bibliotek GNU libc dla
-architektury sparc64.
+architektury 64bit.
 
 %package -n %{name}64-static
 Summary:       Static 64-bit GNU libc libraries
@@ -726,9 +745,8 @@ Bibliotecas est
 Statyczne 64-bitowe biblioteki GNU libc.
 
 %prep
-%setup -q -a 1 -a 10
+%setup -q -a 1
 %patch0 -p1
-%patch1 -p1
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
@@ -738,84 +756,69 @@ Statyczne 64-bitowe biblioteki GNU libc.
 %patch10 -p1
 #%%patch11 -p1
 %patch12 -p1
-%patch13 -p1
 %patch14 -p1
 %patch16 -p1
-%patch17 -p1
 %patch18 -p1
 # don't know, if it is good idea, for brave ones
 #%patch19 -p1
-%patch20 -p1
-#%patch21 -p1
-%patch22 -p1
 %{?with_kernelheaders:%patch23}
-%patch24 -p1
-# updated - lt
-%ifnarch alpha
-%patch25 -p1
-%endif
+%{?!with_kernelheaders:%patch24 -p1}
 %patch26 -p1
 %patch27 -p1
 %patch28 -p1
-%patch29 -p0
+%patch30
+%patch31 -p1
+%patch32 -p1
 
 chmod +x scripts/cpp
 
-# standardize name
-mv -f localedata/locales/{lug_UG,lg_UG}
-
-%if %{with idn}
-cp -r libidn-*/lib libidn
-cp libidn-*/libc/{Makefile,configure,Banner,Versions} libidn
-cp libidn-*/lib/*.{c,h} libidn
-sed -e 's/idn-int.h/stdint.h/g' libidn-*/lib/idna.h > libidn/idna.h
-ln -sf ../libidn/idna.h include/idna.h
-sed -e 's/idn-int.h/stdint.h/g' libidn-*/lib/stringprep.h > libidn/stringprep.h
-sed -e 's/idn-int.h/stdint.h/g' libidn-*/lib/punycode.h > libidn/punycode.h
-sed -e 's/stringprep_generic/rfc3454/g' libidn-*/libc/Makefile > libidn/Makefile
-
-#cp libidn-*/libc/getaddrinfo.c sysdeps/posix/
-#cp libidn-*/libc/netdb.h resolv/
-
-cp libidn-*/libc/*.patch libc-idn.patch
-patch -p0 < libc-idn.patch
-
-touch libidn/libidn.texi
-%endif
-
-#make proper symlink for asm in headers
-#cd usr/include
-#%ifarch %{ix86}
-#ln -s asm-i386 asm
-#%endif
-#cd ../..
-
 %build
 # Build glibc
 cp /usr/share/automake/config.sub .
 cp /usr/share/automake/config.sub scripts
-cp /usr/share/automake/config.sub libidn-*
 [ -d builddir ] || mkdir builddir
 cd builddir
 # avoid stripping ld.so by -s in rpmldflags
 LDFLAGS=" " ; export LDFLAGS
 ../%configure \
-       --enable-add-ons=linuxthreads%{?with_idn:,libidn} \
        --enable-kernel="%{min_kernel}" \
-       --enable-profile \
        --%{!?with_fp:en}%{?with_fp:dis}able-omitfp \
+%if %{with nptl}
+        --enable-add-ons=nptl \
+       --with-tls \
+       --disable-profile \
+%else
+       %{?with_tls:--with-tls} \
+        --enable-add-ons=linuxthreads \
+       --enable-profile \
+%endif
 %if %{with kernelheaders}
        CPPFLAGS="-I%{_kernelsrcdir}/include" \
-       --with-headers=%{_kernelsrcdir}/include
+       --with-headers=%{_kernelsrcdir}/include 
 %else
        CPPFLAGS="-I%{_includedir}" \
-       --with-headers=%{_includedir}
+       --with-headers=%{_includedir} 
 %endif
 
 # problem compiling with --enable-bounded (must be reported to libc-alpha)
 
 %{__make} %{?parallelmkflags}
 
+%if %{with tests}
+env LANGUAGE=C LC_ALL=C \
+%{__make} tests 2>&1 | awk '
+BEGIN { file = "" }
+{
+       if (($0 ~ /\*\*\* \[.*\.out\] Error/) && (file == "")) {
+               file=$0;
+               gsub(/.*\[/, NIL, file);
+               gsub(/\].*/, NIL, file);
+       }
+       print $0;
+}
+END { if (file != "") { print "ERROR OUTPUT FROM " file; system("cat " file); exit(1); } }'
+%endif
+
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{/etc/{logrotate.d,rc.d/init.d,sysconfig},%{_mandir}/man{3,8},/var/log}
@@ -851,8 +854,10 @@ ln -s /%{_lib}/ldconfig                    $RPM_BUILD_ROOT/sbin
 mv -f $RPM_BUILD_ROOT/%{_lib}/libpcprofile.so  $RPM_BUILD_ROOT%{_libdir}
 %endif
 
+%if %{without nptl}
 %{__make} -C ../linuxthreads/man
 install ../linuxthreads/man/*.3thr                     $RPM_BUILD_ROOT%{_mandir}/man3
+%endif
 
 rm -rf $RPM_BUILD_ROOT%{_datadir}/zoneinfo/{localtime,posixtime,posixrules,posix/*}
 
@@ -892,9 +897,11 @@ rm -f $RPM_BUILD_ROOT%{_mandir}/hu/man7/man.7
 rm -rf ../documentation
 install -d ../documentation
 
+%if %{without nptl}
 cp -f ../linuxthreads/ChangeLog ../documentation/ChangeLog.threads
 cp -f ../linuxthreads/Changes ../documentation/Changes.threads
 cp -f ../linuxthreads/README ../documentation/README.threads
+%endif
 cp -f ../crypt/README.ufc-crypt ../documentation/
 
 cp -f ../ChangeLog* ../documentation
@@ -1246,9 +1253,11 @@ fi
 %{_libdir}/librt.a
 %{_libdir}/libutil.a
 
+%if %{without nptl}
 %files profile
 %defattr(644,root,root,755)
 %{_libdir}/lib*_p.a
+%endif
 
 %files pic
 %defattr(644,root,root,755)
This page took 0.066702 seconds and 4 git commands to generate.