Skip to contentSkip to conversation

pidgin: upgrade to 2.14.1 and fix autoconf-2.71 compatibility

PATCH New Martin Jansa 1 participant 1 message Feb 8, 2021 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 pidgin: upgrade to 2.14.1 and fix autoconf-2.71 compatibility

* also log.do_configure is showing this since switch to python3:
DEBUG: Executing shell function do_configure
File "<string>", line 1
import sys ; print sys.version[0:3]
^
SyntaxError: invalid syntax

and this whole line doesn't make much sense and PY_VERSION shouldn't be used in configure.ac since:

commit 9087a59b1c3f9708642a2327b0cf6ecceac0a66f
Author: Martin Jansa <[email protected]>
Date: Thu May 5 16:58:59 2016 +0200

pidgin: use pkg-config instead of hardcoded paths or python-config

* use separate recipe for libgnt (needed only when consoleui PACKAGECONFIG is enabled) with 0.14.0 release libgnt was moved to separate repository

---
 ...son-import-changes-from-3.0.-version.patch | 215 ++++++++++++++++
 .../recipes-support/pidgin/libgnt_2.14.1.bb   |  20 ++
 ...gure.ac-fix-build-with-autoconf-2.71.patch | 229 ++++++++++++++++++
 ...able-few-languages-not-compatible-wi.patch |  49 ++++
 .../pidgin/pidgin-cross-python-265.patch      |  42 ----
 .../pidgin/pidgin/use_py3.patch               |  20 --
 .../{pidgin_2.13.0.bb => pidgin_2.14.1.bb}    |  22 +-
 7 files changed, 521 insertions(+), 76 deletions(-)
 create mode 100644 meta-oe/recipes-support/pidgin/libgnt/0001-meson-import-changes-from-3.0.-version.patch
 create mode 100644 meta-oe/recipes-support/pidgin/libgnt_2.14.1.bb
 create mode 100644 meta-oe/recipes-support/pidgin/pidgin/0001-configure.ac-fix-build-with-autoconf-2.71.patch
 create mode 100644 meta-oe/recipes-support/pidgin/pidgin/0002-configure.ac-disable-few-languages-not-compatible-wi.patch
 delete mode 100644 meta-oe/recipes-support/pidgin/pidgin/pidgin-cross-python-265.patch
 delete mode 100644 meta-oe/recipes-support/pidgin/pidgin/use_py3.patch
 rename meta-oe/recipes-support/pidgin/{pidgin_2.13.0.bb => pidgin_2.14.1.bb} (86%)
