glib2: update to 2.74.0
Remove upstreamed patch and delete pointless one. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
c978cbaad5
commit
5d27631d9f
4 changed files with 15 additions and 162 deletions
|
@ -8,12 +8,12 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=glib2
|
PKG_NAME:=glib2
|
||||||
PKG_VERSION:=2.70.5
|
PKG_VERSION:=2.74.0
|
||||||
PKG_RELEASE:=$(AUTORELEASE)
|
PKG_RELEASE:=$(AUTORELEASE)
|
||||||
|
|
||||||
PKG_SOURCE:=glib-$(PKG_VERSION).tar.xz
|
PKG_SOURCE:=glib-$(PKG_VERSION).tar.xz
|
||||||
PKG_SOURCE_URL:=@GNOME/glib/2.70
|
PKG_SOURCE_URL:=@GNOME/glib/$(word 1,$(subst ., ,$(PKG_VERSION))).$(word 2,$(subst ., ,$(PKG_VERSION)))
|
||||||
PKG_HASH:=f70bf76ebcc84e0705722f038be8e2f9a58d17e1a700810c635fcc18b8974b7e
|
PKG_HASH:=3652c7f072d7b031a6b5edd623f77ebc5dcd2ae698598abcc89ff39ca75add30
|
||||||
|
|
||||||
PKG_MAINTAINER:=Peter Wagner <tripolar@gmx.at>
|
PKG_MAINTAINER:=Peter Wagner <tripolar@gmx.at>
|
||||||
PKG_LICENSE:=LGPL-2.1-or-later
|
PKG_LICENSE:=LGPL-2.1-or-later
|
||||||
|
@ -22,7 +22,6 @@ PKG_CPE_ID:=cpe:/a:gnome:glib
|
||||||
|
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/glib-$(PKG_VERSION)
|
PKG_BUILD_DIR:=$(BUILD_DIR)/glib-$(PKG_VERSION)
|
||||||
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/glib-$(PKG_VERSION)
|
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/glib-$(PKG_VERSION)
|
||||||
HOST_BUILD_DEPENDS:=libffi/host pcre/host
|
|
||||||
PKG_CONFIG_DEPENDS:=CONFIG_BUILD_NLS
|
PKG_CONFIG_DEPENDS:=CONFIG_BUILD_NLS
|
||||||
PKG_FORTIFY_SOURCE:=0
|
PKG_FORTIFY_SOURCE:=0
|
||||||
|
|
||||||
|
@ -34,7 +33,7 @@ include $(INCLUDE_DIR)/meson.mk
|
||||||
define Package/glib2
|
define Package/glib2
|
||||||
SECTION:=libs
|
SECTION:=libs
|
||||||
CATEGORY:=Libraries
|
CATEGORY:=Libraries
|
||||||
DEPENDS:=$(ICONV_DEPENDS) $(INTL_DEPENDS) +zlib +libpthread +libffi +libattr +libpcre
|
DEPENDS:=$(ICONV_DEPENDS) $(INTL_DEPENDS) +zlib +libpthread +libffi +libattr +libpcre2
|
||||||
TITLE:=glib 2.0
|
TITLE:=glib 2.0
|
||||||
URL:=http://www.gtk.org/
|
URL:=http://www.gtk.org/
|
||||||
endef
|
endef
|
||||||
|
@ -56,7 +55,6 @@ COMP_ARGS= \
|
||||||
-Dgtk_doc=false \
|
-Dgtk_doc=false \
|
||||||
-Dbsymbolic_functions=true \
|
-Dbsymbolic_functions=true \
|
||||||
-Dforce_posix_threads=true \
|
-Dforce_posix_threads=true \
|
||||||
-Dfam=false \
|
|
||||||
-Dtests=false \
|
-Dtests=false \
|
||||||
-Dinstalled_tests=false \
|
-Dinstalled_tests=false \
|
||||||
-Doss_fuzz=disabled \
|
-Doss_fuzz=disabled \
|
||||||
|
@ -65,7 +63,7 @@ COMP_ARGS= \
|
||||||
-Dglib_checks=true \
|
-Dglib_checks=true \
|
||||||
-Dlibelf=disabled
|
-Dlibelf=disabled
|
||||||
|
|
||||||
MESON_HOST_ARGS += $(COMP_ARGS) -Dxattr=false -Ddefault_library=static -Dnls=disabled
|
MESON_HOST_ARGS += $(COMP_ARGS) -Dxattr=false -Ddefault_library=static -Dnls=disabled -Dwrap_mode=forcefallback
|
||||||
MESON_ARGS += $(COMP_ARGS) -Dxattr=true -Db_lto=true -Ddefault_library=both -Dnls=$(if $(CONFIG_BUILD_NLS),en,dis)abled
|
MESON_ARGS += $(COMP_ARGS) -Dxattr=true -Db_lto=true -Ddefault_library=both -Dnls=$(if $(CONFIG_BUILD_NLS),en,dis)abled
|
||||||
|
|
||||||
define Build/InstallDev
|
define Build/InstallDev
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
--- a/meson.build
|
|
||||||
+++ b/meson.build
|
|
||||||
@@ -948,7 +948,7 @@ if host_system == 'windows' and (cc.get_
|
|
||||||
glib_conf.set('HAVE_C99_SNPRINTF', false)
|
|
||||||
glib_conf.set('HAVE_C99_VSNPRINTF', false)
|
|
||||||
glib_conf.set('HAVE_UNIX98_PRINTF', false)
|
|
||||||
-elif not cc_can_run and host_system in ['ios', 'darwin']
|
|
||||||
+elif true
|
|
||||||
# All these are true when compiling natively on macOS, so we should use good
|
|
||||||
# defaults when building for iOS and tvOS.
|
|
||||||
glib_conf.set('HAVE_C99_SNPRINTF', true)
|
|
|
@ -1,144 +0,0 @@
|
||||||
From 750687bf2824fcaf8976fb8b558d583f29acdfeb Mon Sep 17 00:00:00 2001
|
|
||||||
From: Eli Schwartz <eschwartz@archlinux.org>
|
|
||||||
Date: Tue, 7 Jun 2022 16:14:04 -0400
|
|
||||||
Subject: [PATCH 1/2] meson: simplify iconv lookups using Meson's builtin
|
|
||||||
dependency lookup
|
|
||||||
|
|
||||||
iconv is complicated to look up. That complexity now resides in
|
|
||||||
Meson, since 0.60.0, via a `dependency('iconv')` lookup, so use that
|
|
||||||
instead.
|
|
||||||
|
|
||||||
No effort is made to support the old option for which type of iconv to
|
|
||||||
use. It was a false choice, because if only one was available, then
|
|
||||||
that's the only one you can use, and if both are available, the external
|
|
||||||
iconv shadows the builtin one and renders the builtin one unusable,
|
|
||||||
so there is still only one you can use.
|
|
||||||
|
|
||||||
This meant that when configuring glib with -Diconv=libc on systems that
|
|
||||||
had an external iconv, the configure check would detect a valid libc
|
|
||||||
iconv, try to use it, and then fail during the build because iconv.h
|
|
||||||
belongs to the external iconv and generates machine code using the
|
|
||||||
external iconv ABI, but fails to link to the iconv `find_library()`.
|
|
||||||
Meson handles this transparently.
|
|
||||||
---
|
|
||||||
meson.build | 20 +-------------------
|
|
||||||
meson_options.txt | 8 +-------
|
|
||||||
2 files changed, 2 insertions(+), 26 deletions(-)
|
|
||||||
|
|
||||||
--- a/meson.build
|
|
||||||
+++ b/meson.build
|
|
||||||
@@ -1958,28 +1958,10 @@ glibconfig_conf.set10('G_HAVE_GROWING_ST
|
|
||||||
# We should never use the MinGW C library's iconv because it may not be
|
|
||||||
# available in the actual runtime environment. On Windows, we always use
|
|
||||||
# the built-in implementation
|
|
||||||
-iconv_opt = get_option('iconv')
|
|
||||||
if host_system == 'windows'
|
|
||||||
libiconv = []
|
|
||||||
- # We have a #include "win_iconv.c" in gconvert.c on Windows, so we don't need
|
|
||||||
- # any external library for it
|
|
||||||
- if iconv_opt != 'auto'
|
|
||||||
- warning('-Diconv was set to @0@, which was ignored')
|
|
||||||
- endif
|
|
||||||
else
|
|
||||||
- found_iconv = false
|
|
||||||
- if ['auto', 'libc'].contains(iconv_opt) and cc.has_function('iconv_open')
|
|
||||||
- libiconv = []
|
|
||||||
- found_iconv = true
|
|
||||||
- endif
|
|
||||||
- if not found_iconv and ['auto', 'external'].contains(iconv_opt) and cc.has_header_symbol('iconv.h', 'iconv_open')
|
|
||||||
- libiconv = [cc.find_library('iconv')]
|
|
||||||
- found_iconv = true
|
|
||||||
- endif
|
|
||||||
-
|
|
||||||
- if not found_iconv
|
|
||||||
- error('iconv implementation "@0@" not found'.format(iconv_opt))
|
|
||||||
- endif
|
|
||||||
+ libiconv = dependency('iconv')
|
|
||||||
endif
|
|
||||||
|
|
||||||
pcre = dependency('libpcre', version: '>= 8.31', required : false) # Should check for Unicode support, too. FIXME
|
|
||||||
@@ -2046,42 +2028,37 @@ endif
|
|
||||||
# FIXME: glib-gettext.m4 has much more checks to detect broken/uncompatible
|
|
||||||
# implementations. This could be extended if issues are found in some platforms.
|
|
||||||
libintl_deps = []
|
|
||||||
-if cc.has_function('ngettext', args : osx_ldflags)
|
|
||||||
- have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset')
|
|
||||||
-else
|
|
||||||
- # First just find the bare library.
|
|
||||||
- libintl = cc.find_library('intl', required : false)
|
|
||||||
- # The bare library probably won't link without help if it's static.
|
|
||||||
- if libintl.found() and not cc.has_function('ngettext', args : osx_ldflags, dependencies : libintl)
|
|
||||||
- libintl_iconv = cc.find_library('iconv', required : false)
|
|
||||||
- # libintl supports different threading APIs, which may not
|
|
||||||
- # require additional flags, but it defaults to using pthreads if
|
|
||||||
- # found. Meson's "threads" dependency does not allow you to
|
|
||||||
- # prefer pthreads. We may not be using pthreads for glib itself
|
|
||||||
- # either so just link the library to satisfy libintl rather than
|
|
||||||
- # also defining the macros with the -pthread flag.
|
|
||||||
- libintl_pthread = cc.find_library('pthread', required : false)
|
|
||||||
- # Try linking with just libiconv.
|
|
||||||
- if libintl_iconv.found() and cc.has_function('ngettext', args : osx_ldflags, dependencies : [libintl, libintl_iconv])
|
|
||||||
- libintl_deps += [libintl_iconv]
|
|
||||||
- # Then also try linking with pthreads.
|
|
||||||
- elif libintl_iconv.found() and libintl_pthread.found() and cc.has_function('ngettext', args : osx_ldflags, dependencies : [libintl, libintl_iconv, libintl_pthread])
|
|
||||||
- libintl_deps += [libintl_iconv, libintl_pthread]
|
|
||||||
- else
|
|
||||||
- libintl = disabler()
|
|
||||||
- endif
|
|
||||||
- endif
|
|
||||||
- if not libintl.found()
|
|
||||||
- libintl = subproject('proxy-libintl').get_variable('intl_dep')
|
|
||||||
- libintl_deps = [libintl] + libintl_deps
|
|
||||||
- have_bind_textdomain_codeset = true # proxy-libintl supports it
|
|
||||||
+libintl = dependency('intl', required: false)
|
|
||||||
+if libintl.found()
|
|
||||||
+ # libintl supports different threading APIs, which may not
|
|
||||||
+ # require additional flags, but it defaults to using pthreads if
|
|
||||||
+ # found. Meson's "threads" dependency does not allow you to
|
|
||||||
+ # prefer pthreads. We may not be using pthreads for glib itself
|
|
||||||
+ # either so just link the library to satisfy libintl rather than
|
|
||||||
+ # also defining the macros with the -pthread flag.
|
|
||||||
+ #
|
|
||||||
+ # Meson's builtin dependency lookup as of 0.60.0 doesn't check for
|
|
||||||
+ # pthread, so we do this manually here.
|
|
||||||
+ if cc.has_function('ngettext', dependencies : libintl)
|
|
||||||
+ libintl_deps += [libintl]
|
|
||||||
else
|
|
||||||
- libintl_deps = [libintl] + libintl_deps
|
|
||||||
- have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset', args : osx_ldflags,
|
|
||||||
- dependencies : libintl_deps)
|
|
||||||
+ libintl_pthread = cc.find_library('pthread', required : false)
|
|
||||||
+ if libintl_pthread.found() and cc.has_function('ngettext', dependencies : [libintl, libintl_pthread])
|
|
||||||
+ libintl_deps += [libintl, libintl_pthread]
|
|
||||||
+ else
|
|
||||||
+ libintl = disabler()
|
|
||||||
+ endif
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
+if libintl.found()
|
|
||||||
+ have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset', dependencies: libintl_deps)
|
|
||||||
+else
|
|
||||||
+ libintl = subproject('proxy-libintl').get_variable('intl_dep')
|
|
||||||
+ libintl_deps = [libintl]
|
|
||||||
+ have_bind_textdomain_codeset = true # proxy-libintl supports it
|
|
||||||
+endif
|
|
||||||
+
|
|
||||||
glib_conf.set('HAVE_BIND_TEXTDOMAIN_CODESET', have_bind_textdomain_codeset)
|
|
||||||
|
|
||||||
# We require gettext to always be present
|
|
||||||
--- a/meson_options.txt
|
|
||||||
+++ b/meson_options.txt
|
|
||||||
@@ -3,12 +3,6 @@ option('runtime_libdir',
|
|
||||||
value : '',
|
|
||||||
description : 'install runtime libraries relative to libdir')
|
|
||||||
|
|
||||||
-option('iconv',
|
|
||||||
- type : 'combo',
|
|
||||||
- choices : ['auto', 'libc', 'external'],
|
|
||||||
- value : 'auto',
|
|
||||||
- description : 'iconv implementation to use (\'libc\' = \'Part of the C library\'; \'external\' = \'External libiconv\'; \'auto\' = \'Auto-detect which iconv is available\')')
|
|
||||||
-
|
|
||||||
option('charsetalias_dir',
|
|
||||||
type : 'string',
|
|
||||||
value : '',
|
|
10
libs/glib2/patches/010-pcre.patch
Normal file
10
libs/glib2/patches/010-pcre.patch
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
--- a/glib/meson.build
|
||||||
|
+++ b/glib/meson.build
|
||||||
|
@@ -365,6 +365,7 @@ pcre2_static_args = []
|
||||||
|
|
||||||
|
if use_pcre2_static_flag
|
||||||
|
pcre2_static_args = ['-DPCRE2_STATIC']
|
||||||
|
+ pcre2 = pcre2.as_link_whole()
|
||||||
|
endif
|
||||||
|
|
||||||
|
glib_c_args = ['-DG_LOG_DOMAIN="GLib"', '-DGLIB_COMPILATION'] + pcre2_static_args + glib_hidden_visibility_args
|
Loading…
Reference in a new issue