X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage5%2Fpkg%2Fghostscript;h=9ab008c598ee8abb17c06a3e3afbb19cec692333;hb=3a7d016a0246156de63a6f98bbf5be2e95230060;hp=bc26a6c929a76bb1cddf8b213157f6ea2f343c37;hpb=3dae4c554ec18f465eb6ee5e6efdbdbe8557e13c;p=hvlinux.git diff --git a/stage5/pkg/ghostscript b/stage5/pkg/ghostscript index bc26a6c..9ab008c 100644 --- a/stage5/pkg/ghostscript +++ b/stage5/pkg/ghostscript @@ -1,64 +1,44 @@ -#!/bin/sh -set -o errexit - -# First argument of this script is the package name. - -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list - -GS_FONTS_PATH="${HV_FONTS_PATH}/ghostscript" - -PACKAGE=${1} -shift -CONFIGURE_OPTS=${*} - -# Applying patches (if any) -apply_patches ${PACKAGE} - -cd ${LFS_TMP}/${PACKAGE} - -# To use the system-installed version of JasPer: -rm -rf jasper - -# To use the system-installed copies of libjpeg and libpng: -rm -rf jpeg -rm -rf libpng - -# To use the system-installed copy of libtiff: -rm -rf tiff - -./configure \ - --prefix=/usr \ - --enable-dynamic \ - --with-system-libtiff \ - --with-fontpath=${GS_FONTS_PATH} -make -make install docdir=/usr/share/doc/${PACKAGE} - -# To install the shared library libgs.so (needed by libspectre) -make so -make soinstall docdir=/usr/share/doc/${PACKAGE} -install -v -m644 base/*.h /usr/include/ghostscript -ln -v -s ghostscript /usr/include/ps - -# Unpack all the fonts to ${GS_FONTS_PATH} -install -v -m755 -d ${GS_FONTS_PATH} -decompress_package ${GHOSTSCRIPT_FONTS_STD} -decompress_package ${GHOSTSCRIPT_FONTS_OTHER} -mv ${LFS_TMP}/fonts/* ${GS_FONTS_PATH} -rmdir ${LFS_TMP}/fonts -chown -v -R root:root ${GS_FONTS_PATH} - -if ! grep "${GS_FONTS_PATH}" /etc/fonts/local.conf 1> /dev/null 2>&1; then - # Adding Ghostscript fonts directory to local configuration file - sed -i -e "s!\(\)! ${GS_FONTS_PATH}\n\1!" /etc/fonts/local.conf -fi - -# Updating cache database. -fc-cache -f - -ldconfig - -exit $? +#!/bin/bash + +hvconfig_pre() +{ + export GS_FONTS_PATH="${HV_FONTS_PATH}/ghostscript" + + cd ${SRC_DIR} + + # To use the system-installed version of librairies: + rm -rf jasper tiff openjpeg + rm -rf expat freetype lcms2 jpeg libpng zlib + + CONFIGURE_OPTS+=" \ + --enable-dynamic \ + --disable-compile-inits \ + --with-system-libtiff \ + --with-fontpath=${GS_FONTS_PATH}" +} + +hvbuild() +{ + make + make install docdir=/usr/share/doc/${PACKAGE} +} + +hvbuild_post() +{ + # To install the shared library libgs.so (needed by libspectre) + make so + make soinstall docdir=/usr/share/doc/${PACKAGE} + install -v -m644 base/*.h /usr/include/ghostscript + ln -svf ghostscript /usr/include/ps + + # Unpack all the fonts to ${GS_FONTS_PATH} + install -v -m755 -d ${GS_FONTS_PATH} + decompress_package ${GHOSTSCRIPT_FONTS_STD} ${GS_FONTS_PATH} 1 + decompress_package ${GHOSTSCRIPT_FONTS_OTHER} ${GS_FONTS_PATH} 1 + chown -v -R root:root ${GS_FONTS_PATH} + + # Updating font information cache. + fc-cache -f + + unset GS_FONTS_PATH +}