Patch for inkscape for poppler 21.11 and version update

Added verbose [configuration only] and no warning options to tqt3 build
master
Ray-V 2 years ago
parent 5adaf90ee6
commit 2dcd1ab86a

@ -36,8 +36,8 @@ getsource_fn
untar_fn
## add -march and -mtune options to CFLAGS where they've been set in BUILD-TDE.sh
sed -i "s|^QMAKE_CFLAGS[^_].*$|& $SET_march|" mkspecs/linux-g++/qmake.conf
## add -march, -mtune and no_warn options to CFLAGS where they've been set in BUILD-TDE.sh
sed -i "s|^QMAKE_CFLAGS[^_].*$|& $SET_march ${NO_WARN:-}|" mkspecs/linux-g++/qmake.conf
## RPATH is set to $ORIGIN/../lib to locate libs during the build
## and added during configure to apply only to tqt3 build
@ -113,7 +113,7 @@ echo "yes" | \
-datadir $TQTDIR/lib$LIBDIRSUFFIX/tqt \
-translationdir $TQTDIR/share/tqt/translations \
-release \
-verbose \
${VERBOSE:+-verbose} \
-I/usr/include/freetype2 \
-I/usr/include/mysql \
-I/usr/include/tirpc \

@ -24,60 +24,26 @@
# SUCH DAMAGE.
PRGNAM=inkscape
## store version for later use to set $version for package name -
## too late for log file name, but sort that out when Sl current is released as Sl 15
## and this script updated for v1.x.x only
echo 0.92.4 > $TMPVARS/INKSC_VERS && {
## v 1.1 for Slackware current
[[ $(ls /var/log/packages/poppler-*) == *-2[1-9].* ]] && echo 1.1 > $TMPVARS/INKSC_VERS ; }
VERSION=$(cat $TMPVARS/INKSC_VERS)
VERSION=1.1.1
BUILD=${BUILD:-1}
ARCHIVE_TYPE="tar.bz2" && [[ $VERSION == 1.1 ]] && ARCHIVE_TYPE="tar.xz"
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 for Slackware current needs gdl and double-conversion
## inkscape v1.1.1 needs double-conversion
[[ $(cat $TMPVARS/PRE_DOWNLOAD) != yes ]] && {
# ### gdl and double-conversion - start
[[ $(ls /var/log/packages/poppler-*) == *-2[1-9].* ]] && {
## If they are already installed, go to end
[[ -s /usr/local/lib$LIBDIRSUFFIX/libgdl-3.so ]] && \
# ### double-conversion - start
{
## If it is already installed, go to end
[[ -s /usr/local/lib$LIBDIRSUFFIX/libdouble-conversion.so ]] || {
## otherwise, if the source archives are in 'src' ..
[[ -s $BUILD_TDE_ROOT/src/gdl-3.34.0.tar.xz ]] && \
## otherwise, if the source archive is in 'src' ..
[[ -s $BUILD_TDE_ROOT/src/double-conversion-3.1.5.tar.gz ]] && {
## .. build, package, and install them
## .. build, package, and install ..
(
## gdl:
echo -e "\n building gdl \n"
cd /$TMP_BUILD
rm -rf *gdl*
tar xf $BUILD_TDE_ROOT/src/gdl-3.34.0.tar.xz
cd gdl-3.34.0
LOCALES=$(cat po/LINGUAS)
rm po/LINGUAS
for locale in $I18N
do
[[ $LOCALES == *$locale* ]] && echo $locale >> po/LINGUAS
done
[[ $(cat $TMPVARS/BuildOptions) == *no_warn* ]] && C_Flags='CFLAGS=-w'
./configure --libdir=/usr/local/lib$LIBDIRSUFFIX ${C_Flags:-}
PKG=$TMP_BUILD/package-gdl
make_fn
cd $TMP_BUILD/package-gdl
makepkg -l y -c n $OUTPUT/gdl-3.34.0-$ARCH-$BUILD.txz
installpkg $OUTPUT/gdl-3.34.0-$ARCH-$BUILD.txz
## double-conversion:
echo -e "\n building double-conversion \n"
cd /$TMP_BUILD
@ -86,7 +52,7 @@ 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 lib$LIBDIRSUFFIX ..
# 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
@ -96,35 +62,39 @@ 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 returning to building inkscape \n"
} || { ## .. but if the source archives aren't in 'src', display message ..
echo -e "\n ############ \n\n\033[39;1m gdl and/or double-conversion are not installed and are required for this build \n \033[34;1m
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/gdl-3.34.0.tar.xz https://download.gnome.org/sources/gdl/3.34/gdl-3.34.0.tar.xz
\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 ; }
}
}
# ### gdl and double-conversion - end
# ### double-conversion - end
}
untar_fn
## install to .../lib64 on 64-bit system
## add -DLIB_SUFFIX=$LIBDIRSUFFIX to cmake
[[ -d /lib64 ]] && {
## set RPATH
sed -i 's|ORIGIN/../lib/inkscape|ORIGIN/../lib${LIB_SUFFIX}/inkscape|' CMakeLists.txt
## set output directory
sed -i 's|/lib |/lib${LIB_SUFFIX} |' CMakeLists.txt
## for dynamic lib
sed -i 's|lib/inkscape|lib${LIB_SUFFIX}/inkscape|' src/CMakeLists.txt
## for static libs
sed -i 's|lib/inkscape|lib${LIB_SUFFIX}/inkscape|' CMakeScripts/HelperMacros.cmake
}
## 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
# ### TODO tidy up when Sl 15 released and v0.92.4 no longer built
{
## set up a directory to store the required locale files temporarily
TEMP_DIR=$TMP_BUILD/tmp-$PRGNAM/loc_tmp
@ -147,24 +117,6 @@ for locale in $I18N
rm -rf po/*.po
mv $TEMP_DIR/* po/
## .. 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 tutorials
for locale in $I18N
do
@ -172,17 +124,8 @@ for locale in $I18N
done
rm share/tutorials/*.*.*
mv $TEMP_DIR/* share/tutorials/
} || true # because the existence of the files hasn't been tested
## .. for templates
for locale in $I18N
do
mv share/templates/*.$locale.* $TEMP_DIR
done
rm share/templates/*.*.*
mv $TEMP_DIR/* share/templates/
} || true
[[ $VERSION == 1.1 ]] && {
## only package man pages for required locales
for file in man/ink*.*.pod.in
do
@ -190,7 +133,18 @@ do
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
@ -198,11 +152,7 @@ chown_fn
cd_builddir_fn
## default options have been pulled from CMakeLists.txt
## These next two determine the RPATH for the inkscape library relative to the binary:
## INKSCAPE_INSTALL_LIBDIR is an addition for v1.1 and is relative to CMAKE_INSTALL_PREFIX/
## LIB_SUFFIX is used for v0.92.4
#
## options have been pulled from CMakeLists.txt
cmake ${G_NINJA:-} \
-DCMAKE_C_FLAGS="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
@ -210,9 +160,8 @@ cmake ${G_NINJA:-} \
-DCMAKE_CXX_COMPILER=$COMPILER_CXX \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DINKSCAPE_INSTALL_LIBDIR=lib$LIBDIRSUFFIX/inkscape \
-DLIB_SUFFIX=$LIBDIRSUFFIX \
-DBUILD_SHARED_LIBS="ON" \
-DBUILD_TESTING="OFF" \
-DENABLE_BINRELOC="OFF" \
-DENABLE_LCMS="ON" \
-DENABLE_POPPLER="ON" \
@ -220,16 +169,15 @@ cmake ${G_NINJA:-} \
-DWITH_ASAN="OFF" \
-DWITH_DBUS="OFF" \
-DWITH_FUZZ="OFF" \
-DWITH_GNOME_VFS="ON" \
-DWITH_GNU_READLINE="ON" \
-DWITH_GRAPHICS_MAGICK="ON" \
-DWITH_GTK3_EXPERIMENTAL="OFF" \
-DWITH_GTKSPELL="OFF" \
-DWITH_GSPELL="OFF" \
-DWITH_IMAGE_MAGICK="ON" \
-DWITH_INKJAR="ON" \
-DWITH_INTERNAL_2GEOM="ON" \
-DWITH_JEMALLOC="OFF" \
-DWITH_LIBCDR="ON" \
-DWITH_LIBVISIO="ON" \
-DWITH_LIBWPG="ON" \
-DWITH_LIBVISIO="OFF" \
-DWITH_LIBWPG="OFF" \
-DWITH_LPETOOL="OFF" \
-DLPE_ENABLE_TEST_EFFECTS="OFF" \
-DWITH_MANPAGE_COMPRESSION="ON" \
@ -245,25 +193,6 @@ make_fn
INSTALL_TDE="/usr/local"
installdocs_fn
[[ $VERSION == 0.92.4 ]] && {
## only package man pages for required locales
mkdir -p $PKG/usr/man/man1/
mv $PKG/usr/local/share/man/man1/* $PKG/usr/man/man1/
rm -rf $PKG/usr/local/share/man
{ for locale in $I18N
do
[[ -s $PKG/usr/man/man1/inkscape.$locale.1 ]] && mv $PKG/usr/man/man1/inkscape.$locale.1 $TEMP_DIR
done
rm $PKG/usr/man/man1/inkscape.*.1
mv $TEMP_DIR/* $PKG/usr/man/man1/
rm -rf $TEMP_DIR
} || true
## man pages are gzipped by WITH_MANPAGE_COMPRESSION="ON" for 1.1
INSTALL_TDE=/usr
mangzip_fn
}
strip_fn
mkdir_install_fn

@ -43,7 +43,7 @@ getsource_fn
untar_fn
# Thanks to SBo:
sed -i s/r// README.TI-DSP
sed -i 's/\r//' README.TI-DSP
listdocs_fn
@ -69,9 +69,6 @@ installdocs_fn
INSTALL_TDE=/usr
mangzip_fn
# Fix libspeex.la Thanks SBo script:
sed -i "s|-L$PKG.*/lib$LIBDIRSUFFIX ||" $PKG/usr/lib$LIBDIRSUFFIX/libspeex.la
strip_fn
mkdir_install_fn

@ -6,8 +6,8 @@
.. for Slackware 14.2 or current on i586+ and x86_64.
.. see 'Cross compiling for RPi3' for building for armv7/aarch64.
Build the release version 14.0.11 from tar archives; or the development versions 14.0.x, 14.1.0 from trinitydesktop gitea.
For a native build, run **./BUILD-TDE.sh** - a dialog based script with a series of screens for user input.
For a native build, run **./BUILD-TDE.sh** - a dialog based script with a series of screens for user input,
which will build the release version 14.0.11, or the development versions 14.0.x, 14.1.0.
[<img src="https://ray-v.github.io/TDE-version.png">](https://ray-v.github.io/TDE-version.png)
@ -18,7 +18,7 @@ Only building the packages is a global option. It therefore can't be used where
Any package, or set of packages, can be selected in the 'TDE Packages Selection' screen.
Information about dependencies for some packages has been added at the bottom of the dialog screen.
14.0.11 source archives will be downloaded from a geoIP located mirror site, or the development sources [14.0.x/14.1.0] cloned or updated from gitea.
14.0.11 source archives will be downloaded from a geoIP located mirror site, or the development sources [14.0.x/14.1.0] cloned or updated from trinitydesktop gitea.
Downloading can be done pre-build [useful for an off-line build], or during the build.
If you're curious about what this might involve, [take a look at a sample build set up](https://ray-v.github.io/A_typical_TDE_SlackBuild.html).
@ -76,7 +76,7 @@ The newly introduced cmake-trinity package for R14.0.11+ is downloaded with the
i18n support [locale and html/help docs] in the packages is restricted to whatever is selected in the ./BUILD-TDE.sh 'Select Additional Languages' screen and, of that, to whatever is available in any individual package source.
Additionally for the development builds, translations for the .desktop files are determined from the LINGUAS variable which is set in this build shell to the additional languages selected.
Translations for the .desktop files are determined from the LINGUAS variable which is set in this build shell to the additional languages selected.
There is an option in tde-i18n.SlackBuild to include a user created language specific patch file in the build.
It needs to be named *tde-i18n-{lang}-patch* and will then automatically be included for the build for that language.
@ -86,7 +86,7 @@ Because of its position in the Slackbuild and the patch -p0 option, the path to
***Building the development versions from git sources***
The individual TDE apps can be cloned from Trinity git, so the build is set up to do that - except for individual language packs of tde-i18n. The whole tde-i18n download is ~1x10^6 bytes, so to reduce that, wget is used to download individual tde-i18n-$lang packs as they are not git repositories.
The build is set up to clone the individual TDE apps from trinitydesktop gitea - except for individual language packs of tde-i18n. The whole tde-i18n download is ~1x10^6 bytes, so to reduce that, wget is used to download individual tde-i18n-$lang packs as they are not git repositories.
Once any git repository has been cloned, further downloads are updates only[2], giving the best options - only fetching what is needed, and incremental updates.
@ -109,7 +109,7 @@ Includes:
* Setting parameters for a 32-bit [armv7 hard float], or 64-bit [aarch64], build,
.. and building ..
* a cross compiler toolchain
* a 64-bit kernel which can be used for the 32-bit system
* a 64-bit kernel which can also be used for the 32-bit system
* qemu to run the TDE binaries built and used during compilation
* the required TDE apps
* a few other TDE and non-TDE apps to provide a basic, but useful, TDE desktop.
@ -124,11 +124,12 @@ Includes:
[3] The Misc directory contains SlackBuilds for software that might already be installed from other sources. Please check because any misc builds selected here could overwrite them.
[4] The README for a native build for Raspberry Pi3 [[README-Raspberry-Pi3.md](./README-Raspberry-Pi3.md)] is now out-of-date and cross compiling is a better option.
[4] The README for a [native build for Raspberry Pi3](./README-Raspberry-Pi3.md) is out-of-date and cross compiling is a better option.
[5] Building the kalzium equation solver needs ocaml and facile installed. They will be built, packaged, and installed during the tdeedu build if the source archives are pre-downloaded to the 'src' directory.
https://github.com/ocaml/ocaml/archive/4.05.0.tar.gz
http://www.recherche.enac.fr/opti/facile/distrib/facile-1.1.3.tar.gz
http://www.recherche.enac.fr/opti/facile/distrib/facile-1.1.3.tar.gz
Further details are in the tdeedu README.
---

Loading…
Cancel
Save