diff options
Diffstat (limited to 'l/icu4c/icu4c.SlackBuild')
-rwxr-xr-x | l/icu4c/icu4c.SlackBuild | 95 |
1 files changed, 58 insertions, 37 deletions
diff --git a/l/icu4c/icu4c.SlackBuild b/l/icu4c/icu4c.SlackBuild index 1465a28..5c11aef 100755 --- a/l/icu4c/icu4c.SlackBuild +++ b/l/icu4c/icu4c.SlackBuild @@ -26,7 +26,7 @@ PKGNAM=icu4c SRCVER=${SRCVER:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 2- -d . | cut -f 2 -d - | rev)} VERSION=$(echo $SRCVER | tr _ .) -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then @@ -44,62 +44,83 @@ CWD=$(pwd) TMP=${TMP:-/tmp} PKG=$TMP/package-icu4c -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "s390" ]; then - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="64" -else - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" -fi - rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf icu +rm -rf icu icu-native tar xvf $CWD/icu4c-$SRCVER-src.tar.xz || exit 1 -cd icu || exit 1 -chown -R root:root . -find . \ +test -d icu || exit 1 +chown -R root:root icu +find icu \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ - -exec chmod 755 {} \; -o \ + -exec chmod 755 {} + -o \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 \ - -o -perm 400 \) -exec chmod 644 {} \; + -o -perm 400 \) -exec chmod 644 {} + + +cp -a icu icu-native + +sed -i \ + -e '/^IMPORT_LIB_EXT = \.lib$/ s/lib/dll.a/' \ + -e '/^LIBPREFIX=$/ s/$/lib/' \ + -e '/^LIBICU = \$(STATIC_PREFIX_WHEN_USED)/ s/\$(STATIC_PREFIX_WHEN_USED)/lib/' \ + icu/source/config/mh-mingw* + +(cd icu-native/source/ && + CFLAGS="-O0" CXXFLAGS="-O0" \ + ./configure \ + --prefix=/${PREFIX} \ + --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \ + --mandir=/${PREFIX}/man \ + --enable-shared \ + --disable-static \ + --sysconfdir=/${PREFIX}/etc \ + --localstatedir=/${PREFIX}/var \ + --build=$ARCH-slackware-linux || exit 1 + make $NUMJOBS || make || exit 1 +) || exit 1 + +cd icu cd source/ - CFLAGS="$SLKCFLAGS" \ - CXXFLAGS="$SLKCFLAGS" \ + CFLAGS="-O2" \ + CXXFLAGS="-O2" \ ./configure \ - --prefix=/usr \ - --libdir=/usr/lib${LIBDIRSUFFIX} \ - --mandir=/usr/man \ + --prefix=/${PREFIX} \ + --libdir=/${PREFIX}/lib${LIBDIRSUFFIX} \ + --mandir=/${PREFIX}/man \ --enable-shared \ --disable-static \ - --sysconfdir=/etc \ - --localstatedir=/var \ + --sysconfdir=/${PREFIX}/etc \ + --localstatedir=/${PREFIX}/var \ --disable-samples \ + --host=${HOST_TRIPLET} \ + --with-cross-build=${TMP}/icu-native/source \ --build=$ARCH-slackware-linux || exit 1 make $NUMJOBS || make || exit 1 make install DESTDIR=$PKG || exit 1 cd - -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true +(cd ${PKG}/${PREFIX} && mv lib${LIBDIRSUFFIX}/lib*.dll bin) + +sed -i '/^Libs:/ s/51//g' ${PKG}/${PREFIX}/lib${LIBDIRSUFFIX}/pkgconfig/*.pc + +find $PKG | xargs file | egrep "executable|shared object" \ + | grep ${HOST_EXE_FORMAT} | cut -f 1 -d : \ + | xargs ${HOST_STRIP} --strip-unneeded 2> /dev/null || true -find $PKG/usr/man -type f -exec gzip -9 {} \; +find $PKG/${PREFIX}/man -type f -exec gzip -9 {} \; -mkdir -p $PKG/usr/doc/icu4c-$VERSION +mkdir -p $PKG/${PREFIX}/doc/icu4c-$VERSION cp -a \ - license.html readme.html $PKG/usr/doc/icu4c-$VERSION + license.html readme.html $PKG/${PREFIX}/doc/icu4c-$VERSION -mkdir -p $PKG/install -cat $CWD/slack-desc > $PKG/install/slack-desc +cat ${CWD}/${PKGNAM}.yypkg.script | sed \ + -e "s/%{PKG}/${PKGNAM}/" \ + -e "s/%{HST}/${HOST_TRIPLET}/" \ + -e "s/%{TGT}//" \ + -e "s/%{VER}/${VERSION}/" \ + -e "s/%{BUILD}/${BUILD}/" \ + -e "s/%{DESCR}/${DESCR:-"No description"}/" \ + | yypkg --makepkg --output ${YYOUTPUT} --script - --directory "${PKG}/${PREFIX}" -cd $PKG -/sbin/makepkg -l y -c n $TMP/icu4c-$VERSION-$ARCH-$BUILD.txz |