%define major 3 %define libname_orig libltdl %define libname %mklibname ltdl %{major} # allow --with bootstrap %define bootstrap 0 %{?_with_bootstrap: %global bootstrap 1} # define biarch platforms %define biarches x86_64 ppc64 sparc64 %ifarch x86_64 %define alt_arch i586 %endif %ifarch ppc64 %define alt_arch ppc %endif %ifarch sparc64 %define alt_arch sparc %endif # define fortran compiler %if %{mdkversion} >= 200600 %define fortran_compiler gfortran %else %define fortran_compiler g77 %endif Summary: The GNU libtool, which simplifies the use of shared libraries Name: libtool Version: 1.5.26 %define subrel 2 Release: %mkrel 5 License: GPL Group: Development/Other URL: http://www.gnu.org/software/libtool/libtool.html BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot Source: ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz Source1: %{SOURCE0}.sig Source2: libtool-cputoolize.sh # (Abel) Patches please only modify ltmain.in and don't touch ltmain.sh # otherwise ltmain.sh will not be regenerated, and patches will be lost Patch0: libtool-1.5.6-relink.patch # Set sys_lib_dlsearch_path_spec correctly on lib64 systems: Patch1: libtool-1.5.26-lib64.patch Patch2: libtool-1.5.6-ltmain-SED.patch Patch3: libtool-1.5.6-libtoolize--config-only.patch Patch4: libtool-1.5.6-test-dependency.patch Patch5: libtool-1.5-testfailure.patch Patch7: libtool-1.5.20-fix-gcj-reload-cmd.patch # disable ugly test. needed by link_all_depslibs patch Patch11: libtool-1.5.24-deplibs_test_disable.patch # from debian, cf http://wiki.mandriva.com/en/Overlinking Patch12: libtool-1.5.24-link_all_deplibs.patch # cf http://wiki.mandriva.com/en/2009-underlinking-overlinking Patch13: libtool-1.5.26-drop-ld-no-undefined-for-shared-lib-modules.patch Patch14: libtool-1.5.x-CVE-2009-3736.diff %ifarch %biarches BuildRequires: linux32 %endif BuildRequires: automake1.8 Buildrequires: autoconf2.5 %if ! %{bootstrap} BuildRequires: gcc-%{fortran_compiler} BuildRequires: gcc-java %endif Requires: %{name}-base = %{version}-%{release} %description The libtool package contains the GNU libtool, a set of shell scripts which automatically configure UNIX and UNIX-like architectures to generically build shared libraries. Libtool provides a consistent, portable interface which simplifies the process of using shared libraries. If you are developing programs which will use shared libraries, you should install libtool. %package base Group: Development/C Summary: Basic package for %{name} Conflicts: libtool < 1.5.20-4mdk Requires: file # cputoolize uses sed Requires: sed Requires(post): info-install Requires(preun): info-install %description base The libtool package contains the GNU libtool, a set of shell scripts which automatically configure UNIX and UNIX-like architectures to generically build shared libraries. Libtool provides a consistent, portable interface which simplifies the process of using shared libraries. If you are developing programs which will use shared libraries, you should install libtool. %package -n %{libname} Group: Development/C Summary: Shared library files for libtool License: LGPL Provides: %{libname_orig} = %{version}-%{release} # old libextractor wrongly provided its own libltdl: Conflicts: %{_lib}extractor1 < 0.5.18a %description -n %{libname} Shared library files for libtool DLL library from the libtool package. %package -n %{libname}-devel Group: Development/C Summary: Development files for libtool License: LGPL Requires: %{name} = %{version} Requires: %{libname} = %{version} Provides: %{libname_orig}-devel = %{version}-%{release} Provides: %{name}-devel %description -n %{libname}-devel Development headers, and files for development from the libtool package. %prep %setup -q %patch0 -p1 -b .relink %patch1 -p1 -b .lib64 %patch2 -p1 -b .ltmain-SED %patch3 -p1 -b .libtoolize--config-only %patch4 -p1 -b .test-dependency %patch5 -p1 %patch7 -p1 -b .gcj-reload %patch11 -p1 -b .uglytest %patch12 -p1 -b .overlinking %patch13 -p1 -b .underlinking %patch14 -p1 -b .CVE-2009-3736 ./bootstrap %build # don't use configure macro - it forces libtoolize, which is bad -jgarzik # Use configure macro but define __libtoolize to be /bin/true -Geoff %define __libtoolize /bin/true # And don't overwrite config.{sub,guess} in this package as well -- Abel %define __cputoolize /bin/true # build alt-arch libtool first # NOTE: don't bother to make libtool biarch capable within the same # "binary", use the multiarch facility to dispatch to the right script. %ifarch %biarches mkdir -p build-%{alt_arch}-%{_target_os} pushd build-%{alt_arch}-%{_target_os} linux32 ../configure --prefix=%{_prefix} --build=%{alt_arch}-%{_real_vendor}-%{_target_os}%{?_gnu} linux32 make popd %endif mkdir -p build-%{_target_cpu}-%{_target_os} pushd build-%{_target_cpu}-%{_target_os} CONFIGURE_TOP=.. %configure2_5x make # Do not use -nostdlib to build libraries, and so no need to hardcode gcc path (mdvbz#44616) # (taken from debian, http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=206356) # ([PIX] this is not done as a patch since the patch would be too big to maintain) sed -i -e 's/^\(predep_objects\)=.*/\1=""/' \ -e 's/^\(postdep_objects\)=.*/\1=""/' \ -e 's/^\(compiler_lib_search_path\)=.*/\1=""/' \ -e 's:^\(sys_lib_search_path_spec\)=.*:\1="/lib/ /usr/lib/ /usr/X11R6/lib/ /usr/local/lib/":' \ -e 's/^\(archive_cmds=\".*\) -nostdlib /\1 /' \ -e 's/^\(archive_expsym_cmds=\".*\) -nostdlib /\1 /' \ libtool popd %check pushd build-%{_target_cpu}-%{_target_os} set +x echo ====================TESTING========================= set -x #ifarch ia64 # - ia64: SIGILL when running hellodl #make check || echo make check failed #else # all tests must pass here make check #endif set +x echo ====================TESTING END===================== set -x make -C demo clean popd %install rm -fr %{buildroot} %makeinstall_std -C build-%{_target_cpu}-%{_target_os} sed -e "s,@prefix@,%{_prefix}," -e "s,@datadir@,%{_datadir}," %{SOURCE2} \ > %{buildroot}%{_bindir}/cputoolize chmod 755 %{buildroot}%{_bindir}/cputoolize # biarch support %ifarch %biarches %multiarch_binaries $RPM_BUILD_ROOT%{_bindir}/libtool install -m 755 build-%{alt_arch}-%{_target_os}/libtool $RPM_BUILD_ROOT%{_bindir}/libtool linux32 /bin/sh -c '%multiarch_binaries $RPM_BUILD_ROOT%{_bindir}/libtool' %endif %clean rm -fr %{buildroot} %post base %_install_info %{name}.info %if %mdkversion < 200900 %post -n %{libname} -p /sbin/ldconfig %endif %preun base %_remove_install_info %{name}.info %if %mdkversion < 200900 %postun -n %{libname} -p /sbin/ldconfig %endif %files %defattr(-,root,root) %doc AUTHORS INSTALL NEWS README %doc THANKS TODO ChangeLog* %{_bindir}/libtool %ifarch %biarches %define alt_multiarch_bindir %(linux32 /bin/rpm --eval %%multiarch_bindir) %{multiarch_bindir} %{multiarch_bindir}/libtool %{alt_multiarch_bindir} %{alt_multiarch_bindir}/libtool %endif %files base %defattr(-,root,root) %doc AUTHORS INSTALL NEWS README %doc THANKS TODO ChangeLog* %{_bindir}/cputoolize %{_bindir}/libtoolize %{_infodir}/libtool.info* %{_datadir}/libtool %{_datadir}/aclocal/*.m4 %files -n %{libname} %defattr(-,root,root) %doc libltdl/README %{_libdir}/*.so.* %files -n %{libname}-devel %defattr(-,root,root) %doc demo %{_includedir}/* %{_libdir}/*.a %{_libdir}/*.so %{_libdir}/*.la %changelog * Thu Nov 19 2009 Oden Eriksson <oeriksson@mandriva.com> 1.5.26-5.2mdv2009.0 - P14: security fix for CVE-2009-3736 * Thu Nov 06 2008 Adam Williamson <awilliamson@mandriva.com> 1.5.26-5.1mdv2009.0 + Revision: 300367 - drop anygcc patch, which is not doing anything useful, and fixed differently - do not use -nostdlib to build libraries, and so no need to hardcode gcc path (#44616) * Wed Aug 06 2008 Thierry Vignaud <tvignaud@mandriva.com> 1.5.26-5mdv2009.0 + Revision: 264933 - rebuild early 2009.0 package (before pixel changes) + Pixel <pixel@mandriva.com> - do not call ldconfig in %%post/%%postun, it is now handled by filetriggers * Wed Jun 04 2008 Anssi Hannula <anssi@mandriva.org> 1.5.26-4mdv2009.0 + Revision: 214898 - update lib64.patch: o do not hardcode build-time library search path (sys_lib_search_path_spec), as libtool fetches it from gcc o apply lib64 change to run-time library search path (sys_lib_dlsearch_path_spec) even when /etc/ld.so.conf does not exist * Mon May 26 2008 Pixel <pixel@mandriva.com> 1.5.26-3mdv2009.0 + Revision: 211318 - discard ld option "--no-undefined" when building shared library modules * Wed May 07 2008 Pixel <pixel@mandriva.com> 1.5.26-2mdv2009.0 + Revision: 202855 - do not build shared files with all deplibs (cf http://wiki.mandriva.com/en/Overlinking) * Thu Apr 17 2008 Oden Eriksson <oeriksson@mandriva.com> 1.5.26-1mdv2009.0 + Revision: 195285 - 1.5.26 + Olivier Blin <oblin@mandriva.com> - restore BuildRoot + Thierry Vignaud <tvignaud@mandriva.com> - kill re-definition of %%buildroot on Pixel's request * Sun Oct 14 2007 Christiaan Welvaart <spturtle@mandriva.org> 1.5.24-1mdv2008.1 + Revision: 98132 - 1.5.24 - rediff patch1 - drop patch6 - almost completely included upstream - drop patches 8 and 9 - merged upstream * Sun Sep 30 2007 Anssi Hannula <anssi@mandriva.org> 1.5.22-3mdv2008.0 + Revision: 94045 - add conflicts with old libextractor1 for smooth upgrade * Tue Sep 18 2007 Anssi Hannula <anssi@mandriva.org> 1.5.22-2mdv2008.0 + Revision: 89730 - rebuild due to package loss * Mon Jan 29 2007 Per Ãyvind Karlsen <pkarlsen@mandriva.com> 1.5.22-1mdv2007.0 + Revision: 114816 - new release: 1.5.22 - detect gcc path at runtime instead of requiring specific version (P10 from fedora) - regenerate P6 - fix link.test check - use new %%check stage for checks - license for libraries is LGPL, not GPL * Thu Jan 04 2007 Gwenole Beauchesne <gbeauchesne@mandriva.com> 1.5.20-11mdv2007.1 + Revision: 104146 - recognize cell spu targets * Sat Nov 11 2006 Anssi Hannula <anssi@mandriva.org> 1.5.20-10mdv2007.1 + Revision: 83259 - fix gcc_version define when gcc is not present - rebuild for gcc 4.1.2 - Import libtool * Fri Jun 02 2006 Gustavo Pichorim Boiko <boiko@mandriva.com> 1.5.20-9mdk - Added requires for sed (it is needed for cputoolize) * Thu May 18 2006 Gwenole Beauchesne <gbeauchesne@mandriva.com> 1.5.20-8mdk - rebuild for 4.1.1 * Wed Apr 26 2006 Christiaan Welvaart <cjw@daneel.dyndns.org> 1.5.20-7mdk - patch7: fix incremental linking for GCJ tag - add a conflicts to fix upgrade * Thu Feb 16 2006 Gwenole Beauchesne <gbeauchesne@mandriva.com> 1.5.20-6mdk - rebuild for 4.0.3 * Wed Nov 23 2005 Christiaan Welvaart <cjw@daneel.dyndns.org> 1.5.20-5mdk - fix filelist for biarch architectures * Fri Nov 18 2005 Abel Cheung <deaddog@mandriva.org> 1.5.20-4mdk - Revert previous crappy revert that make people's life difficult * Wed Nov 16 2005 Gwenole Beauchesne <gbeauchesne@mandriva.com> 1.5.20-3mdk - revert change of lame coward who does not even know how to use --define * Fri Nov 04 2005 Gwenole Beauchesne <gbeauchesne@mandriva.com> 1.5.20-1mdk - 1.5.20 - buildrequires gfortran and gcj - allow definition of custom gcc_version * Sat Aug 13 2005 Gwenole Beauchesne <gbeauchesne@mandriva.com> 1.5.18-1mdk - 1.5.18 - readd the strict gcc requirement, it's still need to match with current env compiler * Mon Jun 20 2005 Stefan van der Eijk <stefan@eijk.nu> 1.5.12-8mdk - remove construction like bug 6574 * Fri Jun 03 2005 Gwenole Beauchesne <gbeauchesne@mandriva.com> 1.5.12-7mdk - rebuild for 4.0.1 * Sat May 07 2005 Gwenole Beauchesne <gbeauchesne@mandriva.com> 1.5.12-6mdk - rebuild once more in a clean environment this time * Thu May 05 2005 Gwenole Beauchesne <gbeauchesne@mandriva.com> 1.5.12-5mdk - rebuild * Sun Feb 27 2005 Christiaan Welvaart <cjw@daneel.dyndns.org> 1.5.12-4mdk - fix bug in Patch0 affecting packages with multiple inst_prefixed lib paths * Wed Feb 23 2005 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.5.12-3mdk - make libtool script multiarch, other lib64 fixes * Fri Feb 11 2005 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.5.12-2mdk - really pass thread flags * Thu Feb 10 2005 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.5.12-1mdk - 1.5.12 - /usr/bin/libtool is compiler dependent * Wed Jul 28 2004 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.5.6-4mdk - Patch10: demo-nopic test not suitable on x86_64 * Tue Jun 22 2004 Abel Cheung <deaddog@deaddog.org> 1.5.6-3mdk - Fix patch16 to include more compatibility hack - Fix Provides (thx gb) * Sat May 22 2004 Abel Cheung <deaddog@deaddog.org> 1.5.6-2mdk - Patch16: Libtool sucks, changing the variable that defines ".so" extension all the time * Mon May 03 2004 Abel Cheung <deaddog@deaddog.org> 1.5.6-1mdk - THE BIG MOVE - Updated P2(relink), P3(lib64), P4(add x86_64 to host_cpu), P8($SED), P12(libtoolize --config-only), P14(test dependency) - Disable or drop other obsolete patches (some are kept in case they might be useful later) - Patch15: Shamelessly copied from fedora RPM, fix test cases - Please check if test suite fails for non-IA32 archs * Wed Feb 11 2004 Abel Cheung <deaddog@deaddog.org> 1.4.3-10mdk - Yet another more extra additional (...) fix to relink patch, hopefully final - Patch14: demo-conf.test is a prerequisite of demo-conf.test