diff options
author | Jochen Neumeister <joneum@FreeBSD.org> | 2019-01-10 16:35:25 +0800 |
---|---|---|
committer | Jochen Neumeister <joneum@FreeBSD.org> | 2019-01-10 16:35:25 +0800 |
commit | c2d46dcf7fc6938fdd925d3459a375661db8e70b (patch) | |
tree | 95f67ec6a6d75d532787015b3d6a903c4658b611 /mail | |
parent | cade964ec2259cda99ccd98e3ddc285af143f73b (diff) | |
download | freebsd-ports-gnome-c2d46dcf7fc6938fdd925d3459a375661db8e70b.tar.gz freebsd-ports-gnome-c2d46dcf7fc6938fdd925d3459a375661db8e70b.tar.zst freebsd-ports-gnome-c2d46dcf7fc6938fdd925d3459a375661db8e70b.zip |
- Switch to python3 and fix build
- Unbreak mail/claws-mail-python
Submitted by: mmokhi
Sponsored by: Netzkommune GmbH
Differential Revision: https://reviews.freebsd.org/D18800
Diffstat (limited to 'mail')
-rw-r--r-- | mail/claws-mail-python/Makefile | 4 | ||||
-rw-r--r-- | mail/claws-mail/Makefile | 5 | ||||
-rw-r--r-- | mail/claws-mail/Makefile.claws | 2 | ||||
-rw-r--r-- | mail/claws-mail/files/patch-configure.ac | 20 | ||||
-rw-r--r-- | mail/claws-mail/files/patch-src_plugins_python_accounttype.c | 22 | ||||
-rw-r--r-- | mail/claws-mail/files/patch-src_plugins_python_composewindowtype.c | 20 | ||||
-rw-r--r-- | mail/claws-mail/files/patch-src_plugins_python_folderpropertiestype.c | 11 | ||||
-rw-r--r-- | mail/claws-mail/files/patch-src_plugins_python_foldertype.c | 11 | ||||
-rw-r--r-- | mail/claws-mail/files/patch-src_plugins_python_mailboxtype.c | 11 | ||||
-rw-r--r-- | mail/claws-mail/files/patch-src_plugins_python_messageinfotype.c | 11 |
10 files changed, 111 insertions, 6 deletions
diff --git a/mail/claws-mail-python/Makefile b/mail/claws-mail-python/Makefile index acf35b2246ac..b3b62aa63378 100644 --- a/mail/claws-mail-python/Makefile +++ b/mail/claws-mail-python/Makefile @@ -2,12 +2,10 @@ # $FreeBSD$ PORTNAME= python -PORTREVISION= 0 +PORTREVISION= 1 COMMENT= Python scripting plugin for Claws Mail -BROKEN= fails to stage - USE_GNOME= pygtk2 CLAWS_PLUGINS_BUILD= python diff --git a/mail/claws-mail/Makefile b/mail/claws-mail/Makefile index 3692516b0b14..14a5ae0d1479 100644 --- a/mail/claws-mail/Makefile +++ b/mail/claws-mail/Makefile @@ -2,6 +2,7 @@ # $FreeBSD$ PORTNAME= claws-mail +PORTREVISION= 1 CATEGORIES= mail news ipv6 COMMENT= Lightweight and featureful GTK+ based e-mail and news client @@ -20,8 +21,8 @@ LIB_DEPENDS= libcurl.so:ftp/curl \ libnettle.so:security/nettle RUN_DEPENDS= mime-support>0:misc/mime-support -USES= compiler:c++11-lang cpe desktop-file-utils gnome pathfix \ - python:2.7 shebangfix ssl +USES= autoreconf gettext-tools compiler:c++11-lang cpe desktop-file-utils gettext gnome pathfix \ + python:3.6 shebangfix ssl USE_XORG= ice sm USE_GNOME= cairo gtk20 librsvg2 SHEBANG_FILES= tools/*.pl tools/*.py tools/tb2claws-mail diff --git a/mail/claws-mail/Makefile.claws b/mail/claws-mail/Makefile.claws index f07d364bbc86..0be677b819d7 100644 --- a/mail/claws-mail/Makefile.claws +++ b/mail/claws-mail/Makefile.claws @@ -8,7 +8,7 @@ MAINTAINER= joneum@FreeBSD.org LICENSE= GPLv3 -USES+= gettext-runtime gmake iconv libtool pkgconfig tar:xz +USES+= autoreconf gettext-tools gmake iconv libtool pkgconfig tar:xz GNU_CONFIGURE= yes CONFIGURE_ARGS= ${ICONV_CONFIGURE_ARG} --disable-dbus --disable-static diff --git a/mail/claws-mail/files/patch-configure.ac b/mail/claws-mail/files/patch-configure.ac new file mode 100644 index 000000000000..77a5cecc27a0 --- /dev/null +++ b/mail/claws-mail/files/patch-configure.ac @@ -0,0 +1,20 @@ +--- configure.ac.orig 2019-01-08 23:08:21 UTC ++++ configure.ac +@@ -1268,7 +1268,7 @@ fi + + dnl Python ********************************************************************* + AM_PATH_PYTHON([2.5], [ +- AC_PATH_PROG(PYTHON_CONFIG, python$PYTHON_VERSION-config) ++ AC_PATH_PROG(PYTHON_CONFIG, python"$PYTHON_VERSION"m-config) + if test x"$PYTHON_CONFIG" = x"" ; then + AC_PATH_PROG(PYTHON_CONFIG, python-config) + fi +@@ -1286,7 +1286,7 @@ AM_PATH_PYTHON([2.5], [ + _save_libs="$LIBS" + if test x"$platform_win32" = xno; then + # libpython.so +- PYTHON_SHARED_LIB="libpython${PYTHON_VERSION}.so" ++ PYTHON_SHARED_LIB="libpython${PYTHON_VERSION}m.so" + AC_CHECK_LIB(dl, dlopen, [LIBS="-ldl"]) + AC_MSG_CHECKING([whether to dlopen $PYTHON_SHARED_LIB works]) + AC_RUN_IFELSE( diff --git a/mail/claws-mail/files/patch-src_plugins_python_accounttype.c b/mail/claws-mail/files/patch-src_plugins_python_accounttype.c new file mode 100644 index 000000000000..38cb9bdda8ad --- /dev/null +++ b/mail/claws-mail/files/patch-src_plugins_python_accounttype.c @@ -0,0 +1,22 @@ +--- src/plugins/python/accounttype.c.orig 2018-09-10 13:00:33 UTC ++++ src/plugins/python/accounttype.c +@@ -24,6 +24,10 @@ + + #include <structmember.h> + ++#if PY_MAJOR_VERSION == 3 ++typedef int (*cmpfunc)(PyObject *, PyObject *); ++#endif ++ + typedef struct { + PyObject_HEAD + PrefsAccount *account; +@@ -38,7 +42,7 @@ static int Account_init(clawsmail_Accoun + + static void Account_dealloc(clawsmail_AccountObject* self) + { +- self->ob_type->tp_free((PyObject*)self); ++ Py_TYPE(self)->tp_free((PyObject*)self); + } + + static int Account_compare(clawsmail_AccountObject *obj1, clawsmail_AccountObject *obj2) diff --git a/mail/claws-mail/files/patch-src_plugins_python_composewindowtype.c b/mail/claws-mail/files/patch-src_plugins_python_composewindowtype.c new file mode 100644 index 000000000000..550fcf2ceb46 --- /dev/null +++ b/mail/claws-mail/files/patch-src_plugins_python_composewindowtype.c @@ -0,0 +1,20 @@ +--- src/plugins/python/composewindowtype.c.orig 2019-01-09 18:38:06 UTC ++++ src/plugins/python/composewindowtype.c +@@ -54,7 +54,7 @@ static void ComposeWindow_dealloc(clawsm + Py_XDECREF(self->text); + Py_XDECREF(self->replyinfo); + Py_XDECREF(self->fwdinfo); +- self->ob_type->tp_free((PyObject*)self); ++ Py_TYPE(self)->tp_free((PyObject*)self); + } + + static void flush_gtk_queue(void) +@@ -345,7 +345,7 @@ static PyObject* ComposeWindow_set_heade + headerfield = PyTuple_GetItem(element, 0); + headercontent = PyTuple_GetItem(element, 1); + if(!headerfield || !headercontent +- || !PyObject_TypeCheck(headerfield, &PyString_Type) || !PyObject_TypeCheck(headercontent, &PyString_Type)) { ++ || !PyObject_TypeCheck(headerfield, &PyBytes_Type) || !PyObject_TypeCheck(headercontent, &PyBytes_Type)) { + PyErr_SetString(PyExc_LookupError, "Argument to set_header_list() must be a list of tuples with two strings"); + return NULL; + } diff --git a/mail/claws-mail/files/patch-src_plugins_python_folderpropertiestype.c b/mail/claws-mail/files/patch-src_plugins_python_folderpropertiestype.c new file mode 100644 index 000000000000..3ddce6ef76b2 --- /dev/null +++ b/mail/claws-mail/files/patch-src_plugins_python_folderpropertiestype.c @@ -0,0 +1,11 @@ +--- src/plugins/python/folderpropertiestype.c.orig 2019-01-09 18:47:36 UTC ++++ src/plugins/python/folderpropertiestype.c +@@ -38,7 +38,7 @@ static int FolderProperties_init(clawsma + + static void FolderProperties_dealloc(clawsmail_FolderPropertiesObject* self) + { +- self->ob_type->tp_free((PyObject*)self); ++ Py_TYPE(self)->tp_free((PyObject*)self); + } + + static PyObject* get_default_account(clawsmail_FolderPropertiesObject *self, void *closure) diff --git a/mail/claws-mail/files/patch-src_plugins_python_foldertype.c b/mail/claws-mail/files/patch-src_plugins_python_foldertype.c new file mode 100644 index 000000000000..e6394fc14abb --- /dev/null +++ b/mail/claws-mail/files/patch-src_plugins_python_foldertype.c @@ -0,0 +1,11 @@ +--- src/plugins/python/foldertype.c.orig 2019-01-09 18:47:36 UTC ++++ src/plugins/python/foldertype.c +@@ -40,7 +40,7 @@ typedef struct { + static void Folder_dealloc(clawsmail_FolderObject* self) + { + Py_XDECREF(self->properties); +- self->ob_type->tp_free((PyObject*)self); ++ Py_TYPE(self)->tp_free((PyObject*)self); + } + + static int Folder_init(clawsmail_FolderObject *self, PyObject *args, PyObject *kwds) diff --git a/mail/claws-mail/files/patch-src_plugins_python_mailboxtype.c b/mail/claws-mail/files/patch-src_plugins_python_mailboxtype.c new file mode 100644 index 000000000000..93a1a52d38e1 --- /dev/null +++ b/mail/claws-mail/files/patch-src_plugins_python_mailboxtype.c @@ -0,0 +1,11 @@ +--- src/plugins/python/mailboxtype.c.orig 2019-01-09 18:47:36 UTC ++++ src/plugins/python/mailboxtype.c +@@ -41,7 +41,7 @@ static int Mailbox_init(clawsmail_Mailbo + static void Mailbox_dealloc(clawsmail_MailboxObject* self) + { + self->folder = NULL; +- self->ob_type->tp_free((PyObject*)self); ++ Py_TYPE(self)->tp_free((PyObject*)self); + } + + static PyObject* Mailbox_str(clawsmail_MailboxObject *self) diff --git a/mail/claws-mail/files/patch-src_plugins_python_messageinfotype.c b/mail/claws-mail/files/patch-src_plugins_python_messageinfotype.c new file mode 100644 index 000000000000..9644d6a4dc6d --- /dev/null +++ b/mail/claws-mail/files/patch-src_plugins_python_messageinfotype.c @@ -0,0 +1,11 @@ +--- src/plugins/python/messageinfotype.c.orig 2019-01-09 18:47:36 UTC ++++ src/plugins/python/messageinfotype.c +@@ -43,7 +43,7 @@ typedef struct { + + static void MessageInfo_dealloc(clawsmail_MessageInfoObject* self) + { +- self->ob_type->tp_free((PyObject*)self); ++ Py_TYPE(self)->tp_free((PyObject*)self); + } + + static int MessageInfo_init(clawsmail_MessageInfoObject *self, PyObject *args, PyObject *kwds) |