2014-06-30 15:56:56 +02:00
|
|
|
#
|
2019-01-28 17:54:37 +01:00
|
|
|
# Copyright (C) 2007-2019 OpenWrt.org
|
2014-06-30 15:56:56 +02: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
|
2022-09-19 04:49:21 +02:00
|
|
|
PKG_VERSION:=2.74.0
|
treewide: remove AUTORELEASE
Automatically compute and substitute current values for all
$(AUTORELEASE) instances as this feature is deprecated and shouldn't be
used.
The following temporary change was made to the core:
diff --git a/rules.mk b/rules.mk
index 57d7995d4fa8..f16367de87a8 100644
--- a/rules.mk
+++ b/rules.mk
@@ -429,7 +429,7 @@ endef
abi_version_str = $(subst -,,$(subst _,,$(subst .,,$(1))))
COMMITCOUNT = $(if $(DUMP),0,$(call commitcount))
-AUTORELEASE = $(if $(DUMP),0,$(call commitcount,1))
+AUTORELEASE = $(if $(DUMP),0,$(shell sed -i "s/\$$(AUTORELEASE)/$(call commitcount,1)/" $(CURDIR)/Makefile))
all:
FORCE: ;
And this command used to fix affected packages:
for i in $(cd feeds/packages; git grep -l PKG_RELEASE:=.*AUTORELEASE | \
sed 's^.*/\([^/]*\)/Makefile^\1^';);
do
make package/$i/download
done
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2023-04-21 18:32:27 +02:00
|
|
|
PKG_RELEASE:=3
|
2014-06-30 15:56:56 +02:00
|
|
|
|
|
|
|
PKG_SOURCE:=glib-$(PKG_VERSION).tar.xz
|
2022-09-19 04:49:21 +02:00
|
|
|
PKG_SOURCE_URL:=@GNOME/glib/$(word 1,$(subst ., ,$(PKG_VERSION))).$(word 2,$(subst ., ,$(PKG_VERSION)))
|
|
|
|
PKG_HASH:=3652c7f072d7b031a6b5edd623f77ebc5dcd2ae698598abcc89ff39ca75add30
|
2014-06-30 15:56:56 +02:00
|
|
|
|
2020-04-23 02:16:17 +02:00
|
|
|
PKG_MAINTAINER:=Peter Wagner <tripolar@gmx.at>
|
|
|
|
PKG_LICENSE:=LGPL-2.1-or-later
|
|
|
|
PKG_LICENSE_FILES:=COPYING
|
2019-09-12 14:13:21 +02:00
|
|
|
PKG_CPE_ID:=cpe:/a:gnome:glib
|
|
|
|
|
2020-04-23 02:16:17 +02:00
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/glib-$(PKG_VERSION)
|
2014-06-30 15:56:56 +02:00
|
|
|
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/glib-$(PKG_VERSION)
|
2020-08-11 01:02:26 +02: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-09 17:13:15 +01:00
|
|
|
PKG_FORTIFY_SOURCE:=0
|
2023-03-23 09:09:13 +01:00
|
|
|
PKG_BUILD_FLAGS:=gc-sections
|
2014-06-30 15:56:56 +02:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/host-build.mk
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
2020-04-20 12:04:03 +02:00
|
|
|
include $(INCLUDE_DIR)/nls.mk
|
2021-09-08 00:24:45 +02:00
|
|
|
include $(INCLUDE_DIR)/meson.mk
|
2014-06-30 15:56:56 +02:00
|
|
|
|
|
|
|
define Package/glib2
|
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
2022-09-19 04:49:21 +02:00
|
|
|
DEPENDS:=$(ICONV_DEPENDS) $(INTL_DEPENDS) +zlib +libpthread +libffi +libattr +libpcre2
|
2014-06-30 15:56:56 +02:00
|
|
|
TITLE:=glib 2.0
|
|
|
|
URL:=http://www.gtk.org/
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/glib2/description
|
|
|
|
The GLib library of C routines
|
|
|
|
endef
|
|
|
|
|
2020-04-23 02:16:17 +02:00
|
|
|
COMP_ARGS= \
|
|
|
|
-Dselinux=disabled \
|
|
|
|
-Dlibmount=disabled \
|
|
|
|
-Dman=false \
|
|
|
|
-Ddtrace=false \
|
|
|
|
-Dsystemtap=false \
|
2021-04-13 06:42:04 +02:00
|
|
|
-Dsysprof=disabled \
|
2020-04-23 02:16:17 +02:00
|
|
|
-Dgtk_doc=false \
|
|
|
|
-Dbsymbolic_functions=true \
|
|
|
|
-Dforce_posix_threads=true \
|
2021-04-13 06:42:04 +02:00
|
|
|
-Dtests=false \
|
2020-04-23 02:16:17 +02:00
|
|
|
-Dinstalled_tests=false \
|
2020-07-30 05:36:38 +02:00
|
|
|
-Doss_fuzz=disabled \
|
2021-04-13 06:42:04 +02:00
|
|
|
-Dglib_debug=disabled \
|
2020-07-30 05:36:38 +02:00
|
|
|
-Dglib_assert=false \
|
2022-05-16 15:52:37 +02:00
|
|
|
-Dglib_checks=true \
|
2021-04-13 06:42:04 +02:00
|
|
|
-Dlibelf=disabled
|
2020-04-23 02:16:17 +02:00
|
|
|
|
2022-09-19 04:49:21 +02:00
|
|
|
MESON_HOST_ARGS += $(COMP_ARGS) -Dxattr=false -Ddefault_library=static -Dnls=disabled -Dwrap_mode=forcefallback
|
2021-10-19 01:39:19 +02:00
|
|
|
MESON_ARGS += $(COMP_ARGS) -Dxattr=true -Db_lto=true -Ddefault_library=both -Dnls=$(if $(CONFIG_BUILD_NLS),en,dis)abled
|
2020-04-23 02:16:17 +02:00
|
|
|
|
2014-06-30 15:56:56 +02:00
|
|
|
define Build/InstallDev
|
2018-10-13 12:30:14 +02:00
|
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
|
|
|
$(CP) \
|
|
|
|
$(PKG_INSTALL_DIR)/usr/bin/* \
|
|
|
|
$(1)/usr/bin/
|
|
|
|
|
2014-06-30 15:56:56 +02: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 02:16:17 +02:00
|
|
|
$(PKG_INSTALL_DIR)/usr/lib/*.{so*,a} \
|
2014-06-30 15:56:56 +02:00
|
|
|
$(1)/usr/lib/
|
|
|
|
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
|
|
|
$(INSTALL_DATA) \
|
|
|
|
$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
|
|
|
|
$(1)/usr/lib/pkgconfig
|
|
|
|
|
|
|
|
$(INSTALL_DIR) $(2)/share/aclocal/
|
|
|
|
$(INSTALL_DATA) \
|
|
|
|
$(PKG_INSTALL_DIR)/usr/share/aclocal/*.m4 \
|
|
|
|
$(2)/share/aclocal/
|
2020-07-30 09:29:24 +02: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 15:56:56 +02: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))
|