Fix for issue 28, tdeutils-kmilo-generic build with clang

Reformatting of klamav.SlackBuild
Added themepack download option during knights build
Added patch for poppler-22.03+ to tdegraphics.SlackBuild and set WITH_TIFF and BUILD_KSVG on
Added gcc visibility option for abakus, filelight, and rosegarden
master
Ray-V 3 years ago
parent a2ca8eb07d
commit 7c9520ba7d

@ -49,6 +49,7 @@ cmake ${G_NINJA:-} \
-DCMAKE_CXX_COMPILER=$COMPILER_CXX \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$INSTALL_TDE \
-DWITH_GCC_VISIBILITY=${GCC_VIS:-} \
-DBUILD_DOC="ON" \
-DBUILD_TRANSLATIONS="ON" \
-Wno-dev \

@ -54,6 +54,7 @@ cmake ${G_NINJA:-} \
-DLIB_SUFFIX=$LIBDIRSUFFIX \
-DMAN_INSTALL_DIR=$INSTALL_TDE/man \
-DPLUGIN_INSTALL_DIR=$INSTALL_TDE/lib$LIBDIRSUFFIX/$PLUGIN_INSTALL_DIR \
-DWITH_GCC_VISIBILITY=${GCC_VIS:-} \
-DBUILD_DOC="ON" \
-DBUILD_TRANSLATIONS="ON" \
-Wno-dev \

