diff options
author | Matteo Bernardini <ponce@slackbuilds.org> | 2017-07-24 17:54:45 +0200 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2021-04-17 23:28:52 -0500 |
commit | 500f5daa5bc9bbbec11a4672d04516761c3887fe (patch) | |
tree | 0a4799db4149ba32de60478d982d88e1f4aa0a43 | |
parent | f8d36c25b53c72920186aea5b944c3c8ac0a57d5 (diff) |
development/hte: Updated for version 2.1.0, cleanups.
Added a patch for gcc >= 7.x
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
-rw-r--r-- | development/hte/hte.SlackBuild | 24 | ||||
-rw-r--r-- | development/hte/hte.info | 6 | ||||
-rw-r--r-- | development/hte/hteditor-2.1.0-gcc-7.patch | 32 |
3 files changed, 50 insertions, 12 deletions
diff --git a/development/hte/hte.SlackBuild b/development/hte/hte.SlackBuild index 97058415dff02..519c03db137f5 100644 --- a/development/hte/hte.SlackBuild +++ b/development/hte/hte.SlackBuild @@ -24,13 +24,13 @@ SRCNAM=ht PRGNAM=hte -VERSION=${VERSION:-2.0.18} +VERSION=${VERSION:-2.1.0} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac @@ -41,8 +41,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" @@ -61,14 +61,20 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $SRCNAM-$VERSION -tar xvf $CWD/$SRCNAM-$VERSION.tar.*z? +tar xvf $CWD/$SRCNAM-$VERSION.tar.?z* cd $SRCNAM-$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 755 {} \; -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 gentoo! +patch -p1 < $CWD/hteditor-2.1.0-gcc-7.patch + +# Respect our CFLAGS +sed -i "s|-O3 -fomit-frame-pointer -Wall -fsigned-char|$SLKCFLAGS|" configure CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ diff --git a/development/hte/hte.info b/development/hte/hte.info index e12fb4f8ebd79..1a2a2cd46173f 100644 --- a/development/hte/hte.info +++ b/development/hte/hte.info @@ -1,8 +1,8 @@ PRGNAM="hte" -VERSION="2.0.18" +VERSION="2.1.0" HOMEPAGE="http://hte.sourceforge.net/" -DOWNLOAD="http://downloads.sourceforge.net/hte/ht-2.0.18.tar.bz2" -MD5SUM="9cd5c52bb3fbae5c631875cd0de3318c" +DOWNLOAD="https://downloads.sf.net/hte/ht-2.1.0.tar.bz2" +MD5SUM="09b2a4461d75e9cd03af1cd67fadc1ec" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/development/hte/hteditor-2.1.0-gcc-7.patch b/development/hte/hteditor-2.1.0-gcc-7.patch new file mode 100644 index 0000000000000..ebcc3c0aa43ec --- /dev/null +++ b/development/hte/hteditor-2.1.0-gcc-7.patch @@ -0,0 +1,32 @@ +https://bugs.gentoo.org/show_bug.cgi?id=620732 + +Fixes build failure on gcc-7: + + htapp.cc: In function 'uint isqr(uint)': + htapp.cc:3026:18: error: call of overloaded 'abs(uint)' is ambiguous + while (abs(a - b) > 1) { + ^ + +Picked upstream patch that fixes it: + +commit 3b62f2f7e49e024ec9d3c5ffc8ff9cd87a107af6 +Author: Sebastian Biallas <sb@biallas.net> +Date: Sun Nov 13 15:25:26 2016 +0100 + + use unsigned variables + +diff --git a/htapp.cc b/htapp.cc +index 53d8725..03236e2 100644 +--- a/htapp.cc ++++ b/htapp.cc +@@ -3021,8 +3021,8 @@ void do_modal_resize() + + static uint isqr(uint u) + { +- uint a = 2; +- uint b = u/a; ++ int a = 2; ++ int b = u/a; + while (abs(a - b) > 1) { + a = (a+b)/2; + b = u/a; |