1 |
commit: 7e16916abe0c4b15d60294230a6eb36e9c5e6adf |
2 |
Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com> |
3 |
AuthorDate: Fri Jul 16 09:38:27 2021 +0000 |
4 |
Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jul 18 21:46:19 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=7e16916a |
7 |
|
8 |
sys-cluster/synapse: initial import |
9 |
|
10 |
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com> |
11 |
|
12 |
sys-cluster/synapse/Manifest | 1 + |
13 |
.../files/synapse-check-for-shared-mrnet.patch | 11 ++++++ |
14 |
.../files/synapse-fix-example-installation.patch | 22 +++++++++++ |
15 |
.../synapse/files/synapse-respect-destdir.patch | 15 ++++++++ |
16 |
sys-cluster/synapse/metadata.xml | 17 +++++++++ |
17 |
sys-cluster/synapse/synapse-2.0.1.ebuild | 43 ++++++++++++++++++++++ |
18 |
6 files changed, 109 insertions(+) |
19 |
|
20 |
diff --git a/sys-cluster/synapse/Manifest b/sys-cluster/synapse/Manifest |
21 |
new file mode 100644 |
22 |
index 000000000..7de754aed |
23 |
--- /dev/null |
24 |
+++ b/sys-cluster/synapse/Manifest |
25 |
@@ -0,0 +1 @@ |
26 |
+DIST synapse-2.0.1.tar.gz 268657 BLAKE2B 19491c1b6c4c60318093d994594b1ebb541a4b1ca1fb9128a2361b06b1a58921a0bc41f8e43abcb62f379c97db6603c62cf1622c7caf6d3f5ee1b84e0f80963d SHA512 c08762f065275232f419cca181acc0e40a913724e1182def9a810ed9b45c1e9f2ddd8dddf0a2623576ad527585b2ecb60842d9fc8f5f0f680c2b391ba4ee1dea |
27 |
|
28 |
diff --git a/sys-cluster/synapse/files/synapse-check-for-shared-mrnet.patch b/sys-cluster/synapse/files/synapse-check-for-shared-mrnet.patch |
29 |
new file mode 100644 |
30 |
index 000000000..c0413f60b |
31 |
--- /dev/null |
32 |
+++ b/sys-cluster/synapse/files/synapse-check-for-shared-mrnet.patch |
33 |
@@ -0,0 +1,11 @@ |
34 |
+--- a/config/macros.m4 |
35 |
++++ b/config/macros.m4 |
36 |
+@@ -327,7 +327,7 @@ |
37 |
+ dnl Check for libraries. |
38 |
+ AC_MSG_CHECKING([for libmrnet and libxplat]) |
39 |
+ |
40 |
+- if test -f ${MRNET_LIBSDIR}/libmrnet.a -a -f ${MRNET_LIBSDIR}/libxplat.a ; then |
41 |
++ if test -f ${MRNET_LIBSDIR}/libmrnet.so -a -f ${MRNET_LIBSDIR}/libxplat.so ; then |
42 |
+ MRNET_LIBS="-lmrnet -lxplat -lpthread -ldl" |
43 |
+ MRNET_LIGHT_LIBS="-lmrnet_lightweight -lxplat_lightweight -lpthread -ldl" |
44 |
+ AC_SUBST(MRNET_LIBS) |
45 |
|
46 |
diff --git a/sys-cluster/synapse/files/synapse-fix-example-installation.patch b/sys-cluster/synapse/files/synapse-fix-example-installation.patch |
47 |
new file mode 100644 |
48 |
index 000000000..f989b7394 |
49 |
--- /dev/null |
50 |
+++ b/sys-cluster/synapse/files/synapse-fix-example-installation.patch |
51 |
@@ -0,0 +1,22 @@ |
52 |
+--- a/test/Makefile.am |
53 |
++++ b/test/Makefile.am |
54 |
+@@ -14,13 +14,9 @@ |
55 |
+ test_BE_LDFLAGS = -L${top_srcdir}/src -lsynapse_backend -L@MRNET_LIBSDIR@ @MRNET_LIBS@ |
56 |
+ |
57 |
+ install-data-hook: |
58 |
+- mkdir -p ${prefix}/example |
59 |
+- cp ${test_FE_SOURCES} ${test_BE_SOURCES} ${prefix}/example |
60 |
+- cp Makefile-example ${prefix}/example/Makefile |
61 |
+- cp run-example ${prefix}/example/run.sh |
62 |
+- cp topology_1x4.txt ${prefix}/example |
63 |
+- chmod u+x ${prefix}/example/run.sh |
64 |
+- $(top_srcdir)/substitute $(SED) "@sub_SYNAPSE_HOME@" "${prefix}" ${prefix}/example/Makefile |
65 |
+- $(top_srcdir)/substitute $(SED) "@sub_SYNAPSE_HOME@" "${prefix}" ${prefix}/example/run.sh |
66 |
+- |
67 |
+- |
68 |
++ mkdir -p ${DESTDIR}/${prefix}/libexec/synapse/example |
69 |
++ cp ${noinst_PROGRAMS} ${DESTDIR}/${prefix}/libexec/synapse/example |
70 |
++ cp run-example ${DESTDIR}/${prefix}/libexec/synapse/example/run.sh |
71 |
++ cp topology_1x4.txt ${DESTDIR}/${prefix}/libexec/synapse/example |
72 |
++ chmod u+x ${DESTDIR}/${prefix}/libexec/synapse/example/run.sh |
73 |
++ $(top_srcdir)/substitute $(SED) "@sub_SYNAPSE_HOME@" "${prefix}" ${DESTDIR}/${prefix}/libexec/synapse/example/run.sh |
74 |
|
75 |
diff --git a/sys-cluster/synapse/files/synapse-respect-destdir.patch b/sys-cluster/synapse/files/synapse-respect-destdir.patch |
76 |
new file mode 100644 |
77 |
index 000000000..31496f62e |
78 |
--- /dev/null |
79 |
+++ b/sys-cluster/synapse/files/synapse-respect-destdir.patch |
80 |
@@ -0,0 +1,15 @@ |
81 |
+--- a/scripts/Makefile.am |
82 |
++++ b/scripts/Makefile.am |
83 |
+@@ -37,9 +37,9 @@ |
84 |
+ $(top_srcdir)/substitute $(SED) "@sub_MRNET_HOME@" "@MRNET_HOME@" $@ |
85 |
+ |
86 |
+ install-data-hook: |
87 |
+- chmod u+x ${bindir}/$(SYNAPSE_CONFIG) |
88 |
+- $(MKDIR_P) $(prefix)/etc |
89 |
+- cp $(SOURCEME_SH) $(prefix)/etc |
90 |
++ chmod u+x ${DESTDIR}${bindir}/$(SYNAPSE_CONFIG) |
91 |
++ $(MKDIR_P) ${DESTDIR}/etc |
92 |
++ cp $(SOURCEME_SH) ${DESTDIR}/etc |
93 |
+ |
94 |
+ clean-local: |
95 |
+ rm -f $(SYNAPSE_CONFIG) $(SOURCEME_SH) $(MRNRUN) |
96 |
|
97 |
diff --git a/sys-cluster/synapse/metadata.xml b/sys-cluster/synapse/metadata.xml |
98 |
new file mode 100644 |
99 |
index 000000000..d67e3064c |
100 |
--- /dev/null |
101 |
+++ b/sys-cluster/synapse/metadata.xml |
102 |
@@ -0,0 +1,17 @@ |
103 |
+<?xml version="1.0" encoding="UTF-8"?> |
104 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
105 |
+<pkgmetadata> |
106 |
+ <maintainer type="person"> |
107 |
+ <email>lssndrbarbieri@×××××.com</email> |
108 |
+ <name>Alessandro Barbieri</name> |
109 |
+ </maintainer> |
110 |
+ <use> |
111 |
+ <flag name="libi">Use libi as tree instantiation method instead of ssh</flag> |
112 |
+ <flag name="threadsafe">Build threasafe version of lightweight MRNet and XPlat libraries</flag> |
113 |
+ <flag name="slurm">Use slurm as libi tree instantiation method instead of ssh</flag> |
114 |
+ </use> |
115 |
+ <upstream> |
116 |
+ <bugs-to>https://github.com/bsc-performance-tools/synapse/issues</bugs-to> |
117 |
+ <remote-id type="github">bsc-performance-tools/synapse</remote-id> |
118 |
+ </upstream> |
119 |
+</pkgmetadata> |
120 |
|
121 |
diff --git a/sys-cluster/synapse/synapse-2.0.1.ebuild b/sys-cluster/synapse/synapse-2.0.1.ebuild |
122 |
new file mode 100644 |
123 |
index 000000000..df1e7566c |
124 |
--- /dev/null |
125 |
+++ b/sys-cluster/synapse/synapse-2.0.1.ebuild |
126 |
@@ -0,0 +1,43 @@ |
127 |
+# Copyright 2019-2021 Gentoo Authors |
128 |
+# Distributed under the terms of the GNU General Public License v2 |
129 |
+ |
130 |
+EAPI=8 |
131 |
+ |
132 |
+DESCRIPTION="synapse" |
133 |
+HOMEPAGE="https://github.com/bsc-performance-tools/synapse" |
134 |
+SRC_URI="https://github.com/bsc-performance-tools/synapse/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" |
135 |
+ |
136 |
+LICENSE="GPL-2" |
137 |
+SLOT="0" |
138 |
+KEYWORDS="~amd64" |
139 |
+ |
140 |
+RDEPEND=" |
141 |
+ dev-libs/boost:= |
142 |
+ sys-cluster/mrnet |
143 |
+" |
144 |
+DEPEND="${RDEPEND}" |
145 |
+ |
146 |
+PATCHES=( |
147 |
+ "${FILESDIR}/${PN}-check-for-shared-mrnet.patch" |
148 |
+ "${FILESDIR}/${PN}-respect-destdir.patch" |
149 |
+ "${FILESDIR}/${PN}-fix-example-installation.patch" |
150 |
+) |
151 |
+ |
152 |
+src_prepare() { |
153 |
+ sed -e "s|\${prefix}/doc|\${DESTDIR}\${prefix}/share/${PF}/doc|g" -i doc/Makefile.am || die |
154 |
+ default |
155 |
+ ./bootstrap || die |
156 |
+} |
157 |
+ |
158 |
+src_configure() { |
159 |
+ local myconf=( |
160 |
+ --with-mrnet="${EPREFIX}/usr" |
161 |
+ ) |
162 |
+ econf "${myconf[@]}" |
163 |
+} |
164 |
+ |
165 |
+src_install() { |
166 |
+ MAKEOPTS="-j1" DESTDIR="${D}" emake install |
167 |
+ find "${ED}" -name '*.a' -delete || die |
168 |
+ find "${ED}" -name '*.a' -delete || die |
169 |
+} |