From owner-svn-ports-all@freebsd.org Sun Sep 13 15:49:03 2020 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8D2943DDBF1; Sun, 13 Sep 2020 15:49:03 +0000 (UTC) (envelope-from tcberner@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BqDSH2g5Gz4KfW; Sun, 13 Sep 2020 15:49:03 +0000 (UTC) (envelope-from tcberner@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3BE8B8810; Sun, 13 Sep 2020 15:49:03 +0000 (UTC) (envelope-from tcberner@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08DFn3YN035221; Sun, 13 Sep 2020 15:49:03 GMT (envelope-from tcberner@FreeBSD.org) Received: (from tcberner@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08DFn2xZ035218; Sun, 13 Sep 2020 15:49:02 GMT (envelope-from tcberner@FreeBSD.org) Message-Id: <202009131549.08DFn2xZ035218@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tcberner set sender to tcberner@FreeBSD.org using -f From: "Tobias C. Berner" Date: Sun, 13 Sep 2020 15:49:02 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r548482 - head/x11-fm/nautilus-python/files X-SVN-Group: ports-head X-SVN-Commit-Author: tcberner X-SVN-Commit-Paths: head/x11-fm/nautilus-python/files X-SVN-Commit-Revision: 548482 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Sep 2020 15:49:03 -0000 Author: tcberner Date: Sun Sep 13 15:49:02 2020 New Revision: 548482 URL: https://svnweb.freebsd.org/changeset/ports/548482 Log: x11-fm/nautilus-python: fix build on current - fixes build with -fcommon Backport of patch from Debian: From: Andreas Henriksson Subject: Fix build with gcc 10 Bug-Debian: https://bugs.debian.org/957578 Forwarded: https://gitlab.gnome.org/GNOME/nautilus-python/-/merge_requests/7 Last-Update: 2020-05-11 Obtained from: https://sources.debian.org/src/nautilus-python/1.2.3-3/debian/patches/gcc10.patch/ Added: head/x11-fm/nautilus-python/files/ head/x11-fm/nautilus-python/files/patch-src_nautilus-python-object.c (contents, props changed) head/x11-fm/nautilus-python/files/patch-src_nautilus-python.c (contents, props changed) head/x11-fm/nautilus-python/files/patch-src_nautilus-python.h (contents, props changed) Added: head/x11-fm/nautilus-python/files/patch-src_nautilus-python-object.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11-fm/nautilus-python/files/patch-src_nautilus-python-object.c Sun Sep 13 15:49:02 2020 (r548482) @@ -0,0 +1,44 @@ +--- src/nautilus-python-object.c.orig 2020-09-13 15:40:21 UTC ++++ src/nautilus-python-object.c +@@ -49,7 +49,7 @@ int __PyString_Check(PyObject *obj) { + #endif + } + +-char* __PyString_AsString(PyObject *obj) { ++const char* __PyString_AsString(PyObject *obj) { + #if PY_MAJOR_VERSION >= 3 + return PyUnicode_AsUTF8(obj); + #else +@@ -398,7 +398,7 @@ beach: + #define METHOD_NAME "update_file_info" + static NautilusOperationResult + nautilus_python_object_update_file_info (NautilusInfoProvider *provider, +- NautilusFile *file, ++ NautilusFileInfo *file_info, + GClosure *update_complete, + NautilusOperationHandle **handle) { + NautilusPythonObject *object = (NautilusPythonObject*)provider; +@@ -417,12 +417,12 @@ nautilus_python_object_update_file_info (NautilusInfoP + pygobject_new((GObject*)provider), + py_handle, + pyg_boxed_new(G_TYPE_CLOSURE, update_complete, TRUE, TRUE), +- pygobject_new((GObject*)file)); ++ pygobject_new((GObject*)file_info)); + } + else if (PyObject_HasAttrString(object->instance, "update_file_info")) { + py_ret = PyObject_CallMethod(object->instance, + METHOD_PREFIX METHOD_NAME, "(N)", +- pygobject_new((GObject*)file)); ++ pygobject_new((GObject*)file_info)); + } + else { + goto beach; +@@ -443,7 +443,7 @@ nautilus_python_object_update_file_info (NautilusInfoP + #endif + + beach: +- free_pygobject_data(file, NULL); ++ free_pygobject_data(file_info, NULL); + Py_XDECREF(py_ret); + pyg_gil_state_release(state); + return ret; Added: head/x11-fm/nautilus-python/files/patch-src_nautilus-python.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11-fm/nautilus-python/files/patch-src_nautilus-python.c Sun Sep 13 15:49:02 2020 (r548482) @@ -0,0 +1,28 @@ +--- src/nautilus-python.c.orig 2020-09-13 15:42:41 UTC ++++ src/nautilus-python.c +@@ -22,6 +22,7 @@ + #endif + + #include ++#define NO_IMPORT_PYGOBJECT //To avoid a multiple definition, nautilus-python-object.c also includes and does the import. + #include + #include + #include +@@ -41,6 +42,17 @@ static gboolean nautilus_python_init_python(void); + + static GArray *all_types = NULL; + ++PyTypeObject *_PyGtkWidget_Type; ++PyTypeObject *_PyNautilusColumn_Type; ++PyTypeObject *_PyNautilusColumnProvider_Type; ++PyTypeObject *_PyNautilusInfoProvider_Type; ++PyTypeObject *_PyNautilusLocationWidgetProvider_Type; ++PyTypeObject *_PyNautilusMenu_Type; ++PyTypeObject *_PyNautilusMenuItem_Type; ++PyTypeObject *_PyNautilusMenuProvider_Type; ++PyTypeObject *_PyNautilusPropertyPage_Type; ++PyTypeObject *_PyNautilusPropertyPageProvider_Type; ++PyTypeObject *_PyNautilusOperationHandle_Type; + + static inline gboolean + np_init_pygobject(void) { Added: head/x11-fm/nautilus-python/files/patch-src_nautilus-python.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11-fm/nautilus-python/files/patch-src_nautilus-python.h Sun Sep 13 15:49:02 2020 (r548482) @@ -0,0 +1,51 @@ +--- src/nautilus-python.h.orig 2020-09-13 15:43:39 UTC ++++ src/nautilus-python.h +@@ -43,37 +43,37 @@ extern NautilusPythonDebug nautilus_python_debug; + #define debug_enter_args(x, y) { if (nautilus_python_debug & NAUTILUS_PYTHON_DEBUG_MISC) \ + g_printf("%s: entered " x "\n", __FUNCTION__, y); } + +-PyTypeObject *_PyGtkWidget_Type; ++extern PyTypeObject *_PyGtkWidget_Type; + #define PyGtkWidget_Type (*_PyGtkWidget_Type) + +-PyTypeObject *_PyNautilusColumn_Type; ++extern PyTypeObject *_PyNautilusColumn_Type; + #define PyNautilusColumn_Type (*_PyNautilusColumn_Type) + +-PyTypeObject *_PyNautilusColumnProvider_Type; ++extern PyTypeObject *_PyNautilusColumnProvider_Type; + #define PyNautilusColumnProvider_Type (*_PyNautilusColumnProvider_Type) + +-PyTypeObject *_PyNautilusInfoProvider_Type; ++extern PyTypeObject *_PyNautilusInfoProvider_Type; + #define PyNautilusInfoProvider_Type (*_PyNautilusInfoProvider_Type) + +-PyTypeObject *_PyNautilusLocationWidgetProvider_Type; ++extern PyTypeObject *_PyNautilusLocationWidgetProvider_Type; + #define PyNautilusLocationWidgetProvider_Type (*_PyNautilusLocationWidgetProvider_Type) + +-PyTypeObject *_PyNautilusMenu_Type; ++extern PyTypeObject *_PyNautilusMenu_Type; + #define PyNautilusMenu_Type (*_PyNautilusMenu_Type) + +-PyTypeObject *_PyNautilusMenuItem_Type; ++extern PyTypeObject *_PyNautilusMenuItem_Type; + #define PyNautilusMenuItem_Type (*_PyNautilusMenuItem_Type) + +-PyTypeObject *_PyNautilusMenuProvider_Type; ++extern PyTypeObject *_PyNautilusMenuProvider_Type; + #define PyNautilusMenuProvider_Type (*_PyNautilusMenuProvider_Type) + +-PyTypeObject *_PyNautilusPropertyPage_Type; ++extern PyTypeObject *_PyNautilusPropertyPage_Type; + #define PyNautilusPropertyPage_Type (*_PyNautilusPropertyPage_Type) + +-PyTypeObject *_PyNautilusPropertyPageProvider_Type; ++extern PyTypeObject *_PyNautilusPropertyPageProvider_Type; + #define PyNautilusPropertyPageProvider_Type (*_PyNautilusPropertyPageProvider_Type) + +-PyTypeObject *_PyNautilusOperationHandle_Type; ++extern PyTypeObject *_PyNautilusOperationHandle_Type; + #define PyNautilusOperationHandle_Type (*_PyNautilusOperationHandle_Type) + + #endif /* NAUTILUS_PYTHON_H */