mirror of
https://github.com/SlackBuildsOrg/slackbuilds
synced 2024-09-28 15:21:00 +02:00
development/source-highlight: Patch for gcc >= 11.x, cleanups.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
eb5f6700f9
commit
89b91a680f
2 changed files with 44 additions and 7 deletions
34
development/source-highlight/gcc11.patch
Normal file
34
development/source-highlight/gcc11.patch
Normal file
|
@ -0,0 +1,34 @@
|
|||
From 904949c9026cb772dc93fbe0947a252ef47127f4 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Tromey <tom@tromey.com>
|
||||
Date: Wed, 10 Jun 2020 20:38:27 -0600
|
||||
Subject: Remove "throw" specifications
|
||||
|
||||
diff --git a/lib/srchilite/fileutil.cc b/lib/srchilite/fileutil.cc
|
||||
index 59a6d64..963178c 100644
|
||||
--- a/lib/srchilite/fileutil.cc
|
||||
+++ b/lib/srchilite/fileutil.cc
|
||||
@@ -48,7 +48,7 @@ void set_file_util_verbose(bool b) {
|
||||
// FIXME avoid using a global variable
|
||||
std::string start_path;
|
||||
|
||||
-string readFile(const string &fileName) throw (IOException) {
|
||||
+string readFile(const string &fileName) {
|
||||
ifstream file(fileName.c_str());
|
||||
|
||||
if (!file.is_open()) {
|
||||
diff --git a/lib/srchilite/fileutil.h b/lib/srchilite/fileutil.h
|
||||
index 7335a9b..042eb56 100644
|
||||
--- a/lib/srchilite/fileutil.h
|
||||
+++ b/lib/srchilite/fileutil.h
|
||||
@@ -27,7 +27,7 @@ extern std::string start_path;
|
||||
* @return the contents of the file
|
||||
* @throw IOException
|
||||
*/
|
||||
-string readFile(const string &fileName) throw (IOException);
|
||||
+string readFile(const string &fileName);
|
||||
|
||||
//char *read_file(const string &fileName);
|
||||
|
||||
--
|
||||
cgit v1.2.1
|
||||
|
|
@ -12,7 +12,7 @@ PKGTYPE=${PKGTYPE:-tgz}
|
|||
|
||||
if [ -z "$ARCH" ]; then
|
||||
case "$( uname -m )" in
|
||||
i?86) ARCH=i486 ;;
|
||||
i?86) ARCH=i586 ;;
|
||||
arm*) ARCH=arm ;;
|
||||
*) ARCH=$( uname -m ) ;;
|
||||
esac
|
||||
|
@ -30,8 +30,8 @@ TMP=${TMP:-/tmp/SBo}
|
|||
PKG=$TMP/package-$PRGNAM
|
||||
OUTPUT=${OUTPUT:-/tmp}
|
||||
|
||||
if [ "$ARCH" = "i486" ]; then
|
||||
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
|
||||
if [ "$ARCH" = "i586" ]; then
|
||||
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "i686" ]; then
|
||||
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
||||
|
@ -54,10 +54,13 @@ tar xzfv $CWD/$PRGNAM-$VERSION.tar.gz
|
|||
cd $PRGNAM-$VERSION
|
||||
chown -R root:root .
|
||||
find -L . \
|
||||
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
|
||||
-exec chmod 555 {} \; -o \
|
||||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
||||
-exec chmod 644 {} \;
|
||||
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
|
||||
-o -perm 511 \) -exec chmod 755 {} \; -o \
|
||||
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
||||
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
||||
|
||||
# thanks archlinux!
|
||||
patch -p1 < $CWD/gcc11.patch
|
||||
|
||||
CFLAGS="$SLKCFLAGS" \
|
||||
CXXFLAGS="$SLKCFLAGS" \
|
||||
|
|
Loading…
Reference in a new issue