@ -33,14 +33,15 @@ source ../../get-source.sh
## klamav needs clamav as a build time requirement
[[ $(cat $TMPVARS/PRE_DOWNLOAD) != yes ]] && {
# ### clamav - start
clamav_installed_fn () { ldconfig -p|grep libclamav 1>/dev/null ;}
clamav_installed_fn () { pkg-config libclamav ;}
## If it's already installed, go to end
clamav_installed_fn || {
## otherwise, if the source archive is in 'src' ..
[[ -s $BUILD_TDE_ROOT/src/clamav-0.103.3.tar.gz ]] && {
## .. build, package, and install it
(
echo -e "\n building clamav \n"
echo "
building clamav"
getsource_fn # to set SLKCFLAGS
@ -70,10 +71,12 @@ sed -i '96iendif()' docs/CMakeLists.txt
mkdir build/docs
cp -a docs/html build/docs/
[[ $GCC_VIS == 0 ]] && unset GCC_VIS # needs to be unset for parameter expansion for CMAKE_CXX_FLAGS
cd build/
# LIBDIRSUFFIX not required - any suffix is included in CMAKE_INSTALL_LIBDIR
cmake ${G_NINJA:-} \
-DCMAKE_C_FLAGS="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS="$SLKCFLAGS ${GCC_VIS:+-fvisibility=hidden -fvisibility-inlines-hidden}" \
-DCMAKE_BUILD_TYPE=Release \
-DENABLE_SYSTEMD_DEFAULT="OFF" \
-Wno-dev \
@ -91,13 +94,26 @@ cd $TMP_BUILD/package-clamav
makepkg -l y -c n $OUTPUT/clamav-0.103.3-$ARCH-$BUILD.txz
installpkg $OUTPUT/clamav-0.103.3-$ARCH-$BUILD.txz
)
echo -e "\n now building klamav \n"
clamav_installed_fn || { echo -e "\033[39;1m"" ## installation of clamav failed ##\n""\033[0m" ; exit 1 ; }
clamav_installed_fn && echo "
now building klamav" || { echo -e "\033[39;1m
## installation of clamav failed ##
\033[0m" ; exit 1 ; }
} || { ## .. but if the source archive isn't in 'src', display message ..
echo -e "\n ############ \n\n\033[39;1m clamav is not installed and is required for this build \n
Download \033[0m [including user-agent, otherwise '403 Forbidden' is returned]:
\n \033[39;1m wget -O $BUILD_TDE_ROOT/src/clamav-0.103.3.tar.gz --user-agent='Mozilla' https://www.clamav.net/downloads/production/clamav-0.103.3.tar.gz \033[0m
\n and re-run this script .. \n\n ############ \n" ; exit 1 ; }
echo -e "
############
clamav is required for klamav
It's not installed nor is the source archive in the 'src' directory
Download [including user-agent, otherwise '403 Forbidden' is returned]:
\033[39;1m
( cd $BUILD_TDE_ROOT/src
wget --user-agent='Mozilla' https://www.clamav.net/downloads/production/clamav-0.103.3.tar.gz )
\033[0m
and re-run this script ..
############
" ; exit 1 ; }
}
# ### clamav - end
}

@ -3,4 +3,11 @@ There is a Spanish language file in the source, but it has no translations in it
Any involvement from a Spanish speaker to check and correct will be welcome. Kbabel is not necessary, it will display in a text editor just fine.
Tested with gnuchess-6.2.2, stockfish-7-linux, and komodo-7, in UCI mode.
-----------
A themepack is available and will be included if pre-downloaded to the 'src' directory or downloaded during the build:
https://downloads.sourceforge.net/project/knights/knights-themepack/0.5.9/knights-themepack-0.5.9.tar.gz
If it's not in 'src', the build will continue with the default theme.

@ -31,6 +31,22 @@ TAG=${TAG:-_tde}
source ../../get-source.sh
getsource_fn
## run getsource_fn for the theme-pack ... in a shell so that the variables don't leak into the build
(ARCHIVE_TYPE="tar.gz"
PRGNAM=knights-themepack
VERSION=0.5.9
SRCURL="https://downloads.sourceforge.net/project/knights/knights-themepack/0.5.9/$PRGNAM-$VERSION.$ARCHIVE_TYPE"
getsource_fn
)
[[ -s $SRCDIR/knights-themepack-0.5.9.tar.gz ]] || \
echo '
##########
The build will continue without additional boards and chessman themes
being added to the package.
##########'
untar_fn
# there is a Spanish language file in the source, but it has no translations in it ..
@ -48,7 +64,6 @@ chown_fn
cd_builddir_fn
## BUILD_EXTRA_THEME is a 14.1.0 option and will be ignored for 14.0.n builds
## See the slack-desc for a URL for additional themes
cmake ${G_NINJA:-} \
-DCMAKE_C_FLAGS="$SLKRCFLAGS" \
-DCMAKE_CXX_FLAGS="$SLKRCFLAGS" \
@ -66,6 +81,10 @@ cmake ${G_NINJA:-} \
make_fn
## if the theme-pack exists, install the themes
[[ -s $SRCDIR/knights-themepack-0.5.9.tar.gz ]] && \
tar xf $SRCDIR/knights-themepack-0.5.9.tar.gz --exclude=??????? -C $PKG$INSTALL_TDE/share/apps/knights/themes --strip-components=1
installdocs_fn
mangzip_fn
@ -76,6 +95,8 @@ mkdir_install_fn
doinst_sh_fn
[[ -s $PKG$INSTALL_TDE/share/apps/knights/themes/KBBrushed_Liquid.tar.gz ]] && \
ADDL_THEMES="Includes additional boards and chessman themes"
echo "
# HOW TO EDIT THIS FILE:
# The 'handy ruler' below makes it easier to edit a package description. Line
@ -86,8 +107,8 @@ echo "
|-----handy-ruler------------------------------------------------------|
$PRGNAM: A graphical chess interface for the Trinity Desktop Environment
$PRGNAM:
$PRGNAM: Download themepack [additional boards and chessman themes] from:
$PRGNAM: https://sourceforge.net/project/showfiles.php?group_id=31461
$PRGNAM: ${ADDL_THEMES:-"A themepack is available for additional boards and chessman themes"}
$PRGNAM:
$PRGNAM:
$PRGNAM: Needs separate chess engines, for example gnuchess, stockfish, komodo.
$PRGNAM:

@ -58,6 +58,9 @@ sed -i "s|\${po_files}|$langs|" po/CMakeLists.txt
langs=$(echo $langs|sed "s|/$PRGNAM.po||g")
[[ $langs != "" ]] && TRANS=ON
## delete zero length files
find data/pixmaps/feta -type f -empty -delete
listdocs_fn
chown_fn
@ -78,6 +81,7 @@ cmake ${G_NINJA:-} \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$INSTALL_TDE \
-DLIB_SUFFIX=$LIBDIRSUFFIX \
-DWITH_GCC_VISIBILITY=${GCC_VIS:-} \
-DBUILD_DOC="ON" \
-DBUILD_TRANSLATIONS=${TRANS:-"OFF"} \
-DWANT_SOUND="ON" \

@ -82,7 +82,7 @@ TMP=${TMP:-/tmp}
export BUILD_TDE_ROOT=$(pwd)
# Place to build (TMP_BUILD), package (PKG), and output (OUTPUT) the program:
## ### moved from get-source.sh to export variables for ocaml, facile, gdl, and double-conversion builds
## ### moved from get-source.sh to export variables for ocaml, facile, and double-conversion builds
export TMP_BUILD=$TMP/build
#export PKG=$TMP_BUILD/package-$PRGNAM
export OUTPUT=$TMP

@ -48,6 +48,47 @@ echo $'
+</includes>
' | patch -N -p0 || true
## for poppler-22.03+
patch -N -p0 << EOF || true
--- config.h.cmake
+++ config.h.cmake
@@ -3,2 +3,3 @@
// poppler-tqt
+#cmakedefine HAVE_POPPLER_2203
#cmakedefine HAVE_POPPLER_2112
--- tdefile-plugins/dependencies/poppler-tqt/ConfigureChecks.cmake
+++ tdefile-plugins/dependencies/poppler-tqt/ConfigureChecks.cmake
@@ -27,1 +27,1 @@
-foreach( _poppler_ver 0.58 0.64 0.70 0.71 0.72 0.76 0.82 0.83 0.86 21.08 21.11 21.12 )
+foreach( _poppler_ver 0.58 0.64 0.70 0.71 0.72 0.76 0.82 0.83 0.86 21.08 21.11 21.12 22.03 )
--- tdefile-plugins/dependencies/poppler-tqt/poppler-document.cpp
+++ tdefile-plugins/dependencies/poppler-tqt/poppler-document.cpp
@@ -53,1 +53,5 @@
+# if defined(HAVE_POPPLER_2203)
+ DocumentData *doc = new DocumentData(std::make_unique<GooString>(TQFile::encodeName(filePath)), {});
+# else
DocumentData *doc = new DocumentData(new GooString(TQFile::encodeName(filePath)), NULL);
+# endif
@@ -87,4 +91,9 @@
+# if defined(HAVE_POPPLER_2203)
+ DocumentData *doc2 = new DocumentData(std::make_unique<GooString>(data->doc.getFileName()),
+ GooString(password.data()));
+# else
GooString *filename = new GooString(data->doc.getFileName());
GooString *pwd = new GooString(password.data());
DocumentData *doc2 = new DocumentData(filename, pwd);
delete pwd;
+# endif
--- tdefile-plugins/dependencies/poppler-tqt/poppler-private.h
+++ tdefile-plugins/dependencies/poppler-tqt/poppler-private.h
@@ -107,1 +107,5 @@
+# if defined(HAVE_POPPLER_2203)
+ DocumentData(std::unique_ptr<GooString> &&filePath, const std::optional<GooString> &password) : doc(std::move(filePath), password), m_fontInfoScanner(0), m_outputDev(0) {}
+# else
DocumentData(GooString *filePath, GooString *password) : doc(filePath,password), m_fontInfoScanner(0), m_outputDev(0) {}
+# endif
EOF
listdocs_fn
chown_fn
@ -55,7 +96,7 @@ chown_fn
cd_builddir_fn
# If imlib is installed, include Kuickshow:
[[ -s /usr/include/Imlib.h ]] && KUICKSHOW=ON
pkg-config imlib && KUICKSHOW=ON
cmake ${G_NINJA:-} \
-DCMAKE_C_FLAGS="$SLKRCFLAGS" \
-DCMAKE_CXX_FLAGS="$SLKRCFLAGS" \
@ -67,7 +108,7 @@ cmake ${G_NINJA:-} \
-DPLUGIN_INSTALL_DIR=$INSTALL_TDE/lib$LIBDIRSUFFIX/$PLUGIN_INSTALL_DIR \
-DWITH_T1LIB="OFF" \
-DWITH_PAPER="OFF" \
-DWITH_TIFF="OFF" \
-DWITH_TIFF="ON" \
-DWITH_OPENEXR="OFF" \
-DWITH_PDF="ON" \
-DBUILD_DOC="ON" \
@ -75,7 +116,7 @@ cmake ${G_NINJA:-} \
-DBUILD_KUICKSHOW=${KUICKSHOW:-OFF} \
-DBUILD_KPDF="ON" \
-DBUILD_KAMERA="OFF" \
-DBUILD_KSVG="OFF" \
-DBUILD_KSVG="ON" \
-DBUILD_LIBKSCAN="OFF" \
-DBUILD_KOOKA="OFF" \
-DBUILD_KCOLOREDIT="ON" \

@ -33,6 +33,18 @@ getsource_fn
untar_fn
## Re: issue 28
## work-around for clang build failure - flag applied to kmilo generic build only
## ...kmilo/generic/generic_monitor.cpp:78:16: error: non-constant-expression cannot be narrowed from type 'int' to 'uint' (aka 'unsigned int') in initializer list [-Wc++11-narrowing]
## { "Search", TDEShortcut("XF86Search"), TQT_SLOT(launchSearch()) },
## ^~~~~~~~~~~~~~~~~~~~~~~~~
[[ $COMPILER_CXX == clang++ ]] && {
## pending upstream fix
[[ $(grep 'Search", TDEShortcut("XF86Search"), TQT_SLOT' kmilo/generic/generic_monitor.cpp) ]] && \
echo '
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-c++11-narrowing")' >> kmilo/generic/CMakeLists.txt
}
## set installation directory for superkaramba.desktop file
sed -i 's|DESTINATION ${APPS_INSTALL_DIR}/Utilities|DESTINATION ${XDG_APPS_INSTALL_DIR}|' superkaramba/src/CMakeLists.txt

@ -48,7 +48,7 @@ getsource_fn ()
# SUCH DAMAGE.
# Place to build (TMP_BUILD) package (PKG) and output (OUTPUT) the program:
## ### moved to BUILD-TDE.sh to export variables for ocaml, facile, gdl, and double-conversion builds
## ### moved to BUILD-TDE.sh to export variables for ocaml, facile, and double-conversion builds
# ### TMP_BUILD=/tmp/build
PKG=$TMP_BUILD/package-$PRGNAM
# ### OUTPUT=/tmp

Loading…
Cancel
Save