diff options
Diffstat (limited to 'app-misc/golly/files')
-rw-r--r-- | app-misc/golly/files/golly-2.1-as-needed.patch | 30 | ||||
-rw-r--r-- | app-misc/golly/files/golly-2.1-perl-ldopts.patch | 11 | ||||
-rw-r--r-- | app-misc/golly/files/golly-2.1-python-amd64.patch | 39 | ||||
-rw-r--r-- | app-misc/golly/files/golly-separate-data-directory.patch | 62 |
4 files changed, 142 insertions, 0 deletions
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(); |