primesieve: Update and fix test

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
This commit is contained in:
Timothy Gu 2014-09-18 19:40:18 -07:00
parent 8c596c09d7
commit 7cb9753e49
1 changed files with 9 additions and 7 deletions

View File

@ -3,25 +3,27 @@
PKG := primesieve
$(PKG)_IGNORE :=
$(PKG)_VERSION := 5.3
$(PKG)_CHECKSUM := dac89a72cc3789035149a7d2cfa48ef7d722fd8a
$(PKG)_VERSION := 5.4
$(PKG)_CHECKSUM := 1309e444bde3822cdc3e953757b46750d384cc00
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz
$(PKG)_URL := http://dl.bintray.com/kimwalisch/$(PKG)/$($(PKG)_FILE)
$(PKG)_DEPS := gcc
$(PKG)_DEPS := gcc libgomp
define $(PKG)_UPDATE
$(WGET) -q -O- 'http://dl.bintray.com/kimwalisch/primesieve/' | \
$(WGET) -q -O- 'http://primesieve.org/downloads/' | \
$(SED) -n 's,.*primesieve-\([0-9][^>]*\)\.tar.*,\1,p' | \
tail -1
grep -v '\(linux\|mac\|win\)' | \
$(SORT) -Vr | \
head -1
endef
define $(PKG)_BUILD
cd '$(1)' && ./configure \
$(MXE_CONFIGURE_OPTS)
$(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= html_DATA=
$(MAKE) -C '$(1)' -j '$(JOBS)' install $(MXE_DISABLE_CRUFT)
$(TARGET)-g++ -s -std=c++0x -o '$(1)/examples/test-primesieve.exe' \
$(TARGET)-g++ -s -std=c++0x -fopenmp -o '$(1)/examples/test-primesieve.exe' \
'$(1)/examples/count_primes.cpp' \
'-lprimesieve'
$(INSTALL) -m755 '$(1)/examples/test-primesieve.exe' '$(PREFIX)/$(TARGET)/bin/'