Patches for building with clang
Update cvs.sh to accept automake 1.16.x
pull/25/head
Ray-V 7 years ago
parent aea999128a
commit 72f134b350

@ -41,6 +41,18 @@ langs="";for Lang in $I18N;do [[ -e po/$Lang".po" ]] && langs="$langs $Lang"".po
sed -i "s|POFILES =.*$|POFILES =$langs|" po/Makefile.am
langs=$(echo $langs | sed "s|.po||g")
## patch for clang
echo $'
--- kaffeine/src/input/audiobrowser/urllistview.h
+++ kaffeine/src/input/audiobrowser/urllistview.h
@@ -35 +35 @@
-class TDEIO::Job;
+namespace TDEIO { class Job; }
' | while read line
do
patch -p0
done
ltoolupdate_fn
chown_fn
@ -48,13 +60,13 @@ chown_fn
cd_builddir_fn
# Refusing to compile with Clang
LDFLAGS="${SLKLDFLAGS}" \
CFLAGS="${SLKCFLAGS} $TQT_INCLUDE_PATH" \
CXXFLAGS="${SLKCFLAGS}" \
CC="gcc" \
CXX="g++" \
LDFLAGS=$SLKLDFLAGS \
CFLAGS="$SLKCFLAGS $TQT_INCLUDE_PATH" \
CXXFLAGS=$SLKCFLAGS \
CC=$COMPILER \
CXX=$COMPILER_CXX \
../configure \
--prefix=${INSTALL_TDE} \
--prefix=$INSTALL_TDE \
--sysconfdir="/etc/trinity" \
--mandir=${INSTALL_TDE}/man \
--disable-rpath \
@ -94,13 +106,13 @@ $PRGNAM:
cat <<EOINS >> $PKG/install/doinst.sh
# Update the desktop database:
if [ -x usr/bin/update-desktop-database ]; then
chroot . /usr/bin/update-desktop-database ${INSTALL_TDE}/share/applications > /dev/null 2>&1
chroot . /usr/bin/update-desktop-database $INSTALL_TDE/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 ${INSTALL_TDE}/share/icons/hicolor 1> /dev/null 2> /dev/null
chroot . /usr/bin/gtk-update-icon-cache -f -t $INSTALL_TDE/share/icons/hicolor 1> /dev/null 2> /dev/null
fi
fi

@ -40,21 +40,33 @@ listdocs_fn
langs="";for Lang in $I18N;do [[ -e translations/$Lang ]] && langs="$langs $Lang";done
sed -i "s|SUBDIRS=.*$|SUBDIRS=$langs|" translations/Makefile.am
## patch for clang
echo $'
--- src/kile/kileprojectview.h
+++ src/kile/kileprojectview.h
@@ -28 +28 @@
-class KileDocument::Info;
+namespace KileDocument { class Info; }
' | while read line
do
patch -p0
done
ltoolupdate_fn
chown_fn
cd_builddir_fn
LDFLAGS="${SLKLDFLAGS}" \
CFLAGS="${SLKCFLAGS} $TQT_INCLUDE_PATH" \
CXXFLAGS="${SLKCFLAGS}" \
CC="gcc" \
CXX="g++" \
LDFLAGS=$SLKLDFLAGS \
CFLAGS="$SLKCFLAGS $TQT_INCLUDE_PATH" \
CXXFLAGS=$SLKCFLAGS \
CC=$COMPILER \
CXX=$COMPILER_CXX \
../configure \
--prefix=${INSTALL_TDE} \
--prefix=$INSTALL_TDE \
--sysconfdir="/etc/trinity" \
--mandir=${INSTALL_TDE}/man \
--mandir=$INSTALL_TDE/man \
--disable-rpath \
--enable-closure
@ -83,7 +95,7 @@ $PRGNAM:
$PRGNAM:
$PRGNAM: With language support for:
$PRGNAM:
$PRGNAM: en $(echo $langs)
$PRGNAM: en$langs
$PRGNAM:
$PRGNAM:
" > $PKG/install/slack-desc

