#!/bin/sh COMP_VERSION="1.12" COMP_RELEASE="1" COMP_SOURCES="${BUILD_ROOT}/src/linux/libiconv" COMP_DEPENDENCIES="autoconf" function component_gather { rsync -a --exclude=.svn ${COMP_SOURCES}/ ${GATHER_DIR}/ } function _setup_build_env { set_compiler_env cd ${BUILDING_ROOT} CFLAGS="${_cflags}" CPPFLAGS="${_cppflags}" LDFLAGS="${_ldflags} $(libtool_format_rpath ${PREFIX_DIR}/${_lib})" export CPPFLAGS CFLAGS LDFLAGS } function component_configure { _setup_build_env ./configure \ --build="`get_build_string`" \ --prefix=${PREFIX_DIR} \ --libdir=${PREFIX_DIR}/${_lib} \ --disable-nls } function component_build { _setup_build_env # Hack to work around broken -fvisibility on solaris if [ "${BUILD_OS_TYPE}" = "solaris" ] then ${MAKE} ${_mflags} all CFLAG_VISIBILITY="" else ${MAKE} ${_mflags} all fi } function component_stage { _setup_build_env # Horrible hack on AIX # The libiconv makefile attempts to apply a hack on # AIX where it manually modifies libiconv.a. However, # libtool does not build libiconv.a when -Wl,-brtl is # in LDFLAGS (it builds libiconv.so instead). Since # libiconv.a doesn't exist, make fails. To work around # this, we create an empty dummy .a file before doing # "make install", and then remove it afterward if [ "${BUILD_OS_TYPE}" = "aix" ] then mkdir -p "${STAGING_ROOT_DIR}/${PREFIX_DIR}/${_lib}" ar cru "${STAGING_ROOT_DIR}/${PREFIX_DIR}/${_lib}/libiconv.a" fi ${MAKE} DESTDIR="${STAGING_ROOT_DIR}" install if [ "${BUILD_OS_TYPE}" = "aix" ] then rm -f "${STAGING_ROOT_DIR}/${PREFIX_DIR}/${_lib}/libiconv.a" fi libtool_rewrite_staging } function component_populate { COMP_NAME=libiconv COMP_PREFIX_DIR=`get_comp_staging_prefix_dir ${COMP_NAME}` COMP_ROOT_DIR=`get_comp_staging_root_dir ${COMP_NAME}` rsync -a ${COMP_ROOT_DIR}/ ${POPULATE_ROOT_DIR}/ --exclude "${PREFIX_DIR}/bin" x_rm ${POPULATE_PREFIX_DIR}/${_lib}/preloadable_libiconv.* x_rm ${POPULATE_PREFIX_DIR}/${_lib}/libcharset.* libtool_rewrite_populate }