Summary: Character set conversion library, portable iconv implementation Name: libiconv Version: 1.16 Release: 1 Group: System Environment/Libraries License: LGPL URL: http://www.gnu.org/software/libiconv/ Source0: http://ftp.gnu.org/pub/gnu/%{name}/%{name}-%{version}.tar.gz Source1: http://ftp.gnu.org/pub/gnu/%{name}/%{name}-%{version}.tar.gz.sig BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: gettext Requires: gettext %description GNU libiconv provides an iconv() implementation for use on systems which don't have one or whose implementation cannot convert from/to Unicode. It supports all the important encodings in use today. The library is available as 32-bit and 64-bit. If you are compiling a 32-bit program, no special compiler options are needed. If you are compiling a 64-bit program, you have to compile and link your application with "cc_r -q64" or "gcc -maix64". %prep %setup -q %build export CONFIG_SHELL=/usr/bin/ksh export CONFIG_ENV_ARGS=/usr/bin/ksh export CC=cc_r export CPPFLAGS=-D_THREAD_SAFE # first build the 64-bit version export OBJECT_MODE=64 ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --enable-shared --disable-static \ --enable-extra-encodings make %{?_smp_mflags} cp lib/.libs/libiconv.so.2 . cp libcharset/lib/.libs/libcharset.so.1 . make distclean # now build the 32-bit version export OBJECT_MODE=32 ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --enable-shared --disable-static \ --enable-extra-encodings make %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} make DESTDIR=${RPM_BUILD_ROOT} install # we need to work around the wrong strategy in the libiconv Makefile, therefore # we create the shared libraries from scratch ourselves export AR="/usr/bin/ar -X32_64" /usr/bin/rm -f ${RPM_BUILD_ROOT}%{_libdir}/*.a ${AR} -rv ${RPM_BUILD_ROOT}%{_libdir}/libcharset.a libcharset/lib/.libs/libcharset.so.1 ${AR} -q ${RPM_BUILD_ROOT}%{_libdir}/libcharset.a ./libcharset.so.1 ${AR} -rv ${RPM_BUILD_ROOT}%{_libdir}/libiconv.a lib/.libs/libiconv.so.2 ${AR} -q ${RPM_BUILD_ROOT}%{_libdir}/libiconv.a ./libiconv.so.2 /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : # create symbolic links ( cd ${RPM_BUILD_ROOT} for dir in bin include lib do mkdir -p usr/linux/${dir} cd usr/linux/${dir} ln -sf ../../..%{_prefix}/${dir}/* . cd - done ) %post # we need to include all shared members of the system wide /usr/lib/libiconv.a # as otherwise if the shared library search order is changed and our library # in /opt/freeware/lib/libiconv.a is found first - e.g. by setting $LIBPATH - # then all system binaries will core dump as they don't find their required # shared members in libiconv.a. export AR="ar -X32_64" export TMPDIR="/tmp/libiconv-hack.tmp" # this is necessary to be able to write to /opt/freeware/lib/libiconv.a /usr/sbin/slibclean /usr/bin/mkdir -p ${TMPDIR} cd ${TMPDIR} list=`${AR} -t /usr/lib/libiconv.a` ${AR} -x /usr/lib/libiconv.a cat ${list} | /usr/bin/xargs /usr/bin/strip -X32_64 -e for f in ${list} ; do ${AR} -q %{_libdir}/libiconv.a ${f} done cd /tmp /usr/bin/rm -rf ${TMPDIR} %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system) %doc AUTHORS* COPYING.LIB* ChangeLog* DESIGN* %doc INSTALL.generic* NEWS* NOTES* README* THANKS* %{_bindir}/* %{_includedir}/* %{_libdir}/*.*a %{_mandir}/man?/* %{_datadir}/locale/*/*/* /usr/linux/bin/* /usr/linux/include/* /usr/linux/lib/*.a* %changelog * Mon Apr 29 2019 Michael Perzl - 1.16-1 - updated to version 1.16 * Fri Feb 03 2017 Michael Perzl - 1.15-1 - updated to version 1.15 * Sat Jan 16 2016 Michael Perzl - 1.14-3 - recompile to make it threadsafe * Wed May 16 2012 Michael Perzl - 1.14-2 - missed a 'cd ${TMPDIR}' in the %post section * Tue Aug 09 2011 Michael Perzl - 1.14-1 - updated to version 1.14 * Tue Aug 09 2011 Michael Perzl - 1.13.1-3 - needed to add a 'slibclean' in the %post section * Tue Jul 06 2010 Michael Perzl - 1.13.1-2 - removed dependency on gettext >= 0.17 - changed way how to include the original /usr/lib/libiconv.a shared members * Thu Jul 02 2009 Michael Perzl - 1.13.1-1 - updated to version 1.13.1 * Thu Jul 02 2009 Michael Perzl - 1.13-1 - updated to version 1.13 * Thu Oct 16 2008 Michael Perzl - 1.12-2 - fixed the generation of the 64-bit version of the library * Sat Mar 28 2008 Michael Perzl - 1.12-1 - first version for AIX V5.1 and higher