diff options
author | Andreas Grapentin <andreas@grapentin.org> | 2018-01-23 13:37:58 +0100 |
---|---|---|
committer | Andreas Grapentin <andreas@grapentin.org> | 2018-01-23 13:37:58 +0100 |
commit | f60f75411dc99f002e477939b68f307410bfeab0 (patch) | |
tree | cfed4067e656949ba0b53b56fe39950c8e886578 /pcr/rush | |
parent | 62d80344ffdba41448db4909f653587324a74f6f (diff) | |
download | abslibre-f60f75411dc99f002e477939b68f307410bfeab0.tar.gz abslibre-f60f75411dc99f002e477939b68f307410bfeab0.tar.bz2 abslibre-f60f75411dc99f002e477939b68f307410bfeab0.zip |
pcr/rush: updated to 1.8
Diffstat (limited to 'pcr/rush')
-rw-r--r-- | pcr/rush/PKGBUILD | 79 | ||||
-rw-r--r-- | pcr/rush/intprops.patch | 257 |
2 files changed, 311 insertions, 25 deletions
diff --git a/pcr/rush/PKGBUILD b/pcr/rush/PKGBUILD index 3fde49dd8..d35292d36 100644 --- a/pcr/rush/PKGBUILD +++ b/pcr/rush/PKGBUILD @@ -1,39 +1,68 @@ -# Maintainer (Arch): Brandon Invergo <brandon@invergo.net> -# Contributor (Arch): B3nny <benny@b3nny.net> -pkgname=rush -pkgver=1.7 -pkgrel=3 -pkgdesc="GNU Restricted User Shell" -arch=('i686' 'x86_64') -url="http://puszcza.gnu.org.ua/software/rush/" +# Maintainer (AUR): Chris Severance aur.severach aATt spamgourmet dott com +# Contributor (AUR): Brandon Invergo <brandon@invergo.net> +# Contributor (AUR): B3nny <benny@b3nny.net> + +# parabola changes and rationale: +# - added .install file to update icon database +# - added patch to fix build errors with gcc7 + +set -u +pkgname='rush' +pkgver='1.8' +pkgrel='1' +pkgdesc='GNU Restricted User Shell' +arch=('i686' 'x86_64' 'armv7h') +url='http://puszcza.gnu.org.ua/software/rush/' license=('GPL3') -backup=(etc/rush.rc) +makedepends=('patch') +backup=('etc/rush.rc') install='rush.install' -source=("http://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz" - 'rush-1.7-glib-2.16-gets.patch') -noextract=() -md5sums=('02fae838fe8f5dc5b4e3a2e4da0182b8' - 'dcd87b8bf9738796621030930384f97d') +_verwatch=("${url}download.html" "${pkgname}-\([0-9\.]\+\)\.tar.xz" 't') +source=("http://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.xz" + 'rush-1.7-glib-2.16-gets.patch' + 'intprops.patch') +# md5 and sha1 are published by gnu +md5sums=('50d8bb3c0a502f2c1f5b374046ff78de' + 'dcd87b8bf9738796621030930384f97d' + 'a86f13da54caba8df99719153c72cdcf') +sha1sums=('e882f68d9004af608b7e5c430c367645aa3e3b75' + 'adb33d34f04846734ec3457517b46fb7a73efa6f' + '637d0a93c8e73e86e9a62f95296e1e110bd6a038') +sha256sums=('dd3b7bfb33570890086218aa049900a9b4d5a9e8d4878a1328e2aa88bb5793ee' + '159dd2fc0fd4feec5d43cf7763a429b9c2da5c50597b157de9e5b376d9ff85a8' + 'eb916fff92a4a33fff4951f1f219e8c9fb12f3a6c0dd462da30e451b26789a28') prepare() { - cd "$srcdir/$pkgname-$pkgver" - patch -p1 < "$srcdir/rush-1.7-glib-2.16-gets.patch" - sed -i 's/^\( *[a-z#].*\)/#\1/g' etc/rush.rc + set -u + cd "${pkgname}-${pkgver}" + patch -Np1 -i "$srcdir"/intprops.patch + if [ "$(vercmp ${pkgver} '1.8')" -lt 0 ]; then + patch -p1 < "${srcdir}/rush-1.7-glib-2.16-gets.patch" + fi + sed -i -e 's:^\s*[^#]:#&:g' 'etc/rush.rc' + ./configure --prefix='/usr' --sysconfdir='/etc' --localstatedir='/var' --sbindir='/usr/bin' + set +u } build() { - cd "$srcdir/$pkgname-$pkgver" - ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --sbindir=/usr/bin - make + set -u + cd "${pkgname}-${pkgver}" + local _nproc="$(nproc)"; _nproc=$((_nproc>8?8:_nproc)) + make -s -j "${_nproc}" + set +u } check() { - cd "$srcdir/$pkgname-$pkgver" - make check + set -u + cd "${pkgname}-${pkgver}" + make check + set +u } package() { - cd "$srcdir/$pkgname-$pkgver" - make DESTDIR="$pkgdir/" install + set -u + cd "${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install + set +u } - +set +u diff --git a/pcr/rush/intprops.patch b/pcr/rush/intprops.patch new file mode 100644 index 000000000..947cb0b9a --- /dev/null +++ b/pcr/rush/intprops.patch @@ -0,0 +1,257 @@ +Description: Update to latest intprops.h from gnulib, fixes FTBFS with gcc 7 +Author: Adrian Bunk <bunk@debian.org> +Bug-Debian: https://bugs.debian.org/853649 + +--- rush-1.8+dfsg.orig/gnu/intprops.h ++++ rush-1.8+dfsg/gnu/intprops.h +@@ -1,20 +1,18 @@ +-/* -*- buffer-read-only: t -*- vi: set ro: */ +-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ + /* intprops.h -- properties of integer types + +- Copyright (C) 2001-2016 Free Software Foundation, Inc. ++ Copyright (C) 2001-2017 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it +- under the terms of the GNU General Public License as published +- by the Free Software Foundation; either version 3 of the License, or ++ under the terms of the GNU Lesser General Public License as published ++ by the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- GNU General Public License for more details. ++ GNU Lesser General Public License for more details. + +- You should have received a copy of the GNU General Public License ++ You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + + /* Written by Paul Eggert. */ +@@ -23,7 +21,6 @@ + #define _GL_INTPROPS_H + + #include <limits.h> +-#include <verify.h> + + /* Return a value with the common real type of E and V and the value of V. */ + #define _GL_INT_CONVERT(e, v) (0 * (e) + (v)) +@@ -49,12 +46,16 @@ + + /* Minimum and maximum values for integer types and expressions. */ + ++/* The width in bits of the integer type or expression T. ++ Padding bits are not supported; this is checked at compile-time below. */ ++#define TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT) ++ + /* The maximum and minimum values for the integer type T. */ + #define TYPE_MINIMUM(t) ((t) ~ TYPE_MAXIMUM (t)) + #define TYPE_MAXIMUM(t) \ + ((t) (! TYPE_SIGNED (t) \ + ? (t) -1 \ +- : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) ++ : ((((t) 1 << (TYPE_WIDTH (t) - 2)) - 1) * 2 + 1))) + + /* The maximum and minimum values for the type of the expression E, + after integer promotion. E should not have side effects. */ +@@ -67,29 +68,23 @@ + ? _GL_SIGNED_INT_MAXIMUM (e) \ + : _GL_INT_NEGATE_CONVERT (e, 1)) + #define _GL_SIGNED_INT_MAXIMUM(e) \ +- (((_GL_INT_CONVERT (e, 1) << (sizeof ((e) + 0) * CHAR_BIT - 2)) - 1) * 2 + 1) ++ (((_GL_INT_CONVERT (e, 1) << (TYPE_WIDTH ((e) + 0) - 2)) - 1) * 2 + 1) ++ ++/* Work around OpenVMS incompatibility with C99. */ ++#if !defined LLONG_MAX && defined __INT64_MAX ++# define LLONG_MAX __INT64_MAX ++# define LLONG_MIN __INT64_MIN ++#endif + + /* This include file assumes that signed types are two's complement without + padding bits; the above macros have undefined behavior otherwise. + If this is a problem for you, please let us know how to fix it for your host. +- As a sanity check, test the assumption for some signed types that +- <limits.h> bounds. */ +-verify (TYPE_MINIMUM (signed char) == SCHAR_MIN); +-verify (TYPE_MAXIMUM (signed char) == SCHAR_MAX); +-verify (TYPE_MINIMUM (short int) == SHRT_MIN); +-verify (TYPE_MAXIMUM (short int) == SHRT_MAX); +-verify (TYPE_MINIMUM (int) == INT_MIN); +-verify (TYPE_MAXIMUM (int) == INT_MAX); +-verify (TYPE_MINIMUM (long int) == LONG_MIN); +-verify (TYPE_MAXIMUM (long int) == LONG_MAX); +-#ifdef LLONG_MAX +-verify (TYPE_MINIMUM (long long int) == LLONG_MIN); +-verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); +-#endif ++ This assumption is tested by the intprops-tests module. */ + + /* Does the __typeof__ keyword work? This could be done by + 'configure', but for now it's easier to do it by hand. */ +-#if (2 <= __GNUC__ || defined __IBM__TYPEOF__ \ ++#if (2 <= __GNUC__ \ ++ || (1210 <= __IBMC__ && defined __IBM__TYPEOF__) \ + || (0x5110 <= __SUNPRO_C && !__STDC__)) + # define _GL_HAVE___TYPEOF__ 1 + #else +@@ -118,8 +113,7 @@ verify (TYPE_MAXIMUM (long long int) == + signed, this macro may overestimate the true bound by one byte when + applied to unsigned types of size 2, 4, 16, ... bytes. */ + #define INT_STRLEN_BOUND(t) \ +- (INT_BITS_STRLEN_BOUND (sizeof (t) * CHAR_BIT \ +- - _GL_SIGNED_TYPE_OR_EXPR (t)) \ ++ (INT_BITS_STRLEN_BOUND (TYPE_WIDTH (t) - _GL_SIGNED_TYPE_OR_EXPR (t)) \ + + _GL_SIGNED_TYPE_OR_EXPR (t)) + + /* Bound on buffer size needed to represent an integer type or expression T, +@@ -224,20 +218,27 @@ verify (TYPE_MAXIMUM (long long int) == + ? (a) < (min) >> (b) \ + : (max) >> (b) < (a)) + +-/* True if __builtin_add_overflow (A, B, P) works when P is null. */ +-#define _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL (7 <= __GNUC__) ++/* True if __builtin_add_overflow (A, B, P) works when P is non-null. */ ++#if 5 <= __GNUC__ && !defined __ICC ++# define _GL_HAS_BUILTIN_OVERFLOW 1 ++#else ++# define _GL_HAS_BUILTIN_OVERFLOW 0 ++#endif ++ ++/* True if __builtin_add_overflow_p (A, B, C) works. */ ++#define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__) + + /* The _GL*_OVERFLOW macros have the same restrictions as the + *_RANGE_OVERFLOW macros, except that they do not assume that operands + (e.g., A and B) have the same type as MIN and MAX. Instead, they assume + that the result (e.g., A + B) has that type. */ +-#if _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL +-# define _GL_ADD_OVERFLOW(a, b, min, max) +- __builtin_add_overflow (a, b, (__typeof__ ((a) + (b)) *) 0) +-# define _GL_SUBTRACT_OVERFLOW(a, b, min, max) +- __builtin_sub_overflow (a, b, (__typeof__ ((a) - (b)) *) 0) +-# define _GL_MULTIPLY_OVERFLOW(a, b, min, max) +- __builtin_mul_overflow (a, b, (__typeof__ ((a) * (b)) *) 0) ++#if _GL_HAS_BUILTIN_OVERFLOW_P ++# define _GL_ADD_OVERFLOW(a, b, min, max) \ ++ __builtin_add_overflow_p (a, b, (__typeof__ ((a) + (b))) 0) ++# define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \ ++ __builtin_sub_overflow_p (a, b, (__typeof__ ((a) - (b))) 0) ++# define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \ ++ __builtin_mul_overflow_p (a, b, (__typeof__ ((a) * (b))) 0) + #else + # define _GL_ADD_OVERFLOW(a, b, min, max) \ + ((min) < 0 ? INT_ADD_RANGE_OVERFLOW (a, b, min, max) \ +@@ -317,7 +318,7 @@ verify (TYPE_MAXIMUM (long long int) == + _GL_BINARY_OP_OVERFLOW (a, b, _GL_ADD_OVERFLOW) + #define INT_SUBTRACT_OVERFLOW(a, b) \ + _GL_BINARY_OP_OVERFLOW (a, b, _GL_SUBTRACT_OVERFLOW) +-#if _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL ++#if _GL_HAS_BUILTIN_OVERFLOW_P + # define INT_NEGATE_OVERFLOW(a) INT_SUBTRACT_OVERFLOW (0, a) + #else + # define INT_NEGATE_OVERFLOW(a) \ +@@ -351,10 +352,6 @@ verify (TYPE_MAXIMUM (long long int) == + #define INT_MULTIPLY_WRAPV(a, b, r) \ + _GL_INT_OP_WRAPV (a, b, r, *, __builtin_mul_overflow, INT_MULTIPLY_OVERFLOW) + +-#ifndef __has_builtin +-# define __has_builtin(x) 0 +-#endif +- + /* Nonzero if this compiler has GCC bug 68193 or Clang bug 25390. See: + https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68193 + https://llvm.org/bugs/show_bug.cgi?id=25390 +@@ -371,17 +368,17 @@ verify (TYPE_MAXIMUM (long long int) == + the operation. BUILTIN is the builtin operation, and OVERFLOW the + overflow predicate. Return 1 if the result overflows. See above + for restrictions. */ +-#if 5 <= __GNUC__ || __has_builtin (__builtin_add_overflow) ++#if _GL_HAS_BUILTIN_OVERFLOW + # define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) builtin (a, b, r) + #elif 201112 <= __STDC_VERSION__ && !_GL__GENERIC_BOGUS + # define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \ + (_Generic \ + (*(r), \ + signed char: \ +- _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned char, \ ++ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ + signed char, SCHAR_MIN, SCHAR_MAX), \ + short int: \ +- _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned short int, \ ++ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ + short int, SHRT_MIN, SHRT_MAX), \ + int: \ + _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ +@@ -395,10 +392,10 @@ verify (TYPE_MAXIMUM (long long int) == + #else + # define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \ + (sizeof *(r) == sizeof (signed char) \ +- ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned char, \ ++ ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ + signed char, SCHAR_MIN, SCHAR_MAX) \ + : sizeof *(r) == sizeof (short int) \ +- ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned short int, \ ++ ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ + short int, SHRT_MIN, SHRT_MAX) \ + : sizeof *(r) == sizeof (int) \ + ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ +@@ -414,15 +411,14 @@ verify (TYPE_MAXIMUM (long long int) == + # else + # define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \ + _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \ +- long int, LONG_MIN, LONG_MAX)) ++ long int, LONG_MIN, LONG_MAX) + # endif + #endif + + /* Store the low-order bits of A <op> B into *R, where the operation + is given by OP. Use the unsigned type UT for calculation to avoid +- overflow problems. *R's type is T, with extremal values TMIN and +- TMAX. T must be a signed integer type. Return 1 if the result +- overflows. */ ++ overflow problems. *R's type is T, with extrema TMIN and TMAX. ++ T must be a signed integer type. Return 1 if the result overflows. */ + #define _GL_INT_OP_CALC(a, b, r, op, overflow, ut, t, tmin, tmax) \ + (sizeof ((a) op (b)) < sizeof (t) \ + ? _GL_INT_OP_CALC1 ((t) (a), (t) (b), r, op, overflow, ut, t, tmin, tmax) \ +@@ -431,17 +427,27 @@ verify (TYPE_MAXIMUM (long long int) == + ((overflow (a, b) \ + || (EXPR_SIGNED ((a) op (b)) && ((a) op (b)) < (tmin)) \ + || (tmax) < ((a) op (b))) \ +- ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t, tmin, tmax), 1) \ +- : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t, tmin, tmax), 0)) ++ ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 1) \ ++ : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 0)) ++ ++/* Return the low-order bits of A <op> B, where the operation is given ++ by OP. Use the unsigned type UT for calculation to avoid undefined ++ behavior on signed integer overflow, and convert the result to type T. ++ UT is at least as wide as T and is no narrower than unsigned int, ++ T is two's complement, and there is no padding or trap representations. ++ Assume that converting UT to T yields the low-order bits, as is ++ done in all known two's-complement C compilers. E.g., see: ++ https://gcc.gnu.org/onlinedocs/gcc/Integers-implementation.html ++ ++ According to the C standard, converting UT to T yields an ++ implementation-defined result or signal for values outside T's ++ range. However, code that works around this theoretical problem ++ runs afoul of a compiler bug in Oracle Studio 12.3 x86. See: ++ http://lists.gnu.org/archive/html/bug-gnulib/2017-04/msg00049.html ++ As the compiler bug is real, don't try to work around the ++ theoretical problem. */ + +-/* Return A <op> B, where the operation is given by OP. Use the +- unsigned type UT for calculation to avoid overflow problems. +- Convert the result to type T without overflow by subtracting TMIN +- from large values before converting, and adding it afterwards. +- Compilers can optimize all the operations except OP. */ +-#define _GL_INT_OP_WRAPV_VIA_UNSIGNED(a, b, op, ut, t, tmin, tmax) \ +- (((ut) (a) op (ut) (b)) <= (tmax) \ +- ? (t) ((ut) (a) op (ut) (b)) \ +- : ((t) (((ut) (a) op (ut) (b)) - (tmin)) + (tmin))) ++#define _GL_INT_OP_WRAPV_VIA_UNSIGNED(a, b, op, ut, t) \ ++ ((t) ((ut) (a) op (ut) (b))) + + #endif /* _GL_INTPROPS_H */ |