Date: Friday, September 15, 2017 @ 21:56:14
  Author: arojas
Revision: 257733

Add missing patch (FS#55643)

Added:
  meataxe/trunk/meataxe-shared.patch
Modified:
  meataxe/trunk/PKGBUILD

----------------------+
 PKGBUILD             |   13 +++++---
 meataxe-shared.patch |   77 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 85 insertions(+), 5 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2017-09-15 21:23:43 UTC (rev 257732)
+++ PKGBUILD    2017-09-15 21:56:14 UTC (rev 257733)
@@ -12,7 +12,7 @@
 #source=("http://www.math.rwth-aachen.de/~MTX/$pkgname-$pkgver.tar.gz";)
 
source=("http://mirrors.mit.edu/sage/spkg/upstream/meataxe/meataxe-$pkgver.tar.gz";
        
"https://git.sagemath.org/sage.git/plain/build/pkgs/meataxe/patches/IO_fixes.patch";
-       
"https://git.sagemath.org/sage.git/plain/build/pkgs/meataxe/patches/StrassenWinogradImplementation.patch";
+       "StrassenWinogradImplementation.patch"
        
"https://git.sagemath.org/sage.git/plain/build/pkgs/meataxe/patches/StrassenWinogradUsage.patch";
        
"https://git.sagemath.org/sage.git/plain/build/pkgs/meataxe/patches/TweakEchelon.patch";
        
"https://git.sagemath.org/sage.git/plain/build/pkgs/meataxe/patches/UseErrorPropagation.patch";
@@ -19,7 +19,7 @@
         meataxe-shared.patch)
 sha256sums=('c3b131218d293c6a68620cafe5da589241f157cd07887e491e7720ba4b469dd1'
             'a0c2141d7741326a304c15a15d621215ec7275d84954cde53e34eac873e56eaa'
-            'b49c32eb1836f13a3c348cf56bff790f78a73e349e70e2172f60a949f17c28df'
+            '375994fef68cf4a4a75a7e016990c1c7268f187298f7702e590d10b7a6422f07'
             '4c7538a55bb0f29b7d95601f6fae408b1742db5aa9954cab22cdd01d8042a272'
             'a36b4e966fcbe6ac63216538038ef45391d44029894f386803d858f8fe32a39c'
             '4c4d2cbec389ed561af10a5558eea87b6f301f8db96e44c06a8ca54a7709f6fd'
@@ -26,22 +26,25 @@
             'aa05e4b235c078ce1d7807ae7320986f56fa6e38033c21328ac298a6e44df411')
 
 prepare() {
+  sed -e 's|#ifdef ASM_MMX|#if 0|g' -i StrassenWinogradImplementation.patch # 
workaround segfaults
+
   cd $pkgname-$pkgver
-#  for _patch in IO_fixes; do
+#  for _patch in IO_fixes StrassenWinogradImplementation; do
   for _patch in IO_fixes StrassenWinogradImplementation StrassenWinogradUsage 
TweakEchelon UseErrorPropagation; do
    patch -p1 -i ../$_patch.patch
   done
   patch -p0 -i ../meataxe-shared.patch # build shared lib
+  cp src/kernel-{0,1}.c
 }
 
 build() {
   cd $pkgname-$pkgver
 
-  export ZZZ=0
+  export ZZZ=1
   export MTXLIB="$HOME/.local/share/meataxe"
   export MTXBIN=/usr/bin
   touch Makefile.conf
-  make LFLAGS1="$LDFLAGS" CFLAGS1="$CFLAGS"
+  make LFLAGS1="$LDFLAGS" CFLAGS1="$CFLAGS" -j1
 }
 
 package() {

Added: meataxe-shared.patch
===================================================================
--- meataxe-shared.patch                                (rev 0)
+++ meataxe-shared.patch        2017-09-15 21:56:14 UTC (rev 257733)
@@ -0,0 +1,77 @@
+--- Makefile.orig      2011-11-28 14:15:16.000000000 -0700
++++ Makefile   2012-01-04 14:53:06.575685168 -0700
+@@ -1,7 +1,9 @@
+ include Makefile.conf
+ 
+-CFLAGS=$(CFLAGS1) -Itmp
++CFLAGS=$(CFLAGS1) -Itmp -DMTXLIB=\"$(MTXLIB)\" -DMTXBIN=\"$(MTXBIN)\" 
-DZZZ=$(ZZZ)
+ LFLAGS=$(LFLAGS1)
++VERSION=
++MAJVER=$(shell cut -d. -f1 - <<<$(VERSION))
+ 
+ PROGRAMS = \
+   cfcomp checksum chop decomp genmod mkcycl mkdotl mkgraph mkhom mkhom_old\
+@@ -22,7 +24,7 @@
+ 
+ tmp/%.o: tmp/mk.dir src/%.c src/meataxe.h tmp/config.h
+       @echo "Compiling $*.c"
+-      @$(CC) $(CFLAGS) -c src/$*.c -o $@
++      @$(CC) $(CFLAGS) -fPIC -c src/$*.c -o $@
+ 
+ tmp/mk.dir:
+       mkdir -p tmp
+@@ -36,9 +38,9 @@
+ # Link programs
+ # 
------------------------------------------------------------------------------
+ 
+-bin/%: bin/mk.dir tmp/%.o tmp/libmtx.a
++bin/%: bin/mk.dir src/%.c tmp/libmtx.so
+       @echo "Linking $@"
+-      @$(CC) $(LFLAGS) -o $@ tmp/$*.o tmp/libmtx.a
++      @$(CC) $(CFLAGS) $(LFLAGS) -o $@ src/$*.c -L tmp -lmtx
+ 
+ 
+ # 
------------------------------------------------------------------------------
+@@ -97,6 +99,12 @@
+       @rm -f $@
+       @ar r $@ $(LIB_OBJS:%=tmp/%.o)
+ 
++tmp/libmtx.so: $(LIB_OBJS:%=tmp/%.o)
++      @echo "Creating $@"
++      @rm -f $@
++      @$(CC) $(LFLAGS) -o $@ -shared \
++      -Wl,--soname=libmtx.so $^
++
+ 
+ # 
------------------------------------------------------------------------------
+ # Test suite
+@@ -108,11 +118,11 @@
+       c-os c-perm c-poly c-pseed c-quot c-random \
+       c-sets c-stf c-tensor
+ 
+-TS_OBJS=tmp/zzztest.o $(TS_OBJS1:%=tmp/%.o) tmp/libmtx.a
++TS_OBJS=tmp/zzztest.o $(TS_OBJS1:%=tmp/%.o)
+ 
+-bin/zzztest: bin/mk.dir $(TS_OBJS)
++bin/zzztest: bin/mk.dir $(TS_OBJS) tmp/libmtx.so
+       @echo "Linking $@"
+-      @$(CC) $(CFLAGS) -o $@ $(TS_OBJS)
++      @$(CC) $(CFLAGS) -o $@ $(TS_OBJS) -L tmp -lmtx
+ 
+ bin/checksum: bin/mk.dir tmp/checksum.o
+       @echo "Linking $@"
+@@ -126,12 +136,12 @@
+ check: tmp/zzztest.done $(TESTS:%=tmp/t-%.done)
+ 
+ tmp/zzztest.done: tmp/mk.dir bin/zzztest
+-      cd tmp && ../bin/zzztest
++      cd tmp && LD_LIBRARY_PATH=. ../bin/zzztest
+       touch $@
+ 
+ tmp/t-%.done: tmp/mk.dir test/t-% tmp/t.config bin/checksum build
+       @echo "t-$* `grep '^#:' test/t-$* | cut -c 3-100`"
+-      @cd tmp && ../test/t-$*
++      @cd tmp && LD_LIBRARY_PATH=. ../test/t-$*
+       @touch $@
+ 
+ tmp/t.config: tmp/mk.dir test/config

Reply via email to