public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/sci:master commit in: sci-mathematics/ripser/files/, sci-mathematics/ripser/
@ 2020-09-22 14:33 Aisha Tammy
  0 siblings, 0 replies; only message in thread
From: Aisha Tammy @ 2020-09-22 14:33 UTC (permalink / raw
  To: gentoo-commits

commit:     221ac1978b41330a43e2f208e6cf5dd798a04357
Author:     Aisha Tammy <gentoo <AT> aisha <DOT> cc>
AuthorDate: Tue Sep 22 14:32:32 2020 +0000
Commit:     Aisha Tammy <gentoo <AT> aisha <DOT> cc>
CommitDate: Tue Sep 22 14:33:22 2020 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=221ac197

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 <AT> aisha.cc>

 sci-mathematics/ripser/files/ripser-Makefile.patch | 50 ++++++++++++++++++++++
 sci-mathematics/ripser/metadata.xml                | 16 +++++++
 sci-mathematics/ripser/ripser-1.1.ebuild           | 29 +++++++++++++
 3 files changed, 95 insertions(+)

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
+}


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-09-22 14:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-22 14:33 [gentoo-commits] proj/sci:master commit in: sci-mathematics/ripser/files/, sci-mathematics/ripser/ Aisha Tammy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox