summaryrefslogtreecommitdiff
path: root/package/glib
diff options
context:
space:
mode:
Diffstat (limited to 'package/glib')
-rw-r--r--package/glib/Makefile71
-rw-r--r--package/glib/patches/patch-glib_gnulib_meson_build12
-rw-r--r--package/glib/patches/patch-meson_build10
3 files changed, 53 insertions, 40 deletions
diff --git a/package/glib/Makefile b/package/glib/Makefile
index 5dbfc4745..eb77cf8fe 100644
--- a/package/glib/Makefile
+++ b/package/glib/Makefile
@@ -4,15 +4,16 @@
include $(ADK_TOPDIR)/rules.mk
PKG_NAME:= glib
-PKG_VERSION:= 2.56.1
+PKG_VERSION:= 2.78.4
PKG_RELEASE:= 1
-PKG_EXTRAVER:= 2.56
-PKG_HASH:= 40ef3f44f2c651c7a31aedee44259809b6f03d3d20be44545cd7d177221c0b8d
+PKG_EXTRAVER:= 2.78
+PKG_HASH:= 24b8e0672dca120cc32d394bccb85844e732e04fe75d18bb0573b2dbc7548f63
PKG_DESCR:= low-level core library that forms the basis of gtk+
PKG_SECTION:= libs/misc
-PKG_DEPENDS:= libpcre zlib libffi
-PKG_BUILDDEP:= glib-host util-linux libffi zlib dbus pcre
-HOST_BUILDDEP:= pkgconf-host libiconv-host libffi-host python2-host gettext-host util-linux-host
+PKG_DEPENDS:= pcre2 zlib libffi
+PKG_BUILDDEP:= glib-host util-linux libffi zlib dbus pcre2
+HOST_BUILDDEP:= pkgconf-host libiconv-host libffi-host python3-host gettext-host util-linux-host
+HOST_BUILDDEP+= pcre2-host meson-host
PKG_NEEDS:= threads intl iconv
PKG_URL:= http://www.gtk.org/
PKG_SITES:= http://ftp.gnome.org/pub/GNOME/sources/glib/$(PKG_EXTRAVER)/
@@ -24,42 +25,32 @@ include $(ADK_TOPDIR)/mk/package.mk
$(eval $(call HOST_template,GLIB,glib,$(PKG_VERSION)-$(PKG_RELEASE)))
$(eval $(call PKG_template,GLIB,glib,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION),$(PKG_OPTS)))
-ifeq ($(ADK_PACKAGE_LIBICONV),y)
-CONFIGURE_ARGS+= --with-libiconv=yes
-else
-CONFIGURE_ARGS+= --with-libiconv=no
-endif
-CONFIGURE_ARGS+= --disable-mem-pools \
- --disable-rebuilds \
- --disable-fam \
- --disable-dtrace \
- --disable-compile-warnings \
- --with-pcre=system \
- --with-threads=posix
-CONFIGURE_ENV+= glib_cv_long_long_format=ll \
- glib_cv_stack_grows=no \
- glib_cv_have_strlcpy=no \
- glib_cv_uscore=no \
- ac_cv_func_posix_getpwuid_r=yes \
- ac_cv_func_posix_getgrgid_r=yes
+HOSTWRKBUILD= $(WRKSRC)
+WRKBUILD= $(WRKDIR)/$(PKG_NAME)-obj
-HOST_STYLE:= auto
-HOST_CPPFLAGS+= -I$(STAGING_HOST_DIR)/usr/include/libmount
-ifneq ($(OS_FOR_BUILD),CYGWIN)
-HOST_CFLAGS+= -fPIC
-endif
-HOST_CONFIGURE_ARGS+= --disable-fam \
- --disable-selinux \
- --disable-dtrace \
- --enable-static \
- --with-pcre=internal \
- --with-libiconv=yes \
- --disable-shared \
- --disable-compile-warnings
+HOST_CONFIG_STYLE:= manual
+HOST_STYLE:= manual
+CONFIG_STYLE:= meson
+BUILD_STYLE:= meson
+INSTALL_STYLE:= meson
-hostpost-install:
- $(CP) $(STAGING_HOST_DIR)/usr/lib/glib-2.0/include/glibconfig.h \
- $(STAGING_HOST_DIR)/usr/include/glib-2.0/
+MESON_FLAGS:= -Dtests=false -Dxattr=false -Doss_fuzz=disabled
+
+host-configure:
+ (cd $(HOSTWRKBUILD) && PATH='$(HOST_PATH)' meson setup --prefix $(STAGING_HOST_DIR)/usr _build)
+
+host-build:
+ (cd $(HOSTWRKBUILD) && PATH='$(HOST_PATH)' meson compile -C _build)
+
+glib-hostinstall:
+ (cd $(HOSTWRKBUILD) && PATH='$(HOST_PATH)' meson install -C _build)
+
+do-configure:
+ (cd $(WRKBUILD) && PATH='$(HOST_PATH)' meson setup --prefix /usr \
+ --libdir lib --cross-file $(STAGING_HOST_DIR)/etc/meson/cross-compilation.conf -Dtests=false _build)
+
+do-build:
+ (cd $(WRKBUILD) && PATH='$(HOST_PATH)' meson compile -C _build)
glib-install:
$(INSTALL_DIR) $(IDIR_GLIB)/usr/lib
diff --git a/package/glib/patches/patch-glib_gnulib_meson_build b/package/glib/patches/patch-glib_gnulib_meson_build
new file mode 100644
index 000000000..4039f468f
--- /dev/null
+++ b/package/glib/patches/patch-glib_gnulib_meson_build
@@ -0,0 +1,12 @@
+--- glib-2.75.2.orig/glib/gnulib/meson.build 2023-01-06 13:49:52.000000000 +0100
++++ glib-2.75.2/glib/gnulib/meson.build 2023-01-22 14:08:55.068305964 +0100
+@@ -312,9 +312,6 @@ endif
+ if not gl_cv_func_frexp_works and gl_cv_func_frexp_broken_beyond_repair
+ error ('frexp() is missing or broken beyond repair, and we have nothing to replace it with')
+ endif
+-if not gl_cv_func_frexpl_works and gl_cv_func_frexpl_broken_beyond_repair
+- error ('frexpl() is missing or broken beyond repair, and we have nothing to replace it with')
+-endif
+
+ math_h_config.set ('REPLACE_FREXP', gl_cv_func_frexp_works ? 0 : 1)
+ math_h_config.set ('REPLACE_FREXPL', gl_cv_func_frexpl_works ? 0 : 1)
diff --git a/package/glib/patches/patch-meson_build b/package/glib/patches/patch-meson_build
new file mode 100644
index 000000000..c410eac33
--- /dev/null
+++ b/package/glib/patches/patch-meson_build
@@ -0,0 +1,10 @@
+--- glib-2.75.2.orig/meson.build 2023-01-06 13:49:52.000000000 +0100
++++ glib-2.75.2/meson.build 2023-01-22 14:18:11.633406695 +0100
+@@ -513,6 +513,7 @@ if cc.get_id() == 'gcc' or cc.get_id() =
+ '-Werror=missing-include-dirs',
+ '-Werror=pointer-arith',
+ '-Werror=unused-result',
++ '-Wno-error=format-nonliteral',
+ ]
+
+ warning_c_args = warning_common_args + [