2014-06-30 21:56:56 +08:00
|
|
|
#
|
2019-01-29 00:54:37 +08:00
|
|
|
# Copyright (C) 2007-2019 OpenWrt.org
|
2014-06-30 21:56:56 +08:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=glib2
|
2024-08-28 05:36:52 +08:00
|
|
|
PKG_VERSION:=2.82.0
|
2024-04-15 19:39:20 +08:00
|
|
|
PKG_RELEASE:=1
|
2014-06-30 21:56:56 +08:00
|
|
|
|
|
|
|
PKG_SOURCE:=glib-$(PKG_VERSION).tar.xz
|
2023-06-11 21:01:18 +08:00
|
|
|
PKG_SOURCE_URL:=@GNOME/glib/$(basename $(PKG_VERSION))
|
2024-08-28 05:36:52 +08:00
|
|
|
PKG_HASH:=f4c82ada51366bddace49d7ba54b33b4e4d6067afa3008e4847f41cb9b5c38d3
|
2014-06-30 21:56:56 +08:00
|
|
|
|
2020-04-23 08:16:17 +08:00
|
|
|
PKG_MAINTAINER:=Peter Wagner <tripolar@gmx.at>
|
|
|
|
PKG_LICENSE:=LGPL-2.1-or-later
|
|
|
|
PKG_LICENSE_FILES:=COPYING
|
2019-09-12 20:13:21 +08:00
|
|
|
PKG_CPE_ID:=cpe:/a:gnome:glib
|
|
|
|
|
2020-04-23 08:16:17 +08:00
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/glib-$(PKG_VERSION)
|
2020-08-11 07:02:26 +08:00
|
|
|
PKG_CONFIG_DEPENDS:=CONFIG_BUILD_NLS
|
glib2: disable fortify source
The glib2 package fails to build when CONFIG_PKG_FORTIFY_SOURCE_1 or
CONFIG_PKG_FORTIFY_SOURCE_2 is enabled in the OpenWrt config:
In file included from ../glib/libcharset/localcharset.c:28:
/home/stijn/Development/OpenWrt/openwrt/staging_dir/toolchain-powerpc64_e5500_gcc-11.2.0_musl/include/fortify/stdio.h: In function 'snprintf':
/home/stijn/Development/OpenWrt/openwrt/staging_dir/toolchain-powerpc64_e5500_gcc-11.2.0_musl/include/fortify/stdio.h:101:9: error: format not a string literal, argument types not checked [-Werror=format-nonliteral]
101 | return __orig_snprintf(__s, __n, __f, __builtin_va_arg_pack());
| ^~~~~~
/home/stijn/Development/OpenWrt/openwrt/staging_dir/toolchain-powerpc64_e5500_gcc-11.2.0_musl/include/fortify/stdio.h: In function 'sprintf':
/home/stijn/Development/OpenWrt/openwrt/staging_dir/toolchain-powerpc64_e5500_gcc-11.2.0_musl/include/fortify/stdio.h:110:17: error: format not a string literal, argument types not checked [-Werror=format-nonliteral]
110 | __r = __orig_snprintf(__s, __b, __f, __builtin_va_arg_pack());
| ^~~
/home/stijn/Development/OpenWrt/openwrt/staging_dir/toolchain-powerpc64_e5500_gcc-11.2.0_musl/include/fortify/stdio.h:114:17: error: format not a string literal, argument types not checked [-Werror=format-nonliteral]
114 | __r = __orig_sprintf(__s, __f, __builtin_va_arg_pack());
| ^~~
Disable fortify source for the package as a workaround.
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2022-01-10 00:13:15 +08:00
|
|
|
PKG_FORTIFY_SOURCE:=0
|
2023-03-23 16:09:13 +08:00
|
|
|
PKG_BUILD_FLAGS:=gc-sections
|
2014-06-30 21:56:56 +08:00
|
|
|
|
2023-05-11 17:43:20 +08:00
|
|
|
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/glib-$(PKG_VERSION)
|
2024-04-06 23:05:17 +08:00
|
|
|
HOST_BUILD_DEPENDS:=pcre2/host libffi/host libiconv-full/host
|
2023-05-11 17:43:20 +08:00
|
|
|
|
2014-06-30 21:56:56 +08:00
|
|
|
include $(INCLUDE_DIR)/host-build.mk
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
2020-04-20 18:04:03 +08:00
|
|
|
include $(INCLUDE_DIR)/nls.mk
|
2021-09-08 06:24:45 +08:00
|
|
|
include $(INCLUDE_DIR)/meson.mk
|
2014-06-30 21:56:56 +08:00
|
|
|
|
|
|
|
define Package/glib2
|
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
2022-09-19 10:49:21 +08:00
|
|
|
DEPENDS:=$(ICONV_DEPENDS) $(INTL_DEPENDS) +zlib +libpthread +libffi +libattr +libpcre2
|
2014-06-30 21:56:56 +08:00
|
|
|
TITLE:=glib 2.0
|
2024-02-16 17:17:59 +08:00
|
|
|
URL:=http://www.gtk.org/
|
2014-06-30 21:56:56 +08:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/glib2/description
|
|
|
|
The GLib library of C routines
|
|
|
|
endef
|
|
|
|
|
2024-02-16 17:52:05 +08:00
|
|
|
COMP_ARGS:=
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
2024-04-15 19:39:20 +08:00
|
|
|
# default feature=auto see meson_options.txt
|
|
|
|
COMP_ARGS+=-Dintrospection=disabled
|
|
|
|
|
|
|
|
# set runtime dir to /var/run
|
|
|
|
COMP_ARGS+=-Druntime_dir=/var/run
|
2020-04-23 08:16:17 +08:00
|
|
|
|
2024-08-28 05:36:52 +08:00
|
|
|
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
|
2020-04-23 08:16:17 +08:00
|
|
|
|
2014-06-30 21:56:56 +08:00
|
|
|
define Build/InstallDev
|
2018-10-13 18:30:14 +08:00
|
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
|
|
|
$(CP) \
|
|
|
|
$(PKG_INSTALL_DIR)/usr/bin/* \
|
|
|
|
$(1)/usr/bin/
|
|
|
|
|
2014-06-30 21:56:56 +08:00
|
|
|
$(INSTALL_DIR) $(1)/usr/include
|
|
|
|
$(CP) \
|
|
|
|
$(PKG_INSTALL_DIR)/usr/include/glib-2.0 \
|
|
|
|
$(1)/usr/include/
|
|
|
|
$(CP) \
|
|
|
|
$(PKG_INSTALL_DIR)/usr/lib/glib-2.0/include/*.h \
|
|
|
|
$(1)/usr/include/glib-2.0/
|
|
|
|
$(CP) \
|
|
|
|
$(PKG_INSTALL_DIR)/usr/include/gio-unix-2.0 \
|
|
|
|
$(1)/usr/include/
|
|
|
|
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
|
|
$(CP) \
|
|
|
|
$(PKG_INSTALL_DIR)/usr/lib/glib-2.0 \
|
|
|
|
$(1)/usr/lib/
|
|
|
|
|
|
|
|
$(CP) \
|
2020-04-23 08:16:17 +08:00
|
|
|
$(PKG_INSTALL_DIR)/usr/lib/*.{so*,a} \
|
2014-06-30 21:56:56 +08:00
|
|
|
$(1)/usr/lib/
|
|
|
|
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
|
|
|
$(INSTALL_DATA) \
|
|
|
|
$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
|
|
|
|
$(1)/usr/lib/pkgconfig
|
2024-04-11 23:07:36 +08:00
|
|
|
$(foreach BIN,glib_genmarshal glib_mkenums,
|
|
|
|
$(SED) 's/^$(BIN)=$$$${bindir}\/\(.*\)/$(BIN)=$$$${prefix_hostpkg}\/bin\/\1/' $(1)/usr/lib/pkgconfig/glib-2.0.pc
|
|
|
|
)
|
2024-11-05 11:15:26 +08:00
|
|
|
$(foreach BIN,glib_compile_resources glib_compile_schemas gdbus_codegen,
|
2024-04-11 23:07:36 +08:00
|
|
|
$(SED) 's/^$(BIN)=$$$${bindir}\/\(.*\)/$(BIN)=$$$${prefix_hostpkg}\/bin\/\1/' $(1)/usr/lib/pkgconfig/gio-2.0.pc
|
|
|
|
)
|
2014-06-30 21:56:56 +08:00
|
|
|
|
|
|
|
$(INSTALL_DIR) $(2)/share/aclocal/
|
|
|
|
$(INSTALL_DATA) \
|
|
|
|
$(PKG_INSTALL_DIR)/usr/share/aclocal/*.m4 \
|
|
|
|
$(2)/share/aclocal/
|
2020-07-30 15:29:24 +08:00
|
|
|
|
|
|
|
$(INSTALL_DIR) $(1)/usr/share/glib-2.0
|
|
|
|
$(CP) \
|
|
|
|
$(PKG_INSTALL_DIR)/usr/share/glib-2.0/codegen \
|
|
|
|
$(1)/usr/share/glib-2.0/
|
2014-06-30 21:56:56 +08:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/glib2/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
|
|
$(CP) \
|
|
|
|
$(PKG_INSTALL_DIR)/usr/lib/*.so* \
|
|
|
|
$(1)/usr/lib/
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call HostBuild))
|
|
|
|
$(eval $(call BuildPackage,glib2))
|