Gentoo Archives: gentoo-commits

From: "Patrick Kursawe (phosphan)" <phosphan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sci-mathematics/snns: ChangeLog snns-4.2-r9.ebuild
Date: Sat, 01 Oct 2011 00:15:34
Message-Id: 20111001001524.3566820036@flycatcher.gentoo.org
1 phosphan 11/10/01 00:15:24
2
3 Modified: ChangeLog
4 Added: snns-4.2-r9.ebuild
5 Log:
6 Moved project to sourceforge and included random seed patch from Bug #224933.
7
8 (Portage version: 2.1.10.11/cvs/Linux i686)
9
10 Revision Changes Path
11 1.23 sci-mathematics/snns/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/snns/ChangeLog?rev=1.23&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/snns/ChangeLog?rev=1.23&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/snns/ChangeLog?r1=1.22&r2=1.23
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sci-mathematics/snns/ChangeLog,v
20 retrieving revision 1.22
21 retrieving revision 1.23
22 diff -u -r1.22 -r1.23
23 --- ChangeLog 2 Aug 2011 05:49:20 -0000 1.22
24 +++ ChangeLog 1 Oct 2011 00:15:23 -0000 1.23
25 @@ -1,6 +1,12 @@
26 # ChangeLog for sci-mathematics/snns
27 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/snns/ChangeLog,v 1.22 2011/08/02 05:49:20 mattst88 Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/snns/ChangeLog,v 1.23 2011/10/01 00:15:23 phosphan Exp $
30 +
31 +*snns-4.2-r9 (30 Sep 2011)
32 +
33 + 30 Sep 2011; Patrick Kursawe <phosphan@g.o>
34 + +snns-4.2-r9.ebuild:
35 + Moved project to sourceforge and included random seed patch from Bug #224933.
36
37 02 Aug 2011; Matt Turner <mattst88@g.o> snns-4.2-r8.ebuild:
38 Renamed x11-libs/Xaw3d to x11-libs/libXaw3d.
39
40
41
42 1.1 sci-mathematics/snns/snns-4.2-r9.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/snns/snns-4.2-r9.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/snns/snns-4.2-r9.ebuild?rev=1.1&content-type=text/plain
46
47 Index: snns-4.2-r9.ebuild
48 ===================================================================
49 # Copyright 1999-2011 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/sci-mathematics/snns/snns-4.2-r9.ebuild,v 1.1 2011/10/01 00:15:23 phosphan Exp $
52
53 EAPI="3"
54 PYTHON_DEPEND="python? 2"
55 SUPPORT_PYTHON_ABIS="1"
56 RESTRICT_PYTHON_ABIS="3.*"
57
58 inherit distutils eutils
59
60 MY_P="SNNSv${PV}"
61 DESCRIPTION="Stuttgart Neural Network Simulator"
62 HOMEPAGE="http://sourceforge.net/projects/snns/"
63 SRC_URI="mirror://sourceforge/snns/${PN}-${PV}-patched.tar.gz
64 doc? ( http://www-ra.informatik.uni-tuebingen.de/downloads/SNNS/${MY_P}.Manual.pdf )
65 python? ( mirror://sourceforge/snns/python.patch.gz )"
66
67 LICENSE="LGPL-2.1"
68 KEYWORDS="~amd64 ~ppc ~x86"
69 SLOT="0"
70 IUSE="X doc python"
71
72 RDEPEND="X? ( x11-libs/libXaw3d )"
73 DEPEND="${RDEPEND}
74 X? ( x11-proto/xproto )"
75
76 S="${WORKDIR}/${PN}"
77
78 src_unpack() {
79 unpack ${PN}-${PV}-patched.tar.gz
80
81 if use python; then
82 unpack python.patch.gz
83 fi
84 }
85
86 src_prepare() {
87
88 if use python; then
89 epatch "${WORKDIR}/python.patch"
90 fi
91
92 cd xgui/sources
93 for file in *.c; do
94 sed -e "s:X11/Xaw/:X11/Xaw3d/:g" -i "${file}"
95 done
96 }
97
98 src_configure() {
99 local myconf="--enable-global"
100
101 if use X; then
102 myconf+=" --with-x"
103 else
104 myconf+=" --without-x"
105 fi
106
107 econf ${myconf}
108 }
109
110 src_compile() {
111 local compileopts="compile-kernel compile-tools"
112 if use X; then
113 compileopts+=" compile-xgui"
114 fi
115
116 # parallel make sometimes fails (phosphan)
117 emake -j1 ${compileopts} || die "make failed"
118
119 if use python; then
120 pushd python > /dev/null
121 distutils_src_compile
122 popd > /dev/null
123 fi
124 }
125
126 src_install() {
127 for file in `find tools -type f -perm +100`; do
128 dobin $file
129 done
130
131 mv "${D}/usr/bin/netperf" "${D}/usr/bin/snns-netperf"
132
133 if use X; then
134 newbin xgui/sources/xgui snns
135
136 dodir /etc/env.d
137 echo XGUILOADPATH=/usr/share/doc/${PF}/ > "${D}"/etc/env.d/99snns
138
139 insinto /usr/share/doc/${PF}
140 doins default.cfg help.hdoc
141 fi
142
143 if use python; then
144 pushd python > /dev/null
145 distutils_src_install
146 cp -pPR examples "${D}"/usr/share/doc/${PF}/python-examples
147 chmod +x "${D}"/usr/share/doc/${PF}/python-examples/*.py
148 newdoc README README.python
149 popd > /dev/null
150 fi
151
152 insinto /usr/share/doc/${PF}
153 use doc && doins "${DISTDIR}"/${MY_P}.Manual.pdf
154
155 insinto /usr/share/doc/${PF}/examples
156 doins examples/*
157
158 doman man/man*/*
159 }
160
161 pkg_postinst() {
162 if use python; then
163 distutils_pkg_postinst
164 fi
165 }
166
167 pkg_postrm() {
168 if use python; then
169 distutils_pkg_postrm
170 fi
171 }