From 45df3bee2ce14d3050e45a26daac166ae233da3c Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Wed, 4 Dec 2024 18:07:14 +0800 Subject: [PATCH] Revert "libs/glib2: update to 2.82.0" This reverts commit 33b43c290ae25ebfc14053d6764547b2449abb5d. --- libs/glib2/Makefile | 57 ++++++++----------- .../patches/003-valgrind.h-mips16-fix.patch | 2 +- libs/glib2/patches/006-c99.patch | 2 +- libs/glib2/patches/010-pcre.patch | 10 ++++ libs/glib2/patches/020-locale.patch | 24 ++++++++ 5 files changed, 59 insertions(+), 36 deletions(-) create mode 100644 libs/glib2/patches/010-pcre.patch create mode 100644 libs/glib2/patches/020-locale.patch diff --git a/libs/glib2/Makefile b/libs/glib2/Makefile index a24a2f34..5ded2fbd 100644 --- a/libs/glib2/Makefile +++ b/libs/glib2/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=glib2 -PKG_VERSION:=2.82.0 -PKG_RELEASE:=1 +PKG_VERSION:=2.74.0 +PKG_RELEASE:=5 PKG_SOURCE:=glib-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNOME/glib/$(basename $(PKG_VERSION)) -PKG_HASH:=f4c82ada51366bddace49d7ba54b33b4e4d6067afa3008e4847f41cb9b5c38d3 +PKG_HASH:=3652c7f072d7b031a6b5edd623f77ebc5dcd2ae698598abcc89ff39ca75add30 PKG_MAINTAINER:=Peter Wagner PKG_LICENSE:=LGPL-2.1-or-later @@ -26,7 +26,7 @@ PKG_FORTIFY_SOURCE:=0 PKG_BUILD_FLAGS:=gc-sections HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/glib-$(PKG_VERSION) -HOST_BUILD_DEPENDS:=pcre2/host libffi/host libiconv-full/host +HOST_BUILD_DEPENDS:=pcre2/host libffi/host include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/package.mk @@ -45,31 +45,26 @@ define Package/glib2/description The GLib library of C routines endef -COMP_ARGS:= +COMP_ARGS= \ + -Dselinux=disabled \ + -Dlibmount=disabled \ + -Dman=false \ + -Ddtrace=false \ + -Dsystemtap=false \ + -Dsysprof=disabled \ + -Dgtk_doc=false \ + -Dbsymbolic_functions=true \ + -Dforce_posix_threads=true \ + -Dtests=false \ + -Dinstalled_tests=false \ + -Doss_fuzz=disabled \ + -Dglib_debug=disabled \ + -Dglib_assert=false \ + -Dglib_checks=true \ + -Dlibelf=disabled -# default feature=auto see meson_options.txt -COMP_ARGS+=-Dglib_debug=disabled - -# default feature=auto see meson_options.txt -COMP_ARGS+=-Dlibmount=disabled - -# default feature=auto see meson_options.txt -COMP_ARGS+=-Dselinux=disabled - -# default boolean=true see meson_options.txt -COMP_ARGS+=-Dglib_assert=false - -# default boolean=true see meson_options.txt -COMP_ARGS+=-Dtests=false - -# default feature=auto see meson_options.txt -COMP_ARGS+=-Dintrospection=disabled - -# set runtime dir to /var/run -COMP_ARGS+=-Druntime_dir=/var/run - -MESON_HOST_ARGS += $(COMP_ARGS) -Dxattr=false -Dnls=disabled -MESON_ARGS += $(COMP_ARGS) -Dxattr=true -Db_lto=true -Dnls=$(if $(CONFIG_BUILD_NLS),en,dis)abled +MESON_HOST_ARGS += $(COMP_ARGS) -Dxattr=false -Ddefault_library=static -Dnls=disabled +MESON_ARGS += $(COMP_ARGS) -Dxattr=true -Db_lto=true -Ddefault_library=both -Dnls=$(if $(CONFIG_BUILD_NLS),en,dis)abled define Build/InstallDev $(INSTALL_DIR) $(1)/usr/bin @@ -101,12 +96,6 @@ define Build/InstallDev $(INSTALL_DATA) \ $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \ $(1)/usr/lib/pkgconfig - $(foreach BIN,glib_genmarshal glib_mkenums, - $(SED) 's/^$(BIN)=$$$${bindir}\/\(.*\)/$(BIN)=$$$${prefix_hostpkg}\/bin\/\1/' $(1)/usr/lib/pkgconfig/glib-2.0.pc - ) - $(foreach BIN,glib_compile_resources glib_compile_schemas gdbus_codegen, - $(SED) 's/^$(BIN)=$$$${bindir}\/\(.*\)/$(BIN)=$$$${prefix_hostpkg}\/bin\/\1/' $(1)/usr/lib/pkgconfig/gio-2.0.pc - ) $(INSTALL_DIR) $(2)/share/aclocal/ $(INSTALL_DATA) \ diff --git a/libs/glib2/patches/003-valgrind.h-mips16-fix.patch b/libs/glib2/patches/003-valgrind.h-mips16-fix.patch index ca35972b..d0c5c803 100644 --- a/libs/glib2/patches/003-valgrind.h-mips16-fix.patch +++ b/libs/glib2/patches/003-valgrind.h-mips16-fix.patch @@ -1,6 +1,6 @@ --- a/glib/valgrind.h +++ b/glib/valgrind.h -@@ -159,7 +159,7 @@ +@@ -158,7 +158,7 @@ # define PLAT_s390x_linux 1 #elif defined(__linux__) && defined(__mips__) && (__mips==64) # define PLAT_mips64_linux 1 diff --git a/libs/glib2/patches/006-c99.patch b/libs/glib2/patches/006-c99.patch index 98c17db0..de348d38 100644 --- a/libs/glib2/patches/006-c99.patch +++ b/libs/glib2/patches/006-c99.patch @@ -1,6 +1,6 @@ --- a/meson.build +++ b/meson.build -@@ -1189,7 +1189,7 @@ if host_system == 'windows' and (cc.get_ +@@ -1045,7 +1045,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) diff --git a/libs/glib2/patches/010-pcre.patch b/libs/glib2/patches/010-pcre.patch new file mode 100644 index 00000000..87b32e73 --- /dev/null +++ b/libs/glib2/patches/010-pcre.patch @@ -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 diff --git a/libs/glib2/patches/020-locale.patch b/libs/glib2/patches/020-locale.patch new file mode 100644 index 00000000..e171d58e --- /dev/null +++ b/libs/glib2/patches/020-locale.patch @@ -0,0 +1,24 @@ +From ebcc3c01db27b79af38b42c3c52a79d0225f744c Mon Sep 17 00:00:00 2001 +From: Seungha Yang +Date: Sun, 14 Aug 2022 04:56:20 +0900 +Subject: [PATCH] glib-mkenums: Specify output encoding as UTF-8 explicitly for + non-English locale + +Fixup regression introduced by +https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2797 +--- + gobject/glib-mkenums.in | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/gobject/glib-mkenums.in ++++ b/gobject/glib-mkenums.in +@@ -19,6 +19,9 @@ import errno + import codecs + import locale + ++# Non-english locale systems might complain to unrecognized character ++sys.stdout = io.TextIOWrapper(sys.stdout.detach(), encoding='utf-8') ++ + VERSION_STR = '''glib-mkenums version @VERSION@ + glib-mkenums comes with ABSOLUTELY NO WARRANTY. + You may redistribute copies of glib-mkenums under the terms of