1
0
mirror of https://github.com/moparisthebest/arch-ppa synced 2024-11-21 16:25:00 -05:00

Add mprime

This commit is contained in:
Travis Burtrum 2018-02-28 19:12:36 -05:00
parent a1b62586aa
commit 12f0347427
2 changed files with 65 additions and 0 deletions

41
src/mprime/PKGBUILD Normal file
View File

@ -0,0 +1,41 @@
# Maintainer: graysky <graysky AT archlinux DOT us>
# Contributer: xyne <xyne AT archlinux DOT ca>
# Contributer: TryA - https://bbs.archlinux.org/viewtopic.php?id=114996
pkgname=mprime
pkgver=294b7
pkgrel=1
pkgdesc="A GIMPS, distributed computing project client, dedicated to finding Mersenne primes."
arch=('x86_64')
url="http://www.mersenne.org"
license=('custom')
depends=('curl' 'hwloc')
conflicts=('mprime-bin')
source=("http://www.mersenne.org/ftp_root/gimps/p95v${pkgver}.source.zip"
unfuck_makefile.patch)
sha256sums=('15682e9587af2b86647de9786f97dc8c5d7a4a679a0440f7d1d1936a48c5aa45'
'c94417f35f988e32693f9002792cbf21da85c2345670cb377066c9b799341528')
prepare () {
patch -Np1 -i unfuck_makefile.patch
}
build() {
cd "$srcdir/gwnum"
make -f make64
cd "$srcdir/linux64"
make
}
package() {
install -Dm755 linux64/mprime "$pkgdir/usr/bin/mprime"
# license and documentation
# x86_64 tarball for 279 includes none of these
#install -Dm644 license.txt "$pkgdir/usr/share/licenses/$pkgname/license.txt"
#install -Dm644 readme.txt "$pkgdir/usr/share/doc/$pkgname/readme.txt"
#install -Dm644 stress.txt "$pkgdir/usr/share/doc/$pkgname/stress.txt"
#install -Dm644 undoc.txt "$pkgdir/usr/share/doc/$pkgname/undoc.txt"
#install -Dm644 whatsnew.txt "$pkgdir/usr/share/doc/$pkgname/whatsnew.txt"
}

View File

@ -0,0 +1,24 @@
diff --git a/linux64/makefile b/linux64/makefile
index 329cb51..88acbc6 100644
--- a/linux64/makefile
+++ b/linux64/makefile
@@ -20,15 +20,15 @@
# LFLAGS = -Wl,-M
# LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -Wl,-Bstatic $(shell pkg-config --static --libs libhwloc) -Wl,-Bstatic $(shell pkg-config --static --libs libcurl) -lstdc++ -Wl,-Bdynamic -ldl
+MPRIME_FLAGS=-I.. -I../gwnum -DX86_64 -march=x86-64 -O2 -Wno-unused-result
CC = gcc
-CFLAGS = -I.. -I../gwnum -I/usr/local/include -DX86_64 -O2
+CFLAGS = ${MPRIME_FLAGS}
CPP = g++
-CPPFLAGS = -I.. -I../gwnum -DX86_64 -O2
+CPPFLAGS = ${MPRIME_FLAGS}
LFLAGS = -Wl,-M -Wl,-L/usr/local/lib
-#LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -Wl,-Bstatic -lhwloc -Wl,-Bstatic -lcurl -Wl,-Bdynamic -lrt -lstdc++ -lz -lxml2 -ldl -lgmp
-LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -Wl,-Bstatic -lhwloc -Wl,-Bstatic -lcurl -Wl,-Bdynamic -lrt -lstdc++ -ldl -lgmp
+LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread $(shell pkg-config --libs libcurl) -lstdc++ $(shell pkg-config --static --libs hwloc) -lgmp
FACTOROBJ = factor64.o
LINUXOBJS = prime.o menu.o