You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
226 lines
7.2 KiB
226 lines
7.2 KiB
#!/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=1.1.1
|
|
BUILD=${BUILD:-1}
|
|
|
|
ARCHIVE_TYPE="tar.xz"
|
|
SRCURL="https://media.inkscape.org/dl/resources/file/$PRGNAM-$VERSION.$ARCHIVE_TYPE"
|
|
|
|
source ../../get-source.sh
|
|
## need this here for CXX_FLAGS for double-conversion
|
|
getsource_fn
|
|
|
|
## inkscape v1.1.1 needs double-conversion
|
|
[[ $(cat $TMPVARS/PRE_DOWNLOAD) != yes ]] && {
|
|
# ### double-conversion - start
|
|
{
|
|
## If it is already installed, go to end
|
|
ldconfig -p|grep libdouble-conversion 1>/dev/null || {
|
|
## otherwise, if the source archive is in 'src' ..
|
|
[[ -s $BUILD_TDE_ROOT/src/double-conversion-3.1.5.tar.gz ]] && {
|
|
## .. build, package, and install ..
|
|
(
|
|
echo -e "\n building double-conversion \n"
|
|
|
|
cd /$TMP_BUILD
|
|
rm -rf *double-conversion*
|
|
tar xf $BUILD_TDE_ROOT/src/double-conversion-3.1.5.tar.gz
|
|
cd double-conversion-3.1.5/
|
|
|
|
cd cmake/
|
|
# LIBDIRSUFFIX not required - builds to lib64 where appropriate ..
|
|
cmake ${G_NINJA:-} ../ -DBUILD_SHARED_LIBS=ON -DCMAKE_CXX_FLAGS="$SLKCFLAGS"
|
|
|
|
PKG=$TMP_BUILD/package-double-conversion
|
|
make_fn
|
|
|
|
cd $TMP_BUILD/package-double-conversion
|
|
makepkg -l y -c n $OUTPUT/double-conversion-3.1.5-$ARCH-$BUILD.txz
|
|
installpkg $OUTPUT/double-conversion-3.1.5-$ARCH-$BUILD.txz
|
|
)
|
|
echo -e "\n now building inkscape \n"
|
|
} || { ## .. but if the source archive isn't in 'src', display download URL ..
|
|
echo -e "\n ############ \n\n\033[39;1m double-conversion is not installed and is required for this build \n \033[34;1m
|
|
Download:
|
|
\n wget -O $BUILD_TDE_ROOT/src/double-conversion-3.1.5.tar.gz https://github.com/google/double-conversion/archive/v3.1.5.tar.gz
|
|
\n and re-run this script .. \n\n \033[0m ############ \n" ; exit 1 ; }
|
|
}
|
|
}
|
|
# ### double-conversion - end
|
|
}
|
|
|
|
untar_fn
|
|
|
|
## patch for poppler 21.11
|
|
## https://gitlab.com/inkscape/inkscape/-/commit/5724c21b9cb7b6176a7b36ca24068b148c817e82.diff
|
|
echo $'--- src/extension/internal/pdfinput/pdf-parser.cpp
|
|
+++ src/extension/internal/pdfinput/pdf-parser.cpp
|
|
@@ -2171,3 +2171,7 @@
|
|
printf(" font: tag=%s name='\''%s'\'' %g\n",
|
|
+#if POPPLER_CHECK_VERSION(21,11,0)
|
|
+ font->getTag().c_str(),
|
|
+#else
|
|
font->getTag()->getCString(),
|
|
+#endif
|
|
font->getName() ? font->getName()->getCString() : "???",
|
|
' | patch -p0
|
|
|
|
## set internal 2geom lib paths to lib$LIBDIRSUFFIX
|
|
sed -i "s|CMAKE_INSTALL_PREFIX}/lib|&$LIBDIRSUFFIX|" src/3rdparty/2geom/CMakeLists.txt
|
|
sed -i "s|DESTINATION lib|&$LIBDIRSUFFIX|" src/3rdparty/2geom/CMakeLists.txt
|
|
sed -i "s|libdir=.*$|&$LIBDIRSUFFIX|" src/3rdparty/2geom/2geom.pc.in
|
|
|
|
## only build for required locales
|
|
{
|
|
## set up a directory to store the required locale files temporarily
|
|
TEMP_DIR=$TMP_BUILD/tmp-$PRGNAM/loc_tmp
|
|
mkdir $TEMP_DIR
|
|
|
|
## .. for po/LINGUAS
|
|
LOCALES=$(cat po/LINGUAS)
|
|
rm po/LINGUAS
|
|
for locale in $I18N
|
|
do
|
|
[[ $LOCALES == *$locale* ]] && \
|
|
echo $locale >> po/LINGUAS
|
|
done
|
|
## .. for translations
|
|
locas="" ## for slack-desc
|
|
for locale in $I18N
|
|
do
|
|
mv po/$locale.po $TEMP_DIR && locas="$locas $locale"
|
|
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/
|
|
} || true # because the existence of the files hasn't been tested
|
|
|
|
## only package man pages for required locales
|
|
for file in man/ink*.*.pod.in
|
|
do
|
|
[[ $I18N != *$(echo $file | cut -d"." -f2)* ]] && rm $file
|
|
done
|
|
## and install them to $prefix, as per most other Slackware packages
|
|
sed -i 's|MANFILE_DEST "${SHARE_INSTALL}|MANFILE_DEST "${CMAKE_INSTALL_PREFIX}|' CMakeScripts/Pod2man.cmake
|
|
|
|
## only package welcome screen text for required locales
|
|
I18N_SVG="about.svg start-welcome-text.svg"
|
|
#
|
|
for Loc in $I18N
|
|
do
|
|
[[ -s share/screens/start-welcome-text.$Loc.svg ]] && I18N_SVG="$I18N_SVG start-welcome-text.$Loc.svg" && COUNT_TEXT=$[${COUNT_TEXT:-}+1]
|
|
COUNT_I18N=$[${COUNT_I18N:-}+1]
|
|
done
|
|
## Add the TRANSLATING file if any of the locales has no start-welcome-text.$I18N.svg
|
|
[[ ${COUNT_I18N:-} != ${COUNT_TEXT:-} ]] && I18N_SVG="TRANSLATING $I18N_SVG"
|
|
sed -i "s|\"\*.svg\"|$I18N_SVG|" share/screens/CMakeLists.txt
|
|
|
|
listdocs_fn
|
|
|
|
chown_fn
|
|
|
|
cd_builddir_fn
|
|
|
|
## options have been pulled from CMakeLists.txt
|
|
cmake ${G_NINJA:-} \
|
|
-DCMAKE_C_FLAGS="$SLKCFLAGS" \
|
|
-DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
|
|
-DCMAKE_C_COMPILER=$COMPILER \
|
|
-DCMAKE_CXX_COMPILER=$COMPILER_CXX \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_INSTALL_PREFIX=/usr/local \
|
|
-DBUILD_SHARED_LIBS="ON" \
|
|
-DBUILD_TESTING="OFF" \
|
|
-DENABLE_BINRELOC="OFF" \
|
|
-DENABLE_LCMS="ON" \
|
|
-DENABLE_POPPLER="ON" \
|
|
-DENABLE_POPPLER_CAIRO="ON" \
|
|
-DWITH_ASAN="OFF" \
|
|
-DWITH_DBUS="OFF" \
|
|
-DWITH_FUZZ="OFF" \
|
|
-DWITH_GNU_READLINE="ON" \
|
|
-DWITH_GRAPHICS_MAGICK="ON" \
|
|
-DWITH_GSPELL="OFF" \
|
|
-DWITH_IMAGE_MAGICK="ON" \
|
|
-DWITH_INTERNAL_2GEOM="ON" \
|
|
-DWITH_JEMALLOC="OFF" \
|
|
-DWITH_LIBCDR="ON" \
|
|
-DWITH_LIBVISIO="OFF" \
|
|
-DWITH_LIBWPG="OFF" \
|
|
-DWITH_LPETOOL="OFF" \
|
|
-DLPE_ENABLE_TEST_EFFECTS="OFF" \
|
|
-DWITH_MANPAGE_COMPRESSION="ON" \
|
|
-DWITH_NLS="ON" \
|
|
-DWITH_OPENMP="ON" \
|
|
-DWITH_PROFILING="OFF" \
|
|
-DWITH_SVG2="ON" \
|
|
-Wno-dev \
|
|
..
|
|
|
|
make_fn
|
|
|
|
INSTALL_TDE="/usr/local"
|
|
installdocs_fn
|
|
|
|
strip_fn
|
|
|
|
mkdir_install_fn
|
|
|
|
INSTALL_TDE=/usr/local
|
|
doinst_sh_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: With language support for:
|
|
$PRGNAM: en$locas
|
|
$PRGNAM:
|
|
$PRGNAM:
|
|
$PRGNAM:
|
|
$PRGNAM:
|
|
" > $PKG/install/slack-desc
|
|
|
|
makepkg_fn
|