[arch-commits] Commit in pari-git/trunk (PKGBUILD public_memory_functions.patch)

2015-04-07 Thread Gaetan Bisson
Date: Tuesday, April 7, 2015 @ 23:21:18
  Author: bisson
Revision: 130904

add patch for sage-mathematics

Added:
  pari-git/trunk/public_memory_functions.patch
Modified:
  pari-git/trunk/PKGBUILD

---+
 PKGBUILD  |   15 +++--
 public_memory_functions.patch |   61 
 2 files changed, 72 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2015-04-07 19:51:26 UTC (rev 130903)
+++ PKGBUILD2015-04-07 21:21:18 UTC (rev 130904)
@@ -4,7 +4,7 @@
 pkgname=pari-git
 _pkgname=pari
 pkgver=20150407.f0d91b9
-pkgrel=1
+pkgrel=2
 pkgdesc='Computer algebra system designed for fast computations in number 
theory'
 url='http://pari.math.u-bordeaux.fr/'
 license=('GPL')
@@ -12,8 +12,10 @@
 depends=('gmp' 'readline' 'libx11')
 makedepends=('perl' 'texlive-core' 'git')
 optdepends=('perl: gphelp, tex2mail')
-source=('git+http://pari.math.u-bordeaux.fr/git/pari.git#commit=f0d91b910702e6fb4f9a5f0e82846e92e813e6cd')
-sha1sums=('SKIP')
+source=('git+http://pari.math.u-bordeaux.fr/git/pari.git#commit=f0d91b910702e6fb4f9a5f0e82846e92e813e6cd'
+'public_memory_functions.patch')
+sha1sums=('SKIP'
+  'a88bca1bc18e6eea90c34a9ea88f16c7f1ec28c8')
 
 provides=("${_pkgname}")
 conflicts=("${_pkgname}")
@@ -23,6 +25,11 @@
git log -1 --format='%cd.%h' --date=short | tr -d -
 }
 
+prepare() {
+   cd "${srcdir}/${_pkgname}"
+   patch -p1 -i ../public_memory_functions.patch
+}
+
 build() {
cd "${srcdir}/${_pkgname}"
./Configure \
@@ -30,7 +37,7 @@
--with-readline \
--mt=pthread \
--with-gmp \
-
+   
make all
 }
 

Added: public_memory_functions.patch
===
--- public_memory_functions.patch   (rev 0)
+++ public_memory_functions.patch   2015-04-07 21:21:18 UTC (rev 130904)
@@ -0,0 +1,61 @@
+diff --git a/src/headers/paridecl.h b/src/headers/paridecl.h
+index 7067183..4ede6ed 100644
+--- a/src/headers/paridecl.h
 b/src/headers/paridecl.h
+@@ -2819,6 +2819,9 @@ GEN pari_thread_start(struct pari_thread *t);
+ voidpari_thread_valloc(struct pari_thread *t, size_t s, size_t v, GEN 
arg);
+ GEN pari_version(void);
+ voidpari_warn(int numerr, ...);
++void *  pari_mainstack_malloc(size_t size);
++voidpari_mainstack_mfree(void *s, size_t size);
++voidpari_mainstack_free(struct pari_mainstack *st);
+ voidparistack_alloc(size_t rsize, size_t vsize);
+ voidparistack_newrsize(ulong newsize);
+ voidparistack_resize(ulong newsize);
+diff --git a/src/language/init.c b/src/language/init.c
+index 7b5922d..2a578d7 100644
+--- a/src/language/init.c
 b/src/language/init.c
+@@ -612,7 +612,7 @@ pari_add_oldmodule(entree *ep)
+ #ifndef MAP_NORESERVE
+ #define MAP_NORESERVE 0
+ #endif
+-static void *
++void *
+ pari_mainstack_malloc(size_t size)
+ {
+   void *b = mmap(NULL, size, PROT_READ|PROT_WRITE,
+@@ -620,7 +620,7 @@ pari_mainstack_malloc(size_t size)
+   return (b == MAP_FAILED) ? NULL: b;
+ }
+ 
+-static void
++void
+ pari_mainstack_mfree(void *s, size_t size)
+ {
+   munmap(s, size);
+@@ -634,13 +634,13 @@ pari_mainstack_mreset(void *s, size_t size)
+ 
+ #else
+ #define PARI_STACK_ALIGN (0x40UL)
+-static void *
++void *
+ pari_mainstack_malloc(size_t s)
+ {
+   return malloc(s); /* NOT pari_malloc, e_MEM would be deadly */
+ }
+ 
+-static void
++void
+ pari_mainstack_mfree(void *s, size_t size) { (void) size; free(s); }
+ 
+ static void
+@@ -681,7 +681,7 @@ pari_mainstack_alloc(struct pari_mainstack *st, size_t 
rsize, size_t vsize)
+   st->memused = 0;
+ }
+ 
+-static void
++void
+ pari_mainstack_free(struct pari_mainstack *st)
+ {
+   pari_mainstack_mfree((void*)st->vbot, st->vsize ? st->vsize : 
fix_size(st->rsize));


[arch-commits] Commit in pari-git/trunk (PKGBUILD)

2015-04-07 Thread Gaetan Bisson
Date: Tuesday, April 7, 2015 @ 21:51:04
  Author: bisson
Revision: 130902

upstream update

Modified:
  pari-git/trunk/PKGBUILD

--+
 PKGBUILD |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Modified: PKGBUILD
===
--- PKGBUILD2015-04-07 19:25:46 UTC (rev 130901)
+++ PKGBUILD2015-04-07 19:51:04 UTC (rev 130902)
@@ -3,7 +3,7 @@
 
 pkgname=pari-git
 _pkgname=pari
-pkgver=20150327.04f73e4
+pkgver=20150407.f0d91b9
 pkgrel=1
 pkgdesc='Computer algebra system designed for fast computations in number 
theory'
 url='http://pari.math.u-bordeaux.fr/'