From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- sci-mathematics/snns/Manifest | 10 ++ sci-mathematics/snns/files/4.2-ldflags.patch | 42 ++++++ sci-mathematics/snns/files/4.3-bison-version.patch | 11 ++ sci-mathematics/snns/files/4.3-snns-netperf.patch | 164 +++++++++++++++++++++ sci-mathematics/snns/files/4.3-unstrip.patch | 11 ++ sci-mathematics/snns/metadata.xml | 15 ++ sci-mathematics/snns/snns-4.3-r2.ebuild | 123 ++++++++++++++++ 7 files changed, 376 insertions(+) create mode 100644 sci-mathematics/snns/Manifest create mode 100644 sci-mathematics/snns/files/4.2-ldflags.patch create mode 100644 sci-mathematics/snns/files/4.3-bison-version.patch create mode 100644 sci-mathematics/snns/files/4.3-snns-netperf.patch create mode 100644 sci-mathematics/snns/files/4.3-unstrip.patch create mode 100644 sci-mathematics/snns/metadata.xml create mode 100644 sci-mathematics/snns/snns-4.3-r2.ebuild (limited to 'sci-mathematics/snns') diff --git a/sci-mathematics/snns/Manifest b/sci-mathematics/snns/Manifest new file mode 100644 index 000000000000..193f557a0515 --- /dev/null +++ b/sci-mathematics/snns/Manifest @@ -0,0 +1,10 @@ +AUX 4.2-ldflags.patch 1109 SHA256 5cebf78bf106ae055bb556004dc285b5ae5362e9a1f4eea296c666be6014265b SHA512 274da0d037922c7bec246cb47a57cf63ca700345073ae0159d5636921a51370e02ed4dd18618e657477c513b2141c87a40c7082abe4fdaeb287ce42b33907033 WHIRLPOOL e206c3e530a17b0548bcb30855691f433e4802cbe1a8e2a2a793c4337281fc3d063485039771091bd1580882819edb075669398a0365ab36ec54f94cf5317e75 +AUX 4.3-bison-version.patch 463 SHA256 db71246207e413f56fbc1e673b61f09a0310d6e1e8a40eb2688da87c772c8e6b SHA512 5ad60b931e1bf79ccc023ca6fdde4ded155cf5d5d47216fec4811dc7689c95b0147dbc3210507c20ca59086f9d0e0df30b5c0a42daada549919c473176338344 WHIRLPOOL bdf02e266680efb9ec690ca19b87583b9fc8217369ace023a0a630dfefbcf7554ab9448dc807e8ce7b83bd1e3f2ade17b2e6d369c041d3ceb33848a6e7e97ae9 +AUX 4.3-snns-netperf.patch 4398 SHA256 76a022ba90dc69b1b78a0c4824c9b5a41709e9152abe5813d38a2d555863da7a SHA512 316c1121e7269adc142a0dd7b7dc9882605bc4c01cb5fa15e5b1d3de93ece31e4ff27894439e54fce6c174d763133bf7cd69b2142bfb3f030609e5e9ba5d41c1 WHIRLPOOL 93bc9758bbd87f5fb2fc284f25c2dbee8386e5be5923fb96d64372b0cfc10d2a3a450ad396495c037d1ae726566dfb93ebb0927837c69b9b56daf058f8547a03 +AUX 4.3-unstrip.patch 260 SHA256 4efb6e5fcbb130eb850bc5d0c837db6b37e78466068cf2c472082d8dd8f334d9 SHA512 9fb6826160850c4de977367a16ebfcd49667ee5bb5647a3a0441a32e58ce5e7649e25c03d4c43b71eab037ad13bdefe1668bedde691fc9883ed2e5e743856b16 WHIRLPOOL 462ad2fc58d837b92a6fafe9d7c8a34e539ae39a3074396ae0665dc6b3be846df5b6fc62a0fb95186cd0f84f715b8e76189a62e3aca47bf2ab490391caaf31a7 +DIST SNNSv4.2.Manual.pdf 2103861 SHA256 ffed74a4d63f78b8bf8a400a18ce32c3e8d8b3e89682394cc6af122c097aba62 SHA512 204ff6cf31cdf6496042b7f1b6a1a446c4050c3d4d92ff046dc4970c4f8d3872f5d3430d2f41138e5e5b64a77348b95960eba53b2c305954b68dd0e483828016 WHIRLPOOL f21891640fd4428cf20e31766fd2cc304d003aba6e2277d2dc3f724747ab688621a90e4afecfa6a3c7cb799aee0fdc00574fc7c9eb102c55031767dea703a326 +DIST SNNSv4.3.tar.gz 5076669 SHA256 54bf92d23e9198f9030a3c3d2b741472e9b8660b27d3b419ade6393b1ebf6f62 SHA512 a057dc946b581eee01334956c33d6870b8b994d1b835834d58c37ae3a8585dfb1206f3082b17a49ee97b22f4c07c0efb47e4e3ae5aeb37e97f69472da3e21f0b WHIRLPOOL 29e1afc09a6e5ba7de5fc21d2a995f7f093e02e9f6125831ce29dfeaddd125241f440b362b97af5fe0933a21455b4002f606ecdce7b13f24046d20167bd5ad7d +EBUILD snns-4.3-r2.ebuild 2818 SHA256 a71824f8a76c511a09f546e2213e9a30bf0f59b6354195e6cc8ed9e5a65bdc07 SHA512 0cb8444ccbfa22458351e1ed5010f4a1335d42a78bfc44a58e64d414a09b139aba6f5f7d9a6471156a30fb42bc4dda6864da08e50786587382f0dd0539dfbf03 WHIRLPOOL 0b9c3860c532fffd3847cf29b77b823647bb5e5b0cc0fc1ee01478edbe759314f1ce3c73db7e1aa313eb7df85b5ad9ab0ac882fc72dcb2fee4f64c85e420830c +MISC ChangeLog 3692 SHA256 e5f69af5c9ea181143659b8f291333da481d135547c4ffc1f94411d5aaab40e5 SHA512 743fdf6a21a363f3d2784c7c8251da849de5f1415f53b886d69058fd6a42f36d63d0820e936f7d4a22ce3c272adfa89335c2dccc8766576a8d6997c9f9dcde25 WHIRLPOOL a48f484feca399e661ee8a0955e759cb0d4ea20e3a98a455e761247474aa0cfe3415e457f615a6bf26ab773251433cfb4cd52771fc66baa80b557918968bac3e +MISC ChangeLog-2015 6497 SHA256 7fae9e1502614d953eecda1505207d4b0ee076dc2ec956dcd9a1d3bfcf25815b SHA512 50bf8afa509f15e3cff6b3b3606ab98ecbd04bc7f65259e46e8c4d89f41874502eb6cb51b5c132b9fa9a9c7dbd10ccd2e175457f707d0ae8d32f99826989cde2 WHIRLPOOL a9c90a71c4dc3bed32d8279976b49f21ab777b24f384872e9a82a0f2b2ccbd61544d767fdd8b672f4476a1e071e9b9a02227db7e079099b83eee226251adfd9a +MISC metadata.xml 450 SHA256 49716db8046aa170a2f72ed14bec1f73335c602bdf2f65c2c88a7c7ed07d7023 SHA512 99adeac1400d381b82d1d3ac3b94b8e00111c7354970937aa5bea8928fdfe15ed85304f073b14018b7396d0213f47c8309b3640570da59d7e5cfd065c395f30f WHIRLPOOL 719ab707add29b757522bfe938724d845bd34c275fa9ea5bb9069845c094bd1df998b02a18f37ae62a2b515728c8be1c426640096304593f0a13e7453ddad1ec diff --git a/sci-mathematics/snns/files/4.2-ldflags.patch b/sci-mathematics/snns/files/4.2-ldflags.patch new file mode 100644 index 000000000000..752380d1d8f0 --- /dev/null +++ b/sci-mathematics/snns/files/4.2-ldflags.patch @@ -0,0 +1,42 @@ +Respect LDFLAGS + +https://bugs.gentoo.org/show_bug.cgi?id=332475 + +--- tools/sources/Makefile ++++ tools/sources/Makefile +@@ -147,19 +147,19 @@ + # Linking of single stand alone programs + + analyze: analyze.o +- $(CC) analyze.o -lm -o analyze ++ $(CC) $(LDFLAGS) analyze.o -lm -o analyze + + pat_sel_simple: pat_sel_simple.o +- $(CC) pat_sel_simple.o -lm -o pat_sel_simple ++ $(CC) $(LDFLAGS) pat_sel_simple.o -lm -o pat_sel_simple + + mkhead: mkhead.o +- $(CC) mkhead.o -lm -o mkhead ++ $(CC) $(LDFLAGS) mkhead.o -lm -o mkhead + + mkout: mkout.o +- $(CC) mkout.o -lm -o mkout ++ $(CC) $(LDFLAGS) mkout.o -lm -o mkout + + mkpat: mkpat.o +- $(CC) mkpat.o -lm -o mkpat ++ $(CC) $(LDFLAGS) mkpat.o -lm -o mkpat + + + # Make sure that kernel libs are available and up to date +--- xgui/sources/Makefile ++++ xgui/sources/Makefile +@@ -202,7 +202,7 @@ + # Linking of xgui + + xgui: $(LIBXGUI1) $(LIBXGUI2) $(BN3DLIB) $(KERNELLIBS) +- $(CC) $(LIBXGUI1) $(LIBXGUI2) $(BN3DLIB) \ ++ $(CC) $(LDFLAGS) $(LIBXGUI1) $(LIBXGUI2) $(BN3DLIB) \ + $(X_LIBS) -lXaw3d -lXmu -lXt -lXext $(X_PRE_LIBS) -lX11 $(X_EXTRA_LIBS) \ + $(KERNELALLLIBS) -o xgui + diff --git a/sci-mathematics/snns/files/4.3-bison-version.patch b/sci-mathematics/snns/files/4.3-bison-version.patch new file mode 100644 index 000000000000..73da70187254 --- /dev/null +++ b/sci-mathematics/snns/files/4.3-bison-version.patch @@ -0,0 +1,11 @@ +--- configure.old 2015-04-08 16:27:05.000000000 -0400 ++++ configure 2015-04-08 16:26:41.000000000 -0400 +@@ -5071,7 +5071,7 @@ + else + { echo "$as_me:$LINENO: checking for version of bison" >&5 + echo $ECHO_N "checking for version of bison... $ECHO_C" >&6; } +- bison_version=`$BISON --version` ++ bison_version=`$BISON --version |head -n 1` + { echo "$as_me:$LINENO: result: $bison_version" >&5 + echo "${ECHO_T}$bison_version" >&6; } + warn_bison=yes diff --git a/sci-mathematics/snns/files/4.3-snns-netperf.patch b/sci-mathematics/snns/files/4.3-snns-netperf.patch new file mode 100644 index 000000000000..f154a538b2d9 --- /dev/null +++ b/sci-mathematics/snns/files/4.3-snns-netperf.patch @@ -0,0 +1,164 @@ +--- a/examples/nettalk.README 2008-04-21 03:55:43.000000000 -0400 ++++ b/examples/nettalk.README 2015-04-14 09:38:23.836014999 -0400 +@@ -60,7 +60,7 @@ + Hints: + ====== + +-We usually call nettalk.net from the tool 'netperf', a benchmarking ++We usually call nettalk.net from the tool 'snns-netperf', a benchmarking + version of SNNS without graphical user interface but with the full and + current SNNS kernel. It is supplied with SNNS in the tools directory. + We usually train and test nettalk for 10 cycles. Since convergence is +--- a/man/man1/snns.1 2008-04-21 03:56:05.000000000 -0400 ++++ b/man/man1/snns.1 2015-04-14 09:36:27.406012874 -0400 +@@ -111,7 +111,7 @@ + .BR netlearn (1) + backpropagation test program + +-.BR netperf (1) ++.BR snns-netperf (1) + benchmark program + + .BR pat_sel (1) +@@ -132,4 +132,4 @@ + yet. + + .SH AUTHOR +-Guenter W. Mamier +\ No newline at end of file ++Guenter W. Mamier +--- a/tools/doc/netperf.doc 2008-04-21 03:56:06.000000000 -0400 ++++ b/tools/doc/netperf.doc 1969-12-31 19:00:00.000000000 -0500 +@@ -1,49 +0,0 @@ +- =============================== +- Description of the tool NETPERF +- =============================== +- +-This is a benchmark program for SNNS. Propagtion and +-backpropagation tests are performed. +- +-synopsis: netperf +- +- +-example: +- +-unix >netperf +- +-produces +- +- SNNS 3D-Kernel V3.1000 +- ----- Benchmark Test ----- +- +- Filename of the network file: ../../../examples/nettalk.net +- Loading the network ... +- +- Network name: nettalk1 +- No. of units : 349 +- No. of input units : 203 +- No. of output units: 26 +- No. of sites: 0 +- No. of links: 27480 +- +- Learning function: Std_Backpropagation +- Update function : Topological_Order +- +- Do you want to benchmark +- Propagation [1] or +- Backpropagation [2] ? +- Input: 1 +- +- Choose no. of cycles: 100 +- +- Begin propagation ... +- +- +- No. of units updated: 34900 +- No. of sites updated: 0 +- No. of links updated: 2748000 +- CPU Time used: 3.05 seconds +- +- No. of connection per second (CPS): 9.0098e+05 +- +--- a/tools/doc/snns-netperf.doc 1969-12-31 19:00:00.000000000 -0500 ++++ b/tools/doc/snns-netperf.doc 2015-04-14 09:37:21.126013855 -0400 +@@ -0,0 +1,49 @@ ++ ==================================== ++ Description of the tool SNNS-NETPERF ++ ==================================== ++ ++This is a benchmark program for SNNS. Propagtion and ++backpropagation tests are performed. ++ ++synopsis: snns-netperf ++ ++ ++example: ++ ++unix >snns-netperf ++ ++produces ++ ++ SNNS 3D-Kernel V3.1000 ++ ----- Benchmark Test ----- ++ ++ Filename of the network file: ../../../examples/nettalk.net ++ Loading the network ... ++ ++ Network name: nettalk1 ++ No. of units : 349 ++ No. of input units : 203 ++ No. of output units: 26 ++ No. of sites: 0 ++ No. of links: 27480 ++ ++ Learning function: Std_Backpropagation ++ Update function : Topological_Order ++ ++ Do you want to benchmark ++ Propagation [1] or ++ Backpropagation [2] ? ++ Input: 1 ++ ++ Choose no. of cycles: 100 ++ ++ Begin propagation ... ++ ++ ++ No. of units updated: 34900 ++ No. of sites updated: 0 ++ No. of links updated: 2748000 ++ CPU Time used: 3.05 seconds ++ ++ No. of connection per second (CPS): 9.0098e+05 ++ +--- a/tools/sources/Makefile 2015-04-14 09:34:31.386010756 -0400 ++++ b/tools/sources/Makefile 2015-04-14 09:35:50.526012201 -0400 +@@ -89,7 +89,7 @@ + + TOOLS_PRG = $(TOOLS_SOURCES_C:.c=) + KRTOOLS_PRG = snns2c pat_sel netlearn td_bignet ff_bignet \ +- netperf snnsbat feedback-gennet convert2snns \ ++ snns-netperf snnsbat feedback-gennet convert2snns \ + isnns linknets + BATCH_PRG = batchman + +@@ -110,7 +110,7 @@ + tools: $(TOOLS_PRG) $(KRTOOLS_PRG) $(BATCH_PRG) + + $(TOOLSBINDIR): +- -mkdir $(TOOLSBINDIR) ++ -mkdir -p $(TOOLSBINDIR) + + install: tools $(TOOLSBINDIR) + for tooltarget in $(TOOLS_PRG) $(KRTOOLS_PRG) $(BATCH_PRG) ; do \ +@@ -191,8 +191,8 @@ + ff_bignet: ff_bignet.o $(KERNELLIBS) + $(CC) $(LDFLAGS) ff_bignet.o $(KERNELALLLIBS) -o ff_bignet + +-netperf: netperf.o $(KERNELLIBS) +- $(CC) $(LDFLAGS) netperf.o $(KERNELALLLIBS) -o netperf ++snns-netperf: netperf.o $(KERNELLIBS) ++ $(CC) $(LDFLAGS) netperf.o $(KERNELALLLIBS) -o snns-netperf + + snnsbat: snnsbat.o $(KERNELLIBS) + $(CC) $(LDFLAGS) snnsbat.o $(KERNELALLLIBS) -o snnsbat diff --git a/sci-mathematics/snns/files/4.3-unstrip.patch b/sci-mathematics/snns/files/4.3-unstrip.patch new file mode 100644 index 000000000000..4f36040e2218 --- /dev/null +++ b/sci-mathematics/snns/files/4.3-unstrip.patch @@ -0,0 +1,11 @@ +--- a/configuration/install-sh 2008-04-21 03:55:33.000000000 -0400 ++++ b/configuration/install-sh 2015-04-08 16:59:32.000000000 -0400 +@@ -79,7 +79,7 @@ + shift + continue;; + +- -s) stripcmd="$stripprog" ++ -s) stripcmd="" + shift + continue;; + diff --git a/sci-mathematics/snns/metadata.xml b/sci-mathematics/snns/metadata.xml new file mode 100644 index 000000000000..cc5d9687eb2d --- /dev/null +++ b/sci-mathematics/snns/metadata.xml @@ -0,0 +1,15 @@ + + + + + axs@gentoo.org + Ian Stakenvicius + + + sci-mathematics@gentoo.org + Gentoo Mathematics Project + + + snns + + diff --git a/sci-mathematics/snns/snns-4.3-r2.ebuild b/sci-mathematics/snns/snns-4.3-r2.ebuild new file mode 100644 index 000000000000..06d5d7dd7c20 --- /dev/null +++ b/sci-mathematics/snns/snns-4.3-r2.ebuild @@ -0,0 +1,123 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +PYTHON_COMPAT=( python2_7 ) +DISTUTILS_OPTIONAL=1 +inherit distutils-r1 eutils + +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 + )" +DEPEND="${RDEPEND} + X? ( x11-proto/xproto ) + >=sys-devel/bison-1.2.2" + +RDEPEND+=" python? ( ${PYTHON_DEPS} )" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + epatch "${FILESDIR}"/4.3-unstrip.patch + epatch "${FILESDIR}"/4.3-bison-version.patch + epatch "${FILESDIR}"/4.2-ldflags.patch + epatch "${FILESDIR}"/4.3-snns-netperf.patch # bug 248322 + + # 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} + + epatch_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*/* +} -- cgit v1.2.3