summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiuseppe Borzi2021-05-30 18:28:28 +0200
committerGiuseppe Borzi2021-05-30 18:28:28 +0200
commit1348a7c3ced326a8263a21abf476a4466fbc505d (patch)
tree8da1579d0ac2184b578e17f52170c5b1520ef59c
parent374c832729d4dab0e76254a76e10579a8a73e992 (diff)
downloadaur-1348a7c3ced326a8263a21abf476a4466fbc505d.tar.gz
Removed compilation warnings
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD12
-rw-r--r--spooles-1.patch179
3 files changed, 191 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 9844ee6b7e9c..2af048382091 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = spooles
pkgdesc = SParse Object Oriented Linear Equations Solver
pkgver = 2.2
- pkgrel = 5
+ pkgrel = 6
url = https://www.netlib.org/linalg/spooles
arch = i686
arch = x86_64
@@ -14,10 +14,12 @@ pkgbase = spooles
source = https://www.netlib.org/linalg/spooles/spooles.2.2.tgz
source = https://www.netlib.org/linalg/spooles/ReferenceManual.ps.gz
source = spooles.patch
+ source = spooles-1.patch
source = license.txt
md5sums = 5789ca60d1ae565a4eaef6d03ca837af
md5sums = 9e5e32828f59c4cf066fdb34218705e7
md5sums = 4bb065242e3df5b39a99370dd0f5e57a
+ md5sums = d681e9e4444df17c79abf6b2ffb23902
md5sums = 0f6276a9728bcf7ab0a31350d9a906c2
pkgname = spooles
diff --git a/PKGBUILD b/PKGBUILD
index 9d03c419561b..1972f4e15c69 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=spooles
pkgver=2.2
-pkgrel=5
+pkgrel=6
pkgdesc="SParse Object Oriented Linear Equations Solver"
arch=('i686' 'x86_64')
license=('custom')
@@ -12,18 +12,24 @@ license=('GPL')
depends=('glibc')
makedepends=('perl' 'ghostscript')
source=($url/${pkgname}.${pkgver}.tgz $url/ReferenceManual.ps.gz
- spooles.patch license.txt)
+ spooles.patch spooles-1.patch license.txt)
md5sums=('5789ca60d1ae565a4eaef6d03ca837af'
'9e5e32828f59c4cf066fdb34218705e7'
'4bb065242e3df5b39a99370dd0f5e57a'
+ 'd681e9e4444df17c79abf6b2ffb23902'
'0f6276a9728bcf7ab0a31350d9a906c2')
noextract=("${pkgname}.${pkgver}.tgz" "ReferenceManual.ps.gz")
-build() {
+prepare() {
mkdir ${srcdir}/$pkgname
cd ${srcdir}/$pkgname
tar -xzf ${srcdir}/${pkgname}.${pkgver}.tgz
patch -Np1 -i ${srcdir}/spooles.patch
+ patch -Np1 -i ${srcdir}/spooles-1.patch
+}
+
+build() {
+ cd ${srcdir}/$pkgname
make CFLAGS="$CFLAGS" lib
zcat "$srcdir/ReferenceManual.ps.gz" |ps2pdf - ReferenceManual.pdf
}
diff --git a/spooles-1.patch b/spooles-1.patch
new file mode 100644
index 000000000000..769b17a2d436
--- /dev/null
+++ b/spooles-1.patch
@@ -0,0 +1,179 @@
+diff -Nur spooles.old/ETree/src/transform.c spooles/ETree/src/transform.c
+--- spooles.old/ETree/src/transform.c 1998-12-07 19:47:00.000000000 +0100
++++ spooles/ETree/src/transform.c 2021-05-30 18:20:28.087479400 +0200
+@@ -1,6 +1,7 @@
+ /* transform.c */
+
+ #include "../ETree.h"
++#include <stdint.h>
+
+ #define MYDEBUG 0
+
+@@ -291,7 +292,7 @@
+ remap the nzeros[] vector
+ -------------------------
+ */
+-temp = IVinit(nfront, NULL) ;
++temp = IVinit(nfront, (int)(uintptr_t)NULL) ;
+ IVcopy(nfront, temp, nzeros) ;
+ IV_setSize(nzerosIV, nnew) ;
+ nzeros = IV_entries(nzerosIV) ;
+@@ -453,7 +454,7 @@
+ remap the nzeros[] vector
+ -------------------------
+ */
+-temp = IVinit(nfront, NULL) ;
++temp = IVinit(nfront, (int)(uintptr_t)NULL) ;
+ IVcopy(nfront, temp, nzeros) ;
+ IV_setSize(nzerosIV, nnew) ;
+ nzeros = IV_entries(nzerosIV) ;
+@@ -614,7 +615,7 @@
+ remap the nzeros[] vector
+ -------------------------
+ */
+-temp = IVinit(nfront, NULL) ;
++temp = IVinit(nfront, (int)(uintptr_t)NULL) ;
+ IVcopy(nfront, temp, nzeros) ;
+ IV_setSize(nzerosIV, nnew) ;
+ nzeros = IV_entries(nzerosIV) ;
+diff -Nur spooles.old/Utilities/src/iohb.c spooles/Utilities/src/iohb.c
+--- spooles.old/Utilities/src/iohb.c 1998-09-19 16:35:21.000000000 +0200
++++ spooles/Utilities/src/iohb.c 2021-05-30 18:20:20.030812863 +0200
+@@ -215,6 +215,7 @@
+ /*---------------------------------------------------------------------*/
+
+ #include "../Utilities.h"
++#include <stdint.h>
+
+ static int ParseIfmt(char* fmt, int* perline, int* width) ;
+ static int ParseRfmt(char* fmt, int* perline, int* width,
+@@ -266,7 +267,7 @@
+ &Ptrcrd, &Indcrd, &Valcrd, &Rhscrd, Rhstype);
+ fclose(in_file);
+ *Type = mat_type;
+- *(*Type+3) = (char) NULL;
++ *(*Type+3) = (char)(uintptr_t) NULL;
+ *M = Nrow;
+ *N = Ncol;
+ *nz = Nnzero;
+@@ -308,8 +309,8 @@
+ if ( sscanf(line,"%*s") < 0 )
+ IOHBTerminate("iohb.c: Null (or blank) first line of HB file.\n");
+ (void) sscanf(line, "%72c%8[^\n]", Title, Key);
+- *(Key+8) = (char) NULL;
+- *(Title+72) = (char) NULL;
++ *(Key+8) = (char)(uintptr_t) NULL;
++ *(Title+72) = (char)(uintptr_t) NULL;
+
+ /* Second line: */
+ fgets(line, BUFSIZ, in_file);
+@@ -344,10 +345,10 @@
+ if ( sscanf(line, "%*16c%*16c%20c",Valfmt) != 1)
+ IOHBTerminate("iohb.c: Invalid format info, line 4 of Harwell-Boeing file.\n");
+ sscanf(line, "%*16c%*16c%*20c%20c",Rhsfmt);
+- *(Ptrfmt+16) = (char) NULL;
+- *(Indfmt+16) = (char) NULL;
+- *(Valfmt+20) = (char) NULL;
+- *(Rhsfmt+20) = (char) NULL;
++ *(Ptrfmt+16) = (char)(uintptr_t) NULL;
++ *(Indfmt+16) = (char)(uintptr_t) NULL;
++ *(Valfmt+20) = (char)(uintptr_t) NULL;
++ *(Rhsfmt+20) = (char)(uintptr_t) NULL;
+
+ /* (Optional) Fifth line: */
+ if (*Rhscrd != 0 )
+@@ -454,7 +455,7 @@
+
+ ThisElement = (char *) malloc(Ptrwidth+1);
+ if ( ThisElement == NULL ) IOHBTerminate("Insufficient memory for ThisElement.");
+- *(ThisElement+Ptrwidth) = (char) NULL;
++ *(ThisElement+Ptrwidth) = (char)(uintptr_t) NULL;
+ count=0;
+ for (i=0;i<Ptrcrd;i++)
+ {
+@@ -477,7 +478,7 @@
+
+ ThisElement = (char *) malloc(Indwidth+1);
+ if ( ThisElement == NULL ) IOHBTerminate("Insufficient memory for ThisElement.");
+- *(ThisElement+Indwidth) = (char) NULL;
++ *(ThisElement+Indwidth) = (char)(uintptr_t) NULL;
+ count = 0;
+ for (i=0;i<Indcrd;i++)
+ {
+@@ -505,7 +506,7 @@
+
+ ThisElement = (char *) malloc(Valwidth+1);
+ if ( ThisElement == NULL ) IOHBTerminate("Insufficient memory for ThisElement.");
+- *(ThisElement+Valwidth) = (char) NULL;
++ *(ThisElement+Valwidth) = (char)(uintptr_t) NULL;
+ count = 0;
+ for (i=0;i<Valcrd;i++)
+ {
+@@ -705,7 +706,7 @@
+
+ ThisElement = (char *) malloc(Rhswidth+1);
+ if ( ThisElement == NULL ) IOHBTerminate("Insufficient memory for ThisElement.");
+- *(ThisElement+Rhswidth) = (char) NULL;
++ *(ThisElement+Rhswidth) = (char)(uintptr_t) NULL;
+ for (rhsi=0;rhsi<Nrhs;rhsi++) {
+
+ for (i=0;i<Nentries;i++) {
+@@ -1018,7 +1019,7 @@
+
+ ThisElement = (char *) malloc(Ptrwidth+1);
+ if ( ThisElement == NULL ) IOHBTerminate("Insufficient memory for ThisElement.");
+- *(ThisElement+Ptrwidth) = (char) NULL;
++ *(ThisElement+Ptrwidth) = (char)(uintptr_t) NULL;
+ count=0;
+ for (i=0;i<Ptrcrd;i++)
+ {
+@@ -1041,7 +1042,7 @@
+
+ ThisElement = (char *) malloc(Indwidth+1);
+ if ( ThisElement == NULL ) IOHBTerminate("Insufficient memory for ThisElement.");
+- *(ThisElement+Indwidth) = (char) NULL;
++ *(ThisElement+Indwidth) = (char)(uintptr_t) NULL;
+ count = 0;
+ for (i=0;i<Indcrd;i++)
+ {
+@@ -1069,7 +1070,7 @@
+
+ ThisElement = (char *) malloc(Valwidth+1);
+ if ( ThisElement == NULL ) IOHBTerminate("Insufficient memory for ThisElement.");
+- *(ThisElement+Valwidth) = (char) NULL;
++ *(ThisElement+Valwidth) = (char)(uintptr_t) NULL;
+ count = 0;
+ for (i=0;i<Valcrd;i++)
+ {
+@@ -1629,7 +1630,7 @@
+ while ( strchr(tmp2+1,')') != NULL ) {
+ tmp2 = strchr(tmp2+1,')');
+ }
+- *(tmp2+1) = (int) NULL;
++ *(tmp2+1) = (int)(uintptr_t) NULL;
+ }
+ if (strchr(fmt,'P') != NULL) /* Remove any scaling factor, which */
+ { /* affects output only, not input */
+@@ -1639,11 +1640,11 @@
+ tmp3 = strchr(fmt,'(')+1;
+ len = tmp-tmp3;
+ tmp2 = tmp3;
+- while ( *(tmp2+len) != (int) NULL ) {
++ while ( *(tmp2+len) != (int)(uintptr_t) NULL ) {
+ *tmp2=*(tmp2+len);
+ tmp2++;
+ }
+- *(strchr(fmt,')')+1) = (int) NULL;
++ *(strchr(fmt,')')+1) = (int)(uintptr_t) NULL;
+ }
+ }
+ if (strchr(fmt,'E') != NULL) {
+@@ -1706,7 +1707,7 @@
+ SubS = (char *)malloc(len+1);
+ if ( SubS == NULL ) IOHBTerminate("Insufficient memory for SubS.");
+ for (i=0;i<len;i++) SubS[i] = S[pos+i];
+- SubS[len] = (char) NULL;
++ SubS[len] = (char)(uintptr_t) NULL;
+ } else {
+ SubS = NULL;
+ }