@ -45,6 +45,18 @@ sed -i 's|Default Gateway" ), LINK_QUALITY|Default Gateway" ), GATEWAY|' src/kne
langs="";for Lang in $I18N;do [[ -d translations/$Lang ]] && langs="$langs $Lang";done
sed -i "s|SUBDIRS=.*$|SUBDIRS=$langs|" translations/Makefile.am
## patch for clang
echo $'
--- src/knemod/knemodaemon.h
+++ src/knemod/knemodaemon.h
@@ -38 +38 @@
-class KNotifyClient::Instance;
+namespace KNotifyClient { class Instance; }
' | while read line
do
patch -p0
done
ltoolupdate_fn
listdocs_fn
@ -53,15 +65,15 @@ chown_fn
cd_builddir_fn
LDFLAGS="${SLKLDFLAGS}" \
CFLAGS="${SLKCFLAGS} $TQT_INCLUDE_PATH" \
CXXFLAGS="${SLKCFLAGS}" \
CC="gcc" \
CXX="g++" \
LDFLAGS=$SLKLDFLAGS \
CFLAGS="$SLKCFLAGS $TQT_INCLUDE_PATH" \
CXXFLAGS=$SLKCFLAGS \
CC=$COMPILER \
CXX=$COMPILER_CXX \
../configure \
--prefix=${INSTALL_TDE} \
--prefix=$INSTALL_TDE \
--sysconfdir="/etc/trinity" \
--mandir=${INSTALL_TDE}/man \
--mandir=$INSTALL_TDE/man \
--disable-rpath \
--enable-closure
@ -89,7 +101,7 @@ knemo: outgoing traffic. For every network interface it displays an icon in
knemo: the Panel.
knemo:
knemo: With language support for:
knemo: en $(echo $langs)
knemo: en$langs
knemo:
knemo: IMPORTANT: KNemo has to be started using
knemo: Trinity Control Center|Internet & Network|Network Monitor.

@ -1,7 +1,6 @@
There is a Spanish language file in the source, but it has no translations in it .. the included es.po file is a collaboration between Google translate, my Spanish-English-Spanish dictionary, and various other sources.
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.
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.

@ -25,7 +25,7 @@
PRGNAM=koffice
VERSION=${VERSION:-$TDEVERSION}
BUILD=${BUILD:-3}
BUILD=${BUILD:-4}
TAG=${TAG:-_tde}
@ -45,6 +45,25 @@ getsource_fn
untar_fn
## patch for clang
## first hunk based on 0004-fix-an-FTBFS-when-build-with-clang.patch
## @ http://trinity-devel.pearsoncomputing.net/?0::11397[:get:6]
echo $'
--- kexi/migration/keximigratetest.cpp
+++ kexi/migration/keximigratetest.cpp
@@ -41 +41 @@
- TDEApplication app(argc, argv, "Kexi Migrate Test");
+ TDEApplication app(argc, argv, TQCString("Kexi Migrate Test"));
--- filters/kword/mswrite/mswriteimport.h
+++ filters/kword/mswrite/mswriteimport.h
@@ -26 +26 @@
-class MSWrite::InternalParser;
+namespace MSWrite { class InternalParser; }
' | while read line
do
patch -p0
done
## fix chalk crashing - set liblcms as a direct dependency - see issue 37 for details
sed -i '2iLCMS1LIBS = -llcms' chalk/Makefile.am
sed -i 's|LDADD) \\$(LIBS)|& \\$(LCMS1LIBS)|' admin/am_edit
@ -90,18 +109,26 @@ chown_fn
cd_builddir_fn
# Refusing to compile with Clang =[
LDFLAGS="${SLKLDFLAGS}" \
CFLAGS="${SLKCFLAGS} $TQT_INCLUDE_PATH" \
CXXFLAGS="${SLKCFLAGS}" \
CC="gcc" \
CXX="g++" \
LDFLAGS=$SLKLDFLAGS \
CFLAGS="$SLKCFLAGS $TQT_INCLUDE_PATH" \
CXXFLAGS=$SLKCFLAGS \
CC=$COMPILER \
CXX=$COMPILER_CXX \
../configure \
--prefix=${INSTALL_TDE} \
--prefix=$INSTALL_TDE \
--sysconfdir="/etc/trinity" \
--mandir=${INSTALL_TDE}/man \
--mandir=$INSTALL_TDE/man \
--disable-rpath \
--enable-closure
## Hack for this clang build error:
#In file included from ../../../../kspread/plugins/scripting/scripting.cc:30:
#In file included from ../../../../lib/kross/main/manager.h:31:
#../../../../lib/kross/main/../api/object.h:145:9: error: cannot use 'throw' with exceptions disabled
# throw TDESharedPtr<Exception>( new Exception(TQString("Object \"%1\" invalid.").arg(object ? object->getClassName() : "")) );
# ^
[[ $COMPILER == clang ]] && sed -i 's|-fno-exceptions|-fexceptions|' kspread/plugins/scripting/Makefile
make_fn
installdocs_fn
@ -135,13 +162,13 @@ $PRGNAM:
cat <<EOINS >> $PKG/install/doinst.sh
# Update the desktop database:
if [ -x usr/bin/update-desktop-database ]; then
chroot . /usr/bin/update-desktop-database ${INSTALL_TDE}/share/applications > /dev/null 2>&1
chroot . /usr/bin/update-desktop-database $INSTALL_TDE/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 ${INSTALL_TDE}/share/icons/hicolor 1> /dev/null 2> /dev/null
chroot . /usr/bin/gtk-update-icon-cache -f -t $INSTALL_TDE/share/icons/hicolor 1> /dev/null 2> /dev/null
fi
fi
EOINS

