aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAisha Tammy <gentoo@aisha.cc>2020-09-22 10:32:32 -0400
committerAisha Tammy <gentoo@aisha.cc>2020-09-22 10:33:22 -0400
commit221ac1978b41330a43e2f208e6cf5dd798a04357 (patch)
tree70761a441bb817e5a55c35ab028b14833682bf92
parentsci-visualization/forge: drop old version (diff)
downloadsci-221ac1978b41330a43e2f208e6cf5dd798a04357.tar.gz
sci-221ac1978b41330a43e2f208e6cf5dd798a04357.tar.bz2
sci-221ac1978b41330a43e2f208e6cf5dd798a04357.zip
sci-mathematics/ripser: fast persistent homology
Closes: https://github.com/gentoo/sci/pull/956 Package-Manager: Portage-3.0.7, Repoman-3.0.1 Signed-off-by: Aisha Tammy <gentoo@aisha.cc>
-rw-r--r--sci-mathematics/ripser/Manifest1
-rw-r--r--sci-mathematics/ripser/files/ripser-Makefile.patch50
-rw-r--r--sci-mathematics/ripser/metadata.xml16
-rw-r--r--sci-mathematics/ripser/ripser-1.1.ebuild29
4 files changed, 96 insertions, 0 deletions
diff --git a/sci-mathematics/ripser/Manifest b/sci-mathematics/ripser/Manifest
new file mode 100644
index 000000000..5b2d33259
--- /dev/null
+++ b/sci-mathematics/ripser/Manifest
@@ -0,0 +1 @@
+DIST ripser-1.1.tar.gz 3253697 BLAKE2B 8c1fccfabfd1db22e386b14707d1e078281921f6c353ce406bb35d37a8453a0e93e7423d8a52ee61d15a62d65708f070614a4ba4d3e13bc45f5d8aeb22d78997 SHA512 22bbce287abbf3cf5594e6dd1d5b754ea4707d21a9711ed9646a6c06715861ff0c79bb6090be5031c8e093ac586d9c3110e6aba84c5fabeefb165d4bc729705c
diff --git a/sci-mathematics/ripser/files/ripser-Makefile.patch b/sci-mathematics/ripser/files/ripser-Makefile.patch
new file mode 100644
index 000000000..bea35a39e
--- /dev/null
+++ b/sci-mathematics/ripser/files/ripser-Makefile.patch
@@ -0,0 +1,50 @@
+diff --git a/Makefile b/Makefile
+index ab410bd..cb0a1c1 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,18 +1,37 @@
+-build: ripser
++TARGET = ripser
+
++DESTDIR ?=
+
+-all: ripser ripser-coeff ripser-debug
++prefix ?= /usr/local
++exec_prefix ?= $(prefix)
++bindir ?= $(exec_prefix)/bin
+
++CFLAGS += -std=c++11 -Wall -Wextra -Wpedantic -Wstrict-overflow
++
++ifeq ($(INDICATE_PROGRESS),1)
++ CFLAGS += -D INDICATE_PROGRESS
++endif
++
++ifeq ($(USE_GOOGLE_HASHMAP),1)
++ CFLAGS += -D USE_GOOGLE_HASHMAP
++endif
++
++ifeq ($(NDEBUG),1)
++ CFLAGS += -D NDEBUG
++endif
++
++build: all
++
++all: ripser ripser-coeff
+
+ ripser: ripser.cpp
+- c++ -std=c++11 -Wall ripser.cpp -o ripser -Ofast -D NDEBUG
++ $(CXX) $(CFLAGS) $(CXXFLAGS) ripser.cpp -o ripser
+
+ ripser-coeff: ripser.cpp
+- c++ -std=c++11 -Wall ripser.cpp -o ripser-coeff -Ofast -D NDEBUG -D USE_COEFFICIENTS
+-
+-ripser-debug: ripser.cpp
+- c++ -std=c++11 -Wall ripser.cpp -o ripser-debug -g
++ $(CXX) $(CFLAGS) $(CXXFLAGS) -D USE_COEFFICIENTS ripser.cpp -o ripser-coeff
+
++install: all
++ install -m 755 ripser ripser-coeff $(bindir)
+
+ clean:
+- rm -f ripser ripser-coeff ripser-debug
++ rm -f ripser ripser-coeff
diff --git a/sci-mathematics/ripser/metadata.xml b/sci-mathematics/ripser/metadata.xml
new file mode 100644
index 000000000..49165d3bd
--- /dev/null
+++ b/sci-mathematics/ripser/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>gentoo@aisha.cc</email>
+ <name>Aisha Tammy</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <use>
+ <flag name="progress">print progress of calculations in console</flag>
+ <flag name="sparsehash">use google sparsehash for storage</flag>
+ </use>
+</pkgmetadata>
diff --git a/sci-mathematics/ripser/ripser-1.1.ebuild b/sci-mathematics/ripser/ripser-1.1.ebuild
new file mode 100644
index 000000000..0b227a955
--- /dev/null
+++ b/sci-mathematics/ripser/ripser-1.1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 2019-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="efficient computation of vietoris-rips persistence barcodes"
+HOMEPAGE="https://ripser.org"
+SRC_URI="https://github.com/Ripser/ripser/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+KEYWORDS="~amd64"
+
+LICENSE="MIT"
+SLOT="0"
+IUSE="debug progress sparsehash"
+
+BDEPEND="
+ sparsehash? ( dev-cpp/sparsehash )
+"
+
+PATCHES=(
+ "${FILESDIR}/ripser-Makefile.patch"
+)
+
+src_compile() {
+ emake USE_GOOGLE_HASHMAP=$(usex sparsehash 1 0) \
+ INDICATE_PROGRESS=$(usex progress 1 0) \
+ NDEBUG=$(usex debug 0 1)\
+ all
+}