summaryrefslogtreecommitdiff
path: root/sci-mathematics/snns
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-12-15 17:25:28 +0000
committerV3n3RiX <venerix@redcorelinux.org>2017-12-15 17:25:28 +0000
commit6b933047f46efec1aa747570f945344254227457 (patch)
treea12a4b87b38f954c4de435272cf4b90d721df5e8 /sci-mathematics/snns
parentf45955e60d4da9b7f4a1088c98042f9c06669039 (diff)
gentoo resync : 15.12.2017
Diffstat (limited to 'sci-mathematics/snns')
-rw-r--r--sci-mathematics/snns/Manifest10
-rw-r--r--sci-mathematics/snns/files/4.2-ldflags.patch8
-rw-r--r--sci-mathematics/snns/files/4.3-bison-version.patch4
-rw-r--r--sci-mathematics/snns/files/4.3-expand-path-strings.patch33
-rw-r--r--sci-mathematics/snns/snns-4.3-r3.ebuild124
5 files changed, 169 insertions, 10 deletions
diff --git a/sci-mathematics/snns/Manifest b/sci-mathematics/snns/Manifest
index 68b928ab6826..7071646bf37f 100644
--- a/sci-mathematics/snns/Manifest
+++ b/sci-mathematics/snns/Manifest
@@ -1,8 +1,10 @@
-AUX 4.2-ldflags.patch 1109 BLAKE2B 163f2632e5bf01e445f85c2e5b0c580aaf0529ac249ea28cca83b9fa796baca31400933b510616004d25bc3cb99fd0a199825d718411bdcc5fd7c006f2f40cd4 SHA512 274da0d037922c7bec246cb47a57cf63ca700345073ae0159d5636921a51370e02ed4dd18618e657477c513b2141c87a40c7082abe4fdaeb287ce42b33907033
-AUX 4.3-bison-version.patch 463 BLAKE2B d39b9b28a3b3483adc7f6edea23224b6434e068b33a58e9b6559b04708ac70f37a3ee920bb0fe9c7b79dc1fcfe004b343745cc3aa75116f79015440366e5e446 SHA512 5ad60b931e1bf79ccc023ca6fdde4ded155cf5d5d47216fec4811dc7689c95b0147dbc3210507c20ca59086f9d0e0df30b5c0a42daada549919c473176338344
+AUX 4.2-ldflags.patch 1117 BLAKE2B 1e2252e184abc36e48d9b147d5704d2f98406a4fbff74b5d42a52f3d68802c2236046681567a5b8c2aa621ebd5ffcd41b4023749e5f16c07376be467c39e2220 SHA512 d2157760e02e5a2a613babb9eca7e1aa61406175b90a2e0d57254dbc720deeb84efc63d8c43deb2031334a952528961640ea9ad9d5a3f9850820f9802f63c64e
+AUX 4.3-bison-version.patch 463 BLAKE2B e9835d820c0dd2cc82744c7f6bc7d3b156beddb69c7ac28a956e57322bf0fa44103e8dd527aa176530fb7eeec825480ba0113523148ef3bded1e432442b2ed60 SHA512 71d983df6634db7f045d30acae780bb810f84b09c6bfd9cb3a5894622f20c5cc6dc706bc1bfc9d7cfe6957473b4bf7dd8b568c0c9f96c70bd56918e2dacbf185
+AUX 4.3-expand-path-strings.patch 1140 BLAKE2B 21ed37be55093c0c7b6d3c7f26ee191bb5345cf2d17f73fcb59a2f02e4e09f1dcd27afd53b4b183dfd7142a81096ce88f7dce34bf7ae6906f724c07856f28a34 SHA512 d7c24ef57d31c31bc565dff0d1dc32ed39192cd9d3e5ea3d2af74431a7b8adc44235db9946523974820b7c1a9b4033ff3dcf3f2320e4c6a36dab992c80d2a1b9
AUX 4.3-snns-netperf.patch 4398 BLAKE2B 62a46bfc87a41911c591575d9f71df67c740856aaeb50026178d609abcb580a952f50338b103a6eacb4c12527f29dd3a8fb5bfc159b2f4af985c6be58ab338b0 SHA512 316c1121e7269adc142a0dd7b7dc9882605bc4c01cb5fa15e5b1d3de93ece31e4ff27894439e54fce6c174d763133bf7cd69b2142bfb3f030609e5e9ba5d41c1
AUX 4.3-unstrip.patch 260 BLAKE2B 31860a583d6ae1d39d360282dc50a6117972001e09773a28d36f0c0d0f991716c1078b4d3e31c795b0a97961f8ce681996a35d3735e9535377865d196de80d5b SHA512 9fb6826160850c4de977367a16ebfcd49667ee5bb5647a3a0441a32e58ce5e7649e25c03d4c43b71eab037ad13bdefe1668bedde691fc9883ed2e5e743856b16
-DIST SNNSv4.2.Manual.pdf 2103861 SHA256 ffed74a4d63f78b8bf8a400a18ce32c3e8d8b3e89682394cc6af122c097aba62 SHA512 204ff6cf31cdf6496042b7f1b6a1a446c4050c3d4d92ff046dc4970c4f8d3872f5d3430d2f41138e5e5b64a77348b95960eba53b2c305954b68dd0e483828016 WHIRLPOOL f21891640fd4428cf20e31766fd2cc304d003aba6e2277d2dc3f724747ab688621a90e4afecfa6a3c7cb799aee0fdc00574fc7c9eb102c55031767dea703a326
-DIST SNNSv4.3.tar.gz 5076669 SHA256 54bf92d23e9198f9030a3c3d2b741472e9b8660b27d3b419ade6393b1ebf6f62 SHA512 a057dc946b581eee01334956c33d6870b8b994d1b835834d58c37ae3a8585dfb1206f3082b17a49ee97b22f4c07c0efb47e4e3ae5aeb37e97f69472da3e21f0b WHIRLPOOL 29e1afc09a6e5ba7de5fc21d2a995f7f093e02e9f6125831ce29dfeaddd125241f440b362b97af5fe0933a21455b4002f606ecdce7b13f24046d20167bd5ad7d
+DIST SNNSv4.2.Manual.pdf 2103861 BLAKE2B 2eaafc53a1c6d298f8dd67d019c39ef1dec9a82cae699247235a963d1bbdc673931dabfe30240672044e7d8596d7d6bf69260682a1dad7b4849be26b0e6b7b19 SHA512 204ff6cf31cdf6496042b7f1b6a1a446c4050c3d4d92ff046dc4970c4f8d3872f5d3430d2f41138e5e5b64a77348b95960eba53b2c305954b68dd0e483828016
+DIST SNNSv4.3.tar.gz 5076669 BLAKE2B 177a6d6a03497cfb6980e6d2c2be27a38d683bdfa8132e257599a6867f150eed0f6dd66b5e43a79f812a83760ec0e40cd5879ba2d8a41e4446e289fd08b3ddc0 SHA512 a057dc946b581eee01334956c33d6870b8b994d1b835834d58c37ae3a8585dfb1206f3082b17a49ee97b22f4c07c0efb47e4e3ae5aeb37e97f69472da3e21f0b
EBUILD snns-4.3-r2.ebuild 2818 BLAKE2B ee1474f11d557ba47aa8799987fa49de0e963c8a3dcde4347a42a1c23e609b2ded13054d5a8b0e292ddf73451ae037a48aa1d91c532e3cdc6bc82d59751c51c7 SHA512 0cb8444ccbfa22458351e1ed5010f4a1335d42a78bfc44a58e64d414a09b139aba6f5f7d9a6471156a30fb42bc4dda6864da08e50786587382f0dd0539dfbf03
+EBUILD snns-4.3-r3.ebuild 2855 BLAKE2B 18b2e303e4ae3d2bebea2287aaa1e55804dc30b041cf3979522eae5f2d0cfac05aee6c4fc29d004339651387ffdf01ecf98a856f4e55bd9e5ccc9df168475745 SHA512 fc1faeb614e53e4c89e9e95bc3f05b6e289c5423dd74a1938fe300993537bb4efa2ae15b97057914cb104e9e68f13de0a79c368a084b1322912143d9365ab1a8
MISC metadata.xml 450 BLAKE2B 298ae57bd29e85e24d63fb428ebd6f35fb17acb84ba321e138f6bff7e326f8217c9b0b63c3700570afdd84b1633be1c4bc555b4798eaba885a504baacb179525 SHA512 99adeac1400d381b82d1d3ac3b94b8e00111c7354970937aa5bea8928fdfe15ed85304f073b14018b7396d0213f47c8309b3640570da59d7e5cfd065c395f30f
diff --git a/sci-mathematics/snns/files/4.2-ldflags.patch b/sci-mathematics/snns/files/4.2-ldflags.patch
index 752380d1d8f0..9ff4769731d1 100644
--- a/sci-mathematics/snns/files/4.2-ldflags.patch
+++ b/sci-mathematics/snns/files/4.2-ldflags.patch
@@ -2,8 +2,8 @@ Respect LDFLAGS
https://bugs.gentoo.org/show_bug.cgi?id=332475
---- tools/sources/Makefile
-+++ tools/sources/Makefile
+--- a/tools/sources/Makefile
++++ b/tools/sources/Makefile
@@ -147,19 +147,19 @@
# Linking of single stand alone programs
@@ -29,8 +29,8 @@ https://bugs.gentoo.org/show_bug.cgi?id=332475
# Make sure that kernel libs are available and up to date
---- xgui/sources/Makefile
-+++ xgui/sources/Makefile
+--- a/xgui/sources/Makefile
++++ b/xgui/sources/Makefile
@@ -202,7 +202,7 @@
# Linking of xgui
diff --git a/sci-mathematics/snns/files/4.3-bison-version.patch b/sci-mathematics/snns/files/4.3-bison-version.patch
index 73da70187254..ceb4b1e43c00 100644
--- a/sci-mathematics/snns/files/4.3-bison-version.patch
+++ b/sci-mathematics/snns/files/4.3-bison-version.patch
@@ -1,5 +1,5 @@
---- configure.old 2015-04-08 16:27:05.000000000 -0400
-+++ configure 2015-04-08 16:26:41.000000000 -0400
+--- a/configure 2015-04-08 16:27:05.000000000 -0400
++++ b/configure 2015-04-08 16:26:41.000000000 -0400
@@ -5071,7 +5071,7 @@
else
{ echo "$as_me:$LINENO: checking for version of bison" >&5
diff --git a/sci-mathematics/snns/files/4.3-expand-path-strings.patch b/sci-mathematics/snns/files/4.3-expand-path-strings.patch
new file mode 100644
index 000000000000..e62a3cfa6cd4
--- /dev/null
+++ b/sci-mathematics/snns/files/4.3-expand-path-strings.patch
@@ -0,0 +1,33 @@
+--- a/tools/sources/convert2snns.c 2008-04-21 03:56:07.000000000 -0400
++++ b/tools/sources/convert2snns.c 2017-12-14 11:13:12.056308969 -0500
+@@ -54,8 +54,8 @@
+ /* Init functionname */
+ #define KOHONEN_INIT_FUNC_NAME "Kohonen_Weights_v3.2"
+
+-char *control_file,pattern_file[80],weight_file[80],
+- string[80],name[50];
++char *control_file,pattern_file[256],weight_file[256],
++ string[256],name[256];
+ int no_of_exemplars,X,Y,
+ ret, i, j, unit_no,
+ IUnits, OUnits, HUnits;
+--- a/tools/sources/snns2c.c 2017-12-14 11:05:48.372487874 -0500
++++ b/tools/sources/snns2c.c 2017-12-14 11:11:08.484915822 -0500
+@@ -1622,7 +1622,7 @@
+ FILE *fOutFile, *fHeaderFile;
+ pList OutList, FunctionList;
+ time_t timer;
+- char HeaderFile[50];
++ char HeaderFile[256];
+
+ /* calculate time for the date in the header of the output file */
+ time(&timer);
+@@ -1824,7 +1824,7 @@
+ FILE *fOutFile, *fHeaderFile;
+ pList OutList, FunctionList;
+ time_t timer;
+- char HeaderFile[50];
++ char HeaderFile[256];
+
+ /* calculate time for the date in the header of the output file */
+ time(&timer);
diff --git a/sci-mathematics/snns/snns-4.3-r3.ebuild b/sci-mathematics/snns/snns-4.3-r3.ebuild
new file mode 100644
index 000000000000..416fa9499a5f
--- /dev/null
+++ b/sci-mathematics/snns/snns-4.3-r3.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 )
+DISTUTILS_OPTIONAL=1
+inherit distutils-r1
+
+MY_P="SNNSv${PV}"
+DESCRIPTION="Stuttgart Neural Network Simulator"
+HOMEPAGE="https://sourceforge.net/projects/snns/"
+SRC_URI="http://www.ra.cs.uni-tuebingen.de/downloads/SNNS/${MY_P}.tar.gz
+ doc? ( http://www.ra.cs.uni-tuebingen.de/downloads/SNNS/SNNSv4.2.Manual.pdf )"
+
+LICENSE="LGPL-2.1"
+KEYWORDS="~amd64 ~ppc ~x86"
+SLOT="0"
+IUSE="X doc python"
+
+RDEPEND="X? (
+ x11-libs/libX11
+ x11-libs/libXaw3d
+ x11-libs/libXt
+ )
+ python? ( ${PYTHON_DEPS} )"
+DEPEND="${RDEPEND}
+ X? ( x11-proto/xproto )
+ >=sys-devel/bison-1.2.2"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ eapply "${FILESDIR}"/4.3-unstrip.patch
+ eapply "${FILESDIR}"/4.3-bison-version.patch
+ eapply "${FILESDIR}"/4.2-ldflags.patch
+ eapply "${FILESDIR}"/4.3-snns-netperf.patch # bug 248322
+ eapply "${FILESDIR}"/4.3-expand-path-strings.patch
+
+ # change all references of Xaw to Xaw3d
+ cd "${S}"/xgui/sources
+ for file in *.c; do
+ sed -e "s:X11/Xaw/:X11/Xaw3d/:g" -i "${file}"
+ done
+
+ # clean up the dirty dist sources and remove files that apparently
+ # are not removed by any clean rules
+ emake clean
+ rm -Rf "${S}"/{tools,xgui}/bin \
+ "${S}"/{Makefile.def,config.h} \
+ "${S}"/configuration/config.{guess,log}
+
+ eapply_user
+
+ if use python; then
+ pushd "${S}"/python > /dev/null || die
+ distutils-r1_src_prepare
+ popd > /dev/null || die
+ fi
+}
+
+src_configure() {
+ econf --enable-global \
+ $(use_with X x)
+
+ if use python; then
+ pushd python > /dev/null || die
+ distutils-r1_src_configure
+ popd > /dev/null || die
+ fi
+}
+
+src_compile() {
+ local compileopts=( compile-kernel compile-tools )
+ use X && compileopts+=( compile-xgui )
+
+ # parallel make sometimes fails (phosphan)
+ # so emake each phase separately (axs)
+ for tgt in "${compileopts[@]}"; do
+ emake ${tgt}
+ done
+
+ if use python; then
+ pushd python > /dev/null || die
+ distutils-r1_src_compile
+ popd > /dev/null || die
+ fi
+}
+
+src_install() {
+ pushd "${S}"/tools/sources > /dev/null || die
+ emake TOOLSBINDIR="${ED}"usr/bin install
+ popd > /dev/null || die
+
+ if use X; then
+ newbin xgui/sources/xgui snns
+
+ echo XGUILOADPATH=/usr/share/doc/${PF} > "${T}"/99snns
+ doenvd "${T}"/99snns
+
+ docompress -x /usr/share/doc/${PF}/{default.cfg,help.hdoc}
+ insinto /usr/share/doc/${PF}
+ doins default.cfg help.hdoc
+ fi
+
+ if use python; then
+ pushd python > /dev/null || die
+ distutils-r1_src_install
+ insinto /usr/share/doc/${PF}/python-examples
+ doins examples/*
+ newdoc README README.python
+ popd > /dev/null || die
+ fi
+
+ if use doc; then
+ insinto /usr/share/doc/${PF}
+ doins "${DISTDIR}"/${MY_P}.Manual.pdf
+ fi
+
+ insinto /usr/share/doc/${PF}/examples
+ doins examples/*
+ doman man/man*/*
+}