@ -34,6 +34,68 @@ getsource_fn
untar_fn
## patch for clang
echo $'
--- libk3b/projects/k3babstractwriter.h
+++ libk3b/projects/k3babstractwriter.h
@@ -25 +25 @@
-class K3bDevice::Device;
+namespace K3bDevice { class Device; }
--- libk3b/projects/datacd/k3bisoimager.h
+++ libk3b/projects/datacd/k3bisoimager.h
@@ -32 +32 @@
-class K3bDevice::Device;
+namespace K3bDevice { class Device; }
--- libk3b/projects/k3bcdrecordwriter.h
+++ libk3b/projects/k3bcdrecordwriter.h
@@ -28 +28 @@
-class K3bDevice::Device;
+namespace K3bDevice { class Device; }
--- libk3b/projects/k3bcdrdaowriter.h
+++ libk3b/projects/k3bcdrdaowriter.h
@@ -27 +27 @@
-class K3bDevice::Device;
+namespace K3bDevice { class Device; }
--- libk3b/projects/audiocd/k3baudiojob.h
+++ libk3b/projects/audiocd/k3baudiojob.h
@@ -32 +32 @@
-class K3bDevice::Device;
+namespace K3bDevice { class Device; }
--- libk3b/projects/mixedcd/k3bmixedjob.h
+++ libk3b/projects/mixedcd/k3bmixedjob.h
@@ -35 +35 @@
-class K3bDevice::Device;
+namespace K3bDevice { class Device; }
--- libk3b/projects/videocd/k3bvcdjob.h
+++ libk3b/projects/videocd/k3bvcdjob.h
@@ -28 +28 @@
-class K3bDevice::Device;
+namespace K3bDevice { class Device; }
--- libk3b/jobs/k3bblankingjob.h
+++ libk3b/jobs/k3bblankingjob.h
@@ -23 +23 @@
-class K3bDevice::Device;
+namespace K3bDevice { class Device; }
--- libk3b/projects/movixcd/k3bmovixjob.h
+++ libk3b/projects/movixcd/k3bmovixjob.h
@@ -23 +23 @@
-class K3bDevice::Device;
+namespace K3bDevice { class Device; }
--- libk3b/projects/movixdvd/k3bmovixdvdjob.h
+++ libk3b/projects/movixdvd/k3bmovixdvdjob.h
@@ -23 +23 @@
-class K3bDevice::Device;
+namespace K3bDevice { class Device; }
--- libk3b/projects/k3bdvdrecordwriter.h
+++ libk3b/projects/k3bdvdrecordwriter.h
@@ -22 +22 @@
-class K3bDevice::Device;
+namespace K3bDevice { class Device; }
' | while read line
do
patch -p0
done
listdocs_fn
chown_fn
@ -51,13 +113,13 @@ cd_builddir_fn
cmake \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS $TQT_INCLUDE_PATH" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_C_COMPILER="gcc" \
-DCMAKE_CXX_COMPILER="g++" \
-DCMAKE_INSTALL_PREFIX=${INSTALL_TDE} \
-DLIB_SUFFIX=${LIBDIRSUFFIX} \
-DCMAKE_CXX_FLAGS:STRING=$SLKCFLAGS \
-DCMAKE_C_COMPILER=$COMPILER \
-DCMAKE_CXX_COMPILER=$COMPILER_CXX \
-DCMAKE_INSTALL_PREFIX=$INSTALL_TDE \
-DLIB_SUFFIX=$LIBDIRSUFFIX \
-DSYSCONF_INSTALL_DIR="/etc/trinity" \
-DMAN_INSTALL_DIR=${INSTALL_TDE}/man \
-DMAN_INSTALL_DIR=$INSTALL_TDE/man \
-DWITH_LIBDVDREAD="ON" \
-DWITH_MUSICBRAINZ=${MUSICBRAINZ:-"OFF"} \
-DWITH_SYSTEM_LIBSAMPLERATE="ON" \

