summaryrefslogtreecommitdiffstats
path: root/misc/recode
diff options
context:
space:
mode:
Diffstat (limited to 'misc/recode')
-rw-r--r--misc/recode/README19
-rw-r--r--misc/recode/recode.SlackBuild61
-rw-r--r--misc/recode/recode.info12
-rw-r--r--misc/recode/slack-desc2
4 files changed, 61 insertions, 33 deletions
diff --git a/misc/recode/README b/misc/recode/README
index dee5e0dc21..7e971d8048 100644
--- a/misc/recode/README
+++ b/misc/recode/README
@@ -1,9 +1,12 @@
-The recode program recognizes or produces approximately 150 character sets
-and can convert almost any character set to almost any other. When exact
-translations are not possible, the program may get rid of offending characters
-or use approximations. Particular attention has been paid to the proper
-representation of French language diacritics.
+The recode program recognizes or produces approximately 150 character
+sets and can convert almost any character set to almost any other.
+When exact translations are not possible, the program may get rid of
+offending characters or use approximations. Particular attention has
+been paid to the proper representation of French language diacritics.
-Although we normally wouldn't put anything beta on SlackBuilds,
-this release fixes some long-standing bugs that everyone else has
-been patching for years.
+The original recode by pinard hasn't been updated in almost 10 years.
+It seems most distros have moved to a well-maintained fork by
+rrthomas and it's probably time we did too.
+
+NOTE: We are unable to update past 3.7.13 due to Slackware 15.0's
+autoconf being too old (2.69). recode-3.7.14+ requires autoconf 2.71+.
diff --git a/misc/recode/recode.SlackBuild b/misc/recode/recode.SlackBuild
index 6b10f1bfca..983cc10c81 100644
--- a/misc/recode/recode.SlackBuild
+++ b/misc/recode/recode.SlackBuild
@@ -1,7 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Copyright (c) 2007 Niki Kovacs <contact@kikinovak.net>
# Copyright 2014 Ryan P.C. McQuen, WA, <ryanpcmcquen@member.fsf.org>
+# Copyright 2023 Jeremy Hansen <jebrhansen+SBo@gmail.com>
#
# Slackware build script for recode
@@ -30,12 +31,20 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20220412 bkw: Modified by SlackBuilds.org, BUILD=4:
+# - use correct github URL.
+# - strip binary and library.
+# - remove useless ABOUT-NLS from doc dir.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=recode
-SRCNAM=Recode
-VERSION=${VERSION:-3.7_beta2}
-SRCVER=$(echo $VERSION | tr _ -)
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-3.7.13}
+GNULIBVER=${GNULIBVER:-2752f1cb315fc461e3df263ab5bb03a354cf4308}
+BOOTSTRAPVER=${BOOTSTRAPVER:-037f83765b6e8f90dfabdfac4889be22a5a3f4a4}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -45,7 +54,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+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}
@@ -69,34 +85,39 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $SRCNAM-$SRCVER
-tar xvf $CWD/$SRCNAM-$SRCVER.tar.gz || tar xvf $CWD/v$SRCVER.tar.gz
-cd $SRCNAM-$SRCVER
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+# Extract git submodule archives to correct location
+tar xvf $CWD/gnulib-$GNULIBVER.tar.gz --strip-components=1 -C gnulib/
+tar xvf $CWD/bootstrap-$BOOTSTRAPVER.tar.gz --strip-components=1 -C gl-mod/bootstrap/
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 755 {} \; -o \
+ -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 {} \;
-
-# allow recode to be built on a gcc that is not ancient -ryan
-sed -i "s/bool ignore : 2;/bool ignore : 1;/g" ./src/recodext.h
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
-# libdir and target are critical for x86_64
+./bootstrap --skip-po
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
- --enable-static=no \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
--infodir=/usr/info \
--mandir=/usr/man \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --enable-static=no \
--build=$ARCH-slackware-linux \
--host=$ARCH-slackware-linux \
--target=$ARCH-slackware-linux
make
-make install DESTDIR=$PKG
+make install-strip DESTDIR=$PKG
+
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+
+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
@@ -105,7 +126,7 @@ rm -f $PKG/usr/info/dir
gzip -9 $PKG/usr/info/*.info*
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a ABOUT-NLS AUTHORS COPYING* NEWS README THANKS TODO \
+cp -a AUTHORS COPYING* NEWS README THANKS TODO \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@@ -113,4 +134,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
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/misc/recode/recode.info b/misc/recode/recode.info
index 87606f74d9..16e488d881 100644
--- a/misc/recode/recode.info
+++ b/misc/recode/recode.info
@@ -1,8 +1,12 @@
PRGNAM="recode"
-VERSION="3.7_beta2"
-HOMEPAGE="https://github.com/pinard/Recode"
-DOWNLOAD="https://github.com/pinard/Recode/archive/v3.7-beta2.tar.gz"
-MD5SUM="fd0e609d54fad968fcb52a8eca2d6bf0"
+VERSION="3.7.13"
+HOMEPAGE="https://github.com/rrthomas/recode"
+DOWNLOAD="https://github.com/rrthomas/recode/archive/refs/tags/v3.7.13/recode-3.7.13.tar.gz \
+ https://github.com/coreutils/gnulib/archive/2752f1c/gnulib-2752f1cb315fc461e3df263ab5bb03a354cf4308.tar.gz \
+ https://github.com/gnulib-modules/bootstrap/archive/037f837/bootstrap-037f83765b6e8f90dfabdfac4889be22a5a3f4a4.tar.gz"
+MD5SUM="3348e4f4328e828d75178af9ace44352 \
+ 042bd31255f32188cf1f0f599b6818a3 \
+ ed24221935b5a2aeb635e5541c1f2fa3"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
diff --git a/misc/recode/slack-desc b/misc/recode/slack-desc
index 30b08a8b40..afd1de0357 100644
--- a/misc/recode/slack-desc
+++ b/misc/recode/slack-desc
@@ -14,6 +14,6 @@ recode: When exact translations are not possible, the program may get rid of
recode: offending characters or use approximations. Particular attention has
recode: been paid to the proper representation of French language diacritics.
recode:
-recode: Homepage: https://github.com/pinard/Recode
+recode: Homepage: https://github.com/rrthomas/recode
recode:
recode: