blob: 2f170be0b21d4e5f0cd70a564a105310c9d93c48 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-misc/golly/golly-2.1.ebuild,v 1.1 2010/09/16 15:53:09 xmw Exp $
EAPI=2
PYTHON_DEPEND=2
WX_GTK_VER=2.8
inherit eutils python wxwidgets toolchain-funcs
MY_P=${P}-src
DESCRIPTION="A simulator for Conway's Game of Life and other cellular automata"
HOMEPAGE="http://golly.sourceforge.net/"
SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
DEPEND="dev-lang/perl
|| ( <=x11-libs/wxGTK-2.8.10.1-r5:2.8[X] >=x11-libs/wxGTK-2.8.11.0:2.8[X,tiff] )"
RDEPEND="${DEPEND}"
S=${WORKDIR}/${MY_P}
pkg_setup() {
python_set_active_version 2
}
src_prepare() {
# Fix linker flags to work with Perl 5.10.1 (fixed in CVS)
epatch "${FILESDIR}"/${P}-perl-ldopts.patch
# Fix Python symbol names on AMD64 (fixed in CVS)
epatch "${FILESDIR}"/${P}-python-amd64.patch
# Fix installing data files into a different directory than binaries:
epatch "${FILESDIR}"/${PN}-separate-data-directory.patch
# We need this for correct linking
epatch "${FILESDIR}"/${P}-as-needed.patch
# Get rid of .DS_Store and other stuff that should not be installed:
find -type f -name '.*' -exec rm -f {} + || die
find Scripts/Python -name '*.pyc' -exec rm -f {} + || die
# Fix Python library path:
sed -i -e "s|libpython2.5.so|$(python_get_library)|" wxprefs.cpp || die
# Insert user-specified compiler flags into Makefile:
sed -i -e "/^CXXFLAGS = /s/-O5/${CXXFLAGS}/" makefile-gtk || die
}
src_compile() {
emake \
CXXC="$(tc-getCXX)" \
-f makefile-gtk || die
}
src_install() {
dobin golly bgolly RuleTableToTree || die
insinto /usr/share/${PN}
doins -r Help Patterns Scripts Rules || die
dodoc README || die
}
|