@ -99,9 +99,9 @@ Set the directory that TDE is to be installed in.
rm -f $TMPVARS/COMPILER
dialog --cr-wrap --no-shadow --colors --yes-label "clang" --no-label "gcc" --defaultno --title " Compiler " --yesno \
dialog --cr-wrap --no-shadow --colors --yes-label "Clang" --no-label "Gcc" --defaultno --title " Compiler " --yesno \
"
Choose which compiler to use - \Zb\Z6gcc/g++\Zn or \Zb\Z6clang/clang++\Zn
Choose which compiler to use - <\Z1C\Zb\Z0lang/clang++\Zn> or \Zr\Z4\ZbGcc/g++\Zn
" \
8 75
[[ $? == 0 ]] && echo clang > $TMPVARS/COMPILER
@ -595,17 +595,14 @@ export ARM_FABI=$(readelf -Ah $(which bash)|grep -oE "soft|hard")
## Action on failure
AOF=$(echo $EXIT_FAIL|cut -d" " -f1)
## if tdebase selected, runlevel selected
[[ $(grep -o tdebase $TMPVARS/TDEbuilds) ]] && [[ $RUNLEVEL ]] && {
TDMRL=\\Zb\\Z6$RUNLEVEL\\Zn
} && SHADERL=" "
[[ $(grep -o tdebase $TMPVARS/TDEbuilds) ]] && [[ $RUNLEVEL ]] && TDMRL=\\Zb\\Z6$RUNLEVEL\\Zn && SHADERL=" "
## koffice - only if it is being built
[[ $(sed 's|koffice-||' $TMPVARS/TDEbuilds | grep -o Apps/koffice) ]] && {
[[ $REVERT == yes ]] && RVT=\\Zb\\Z6yes\\Zn || RVT=\\Zb\\Z6no\\Zn
} && {
[[ $(cat $TMPVARS/Krita_OPTS) == *useGM* ]] && USE_GM=\\Zb\\Z6yes\\Zn || USE_GM\\Zb\\Z6=no\\Zn
} && {
[[ $(cat $TMPVARS/Krita_OPTS) == *useGM* ]] && USE_GM=\\Zb\\Z6yes\\Zn || USE_GM=\\Zb\\Z6no\\Zn
[[ $USE_PNG14 == yes ]] && USE_PNG=\\Zb\\Z6yes\\Zn || USE_PNG=\\Zb\\Z6no\\Zn
} && SHADEKO=" "
SHADEKO=" "
}
## start dialog
EXITVAL=2
until [[ $EXITVAL -lt 2 ]] ; do

@ -47,8 +47,6 @@ cd_builddir_fn
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${INSTALL_TDE} \
-DLIB_SUFFIX=${LIBDIRSUFFIX} \
-DSYSCONF_INSTALL_DIR="/etc/trinity" \
-DMAN_INSTALL_DIR=${INSTALL_TDE}/man \
..
make_fn

@ -40,23 +40,38 @@ chown_fn
#cd_builddir_fn
# This configure script doesn't accept crap for arguments see ./configure --help to verify
[[ ! -d /usr/include/tqt ]] && sed -i "s|/usr/include/tqt|${INSTALL_TDE}/include/tqt|g" configure || true
LDFLAGS="$SLKLDFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
CFLAGS="$SLKCFLAGS" \
CC=${COMPILER} \
CXX=${COMPILER_CXX} \
[[ ! -d /usr/include/tqt ]] && sed -i "s|/usr/include/tqt|$INSTALL_TDE/include/tqt|g" configure || true
LDFLAGS=$SLKLDFLAGS \
CXXFLAGS=$SLKCFLAGS \
CFLAGS=$SLKCFLAGS \
./configure \
--qtdir=$TQTDIR-${VERSION}
--qtdir=$TQTDIR-$VERSION
## configure uses the installed tqt for it's flags - if this is a re-build of this package only,
## it may pick up the wrong march/mtune flags, or none at all - use SET_march as set up in BUILD-TDE.sh
sed -i "s|-march=.*-mtune=[a-z,0-9,-]*||;s|fvisibility-inlines-hidden|& $SET_march|" Makefile
## allow building with clang
echo $'
--- Makefile
+++ Makefile
@@ -12,2 +12,2 @@
-CC = gcc
-CXX = g++
+CC = $(COMPILER)
+CXX = $(COMPILER_CXX)
@@ -21 +21 @@
-LINK = g++
+LINK = $(COMPILER_CXX)
' | while read line
do
patch -p0
done
make $NUMJOBS || exit 1
mkdir -p $PKG$TQTDIR-${VERSION}/plugins/crypto/
install -m 0755 libtqca-tls.so $PKG$TQTDIR-${VERSION}/plugins/crypto/
mkdir -p $PKG$TQTDIR-$VERSION/plugins/crypto/
install -m 0755 libtqca-tls.so $PKG$TQTDIR-$VERSION/plugins/crypto/
installdocs_fn

