Name: harfbuzz Version: 0.9.18 Release: 1 Summary: Text shaping library License: MIT Group: Development/Libraries URL: http://freedesktop.org/wiki/Software/HarfBuzz Source0: http://www.freedesktop.org/software/harfbuzz/release/%{name}-%{version}.tar.bz2 Source1: http://www.freedesktop.org/software/harfbuzz/release/%{name}-%{version}.tar.bz2.sha256 Source2: http://www.freedesktop.org/software/harfbuzz/release/%{name}-%{version}.tar.bz2.sha256.asc Patch0: %{name}-%{version}-aix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: gcc-c++ >= 4.2.3-2 BuildRequires: make BuildRequires: cairo-devel >= 1.10.0-3 BuildRequires: freetype2-devel >= 2.4.6-1 BuildRequires: glib2-devel >= 2.22.5-1 Requires: libgcc >= 4.2.3-2 Requires: cairo >= 1.10.0-3 Requires: freetype2 >= 2.4.6-1 Requires: glib2 >= 2.22.5-1 %define _libdir64 %{_prefix}/lib64 %description HarfBuzz is an implementation of the OpenType Layout engine. %package devel Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %prep %setup -q %patch0 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 CFLAGS="-DSYSV -D_AIX -D_AIX32 -D_AIX41 -D_AIX43 -D_AIX51 -D_ALL_SOURCE -DFUNCPROTO=15 -O -I/opt/freeware/include" export CXXFLAGS="-DSYSV -D_AIX -D_AIX32 -D_AIX41 -D_AIX43 -D_AIX51 -D_ALL_SOURCE -DFUNCPROTO=15 -O -I/opt/freeware/include" cd 64bit # first build the 64-bit version export OBJECT_MODE=64 export CC="gcc -pthread -maix64" export CXX="g++ -pthread -maix64" export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir64} \ --enable-shared --disable-static gmake %{?_smp_mflags} cd ../32bit # now build the 32-bit version export OBJECT_MODE=32 export CC="gcc -maix32" export CXX="g++ -maix32" export LDFLAGS="-L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" ./configure \ --prefix=%{_prefix} \ --enable-shared --disable-static gmake %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} cd 64bit export OBJECT_MODE=64 gmake DESTDIR=${RPM_BUILD_ROOT} install ( cd ${RPM_BUILD_ROOT}%{_bindir} for f in * ; do mv -f ${f} ${f}_64 done ) cd ../32bit export OBJECT_MODE=32 gmake DESTDIR=${RPM_BUILD_ROOT} install /usr/bin/strip -X32_64 ${RPM_BUILD_ROOT}%{_bindir}/* || : chmod 0755 ${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 libraries 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* ( 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 %doc 32bit/NEWS 32bit/AUTHORS 32bit/COPYING 32bit/README %{_libdir}/*.a %{_libdir}/*.so* %{_libdir64}/*.so* /usr/lib/*.a /usr/lib/*.so* /usr/lib64/*.so* %files devel %{_bindir}/hb-view* %{_bindir}/hb-ot-shape-closure* %{_bindir}/hb-shape* %{_includedir}/* %{_libdir}/*.la %{_libdir64}/*.la %{_libdir}/pkgconfig/* %{_libdir64}/pkgconfig/* /usr/bin/hb-view* /usr/bin/hb-ot-shape-closure* /usr/bin/hb-shape* /usr/include/* %changelog * Fri Nov 07 2014 Michael Perzl - 0.9.18-1 - first version for AIX V5.1 and higher