diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2020-12-18 09:51:41 +0000 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2020-12-18 09:52:52 +0000 |
commit | d99216f0c924f3bfe62f1707215251f51866f5ea (patch) | |
tree | 9dd4ef794edbf3ac0e692dd3bd07618a9023a516 /app-misc/golly | |
parent | app-misc/mc: drop old (diff) | |
download | gentoo-d99216f0c924f3bfe62f1707215251f51866f5ea.tar.gz gentoo-d99216f0c924f3bfe62f1707215251f51866f5ea.tar.bz2 gentoo-d99216f0c924f3bfe62f1707215251f51866f5ea.zip |
app-misc/golly: drop old
Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'app-misc/golly')
-rw-r--r-- | app-misc/golly/Manifest | 1 | ||||
-rw-r--r-- | app-misc/golly/files/golly-3.3-allow-py23-exec.patch | 12 | ||||
-rw-r--r-- | app-misc/golly/files/golly-3.3-allow-py3.patch | 90 | ||||
-rw-r--r-- | app-misc/golly/files/golly-3.3-glife-py23.patch | 32 | ||||
-rw-r--r-- | app-misc/golly/files/golly-3.3-nondynamic-python.patch | 51 | ||||
-rw-r--r-- | app-misc/golly/golly-3.4.ebuild | 70 |
6 files changed, 0 insertions, 256 deletions
diff --git a/app-misc/golly/Manifest b/app-misc/golly/Manifest index 41f9152dcb62..18e55e3d1acc 100644 --- a/app-misc/golly/Manifest +++ b/app-misc/golly/Manifest @@ -1,2 +1 @@ -DIST golly-3.4-src.tar.gz 5480295 BLAKE2B 6bd0c71083d021adb660ed8fd333399865e5f486b6d95d2851aefd31fd2ad09a04419e6e3b2e0ff38b1d934ebb975525c07ca841210cc05f60f9ecf92362bc48 SHA512 bb2b1a653f9556901aa18d2d56c75c2c5e55bd7451b2b5bfb6268793758c12a6b00d30fa52c08ebd47e5db98fbec6fb80c64194cd93a1a41846adbd824c7af47 DIST golly-4.0-src.tar.gz 5579026 BLAKE2B fc6c9d4db80e92635ac466250ca65c5cbe496c668f2fbd583226a2ecd686ac022aa4d47f453628284bceeb16554b91340b442216eab8412506243e30085a3a32 SHA512 3a39e170ceddfa4f8c261a81f7b45039e9cc2aef901915d83d3227231514bf66e254d307802cb0afddd7458722b8cbf2ce527cb9ee84a2710b52bf5bdb15484d diff --git a/app-misc/golly/files/golly-3.3-allow-py23-exec.patch b/app-misc/golly/files/golly-3.3-allow-py23-exec.patch deleted file mode 100644 index e46b608ed6c5..000000000000 --- a/app-misc/golly/files/golly-3.3-allow-py23-exec.patch +++ /dev/null @@ -1,12 +0,0 @@ -'execfile' is python-2-only. 'exec/open' works for both python2 and python3. ---- a/gui-wx/wxpython.cpp -+++ b/gui-wx/wxpython.cpp -@@ -3356,7 +3388,7 @@ void RunPythonScript(const wxString& filepath) - // for the global namespace so that this script cannot change the - // globals of a caller script (which is possible now that RunScript - // is re-entrant) -- wxString command = wxT("execfile('") + fpath + wxT("',{})"); -+ wxString command = wxT("exec(open('") + fpath + wxT("').read(),{})"); - PyRun_SimpleString(command.mb_str(wxConvLocal)); - // don't use wxConvUTF8 in above line because caller has already converted - // filepath to decomposed UTF8 if on a Mac diff --git a/app-misc/golly/files/golly-3.3-allow-py3.patch b/app-misc/golly/files/golly-3.3-allow-py3.patch deleted file mode 100644 index 54a047830818..000000000000 --- a/app-misc/golly/files/golly-3.3-allow-py3.patch +++ /dev/null @@ -1,90 +0,0 @@ -The patch allows python3 as a python implementation. -Ports module loading to conditional python3 support. ---- a/gui-wx/configure/configure.ac -+++ b/gui-wx/configure/configure.ac -@@ -19,7 +19,7 @@ AC_ARG_WITH([python-shlib], [AS_HELP_STRING([--with-python-shlib=ARG], - , [with_python_shlib=check]) - AC_ARG_VAR([GOLLYDIR], [golly data directory [default=DATADIR/golly]]) - AC_ARG_VAR([PERL], [Perl 5 interpreter]) --AC_ARG_VAR([PYTHON], [Python 2 interpreter]) -+AC_ARG_VAR([PYTHON], [Python interpreter]) - - # Check for build tools: - m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) -@@ -76,7 +76,7 @@ AS_IF([test "x$enable_perl" = xyes], [ - ]) - - # Find Python --AC_PATH_PROGS(PYTHON, [python2 python]) -+AC_CHECK_PROGS(PYTHON, [python python3 python2]) - AS_IF([test "x$PYTHON" = x], [AC_MSG_ERROR([missing Python])]) - AC_SUBST([PYTHON_INCLUDE], [-I"'`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_python_inc())"`'"]) - AS_IF([test "x$with_python_shlib" = xcheck], ---- a/gui-wx/wxpython.cpp -+++ b/gui-wx/wxpython.cpp -@@ -90,6 +90,12 @@ - #include <Python.h> - #endif - -+#if PY_MAJOR_VERSION >= 3 -+ // python-3 got rid of int/log distinction -+ #define PyInt_AsLong PyLong_AsLong -+ #define PyInt_FromLong PyLong_FromLong -+#endif -+ - #ifdef USE_PYTHON_DYNAMIC - - #ifndef __WXMAC__ -@@ -3268,6 +3274,22 @@ static PyMethodDef py_methods[] = { - { NULL, NULL, 0, NULL } - }; - -+#if PY_MAJOR_VERSION >= 3 -+static PyModuleDef golly_module = { -+ PyModuleDef_HEAD_INIT, -+ "golly", /* name */ -+ NULL, /* doc */ -+ -1, /* size */ -+ py_methods, /* methoods */ -+}; -+ -+PyMODINIT_FUNC -+PyInit_golly(void) -+{ -+ return PyModule_Create(&golly_module); -+} -+#endif -+ - // ============================================================================= - - bool pyinited = false; // InitPython has been successfully called? -@@ -3280,6 +3302,13 @@ bool InitPython() - if (!LoadPythonLib()) return false; - #endif - -+ #if PY_MAJOR_VERSION >= 3 -+ // Autoload 'golly' builtin module at interpreter start. -+ if (PyImport_AppendInittab("golly", PyInit_golly) == -1) { -+ Warning(_("Error: could not extend in-built modules table\n")); -+ } -+ #endif -+ - // only initialize the Python interpreter once, mainly because multiple - // Py_Initialize/Py_Finalize calls cause leaks of about 12K each time! - Py_Initialize(); -@@ -3287,9 +3316,12 @@ bool InitPython() - #ifdef USE_PYTHON_DYNAMIC - GetPythonExceptions(); - #endif -- -- // allow Python to call the above py_* routines -- Py_InitModule((char*)"golly", py_methods); -+ -+ // Python-3 uses module constructor -+ #if PY_MAJOR_VERSION < 3 -+ // allow Python to call the above py_* routines -+ Py_InitModule((char*)"golly", py_methods); -+ #endif - - // catch Python messages sent to stderr and pass them to py_stderr - if (PyRun_SimpleString( diff --git a/app-misc/golly/files/golly-3.3-glife-py23.patch b/app-misc/golly/files/golly-3.3-glife-py23.patch deleted file mode 100644 index 8b1599712508..000000000000 --- a/app-misc/golly/files/golly-3.3-glife-py23.patch +++ /dev/null @@ -1,32 +0,0 @@ -Use python-3 compatible syntax. ---- a/Scripts/Python/glife/__init__.py -+++ b/Scripts/Python/glife/__init__.py -@@ -90,7 +90,7 @@ def rule(s = "B3/S23"): - def description(s): - """Supply a textual description to the whole pattern.""" - for line in s.split("\n"): -- print "#D", line -+ print("#D", line) - - # -------------------------------------------------------------------- - -@@ -161,7 +161,7 @@ class pattern(list): - It is also the base for computing generations subsequent to N-th.""" - if N < 0: - raise ValueError("backward evolving requested") -- if self.__phases.has_key(N): -+ if N in self.__phases: - return self.__phases[N] - M = 0 - for k in self.__phases.keys(): ---- a/Scripts/Python/glife/text.py -+++ b/Scripts/Python/glife/text.py -@@ -173,7 +173,7 @@ def make_text (string, font='Snakial'): - unknown = '-' - - for c in string: -- if not f.has_key (c): c = unknown -+ if not (c in f): c = unknown - symbol = f[c] - p += symbol (x, 0) - x += symbol.width diff --git a/app-misc/golly/files/golly-3.3-nondynamic-python.patch b/app-misc/golly/files/golly-3.3-nondynamic-python.patch deleted file mode 100644 index bc1c81a61917..000000000000 --- a/app-misc/golly/files/golly-3.3-nondynamic-python.patch +++ /dev/null @@ -1,51 +0,0 @@ -Don't use runtime python loading via dlopen(). - -Just link to libpython directly. That makes python dependency -more explicit and allows catching more compile-time bugs. ---- a/gui-wx/configure/Makefile.am -+++ b/gui-wx/configure/Makefile.am -@@ -22,7 +22,7 @@ golly_CPPFLAGS = $(AM_CPPFLAGS) $(WX_CPPFLAGS) $(PYTHON_INCLUDE) \ - $(PERL_CPPFLAGS) $(PERL_INCLUDE) \ - $(liblua_a_CPPFLAGS) -I$(top_srcdir)/../../lua - golly_CXXFLAGS = $(AM_CXXFLAGS) $(WX_CXXFLAGS_ONLY) --golly_LDADD = $(WX_LIBS) libgolly.a liblua.a -+golly_LDADD = $(WX_LIBS) $(PYTHON_LIBS) libgolly.a liblua.a - - if WINDOWS - golly_LDADD += gollyres.o ---- a/gui-wx/configure/configure.ac -+++ b/gui-wx/configure/configure.ac -@@ -86,6 +86,16 @@ AS_IF([test "x$with_python_shlib" = xcheck], - AS_IF([test "x$shlib" = x], AC_MSG_ERROR([could not determine Python shared library name])) - AC_DEFINE_UNQUOTED([PYTHON_SHLIB], [$shlib]) - -+# Find python interpreter -+# 1. --embed is needed for python>=3.8 -+# 2. statuc check is needed because python-3.7-config outputs error to stdout, not stderr -+if ${PYTHON}-config --libs --embed; then -+ PYTHON_LIBS=`${PYTHON}-config --libs --embed` -+elif ${PYTHON}-config --libs; then -+ PYTHON_LIBS=`${PYTHON}-config --libs` -+fi -+AC_SUBST(PYTHON_LIBS) -+ - # Find zlib (unless explicitly disabled) - AS_IF([test "x$with_zlib" != xno], - [ AC_CHECK_HEADER([zlib.h], , [AC_MSG_ERROR([missing zlib])]) ---- a/gui-wx/wxpython.cpp -+++ b/gui-wx/wxpython.cpp -@@ -59,8 +59,12 @@ - #undef SIZEOF_SIZE_T - #undef SIZEOF_VOID_P - #else -- // load Python lib at runtime -- #define USE_PYTHON_DYNAMIC -+ // On gentoo just link against python to make -+ // python dependency more explicit. -+ # if 0 -+ // load Python lib at runtime -+ #define USE_PYTHON_DYNAMIC -+ #endif - - #ifdef __UNIX__ - // avoid warning on Linux diff --git a/app-misc/golly/golly-3.4.ebuild b/app-misc/golly/golly-3.4.ebuild deleted file mode 100644 index b1dcbb7f8201..000000000000 --- a/app-misc/golly/golly-3.4.ebuild +++ /dev/null @@ -1,70 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -WX_GTK_VER=3.0-gtk3 -PYTHON_COMPAT=( python3_{7,8,9} ) - -inherit autotools desktop python-single-r1 wxwidgets xdg-utils - -DESCRIPTION="simulator for Conway's Game of Life and other cellular automata" -HOMEPAGE="http://golly.sourceforge.net/" -SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="amd64 x86" -IUSE="" -REQUIRED_USE="${PYTHON_REQUIRED_USE}" - -DEPEND="virtual/opengl - sys-libs/zlib - x11-libs/wxGTK:${WX_GTK_VER}[X,opengl,tiff] - ${PYTHON_DEPS} -" - -RDEPEND="${DEPEND}" - -S=${WORKDIR}/${P}-src - -PATCHES=( - "${FILESDIR}"/${PN}-3.3-nondynamic-python.patch - "${FILESDIR}"/${PN}-3.3-allow-py23-exec.patch - "${FILESDIR}"/${PN}-3.3-glife-py23.patch - "${FILESDIR}"/${PN}-3.3-allow-py3.patch -) - -pkg_setup() { - python-single-r1_pkg_setup - setup-wxwidgets -} - -src_prepare() { - default - - # patches change configure.ac and Makefile.am - pushd gui-wx/configure - eautoreconf - popd -} - -src_configure() { - ECONF_SOURCE=gui-wx/configure econf \ - --with-wxshared -} - -src_install() { - emake docdir= DESTDIR="${D}" install - dodoc docs/ReadMe.html - newicon --size 32 gui-wx/icons/appicon.xpm ${PN}.xpm - make_desktop_entry ${PN} "Golly" ${PN} "Science" -} - -pkg_postinst() { - xdg_icon_cache_update -} - -pkg_postrm() { - xdg_icon_cache_update -} |