@ -10,6 +10,7 @@ design, networking, and in visual interfaces for many other domains.
gts is an optional dependency.
------------------------------
pdf and html documentation is not built by default in the SB.
To build it, comment out 'rmdoc' in the script [c. line 70].

@ -40,10 +40,12 @@ chown_fn
cd_builddir_fn
CFLAGS="$SLKCFLAGS" \
CC=$COMPILER \
CXX=$COMPILER_CXX \
../configure \
--prefix=/usr \
--sysconfdir=/etc \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--libdir=/usr/lib$LIBDIRSUFFIX \
--includedir=/usr/include \
--mandir=/usr/man \
--disable-static

@ -43,11 +43,12 @@ listdocs_fn
chown_fn
#cd_builddir_fn
CC=$COMPILER \
python setup.py install --with-unicode-strings --root=$PKG || exit 1
python setup.py build --with-unicode-strings || exit 1
python setup.py install --skip-build --root=$PKG || exit 1
if $(python3 -c 'import os' 2>/dev/null); then
CC=$COMPILER \
python3 setup.py build --with-unicode-strings || exit 1
python3 setup.py install --skip-build --root=$PKG || exit 1
fi

@ -42,8 +42,10 @@ chown_fn
#cd_builddir_fn
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
CFLAGS=$SLKCFLAGS \
CXXFLAGS=$SLKCFLAGS \
CC=$COMPILER \
CXX=$COMPILER_CXX \
./configure \
--prefix=/usr \
--libdir=/usr/lib$LIBDIRSUFFIX \

@ -34,6 +34,19 @@ source ../../get-source.sh
getsource_fn
untar_fn
## patch for clang
echo $'
--- Makefile
+++ Makefile
@@ -21 +21 @@
-CC=cc
+CC=$(COMPILER)
' | while read line
do
patch -p0
done
listdocs_fn
chown_fn

@ -1,4 +1,4 @@
Build TDE [Trinity Desktop Environment] for Slackware 14.2 and current on i586+, x86_64, or Raspberry Pi3 [see README-Raspberry-Pi3.md].
Build TDE [Trinity Desktop Environment] for Slackware 14.2 and current** on i586+, x86_64, or Raspberry Pi3 [see README-Raspberry-Pi3.md].
Run ./BUILD-TDE.sh - a dialog based script with a series of screens for user input.
@ -45,4 +45,6 @@ See https://wiki.trinitydesktop.org/How_to_Build_TDE_Core_Modules for more infor
NOTE: The Misc directory contains SlackBuilds for software that might already be installed from slackbuilds.org or elsewhere.
Please check because any misc builds selected here could overwrite them.
** Not tested on current since the Mass Rebuild of 2018-04-19. **
***Please be sure to read the KNOWN-ISSUES file prior to building.***

@ -125,6 +125,18 @@ cd $TMP/tmp-$PRGNAM
echo -e "\n unpacking $(basename ${SOURCE}) ... \n"
tar -xf ${SOURCE}
[[ $TDEMIR_SUBDIR != misc ]] && cd ./$(echo $TDEMIR_SUBDIR | cut -d / -f 2) && cd ${PRGNAM} || cd ${PRGNAM}-${VERSION}
## patch to allow automake 1.16.x
[[ -s admin/cvs.sh ]] && echo $'
--- admin/cvs.sh
+++ admin/cvs.sh
@@ -59 +59 @@
- automake*1.6.* | automake*1.7* | automake*1.8* | automake*1.9* | automake*1.10* | automake*1.11* | automake*1.12* | automake*1.13* | automake*1.14* | automake*1.15* )
+ automake*1.6.[1-9] | automake*1.[7-9].* | automake*1.1[0-6].* )
' | while read line
do
patch -p0
done || true
}
listdocs_fn ()

Loading…
Cancel
Save