meta-oe/recipes-support/pidgin/libgnt/0001-meson-import-changes-from-3.0.-version.patch new file +215 -0
new file mode 100644
index 0000000000..8bb60b5557
@@ -0,0 +1,215 @@
+From 51d66c1c257f7487497f562033ac32ac75f648cb Mon Sep 17 00:00:00 2001
+From: Martin Jansa <[email protected]>
+Date: Mon, 8 Feb 2021 12:27:51 +0100
+Subject: [PATCH] meson: import changes from 3.0.* version
+
+* we need to use the meson option to disable introspection and docs
+
+Upstream-Status: Backport
+Signed-off-by: Martin Jansa <[email protected]>
+---
+ meson.build       | 139 ++++++++++++++++++++++++++++------------------
+ meson_options.txt |   5 ++
+ 2 files changed, 90 insertions(+), 54 deletions(-)
+ create mode 100644 meson_options.txt
+
+diff --git a/meson.build b/meson.build
+index 1084c82..ed040b4 100644
+--- a/meson.build
++++ b/meson.build
+@@ -53,9 +53,9 @@ compiler = meson.get_compiler('c')
+ pkgconfig = import('pkgconfig')
+ 
+ # #######################################################################
+-# # Check for GLib 2.16
++# # Check for GLib 2.44
+ # #######################################################################
+-glib = dependency('glib-2.0', version : '>= 2.16.0')
++glib = dependency('glib-2.0', version : '>= 2.44.0')
+ gobject = dependency('gobject-2.0')
+ gmodule = dependency('gmodule-2.0')
+ gnome = import('gnome')
+@@ -63,74 +63,88 @@ gnome = import('gnome')
+ #######################################################################
+ # Check for LibXML2
+ #######################################################################
+-libxml = dependency('libxml-2.0', version : '>= 2.6.0', required : false)
+-gnt_config.set('NO_LIBXML', not libxml.found())
++libxml = dependency('libxml-2.0', version : '>= 2.6.0')
+ 
+ #######################################################################
+ # Check for ncurses and other things used by it
+ #######################################################################
+ ncurses_available = true
+-ncurses_inc = []
+-# The order of this list is important to the condition that follows.
+-ncurses_libs = [
+-	compiler.find_library('ncursesw', required : false),
+-	compiler.find_library('panelw', required : false),
+-	compiler.find_library('tinfow', required : false),
+-]
+-if not ncurses_libs[0].found() or not ncurses_libs[1].found()
+-	ncurses_available = false
+-endif
++ncurses_widechar = true
++ncurses_header = 'ncurses.h'
++# Some distros put the headers in ncursesw/, some don't. These are ordered to
++# pick the last available as most-specific version.
++ncursesw_header_paths = ['', 'ncursesw/']
+ 
+-if host_machine.system() == 'windows'
+-	# FIXME: $host ?
+-	ncurses_sys_prefix = '/usr/$host/sys-root/mingw'
++ncurses = [
++	dependency('ncursesw', required : false),
++	dependency('panelw', required : false),
++]
++if ncurses[0].found() and ncurses[1].found()
++	foreach location : ncursesw_header_paths
++		f = location + 'ncurses.h'
++		if compiler.has_header_symbol(f, 'get_wch',
++		    prefix : '#define _XOPEN_SOURCE_EXTENDED')
++			ncurses_header = f
++		endif
++	endforeach
+ else
+-	ncurses_sys_prefix = '/usr'
+-endif
+-
+-ncurses_sys_dirs = [ncurses_sys_prefix + '/include/ncursesw',
+-                    ncurses_sys_prefix + '/include']
+-
+-if ncurses_available
+-	# Some distros put the headers in ncursesw/, some don't
+-	found_ncurses_h = false
+-	foreach location : ncurses_sys_dirs
+-		f = location + '/ncurses.h'
+-		if not found_ncurses_h
++	ncurses_available = false
++	ncurses_inc = []
++	ncurses_libs = [
++		compiler.find_library('ncursesw', required : false),
++		compiler.find_library('panelw', required : false)
++	]
++	if ncurses_libs[0].found() and ncurses_libs[1].found()
++		foreach location : ncursesw_header_paths
++			f = location + 'ncurses.h'
+ 			if compiler.has_header_symbol(f, 'get_wch',
+ 			    prefix : '#define _XOPEN_SOURCE_EXTENDED')
+-				if location != '.'
+-					ncurses_inc += [include_directories(location)]
+-				endif
+-				found_ncurses_h = true
++				ncurses_available = true
++				ncurses_header = f
+ 			endif
+-		endif
+-	endforeach
++		endforeach
+ 
+-	if not found_ncurses_h
+-		ncurses_inc = []
+-		ncurses_libs = []
+-		ncurses_available = false
++		if ncurses_available
++			ncurses = declare_dependency(
++			    include_directories : ncurses_inc,
++			    dependencies : ncurses_libs
++			)
++		endif
+ 	endif
+-else
++endif
++
++if not ncurses_available
+ 	# ncursesw was not found. Look for plain old ncurses
+-	# The order of this list is important to the condition that follows.
+-	ncurses_libs = [
+-		compiler.find_library('ncurses', required : false),
+-		compiler.find_library('panel', required : false),
+-		compiler.find_library('tinfo', required : false),
++	ncurses = [
++		dependency('ncurses', required : false),
++		dependency('panel', required : false),
+ 	]
+-	ncurses_available = ncurses_libs[0].found() and ncurses_libs[1].found()
+-	gnt_config.set('NO_WIDECHAR', true)
++	if ncurses[0].found() and ncurses_libs[1].found()
++		ncurses_available = true
++	else
++		ncurses_libs = [
++			compiler.find_library('ncurses', required : false),
++			compiler.find_library('panel', required : false),
++		]
++		ncurses_available = ncurses_libs[0].found() and ncurses_libs[1].found()
++		ncurses = declare_dependency(dependencies : ncurses_libs)
++	endif
++	ncurses_widechar = false
+ endif
++
++if not ncurses_available and host_machine.system() == 'windows'
++	# Try pdcurses too.
++	ncurses_header = 'curses.h'
++	ncurses_libs = compiler.find_library('pdcurses', required : false)
++	ncurses_available = compiler.has_header(ncurses_header) and ncurses_libs.found()
++	ncurses = declare_dependency(dependencies : ncurses_libs)
++endif
++
+ if not ncurses_available
+ 	error('ncurses could not be found!')
+ endif
+-
+-ncurses = declare_dependency(
+-    include_directories : ncurses_inc,
+-    dependencies : ncurses_libs
+-)
++gnt_config.set('NCURSES_HEADER', ncurses_header)
++gnt_config.set10('NCURSES_WIDECHAR', ncurses_widechar)
+ 
+ libgnt_SOURCES = [
+ 	'gntwidget.c',
+@@ -191,7 +205,10 @@ libgnt_headers = [
+ ]
+ 
+ # Check for Python headers
+-python_dep = dependency('python2', required : false)
++python_dep = dependency('python3-embed', required: false)
++if not python_dep.found()
++	python_dep = dependency('python3', required : false)
++endif
+ gnt_config.set('USE_PYTHON', python_dep.found())
+ 
+ configure_file(output : 'gntconfig.h',
+@@ -233,6 +250,20 @@ pkgconfig.generate(
+     variables : ['plugindir = ${libdir}/gnt'],
+     )
+ 
++if get_option('introspection')
++	libgnt_gir = gnome.generate_gir(libgnt,
++	    sources : libgnt_headers + [gnt_h],
++	    includes : 'GObject-2.0',
++	    namespace : 'Gnt',
++	    symbol_prefix : 'gnt',
++	    identifier_prefix : 'Gnt',
++	    nsversion : '@0@.@1@'.format(gnt_major_version, gnt_minor_version),
++	    install : true,
++	    extra_args : ['-DGNT_COMPILATION', '--quiet'])
++endif
++
+ subdir('wms')
+ subdir('test')
+-subdir('doc')
++if get_option('doc')
++	subdir('doc')
++endif
+diff --git a/meson_options.txt b/meson_options.txt
+new file mode 100644
+index 0000000..f2414e2
+--- /dev/null
++++ b/meson_options.txt
+@@ -0,0 +1,5 @@
++option('doc', type : 'boolean', value : true, yield : true,
++       description : 'build documentation with gtk-doc')
++
++option('introspection', type : 'boolean', value : true, yield : true,
++       description : 'build introspection data')
meta-oe/recipes-support/pidgin/libgnt_2.14.1.bb new file +20 -0
new file mode 100644
index 0000000000..67d8cc87ce
@@ -0,0 +1,20 @@
+SUMMARY = "GNT: The GLib Ncurses Toolkit"
+
+SECTION = "libs"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=c9a1abacd0166f595a9fbe6afb1f0d5e"
+DEPENDS = "glib-2.0 ncurses libxml2 glib-2.0-native"
+
+inherit meson
+
+# SRCREV = "0a44b1d01c41"
+# SRC_URI = "hg://keep.imfreedom.org/${BPN};module=${BPN}
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/project/pidgin/${BPN}/${PV}/${BP}.tar.xz \
+    file://0001-meson-import-changes-from-3.0.-version.patch \
+"
+SRC_URI[sha256sum] = "5ec3e68e18f956e9998d79088b299fa3bca689bcc95c86001bc5da17c1eb4bd8"
+
+EXTRA_OEMESON = "-Dintrospection=false -Ddoc=false"
+
+FILES_${PN} += "${libdir}/gnt/s.so ${libdir}/gnt/irssi.so"
meta-oe/recipes-support/pidgin/pidgin/0001-configure.ac-fix-build-with-autoconf-2.71.patch new file +229 -0

229 lines not on this page · raw message

meta-oe/recipes-support/pidgin/pidgin/0002-configure.ac-disable-few-languages-not-compatible-wi.patch new file +49 -0

49 lines not on this page · raw message

meta-oe/recipes-support/pidgin/pidgin/pidgin-cross-python-265.patch deleted +0 -42

42 lines not on this page · raw message

meta-oe/recipes-support/pidgin/pidgin/use_py3.patch deleted +0 -20
deleted file mode 100644
index c7b4163cb5..0000000000
@@ -1,20 +0,0 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -1488,7 +1488,7 @@ AC_ARG_WITH([python],
- 
- if test "x$enable_dbus" = "xyes" || test "x$enable_consoleui" = "xyes" ; then
- 	if test -z "$PYTHON" -o "x$PYTHON" = "xyes"; then
--		AC_PATH_PROG([PYTHON], [python], [no])
-+		AC_PATH_PROG([PYTHON], [python3], [no])
- 	fi
- 
- 	if test x"$PYTHON" = x"no" ; then
-@@ -1568,7 +1568,7 @@ dnl Check for Python headers (currently
- dnl (Thanks to XChat)
- if test "x$enable_consoleui" = "xyes" -a ! -z "$PYTHON" -a x"$PYTHON" != x"no" ; then
-         AC_MSG_CHECKING(for Python compile flags)
--        PKG_CHECK_MODULES(PY, python, [
-+        PKG_CHECK_MODULES(PY, python3, [
-                 AC_SUBST(PY_CFLAGS)
-                 AC_SUBST(PY_LIBS)
-         ], [
meta-oe/recipes-support/pidgin/pidgin_2.14.1.bb renamed from meta-oe/recipes-support/pidgin/pidgin_2.13.0.bb +8 -14
similarity index 86%
rename from meta-oe/recipes-support/pidgin/pidgin_2.13.0.bb
rename to meta-oe/recipes-support/pidgin/pidgin_2.14.1.bb
index fdc79e81b2..d22380eb0d 100644
@@ -1,4 +1,5 @@
 SUMMARY = "multi-protocol instant messaging client"
+
 SECTION = "x11/network"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
@@ -10,12 +11,11 @@ SRC_URI = "\
     ${SOURCEFORGE_MIRROR}/pidgin/pidgin-${PV}.tar.bz2 \
     file://sanitize-configure.ac.patch \
     file://purple-OE-branding-25.patch \
-    file://pidgin-cross-python-265.patch \
-    file://use_py3.patch \
+    file://0001-configure.ac-fix-build-with-autoconf-2.71.patch \
+    file://0002-configure.ac-disable-few-languages-not-compatible-wi.patch \
 "
 
-SRC_URI[md5sum] = "423403494fe1951e47cc75231f743bb0"
-SRC_URI[sha256sum] = "2747150c6f711146bddd333c496870bfd55058bab22ffb7e4eb784018ec46d8f"
+SRC_URI[sha256sum] = "f132e18d551117d9e46acce29ba4f40892a86746c366999166a3862b51060780"
 
 PACKAGECONFIG ??= "gnutls consoleui avahi dbus idn nss \
     ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 gtk startup-notification', '', d)} \
@@ -34,13 +34,14 @@ PACKAGECONFIG[idn] = "--enable-idn,--disable-idn,libidn"
 PACKAGECONFIG[gtk] = "--enable-gtkui,--disable-gtkui,gtk+"
 PACKAGECONFIG[x11] = "--with-x=yes --x-includes=${STAGING_INCDIR} --x-libraries=${STAGING_LIBDIR},--with-x=no,virtual/libx11"
 PACKAGECONFIG[startup-notification] = "--enable-startup-notification,--disable-startup-notification,startup-notification"
-PACKAGECONFIG[consoleui] = "--enable-consoleui --with-ncurses-headers=${STAGING_INCDIR},--disable-consoleui,ncurses"
+PACKAGECONFIG[consoleui] = "--enable-consoleui --with-ncurses-headers=${STAGING_INCDIR},--disable-consoleui,libgnt"
 PACKAGECONFIG[gnutls] = "--enable-gnutls --with-gnutls-includes=${STAGING_INCDIR} --with-gnutls-libs=${STAGING_LIBDIR},--disable-gnutls,gnutls,libpurple-plugin-ssl-gnutls"
 PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus dbus-glib"
 PACKAGECONFIG[avahi] = "--enable-avahi,--disable-avahi,avahi"
 PACKAGECONFIG[nss] = "--enable-nss,--disable-nss,nss nspr,libpurple-plugin-ssl-nss"
 
 EXTRA_OECONF = " \
+    --with-python=python3 \
     --disable-perl \
     --disable-tcl \
     --disable-gevolution \
@@ -51,17 +52,12 @@ EXTRA_OECONF = " \
     --disable-screensaver \
 "
 
-do_configure_prepend() {
-    touch ${S}/po/Makefile
-    sed -i "s#PY_VERSION=`$PYTHON -c 'import sys ; print sys.version[0:3]'`#PY_VERSION=${PYTHON_BASEVERSION}#g" ${S}/configure.ac
-}
-
 OE_LT_RPATH_ALLOW=":${libdir}/purple-2:"
 OE_LT_RPATH_ALLOW[export]="1"
 
-PACKAGES =+ "libpurple-dev libpurple libgnt libgnt-dev finch finch-dev ${PN}-data"
+PACKAGES =+ "libpurple-dev libpurple finch finch-dev ${PN}-data"
 
-RPROVIDES_${PN}-dbg += "libpurple-dbg libgnt-dbg finch-dbg"
+RPROVIDES_${PN}-dbg += "libpurple-dbg finch-dbg"
 
 LEAD_SONAME = "libpurple.so.0"
 FILES_libpurple     = "${libdir}/libpurple*.so.* ${libdir}/purple-2 ${bindir}/purple-* ${sysconfdir}/gconf/schemas/purple* ${datadir}/purple/ca-certs"
@@ -72,8 +68,6 @@ FILES_libpurple-dev = "${libdir}/libpurple*.la \
                        ${libdir}/purple-2/liboscar.so \
                        ${libdir}/purple-2/libymsg.so \
                        ${datadir}/aclocal"
-FILES_libgnt         = "${libdir}/libgnt.so.* ${libdir}/gnt/*.so"
-FILES_libgnt-dev     = "${libdir}/gnt/*.la"
 FILES_finch          = "${bindir}/finch"
 FILES_finch-dev      = "${libdir}/finch/*.la"
 
Signature · 1 line
2.27.0