#!/bin/sh # Generated by Alien's SlackBuild Toolkit: http://slackware.com/~alien/AST # Copyright 2009, 2010, 2011, 2012, 2013, 2014, 2015 Eric Hameleers, Eindhoven, Netherlands # Copyright 2015-2017 Thorn Inurcide # Copyright 2015-2017 tde-slackbuilds project on GitHub # All rights reserved. # # Permission to use, copy, modify, and distribute this software for # any purpose with or without fee is hereby granted, provided that # the above copyright notice and this permission notice appear in all # copies. # # THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. # IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF # USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. PRGNAM=inkscape VERSION=${VERSION:-0.92.3} BUILD=${BUILD:-1} SRCURL="https://media.inkscape.org/dl/resources/file/inkscape-$VERSION.tar.bz2" source ../../get-source.sh getsource_fn untar_fn ## install to .../lib64 on 64-bit system [[ -d /lib64 ]] && \ { ## set RPATH sed -i "s|ORIGIN/../lib/inkscape|ORIGIN/../lib$LIBDIRSUFFIX/inkscape|" CMakeLists.txt ## set output directory sed -i "s|/lib |/lib$LIBDIRSUFFIX |" CMakeLists.txt ## for dynamic lib sed -i "s|lib/inkscape|lib$LIBDIRSUFFIX/inkscape|" src/CMakeLists.txt ## for static libs sed -i "s|lib/inkscape|lib$LIBDIRSUFFIX/inkscape|" CMakeScripts/HelperMacros.cmake } ## only build for required locales { ## .. for po/LINGUAS LOCALES=$(cat po/LINGUAS) rm po/LINGUAS for locale in $I18N do [[ $LOCALES == *$locale* ]] && \ echo $locale >> po/LINGUAS done ## set up a directory to store the required locale files temporarily TEMP_DIR=$TMP_BUILD/tmp-$PRGNAM/loc_tmp mkdir $TEMP_DIR ## .. for READMEs for locale in $I18N do mv README.$locale.txt $TEMP_DIR done rm README.*.txt mv $TEMP_DIR/* . RM_LIST=$(ls -1 README*) ## .. for keys.*.html for locale in $I18N do mv doc/keys.$locale.html $TEMP_DIR done rm doc/keys.*.html mv $TEMP_DIR/* doc/ KEYS_LIST=$(ls -1 doc/keys.*) ## .. for translations for locale in $I18N do mv po/$locale.po $TEMP_DIR done rm -rf po/*.po mv $TEMP_DIR/* po/ ## .. for tutorials for locale in $I18N do mv share/tutorials/*.$locale.* $TEMP_DIR done rm share/tutorials/*.*.* mv $TEMP_DIR/* share/tutorials/ ## .. for templates for locale in $I18N do mv share/templates/*.$locale.* $TEMP_DIR done rm share/templates/*.*.* mv $TEMP_DIR/* share/templates/ } || true chown_fn listdocs_fn cd_builddir_fn ## default options have been pulled from CMakeLists.txt cmake \ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \ -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \ -DCMAKE_C_COMPILER=$COMPILER \ -DCMAKE_CXX_COMPILER=$COMPILER_CXX \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr/local \ -DWITH_NLS="ON" \ -DWITH_DBUS="OFF" \ -DENABLE_LCMS="ON" \ -DWITH_GNOME_VFS="ON" \ -DWITH_SVG2="ON" \ -DWITH_LPETOOL="OFF" \ -DWITH_INKJAR="ON" \ -DWITH_OPENMP="ON" \ -DWITH_PROFILING="OFF" \ -DENABLE_POPPLER="ON" \ -DENABLE_POPPLER_CAIRO="ON" \ -DWITH_IMAGE_MAGICK="ON" \ -DWITH_LIBCDR="ON" \ -DWITH_LIBVISIO="ON" \ -DWITH_LIBWPG="ON" \ -DWITH_GTK3_EXPERIMENTAL="OFF" \ -DENABLE_BINRELOC="OFF" \ .. make_fn ## only package man pages for required locales { for locale in $I18N do mv $PKG/usr/local/share/man/man1/inkscape.$locale.1 $TEMP_DIR done rm $PKG/usr/local/share/man/man1/inkscape.*.1 mv $TEMP_DIR/* $PKG/usr/local/share/man/man1/ } || true installdocs_fn #mangzip_fn strip_fn mkdir_install_fn echo " # HOW TO EDIT THIS FILE: # The 'handy ruler' below makes it easier to edit a package description. Line # up the first '|' above the ':' following the base package name, and the '|' on # the right side marks the last column you can put a character in. You must make # exactly 11 lines for the formatting to be correct. It's also customary to # leave one space after the ':'. |-----handy-ruler------------------------------------------------------| $PRGNAM: Inkscape (Open Source vector graphics editor) $PRGNAM: $PRGNAM: Inkscape is an Open Source vector graphics editor, with capabilities $PRGNAM: similar to Illustrator, Freehand, CorelDraw, or Xara X using the W3C $PRGNAM: standard Scalable Vector Graphics (SVG) file format. $PRGNAM: $PRGNAM: $PRGNAM: $PRGNAM: With language support for: $PRGNAM: en $(echo $(cat ../po/LINGUAS)) $PRGNAM: $PRGNAM: Homepage: http://www.inkscape.org/ " > $PKG/install/slack-desc cat <> $PKG/install/doinst.sh # Update the desktop database: if [ -x usr/bin/update-desktop-database ]; then chroot . /usr/bin/update-desktop-database /usr/local/share/applications > /dev/null 2>&1 fi # Update hicolor theme cache: if [ -d usr/share/icons/hicolor ]; then if [ -x /usr/bin/gtk-update-icon-cache ]; then chroot . /usr/bin/gtk-update-icon-cache -f -t /usr/local/share/icons/hicolor 1> /dev/null 2> /dev/null fi fi EOINS makepkg_fn