summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Weber <xmw@gentoo.org>2010-09-16 15:53:09 +0000
committerMichael Weber <xmw@gentoo.org>2010-09-16 15:53:09 +0000
commit445409b933698c5a89dcb3930a0c3f678dbe13f3 (patch)
tree908b0507cdc9c9cb75250b0c55c7a6f4d91f3a2a /app-misc
parentCleaned up our masks a little to reflect reality. (diff)
downloadgentoo-2-445409b933698c5a89dcb3930a0c3f678dbe13f3.tar.gz
gentoo-2-445409b933698c5a89dcb3930a0c3f678dbe13f3.tar.bz2
gentoo-2-445409b933698c5a89dcb3930a0c3f678dbe13f3.zip
Initial import from sunrise overlay.
(Portage version: 2.1.8.3/cvs/Linux x86_64)
Diffstat (limited to 'app-misc')
-rw-r--r--app-misc/golly/ChangeLog14
-rw-r--r--app-misc/golly/files/golly-2.1-as-needed.patch30
-rw-r--r--app-misc/golly/files/golly-2.1-perl-ldopts.patch11
-rw-r--r--app-misc/golly/files/golly-2.1-python-amd64.patch39
-rw-r--r--app-misc/golly/files/golly-separate-data-directory.patch62
-rw-r--r--app-misc/golly/golly-2.1.ebuild68
-rw-r--r--app-misc/golly/metadata.xml10
7 files changed, 234 insertions, 0 deletions
diff --git a/app-misc/golly/ChangeLog b/app-misc/golly/ChangeLog
new file mode 100644
index 000000000000..1c25d5fd2498
--- /dev/null
+++ b/app-misc/golly/ChangeLog
@@ -0,0 +1,14 @@
+# ChangeLog for app-misc/golly
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-misc/golly/ChangeLog,v 1.1 2010/09/16 15:53:09 xmw Exp $
+
+*golly-2.1 (16 Sep 2010)
+
+ 16 Sep 2010; Michael Weber <xmw@gentoo.org> +golly-2.1.ebuild,
+ +files/golly-2.1-as-needed.patch, +files/golly-2.1-perl-ldopts.patch,
+ +files/golly-2.1-python-amd64.patch,
+ +files/golly-separate-data-directory.patch, +metadata.xml:
+ Initial import from sunrise overlay. Thanks to Maks Verver
+ <maksverver@geocities.com> on bug #323219 for the ebuild and patches,
+ great work.
+
diff --git a/app-misc/golly/files/golly-2.1-as-needed.patch b/app-misc/golly/files/golly-2.1-as-needed.patch
new file mode 100644
index 000000000000..f65df4a5925c
--- /dev/null
+++ b/app-misc/golly/files/golly-2.1-as-needed.patch
@@ -0,0 +1,30 @@
+diff --git a/makefile-gtk b/makefile-gtk
+index 56b31d0..a09aad4 100644
+--- a/makefile-gtk
++++ b/makefile-gtk
+@@ -21,7 +21,7 @@ BINFILES = golly bgolly RuleTableToTree
+ CXXC = g++
+ CXXFLAGS = `wx-config --cxxflags` -O5 -DZLIB -DVERSION=$(VERSION) \
+ -Wall -Wno-non-virtual-dtor -fno-strict-aliasing
+-LDFLAGS = `wx-config --libs` -lz
++LIBS = `wx-config --libs` -lz
+
+ # for Perl script support
+ PERL_INCLUDE = `perl -MExtUtils::Embed -e ccopts`
+@@ -72,13 +72,13 @@ clean:
+ rm -f golly bgolly RuleTableToTree
+
+ golly: $(BASEOBJ) $(WXOBJ)
+- $(CXXC) $(CXXFLAGS) -o golly $(BASEOBJ) $(WXOBJ) $(LDFLAGS) $(PYTHON_LINK) $(PERL_LINK)
++ $(CXXC) $(CXXFLAGS) $(LDFLAGS) -o golly $(BASEOBJ) $(WXOBJ) $(LIBS) $(PYTHON_LINK) $(PERL_LINK)
+
+ bgolly: $(BASEOBJ) $(OBJDIR)/bgolly.o
+- $(CXXC) $(CXXFLAGS) -o bgolly $(BASEOBJ) $(OBJDIR)/bgolly.o $(LDFLAGS)
++ $(CXXC) $(CXXFLAGS) $(LDFLAGS) -o bgolly $(BASEOBJ) $(OBJDIR)/bgolly.o $(LIBS)
+
+ RuleTableToTree: $(BASEOBJ) $(OBJDIR)/RuleTableToTree.o
+- $(CXXC) $(CXXFLAGS) -o RuleTableToTree $(BASEOBJ) $(OBJDIR)/RuleTableToTree.o $(LDFLAGS)
++ $(CXXC) $(CXXFLAGS) $(LDFLAGS) -o RuleTableToTree $(BASEOBJ) $(OBJDIR)/RuleTableToTree.o $(LIBS)
+
+ $(OBJDIR)/bgolly.o: bgolly.cpp
+ $(CXXC) $(CXXFLAGS) -c -o $@ bgolly.cpp
diff --git a/app-misc/golly/files/golly-2.1-perl-ldopts.patch b/app-misc/golly/files/golly-2.1-perl-ldopts.patch
new file mode 100644
index 000000000000..a98178f8f2d1
--- /dev/null
+++ b/app-misc/golly/files/golly-2.1-perl-ldopts.patch
@@ -0,0 +1,11 @@
+--- golly-2.1-src.old/makefile-gtk 2009-09-07 02:33:06.000000000 +0200
++++ golly-2.1-src.new/makefile-gtk 2010-06-08 17:32:21.000000000 +0200
+@@ -29,7 +29,7 @@
+ # than 5.10 (this is necessary because boot_DynaLoader is in DynaLoader.a);
+ # if using 5.10 or later we can dynamically load the Perl library because
+ # it contains the boot_DynaLoader code
+-PERL_LINK = `perl -MExtUtils::Embed -e '$$]<5.010 && ldopts'`
++PERL_LINK = `perl -MExtUtils::Embed -e 'ldopts'`
+
+ # for Python script support
+ PYTHON_INCLUDE = -I`python -c "import distutils.sysconfig; print distutils.sysconfig.get_python_inc()"`
diff --git a/app-misc/golly/files/golly-2.1-python-amd64.patch b/app-misc/golly/files/golly-2.1-python-amd64.patch
new file mode 100644
index 000000000000..9c43d53d8372
--- /dev/null
+++ b/app-misc/golly/files/golly-2.1-python-amd64.patch
@@ -0,0 +1,39 @@
+--- wxpython.cpp 2009/09/04 00:36:39 1.70
++++ wxpython.cpp 2009/10/04 23:03:13 1.71
+@@ -106,7 +106,11 @@
+ {
+ // startup/shutdown
+ void(*G_Py_Initialize)(void) = NULL;
++#ifdef __LP64__
++ PyObject*(*G_Py_InitModule4_64)(char*, struct PyMethodDef*, char*, PyObject*, int) = NULL;
++#else
+ PyObject*(*G_Py_InitModule4)(char*, struct PyMethodDef*, char*, PyObject*, int) = NULL;
++#endif
+ void(*G_Py_Finalize)(void) = NULL;
+
+ // errors
+@@ -145,7 +149,11 @@
+
+ // redefine the Py* functions to their equivalent G_* wrappers
+ #define Py_Initialize G_Py_Initialize
+-#define Py_InitModule4 G_Py_InitModule4
++#ifdef __LP64__
++ #define Py_InitModule4_64 G_Py_InitModule4_64
++#else
++ #define Py_InitModule4 G_Py_InitModule4
++#endif
+ #define Py_Finalize G_Py_Finalize
+ #define PyErr_Occurred G_PyErr_Occurred
+ #define PyErr_SetString G_PyErr_SetString
+@@ -185,7 +193,11 @@
+ } pythonFuncs[] =
+ {
+ PYTHON_FUNC(Py_Initialize)
++#ifdef __LP64__
++ PYTHON_FUNC(Py_InitModule4_64)
++#else
+ PYTHON_FUNC(Py_InitModule4)
++#endif
+ PYTHON_FUNC(Py_Finalize)
+ PYTHON_FUNC(PyErr_Occurred)
+ PYTHON_FUNC(PyErr_SetString)
diff --git a/app-misc/golly/files/golly-separate-data-directory.patch b/app-misc/golly/files/golly-separate-data-directory.patch
new file mode 100644
index 000000000000..abbaedf476f7
--- /dev/null
+++ b/app-misc/golly/files/golly-separate-data-directory.patch
@@ -0,0 +1,62 @@
+--- golly-2.1-src.old/wxgolly.cpp 2009-09-07 02:35:55.000000000 +0200
++++ golly-2.1-src.new/wxgolly.cpp 2010-06-08 17:34:51.000000000 +0200
+@@ -195,42 +195,6 @@
+
+ // -----------------------------------------------------------------------------
+
+-void SetAppDirectory(const char* argv0)
+-{
+- #ifdef __WXMSW__
+- // on Windows we need to reset current directory to app directory if user
+- // dropped file from somewhere else onto app to start it up (otherwise we
+- // can't find Help files)
+- wxString appdir = wxStandardPaths::Get().GetDataDir();
+- wxString currdir = wxGetCwd();
+- if ( currdir.CmpNoCase(appdir) != 0 )
+- wxSetWorkingDirectory(appdir);
+- // avoid VC++ warning
+- wxUnusedVar(argv0);
+- #elif defined(__WXMAC__)
+- // wxMac has set current directory to location of .app bundle so no need
+- // to do anything
+- #else // assume Unix
+- // user might have started app from a different directory so find
+- // last "/" in argv0 and change cwd if "/" isn't part of "./" prefix
+- unsigned int pos = strlen(argv0);
+- while (pos > 0) {
+- pos--;
+- if (argv0[pos] == '/') break;
+- }
+- if ( pos > 0 && !(pos == 1 && argv0[0] == '.') ) {
+- char appdir[2048];
+- if (pos < sizeof(appdir)) {
+- strncpy(appdir, argv0, pos);
+- appdir[pos] = 0;
+- wxSetWorkingDirectory(wxString(appdir,wxConvLocal));
+- }
+- }
+- #endif
+-}
+-
+-// -----------------------------------------------------------------------------
+-
+ void GollyApp::SetFrameIcon(wxFrame* frame)
+ {
+ // set frame icon
+@@ -280,13 +244,12 @@
+ wxSystemOptions::SetOption(wxMAC_TEXTCONTROL_USE_MLTE, 1);
+ #endif
+
+- // get current working directory before calling SetAppDirectory
++ // get current working directory before changing to data directory
+ wxString initdir = wxFileName::GetCwd();
+ if (initdir.Last() != wxFILE_SEP_PATH) initdir += wxFILE_SEP_PATH;
+
+- // make sure current working directory contains application otherwise
+- // we can't open Help files
+- SetAppDirectory( wxString(argv[0]).mb_str(wxConvLocal) );
++ // change to data directory
++ wxSetWorkingDirectory(wxString("/usr/share/golly", wxConvLocal));
+
+ // now set global gollydir for use in GetPrefs and elsewhere
+ gollydir = wxFileName::GetCwd();
diff --git a/app-misc/golly/golly-2.1.ebuild b/app-misc/golly/golly-2.1.ebuild
new file mode 100644
index 000000000000..2f170be0b21d
--- /dev/null
+++ b/app-misc/golly/golly-2.1.ebuild
@@ -0,0 +1,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
+}
diff --git a/app-misc/golly/metadata.xml b/app-misc/golly/metadata.xml
new file mode 100644
index 000000000000..02b909e46b7e
--- /dev/null
+++ b/app-misc/golly/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>no-herd</herd>
+<maintainer>
+<email>xmw@gentoo.org</email>
+<name>Michael Weber</name>
+</maintainer>
+</pkgmetadata>
+