From 8b4e3f13359d8262957af8a6c861c060f9427ddd Mon Sep 17 00:00:00 2001 From: Deji Akingunola Date: Jul 28 2010 02:10:39 +0000 Subject: - Create a subpackage for SSE2 on x86_64 --- diff --git a/atlas.spec b/atlas.spec index 4573a80..6b62c0f 100644 --- a/atlas.spec +++ b/atlas.spec @@ -2,7 +2,7 @@ Name: atlas Version: 3.8.3 -Release: 15%{?dist} +Release: 16%{?dist} Summary: Automatically Tuned Linear Algebra Software Group: System Environment/Libraries @@ -41,7 +41,7 @@ Summary: Development libraries for ATLAS Group: Development/Libraries Requires: %{name} = %{version}-%{release} Obsoletes: %name-header <= %version-%release -Requires(posttans): chkconfig +Requires(posttrans): chkconfig Requires(preun): chkconfig %description devel @@ -53,6 +53,34 @@ with ATLAS (Automatically Tuned Linear Algebra Software). %if "%{?enable_native_atlas}" == "0" ############## Subpackages for architecture extensions ################# # +%ifarch x86_64 +%define types base sse2 + +%package sse2 +Summary: ATLAS libraries for SSE2 extensions +Group: System Environment/Libraries + +%description sse2 +This package contains the ATLAS (Automatically Tuned Linear Algebra +Software) libraries compiled with optimizations for the SSE2 +extensions to the x86_64 architecture. The base ATLAS builds in Fedora for the +x86_64 architecture are made fro the SSE3 extensions. + +%package sse2-devel +Summary: Development libraries for ATLAS with SSE2 extensions +Group: Development/Libraries +Requires: %{name}-sse2 = %{version}-%{release} +Obsoletes: %name-header <= %version-%release +Requires(posttans): chkconfig +Requires(preun): chkconfig + +%description sse2-devel +This package contains shared and static versions of the ATLAS +(Automatically Tuned Linear Algebra Software) libraries compiled with +optimizations for the SSE2 extensions to the x86_64 architecture. + +%endif + %ifarch %{ix86} %define types base 3dnow sse sse2 sse3 @@ -71,7 +99,7 @@ Summary: Development libraries for ATLAS with 3DNow extensions Group: Development/Libraries Requires: %{name}-3dnow = %{version}-%{release} Obsoletes: %name-header <= %version-%release -Requires(posttans): chkconfig +Requires(posttrans): chkconfig Requires(preun): chkconfig %description 3dnow-devel @@ -94,7 +122,7 @@ Summary: Development libraries for ATLAS with SSE extensions Group: Development/Libraries Requires: %{name}-sse = %{version}-%{release} Obsoletes: %name-header <= %version-%release -Requires(posttans): chkconfig +Requires(posttrans): chkconfig Requires(preun): chkconfig %description sse-devel @@ -117,7 +145,7 @@ Summary: Development libraries for ATLAS with SSE2 extensions Group: Development/Libraries Requires: %{name}-sse2 = %{version}-%{release} Obsoletes: %name-header <= %version-%release -Requires(posttans): chkconfig +Requires(posttrans): chkconfig Requires(preun): chkconfig %description sse2-devel @@ -139,7 +167,7 @@ Summary: Development libraries for ATLAS with SSE3 extensions Group: Development/Libraries Requires: %{name}-sse3 = %{version}-%{release} Obsoletes: %name-header <= %version-%release -Requires(posttans): chkconfig +Requires(posttrans): chkconfig Requires(preun): chkconfig %description sse3-devel @@ -173,7 +201,17 @@ for type in %{types}; do --prefix=%{buildroot}%{_prefix} \ --incdir=%{buildroot}%{_includedir} \ --libdir=%{buildroot}%{_libdir}/${libname} \ - --with-netlib-lapack=%{_libdir}/liblapack_pic.a + --with-netlib-lapack=%{_libdir}/liblapack_pic.a \ + -Si cputhrchk 0 + +%ifarch x86_64 + if [ "$type" = "sse2" ]; then + sed -i 's#ARCH =.*#ARCH = HAMMER64SSE2#' Make.inc + sed -i 's#-DATL_SSE3##' Make.inc + sed -i 's#-msse3#-msse2#' Make.inc + %define pr_sse2 %(echo $((%{__isa_bits}-1))) + fi +%endif %ifarch %{ix86} if [ "$type" = "base" ]; then @@ -228,7 +266,7 @@ for type in %{types}; do > %{buildroot}/etc/ld.so.conf.d/atlas-%{_arch}.conf else echo "%{_libdir}/atlas-${type}" \ - > %{buildroot}/etc/ld.so.conf.d/atlas-${type}.conf + > %{buildroot}/etc/ld.so.conf.d/atlas-%{_arch}-${type}.conf fi done mkdir -p %{buildroot}%{_includedir}/atlas @@ -252,8 +290,27 @@ if [ $1 -ge 0 ] ; then /usr/sbin/alternatives --remove atlas-inc %{_includedir}/atlas-%{_arch}-base fi -%ifarch %{ix86} && %if "%{?enable_native_atlas}" == "0" +%if "%{?enable_native_atlas}" == "0" +%ifarch x86_64 +%post -n atlas-sse2 -p /sbin/ldconfig + +%postun -n atlas-sse2 -p /sbin/ldconfig + +%posttrans sse2-devel +if [ $1 -eq 0 ] ; then +/usr/sbin/alternatives --install %{_includedir}/atlas atlas-inc \ + %{_includedir}/atlas-%{_arch}-sse2 %{pr_sse2} +fi + +%preun sse2-devel +if [ $1 -ge 0 ] ; then +/usr/sbin/alternatives --remove atlas-inc %{_includedir}/atlas-%{_arch}-sse2 +fi + +%endif + +%ifarch %{ix86} %post -n atlas-3dnow -p /sbin/ldconfig %postun -n atlas-3dnow -p /sbin/ldconfig @@ -315,6 +372,7 @@ if [ $1 -ge 0 ] ; then fi %endif +%endif %files %defattr(-,root,root,-) @@ -331,14 +389,35 @@ fi %{_includedir}/*.h %ghost %{_includedir}/atlas -%ifarch %{ix86} && %if "%{?enable_native_atlas}" == "0" +%if "%{?enable_native_atlas}" == "0" + +%ifarch x86_64 + +%files sse2 +%defattr(-,root,root,-) +%doc doc/README.Fedora +%dir %{_libdir}/atlas-sse2 +%{_libdir}/atlas-sse2/*.so.* +%config(noreplace) /etc/ld.so.conf.d/atlas-%{_arch}-sse2.conf + +%files sse2-devel +%defattr(-,root,root,-) +%doc doc +%{_libdir}/atlas-sse2/*.so +%{_includedir}/atlas-%{_arch}-sse2/ +%{_includedir}/*.h +%ghost %{_includedir}/atlas + +%endif + +%ifarch %{ix86} %files 3dnow %defattr(-,root,root,-) %doc doc/README.Fedora %dir %{_libdir}/atlas-3dnow %{_libdir}/atlas-3dnow/*.so.* -%config(noreplace) /etc/ld.so.conf.d/atlas-3dnow.conf +%config(noreplace) /etc/ld.so.conf.d/atlas-%{_arch}-3dnow.conf %files 3dnow-devel %defattr(-,root,root,-) @@ -353,7 +432,7 @@ fi %doc doc/README.Fedora %dir %{_libdir}/atlas-sse %{_libdir}/atlas-sse/*.so.* -%config(noreplace) /etc/ld.so.conf.d/atlas-sse.conf +%config(noreplace) /etc/ld.so.conf.d/atlas-%{_arch}-sse.conf %files sse-devel %defattr(-,root,root,-) @@ -368,7 +447,7 @@ fi %doc doc/README.Fedora %dir %{_libdir}/atlas-sse2 %{_libdir}/atlas-sse2/*.so.* -%config(noreplace) /etc/ld.so.conf.d/atlas-sse2.conf +%config(noreplace) /etc/ld.so.conf.d/atlas-%{_arch}-sse2.conf %files sse2-devel %defattr(-,root,root,-) @@ -383,7 +462,7 @@ fi %doc doc/README.Fedora %dir %{_libdir}/atlas-sse3 %{_libdir}/atlas-sse3/*.so.* -%config(noreplace) /etc/ld.so.conf.d/atlas-sse3.conf +%config(noreplace) /etc/ld.so.conf.d/atlas-%{_arch}-sse3.conf %files sse3-devel %defattr(-,root,root,-) @@ -394,8 +473,12 @@ fi %ghost %{_includedir}/atlas %endif +%endif %changelog +* Mon Jul 26 2010 Deji Akingunola - 3.8.3-16 +- Create a subpackage for SSE2 on x86_64 + * Wed Feb 10 2010 Deji Akingunola - 3.8.3-15 - Disable the problematic sparc patch - Change lapack-devel BR to lapack-static, where liblapack_pic.a now resides.