summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel Revilla2017-07-07 15:21:30 +0200
committerMiguel Revilla2017-07-07 15:21:30 +0200
commitcf06b60a026ea99406ce51ea60dd95e0d5c00926 (patch)
treea3a797439e2aeaece08c7e446a122ee3d32b8b43
parent0b5f43904811e9e83b84f03fd6aa3b8c15bce1d0 (diff)
downloadaur-cf06b60a026ea99406ce51ea60dd95e0d5c00926.tar.gz
Fixed compile problem with perl modules and runtime problem with GCC7.
Special thanks to @ahinrichs for informing of the bugs and the fixes in one shot. Bump to 0.10.2-2.
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD24
-rw-r--r--perl-module.patch11
-rw-r--r--xalloc-oversized.patch11
4 files changed, 45 insertions, 9 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 9c2d53126924..4c5246ecddd8 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,7 @@
-# Generated by mksrcinfo v8
-# Sun Jul 24 16:35:59 UTC 2016
pkgbase = pspp
pkgdesc = Statistical analysis program. Free replacement for SPSS.
pkgver = 0.10.2
- pkgrel = 1
+ pkgrel = 2
url = http://www.gnu.org/software/pspp/
install = pspp.install
arch = i686
@@ -18,7 +16,11 @@ pkgbase = pspp
options = !libtool
options = !emptydirs
source = ftp://ftp.gnu.org/gnu/pspp/pspp-0.10.2.tar.gz
+ source = perl-module.patch
+ source = xalloc-oversized.patch
md5sums = 9c5a3295d59b07a9a4462148371723ae
+ md5sums = bed924eac7dabd2afa65157fbc2d89dd
+ md5sums = e62a701045851b052e5e266a25d0cda6
pkgname = pspp
diff --git a/PKGBUILD b/PKGBUILD
index 94dccb256916..e52437ee0a1c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
# Contributor: joyfulgirl <joyfulgirl (at) archlinux.us>
pkgname=pspp
pkgver=0.10.2
-pkgrel=1
+pkgrel=2
pkgdesc="Statistical analysis program. Free replacement for SPSS."
arch=('i686' 'x86_64')
url="http://www.gnu.org/software/pspp/"
@@ -11,15 +11,27 @@ depends=('gsl' 'gtksourceview3' 'postgresql-libs' 'desktop-file-utils')
optdepends=('zlib: GNUmeric support'
'libxml2: GNUMERIC support')
options=('!libtool' '!emptydirs')
-source=(ftp://ftp.gnu.org/gnu/pspp/pspp-${pkgver}.tar.gz)
-md5sums=('9c5a3295d59b07a9a4462148371723ae')
+source=(ftp://ftp.gnu.org/gnu/pspp/pspp-${pkgver}.tar.gz
+ 'perl-module.patch'
+ 'xalloc-oversized.patch')
+md5sums=('9c5a3295d59b07a9a4462148371723ae'
+ 'bed924eac7dabd2afa65157fbc2d89dd'
+ 'e62a701045851b052e5e266a25d0cda6')
install=pspp.install
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -p0 < "${srcdir}/perl-module.patch"
+ patch -p0 < "${srcdir}/xalloc-oversized.patch"
+
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --without-libreadline-prefix
+}
+
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
- ./configure --prefix=/usr \
- --sysconfdir=/etc \
- --without-libreadline-prefix
+
make
}
diff --git a/perl-module.patch b/perl-module.patch
new file mode 100644
index 000000000000..da66edb728aa
--- /dev/null
+++ b/perl-module.patch
@@ -0,0 +1,11 @@
+--- perl-module/Makefile.PL.orig 2017-07-07 15:02:34.054187220 +0200
++++ perl-module/Makefile.PL 2017-07-07 15:02:54.420853430 +0200
+@@ -4,7 +4,7 @@
+ # the contents of the Makefile that is written.
+
+
+-do 'pspp-module-config' || do {
++do './pspp-module-config' || do {
+ my $build = prompt ("Enter the location of the build directory of the configured pspp source:", "" );
+ my $src = $top_srcdir;
+
diff --git a/xalloc-oversized.patch b/xalloc-oversized.patch
new file mode 100644
index 000000000000..3c6bc5d0761f
--- /dev/null
+++ b/xalloc-oversized.patch
@@ -0,0 +1,11 @@
+--- gl/xalloc-oversized.h.orig 2017-07-07 15:14:42.847504140 +0200
++++ gl/xalloc-oversized.h 2017-07-07 15:15:53.110835890 +0200
+@@ -46,7 +46,7 @@
+ /* GCC 7 __builtin_mul_overflow should easily compute this. See:
+ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68120 */
+ #if 7 <= __GNUC__
+-# define xalloc_oversized(n, s) __builtin_mul_overflow (n, s, (size_t *) NULL)
++# define xalloc_oversized(n, s) __builtin_mul_overflow_p (n, s, (size_t) 1)
+
+ /* GCC 5 and Clang __builtin_mul_overflow needs a temporary, and
+ should be used only for non-constant operands, so that