summaryrefslogtreecommitdiffstats
path: root/development/source-highlight
diff options
context:
space:
mode:
Diffstat (limited to 'development/source-highlight')
-rw-r--r--development/source-highlight/README26
-rw-r--r--development/source-highlight/doinst.sh6
-rw-r--r--development/source-highlight/gcc11.patch34
-rw-r--r--development/source-highlight/source-highlight.SlackBuild63
-rw-r--r--development/source-highlight/source-highlight.info6
5 files changed, 96 insertions, 39 deletions
diff --git a/development/source-highlight/README b/development/source-highlight/README
index 6f34ffa6a7..a4813ef344 100644
--- a/development/source-highlight/README
+++ b/development/source-highlight/README
@@ -1,20 +1,22 @@
GNU Source-highlight
-This program, given a source file, produces a document with syntax highlighting.
-It also provides a C++ highlight library.
+This program, given a source file, produces a document with syntax
+highlighting. It also provides a C++ highlight library.
-Source-highlight reads source language specifications dynamically, thus it can
-be easily extended (without recompiling the sources) for handling new
-languages. It also reads output format specifications dynamically, and thus it
-can be easily extended (without recompiling the sources) for handling new
-output formats. The syntax for these specifications is quite easy (take a look
-at the manual).
+Source-highlight reads source language specifications dynamically,
+thus it can be easily extended (without recompiling the sources) for
+handling new languages. It also reads output format specifications
+dynamically, and thus it can be easily extended (without recompiling
+the sources) for handling new output formats. The syntax for these
+specifications is quite easy (take a look at the manual).
-Source-highlight is a command line program, and it can also be used as a CGI.
+Source-highlight is a command line program, and it can also be used as
+a CGI.
-Notice that source-highlight can also be used as a formatter (i.e., without
-highlighting): you can, for instance, format a txt file in HTML (and it will
-take care of translating special characters, such as, <, >, &).
+Notice that source-highlight can also be used as a formatter (i.e.,
+without highlighting): you can, for instance, format a txt file in
+HTML (and it will take care of translating special characters, such
+as, <, >, &).
A common example:
less /usr/src/linux/kernel/panic.c
diff --git a/development/source-highlight/doinst.sh b/development/source-highlight/doinst.sh
new file mode 100644
index 0000000000..1bef502028
--- /dev/null
+++ b/development/source-highlight/doinst.sh
@@ -0,0 +1,6 @@
+if [ -x /usr/bin/install-info -a -d usr/info ]; then
+ ( cd usr/info
+ rm -f dir
+ for i in *.info*; do /usr/bin/install-info $i dir 2>/dev/null; done
+ )
+fi
diff --git a/development/source-highlight/gcc11.patch b/development/source-highlight/gcc11.patch
new file mode 100644
index 0000000000..1e5b0dd8df
--- /dev/null
+++ b/development/source-highlight/gcc11.patch
@@ -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
+
diff --git a/development/source-highlight/source-highlight.SlackBuild b/development/source-highlight/source-highlight.SlackBuild
index 697007dda0..7e7b3c8421 100644
--- a/development/source-highlight/source-highlight.SlackBuild
+++ b/development/source-highlight/source-highlight.SlackBuild
@@ -1,27 +1,39 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for source-highlight
# Written by powtrix (@gmail.com)
+# 20230627 bkw: Modified by SlackBuilds.org, BUILD=3:
+# - remove static library (nothing depended on it anyway).
+# - remove generic INSTALL instructions from doc dir.
+# - add doinst/douninst to handle /usr/info/dir.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=source-highlight
-VERSION=${VERSION:-3.1.8}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-3.1.9}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
+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
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
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"
@@ -44,10 +56,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" \
@@ -58,28 +73,28 @@ CXXFLAGS="$SLKCFLAGS" \
--sysconfdir=/etc \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION \
+ --disable-static \
+ --enable-shared \
--build=$ARCH-slackware-linux
make
-make install DESTDIR=$PKG
-
-find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | \
- grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2>/dev/null || true
-
-find $PKG/usr/man -type f -exec gzip -9 {} \;
-for i in $( find $PKG/usr/man -type l ); do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+make install-strip DESTDIR=$PKG
+gzip -9 $PKG/usr/man/man*/*
rm -f $PKG/usr/info/dir
gzip -9 $PKG/usr/info/*.info
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a \
- AUTHORS COPYING CREDITS ChangeLog INSTALL NEWS README THANKS TODO.txt \
- $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+rm -f $PKGDOC/INSTALL
+cp -a AUTHORS $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
+
+rm -f $PKG/usr/lib*/*.la
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+cat $CWD/doinst.sh > $PKG/install/douninst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/development/source-highlight/source-highlight.info b/development/source-highlight/source-highlight.info
index ca5289b09b..835f0f0856 100644
--- a/development/source-highlight/source-highlight.info
+++ b/development/source-highlight/source-highlight.info
@@ -1,8 +1,8 @@
PRGNAM="source-highlight"
-VERSION="3.1.8"
+VERSION="3.1.9"
HOMEPAGE="http://www.gnu.org/software/src-highlite"
-DOWNLOAD="ftp://ftp.gnu.org/gnu/src-highlite/source-highlight-3.1.8.tar.gz"
-MD5SUM="3243470706ef5fefdc3e43b5306a4e41"
+DOWNLOAD="ftp://ftp.gnu.org/gnu/src-highlite/source-highlight-3.1.9.tar.gz"
+MD5SUM="a51266164a537c97860d5d9664614dec"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""