summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sci-mathematics/snns
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sci-mathematics/snns')
-rw-r--r--sci-mathematics/snns/Manifest8
-rw-r--r--sci-mathematics/snns/files/4.2-fPIC-python.patch12
-rw-r--r--sci-mathematics/snns/files/4.2-ldflags.patch42
-rw-r--r--sci-mathematics/snns/files/4.3-bison-version.patch11
-rw-r--r--sci-mathematics/snns/files/4.3-snns-netperf.patch164
-rw-r--r--sci-mathematics/snns/files/4.3-unstrip.patch11
-rw-r--r--sci-mathematics/snns/metadata.xml9
-rw-r--r--sci-mathematics/snns/snns-4.2-r8.ebuild134
-rw-r--r--sci-mathematics/snns/snns-4.2-r9.ebuild123
-rw-r--r--sci-mathematics/snns/snns-4.3-r2.ebuild124
10 files changed, 638 insertions, 0 deletions
diff --git a/sci-mathematics/snns/Manifest b/sci-mathematics/snns/Manifest
new file mode 100644
index 000000000000..3cc5f12e65df
--- /dev/null
+++ b/sci-mathematics/snns/Manifest
@@ -0,0 +1,8 @@
+DIST PySNNS-20040605.tar.gz 20158 SHA256 c2dff5a88faa756546dac1c850d5196d8bba39f793537c5ebcaa61e21f0db317
+DIST PythonFunctionSupport-20050210.patch.gz 15728 SHA256 c507c70aa158ffb1422aeef693d45f2e8486b1fc7056142736796dd4273f4869
+DIST SNNSv4.2.Manual.pdf 2103861 SHA256 ffed74a4d63f78b8bf8a400a18ce32c3e8d8b3e89682394cc6af122c097aba62
+DIST SNNSv4.2.tar.gz 2170375 SHA256 13a36eb7e7838cc7df92a2eaa36c955579a99007c2936d85c20ec0c6a3036c38 SHA512 1e7943204783f742048182cc2ea90fcf31f54c9ce868aef0c48baed68056ded2300f86bb0f2f3219fd9e2a6bab1e65aa3101734c0476a95af97e12cffc379614 WHIRLPOOL eb7c49e5039056e56bed3de10cb88f4d90cc65f89e7fe87747aea2b361f72dff04e78a06f8d8ade79de0da67031af1efb148e18a4a7a5935da4d07760d5bea04
+DIST SNNSv4.3.tar.gz 5076669 SHA256 54bf92d23e9198f9030a3c3d2b741472e9b8660b27d3b419ade6393b1ebf6f62 SHA512 a057dc946b581eee01334956c33d6870b8b994d1b835834d58c37ae3a8585dfb1206f3082b17a49ee97b22f4c07c0efb47e4e3ae5aeb37e97f69472da3e21f0b WHIRLPOOL 29e1afc09a6e5ba7de5fc21d2a995f7f093e02e9f6125831ce29dfeaddd125241f440b362b97af5fe0933a21455b4002f606ecdce7b13f24046d20167bd5ad7d
+DIST python.patch.gz 52650 SHA256 de4b97a208bf7a9a1ee40256e153fbd142aa612822e1451d50fd36cbd3ecc1d9
+DIST snns-4.2-20040227.patch.gz 55476 SHA256 08a5fa51552b33e5e981d68cbf05792d40d6d0015abad090697b6f88544d3468 SHA512 29378fead9c59c5c3341e03aa08009230b805ce910a95932c34a9c0f6eaf31ef978410add7e79249fe302992890e693567e32d6686589f2d939efae7d0bc32b0 WHIRLPOOL 64f1283979a06e86d25cd2a750ff53978bc47e8fd5df708d416be3886288ebae6534b10d1a2a6eec3931c81b39ab9b5322c2602094b3b62c3397d7d41671eff8
+DIST snns-4.2-patched.tar.gz 2188658 SHA256 d0fc25dcb82979a46bfdfd24a090ec113b039d0f144f8f7c10404775acd129a7
diff --git a/sci-mathematics/snns/files/4.2-fPIC-python.patch b/sci-mathematics/snns/files/4.2-fPIC-python.patch
new file mode 100644
index 000000000000..c16e9e867280
--- /dev/null
+++ b/sci-mathematics/snns/files/4.2-fPIC-python.patch
@@ -0,0 +1,12 @@
+diff -urpN configuration.orig/Makefile.din configuration/Makefile.din
+--- configuration.orig/Makefile.din 2005-01-30 16:40:54.430169528 +0100
++++ configuration/Makefile.din 2005-01-30 16:41:20.971134688 +0100
+@@ -114,7 +114,7 @@ SUBSTOBJECTS = @LIBOBJS@ @ALLOCA@
+ .SUFFIXES:
+ .SUFFIXES: .c .o
+ .c.o:
+- $(CC) $(CPPFLAGS) $(CFLAGS) -c $<
++ $(CC) -fPIC $(CPPFLAGS) $(CFLAGS) -c $<
+
+ #*****************************************************************************
+ # End of common Makefile.defs
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..601be9594b9b
--- /dev/null
+++ b/sci-mathematics/snns/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sci-mathematics</herd>
+<maintainer>
+ <email>axs@gentoo.org</email>
+ <name>Ian Stakenvicius</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sci-mathematics/snns/snns-4.2-r8.ebuild b/sci-mathematics/snns/snns-4.2-r8.ebuild
new file mode 100644
index 000000000000..15da02f7ae69
--- /dev/null
+++ b/sci-mathematics/snns/snns-4.2-r8.ebuild
@@ -0,0 +1,134 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+PYTHON_DEPEND="python? 2"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="3.* *-jython"
+
+inherit distutils eutils
+
+MY_P="SNNSv${PV}"
+MYPATCH="${P}-20040227"
+MYPYTHONEXT="PySNNS-20040605"
+MYPYTHONPATCH="PythonFunctionSupport-20050210.patch"
+
+DESCRIPTION="Stuttgart Neural Network Simulator"
+HOMEPAGE="http://www-ra.informatik.uni-tuebingen.de/SNNS/"
+SRC_URI="http://www-ra.informatik.uni-tuebingen.de/downloads/SNNS/${MY_P}.tar.gz
+ mirror://berlios/snns-dev/${MYPATCH}.patch.gz
+ doc? ( http://www-ra.informatik.uni-tuebingen.de/downloads/SNNS/${MY_P}.Manual.pdf )
+ python? ( mirror://berlios/snns-dev/${MYPYTHONEXT}.tar.gz
+ mirror://berlios/snns-dev/${MYPYTHONPATCH}.gz )"
+
+LICENSE="SNNS-${PV}"
+KEYWORDS="amd64 ppc x86"
+SLOT="0"
+IUSE="X doc python"
+
+RDEPEND="X? ( x11-libs/libXaw3d )"
+DEPEND="${RDEPEND}
+ X? ( x11-proto/xproto )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ unpack ${MY_P}.tar.gz
+ unpack ${MYPATCH}.patch.gz
+
+ if use python; then
+ unpack ${MYPYTHONEXT}.tar.gz
+ unpack ${MYPYTHONPATCH}.gz
+ fi
+}
+
+src_prepare() {
+ epatch "${WORKDIR}/${MYPATCH}.patch" \
+ "${FILESDIR}/${PV}-ldflags.patch"
+
+ if use python; then
+ epatch "${FILESDIR}/${PV}-fPIC-python.patch"
+ epatch "${WORKDIR}/${MYPYTHONPATCH}"
+ fi
+
+ cd xgui/sources
+ for file in *.c; do
+ sed -e "s:X11/Xaw/:X11/Xaw3d/:g" -i "${file}"
+ done
+}
+
+src_configure() {
+ local myconf="--enable-global"
+
+ if use X; then
+ myconf+=" --with-x"
+ else
+ myconf+=" --without-x"
+ fi
+
+ econf ${myconf}
+}
+
+src_compile() {
+ local compileopts="compile-kernel compile-tools"
+ if use X; then
+ compileopts+=" compile-xgui"
+ fi
+
+ # parallel make sometimes fails (phosphan)
+ emake -j1 ${compileopts} || die "make failed"
+
+ if use python; then
+ pushd python > /dev/null
+ distutils_src_compile
+ popd > /dev/null
+ fi
+}
+
+src_install() {
+ for file in `find tools -type f -perm +100`; do
+ dobin $file
+ done
+
+ mv "${D}/usr/bin/netperf" "${D}/usr/bin/snns-netperf"
+
+ if use X; then
+ newbin xgui/sources/xgui snns
+
+ dodir /etc/env.d
+ echo XGUILOADPATH=/usr/share/doc/${PF}/ > "${D}"/etc/env.d/99snns
+
+ insinto /usr/share/doc/${PF}
+ doins default.cfg help.hdoc
+ fi
+
+ if use python; then
+ pushd python > /dev/null
+ distutils_src_install
+ cp -pPR examples "${D}"/usr/share/doc/${PF}/python-examples
+ chmod +x "${D}"/usr/share/doc/${PF}/python-examples/*.py
+ newdoc README README.python
+ popd > /dev/null
+ fi
+
+ insinto /usr/share/doc/${PF}
+ use doc && doins "${DISTDIR}"/${MY_P}.Manual.pdf
+
+ insinto /usr/share/doc/${PF}/examples
+ doins examples/*
+
+ doman man/man*/*
+}
+
+pkg_postinst() {
+ if use python; then
+ distutils_pkg_postinst
+ fi
+}
+
+pkg_postrm() {
+ if use python; then
+ distutils_pkg_postrm
+ fi
+}
diff --git a/sci-mathematics/snns/snns-4.2-r9.ebuild b/sci-mathematics/snns/snns-4.2-r9.ebuild
new file mode 100644
index 000000000000..af5ebc4090fa
--- /dev/null
+++ b/sci-mathematics/snns/snns-4.2-r9.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+PYTHON_DEPEND="python? 2"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="3.* *-jython"
+
+inherit distutils eutils
+
+MY_P="SNNSv${PV}"
+DESCRIPTION="Stuttgart Neural Network Simulator"
+HOMEPAGE="http://sourceforge.net/projects/snns/"
+SRC_URI="mirror://sourceforge/snns/${PN}-${PV}-patched.tar.gz
+ doc? ( http://www-ra.informatik.uni-tuebingen.de/downloads/SNNS/${MY_P}.Manual.pdf )
+ python? ( mirror://sourceforge/snns/python.patch.gz )"
+
+LICENSE="LGPL-2.1"
+KEYWORDS="~amd64 ~ppc ~x86"
+SLOT="0"
+IUSE="X doc python"
+
+RDEPEND="X? ( x11-libs/libXaw3d )"
+DEPEND="${RDEPEND}
+ X? ( x11-proto/xproto )"
+
+S="${WORKDIR}/${PN}"
+
+src_unpack() {
+ unpack ${PN}-${PV}-patched.tar.gz
+
+ if use python; then
+ unpack python.patch.gz
+ fi
+}
+
+src_prepare() {
+
+ if use python; then
+ epatch "${WORKDIR}/python.patch"
+ fi
+
+ cd xgui/sources
+ for file in *.c; do
+ sed -e "s:X11/Xaw/:X11/Xaw3d/:g" -i "${file}"
+ done
+}
+
+src_configure() {
+ local myconf="--enable-global"
+
+ if use X; then
+ myconf+=" --with-x"
+ else
+ myconf+=" --without-x"
+ fi
+
+ econf ${myconf}
+}
+
+src_compile() {
+ local compileopts="compile-kernel compile-tools"
+ if use X; then
+ compileopts+=" compile-xgui"
+ fi
+
+ # parallel make sometimes fails (phosphan)
+ emake -j1 ${compileopts} || die "make failed"
+
+ if use python; then
+ pushd python > /dev/null
+ distutils_src_compile
+ popd > /dev/null
+ fi
+}
+
+src_install() {
+ for file in `find tools -type f -perm +100`; do
+ dobin $file
+ done
+
+ mv "${D}/usr/bin/netperf" "${D}/usr/bin/snns-netperf"
+
+ if use X; then
+ newbin xgui/sources/xgui snns
+
+ dodir /etc/env.d
+ echo XGUILOADPATH=/usr/share/doc/${PF}/ > "${D}"/etc/env.d/99snns
+
+ insinto /usr/share/doc/${PF}
+ doins default.cfg help.hdoc
+ fi
+
+ if use python; then
+ pushd python > /dev/null
+ distutils_src_install
+ cp -pPR examples "${D}"/usr/share/doc/${PF}/python-examples
+ chmod +x "${D}"/usr/share/doc/${PF}/python-examples/*.py
+ newdoc README README.python
+ popd > /dev/null
+ fi
+
+ insinto /usr/share/doc/${PF}
+ use doc && doins "${DISTDIR}"/${MY_P}.Manual.pdf
+
+ insinto /usr/share/doc/${PF}/examples
+ doins examples/*
+
+ doman man/man*/*
+}
+
+pkg_postinst() {
+ if use python; then
+ distutils_pkg_postinst
+ fi
+}
+
+pkg_postrm() {
+ if use python; then
+ distutils_pkg_postrm
+ fi
+}
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..78d50c673e98
--- /dev/null
+++ b/sci-mathematics/snns/snns-4.3-r2.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+DISTUTILS_OPTIONAL=1
+inherit distutils-r1 eutils
+
+MY_P="SNNSv${PV}"
+DESCRIPTION="Stuttgart Neural Network Simulator"
+HOMEPAGE="http://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*/*
+}