%ifos aix6.1 || %ifos aix7.1 %global p7build 1 %else %global p7build 0 %endif %define _libdir64 %{_prefix}/lib64 Name: pcre Version: 8.43 %if %{p7build} Release: 1.p7 %else Release: 1 %endif Summary: Perl-compatible regular expression library URL: http://www.pcre.org/ Source0: ftp://ftp.csx.cam.ac.uk/pub/software/programming/%{name}/%{name}-%{version}.tar.bz2 Source1: ftp://ftp.csx.cam.ac.uk/pub/software/programming/%{name}/%{name}-%{version}.tar.bz2.sig Source2: libpcre.so.0-aix32 Source3: libpcre.so.0-aix64 License: BSD Group: System Environment/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildPrereq: sed %if %{p7build} BuildRequires: bzip2 >= 1.0.5-3 %else BuildRequires: bzip2 >= 1.0.2-4 %endif BuildRequires: zlib-devel >= 1.2.3-7, readline-devel >= 7.0-4 %if %{p7build} Requires: bzip2 >= 1.0.5-3 %else Requires: bzip2 >= 1.0.2-4 %endif Requires: zlib >= 1.2.3-7, readline >= 7.0-4 %if %{p7build} %ifos aix6.1 Requires: AIX-rpm >= 6.1.8.0 %endif %ifos aix7.1 Requires: AIX-rpm >= 7.1.3.0 %endif %endif %description Perl-compatible regular expression library. PCRE has its own native API, but a set of "wrapper" functions that are based on the POSIX API are also supplied in the library libpcreposix. Note that this just provides a POSIX calling interface to PCRE: the regular expressions themselves still follow Perl syntax and semantics. The header file for the POSIX-style functions is called pcreposix.h. %package devel Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel Development files (Headers, libraries for static linking, etc) for %{name}. %prep %setup -q mkdir ../32bit mv * ../32bit mv ../32bit . mkdir 64bit cd 32bit tar cf - . | (cd ../64bit ; tar xpf -) %build export CONFIG_SHELL=/usr/bin/ksh export CONFIG_ENV_ARGS=/usr/bin/ksh export CC="xlc_r" export CXX="xlC_r" export RM="/usr/bin/rm -f" cd 64bit # first build the 64-bit version export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" export OBJECT_MODE=64 ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir64} \ --mandir=%{_mandir} \ --enable-shared --disable-static \ --enable-pcre8 \ --enable-pcre16 \ --enable-pcre32 \ --enable-cpp \ --enable-jit \ --enable-pcregrep-jit \ --enable-utf \ --enable-unicode-properties \ --disable-newline-is-cr \ --enable-newline-is-lf \ --disable-newline-is-crlf \ --disable-newline-is-anycrlf \ --disable-newline-is-any \ --disable-bsr-anycrlf \ --disable-ebcdic \ --enable-stack-for-recursion \ --enable-pcregrep-libz \ --enable-pcregrep-libbz2 \ --disable-pcretest-libedit \ --enable-pcretest-libreadline \ --disable-valgrind \ --disable-coverage make %{?_smp_mflags} cd ../32bit # now build the 32-bit version export LDFLAGS="-L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" export OBJECT_MODE=32 ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir} \ --mandir=%{_mandir} \ --enable-shared --disable-static \ --enable-pcre8 \ --enable-pcre16 \ --enable-pcre32 \ --enable-cpp \ --enable-jit \ --enable-pcregrep-jit \ --enable-utf \ --enable-unicode-properties \ --disable-newline-is-cr \ --enable-newline-is-lf \ --disable-newline-is-crlf \ --disable-newline-is-anycrlf \ --disable-newline-is-any \ --disable-bsr-anycrlf \ --disable-ebcdic \ --enable-stack-for-recursion \ --enable-pcregrep-libz \ --enable-pcregrep-libbz2 \ --disable-pcretest-libedit \ --enable-pcretest-libreadline \ --disable-valgrind \ --disable-coverage make %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} export RM="/usr/bin/rm -f" cd 64bit export OBJECT_MODE=64 make install DESTDIR=${RPM_BUILD_ROOT} ( cd ${RPM_BUILD_ROOT}%{_bindir} for f in * ; do mv -f ${f} ${f}_64 done ) cd ../32bit export OBJECT_MODE=32 make install DESTDIR=${RPM_BUILD_ROOT} /usr/bin/strip -X32_64 ${RPM_BUILD_ROOT}%{_bindir}/* || : ( cd ${RPM_BUILD_ROOT}%{_libdir64} for f in *.a ; do /usr/bin/ar -X64 -x ${f} done cd ${RPM_BUILD_ROOT}%{_libdir} for f in *.a ; do /usr/bin/ar -X32 -x ${f} done ) # add the 64-bit shared objects to the shared library containing already the # 32-bit shared objects /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/lib%{name}.a ${RPM_BUILD_ROOT}%{_libdir64}/lib%{name}.so.1 /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/lib%{name}16.a ${RPM_BUILD_ROOT}%{_libdir64}/lib%{name}16.so.0 /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/lib%{name}32.a ${RPM_BUILD_ROOT}%{_libdir64}/lib%{name}32.so.0 /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/lib%{name}cpp.a ${RPM_BUILD_ROOT}%{_libdir64}/lib%{name}cpp.so.0 /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/lib%{name}posix.a ${RPM_BUILD_ROOT}%{_libdir64}/lib%{name}posix.so.0 # Add the older 8.21 shared members for compatibility with older apps # (make sure they're set for LOADONLY with 'strip -e') cp %{SOURCE2} lib%{name}.so.0 /usr/bin/strip -X32 -e lib%{name}.so.0 /usr/bin/ar -X32 -q ${RPM_BUILD_ROOT}%{_libdir}/lib%{name}.a lib%{name}.so.0 cp %{SOURCE3} lib%{name}.so.0 /usr/bin/strip -X64 -e lib%{name}.so.0 /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/lib%{name}.a lib%{name}.so.0 ( cd ${RPM_BUILD_ROOT} for dir in bin include lib lib64 do mkdir -p usr/${dir} cd usr/${dir} ln -sf ../..%{_prefix}/${dir}/* . cd - done ) %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system) %doc 32bit/AUTHORS 32bit/LICENCE 32bit/README %{_bindir}/pcregrep* %{_bindir}/pcretest* %{_libdir}/*.a %{_libdir}/*.so* %{_libdir64}/*.so* %{_mandir}/man1/pcregrep.1 %{_mandir}/man1/pcretest.1 /usr/bin/pcregrep* /usr/bin/pcretest* /usr/lib/*.a /usr/lib/*.so* /usr/lib64/*.so* %files devel %defattr(-,root,system) %{_bindir}/pcre-config* %{_includedir}/* %{_libdir}/*.la %{_libdir64}/*.la %{_libdir}/pkgconfig/* %{_libdir64}/pkgconfig/* %{_mandir}/man1/pcre-config.1 %{_mandir}/man3/* /usr/bin/pcre-config* /usr/include/* /usr/lib/*.la /usr/lib64/*.la %changelog * Tue Mar 05 2019 Michael Perzl - 8.43-1 - updated to version 8.43 * Mon Apr 09 2018 Michael Perzl - 8.42-1 - updated to version 8.42 * Mon Jul 10 2017 Michael Perzl - 8.41-1 - updated to version 8.41 * Thu Jan 12 2017 Michael Perzl - 8.40-1 - updated to version 8.40 * Tue Jun 28 2016 Michael Perzl - 8.39-1 - updated to version 8.39 - added 16-bit and 32-bit versions of the library * Fri Jan 15 2016 Michael Perzl - 8.38-2 - added missing 64-bit shared member to libpcre.a * Mon Dec 28 2015 Michael Perzl - 8.38-1 - updated to version 8.38 * Fri Jul 24 2015 Michael Perzl - 8.37-1 - updated to version 8.37 * Thu Nov 13 2014 Michael Perzl - 8.36-1 - updated to version 8.36 * Fri Apr 04 2014 Michael Perzl - 8.35-1 - updated to version 8.35 * Sun Dec 15 2013 Michael Perzl - 8.34-1 - updated to version 8.34 * Tue May 28 2013 Michael Perzl - 8.33-1 - updated to version 8.33 * Sat Dec 01 2012 Michael Perzl - 8.32-1 - updated to version 8.32 * Sat Jul 07 2012 Michael Perzl - 8.31-1 - updated to version 8.31 * Mon Jun 18 2012 Michael Perzl - 8.30-1 - updated to version 8.30 * Tue Dec 13 2011 Michael Perzl - 8.21-1 - updated to version 8.21 * Fri Oct 21 2011 Michael Perzl - 8.20-1 - updated to version 8.20 * Tue Aug 16 2011 Michael Perzl - 8.13-1 - updated to version 8.13 * Sat Jan 15 2011 Michael Perzl - 8.12-1 - updated to version 8.12 * Sat Dec 11 2010 Michael Perzl - 8.11-1 - updated to version 8.11 * Thu Jul 01 2010 Michael Perzl - 8.10-2 - removed dependency on bzip2 >= 1.0.5 * Tue Jun 29 2010 Michael Perzl - 8.10-1 - updated to version 8.10 * Mon Mar 22 2010 Michael Perzl - 8.02-1 - updated to version 8.02 * Wed Oct 21 2009 Michael Perzl - 8.00-1 - updated to version 8.00 * Thu Apr 16 2009 Michael Perzl - 7.9-1 - updated to version 7.9, added external dependencies for pcregrep * Mon Sep 08 2008 Michael Perzl - 7.8-1 - updated to version 7.8 * Fri May 09 2008 Michael Perzl - 7.7-1 - updated to version 7.7 * Tue Jan 29 2008 Michael Perzl - 7.6-1 - updated to version 7.6 * Fri Jan 10 2008 Michael Perzl - 7.5-1 - updated to version 7.5 * Thu Jan 03 2008 Michael Perzl - 7.4-2 - included both 32-bit and 64-bit shared objects * Thu Oct 18 2007 Michael Perzl - 7.4-1 - first version for AIX V5.1 and higher