treewide: remove AUTORELEASE
[feed/packages.git] / libs / glib2 / Makefile
1 #
2 # Copyright (C) 2007-2019 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=glib2
11 PKG_VERSION:=2.74.0
12 PKG_RELEASE:=3
13
14 PKG_SOURCE:=glib-$(PKG_VERSION).tar.xz
15 PKG_SOURCE_URL:=@GNOME/glib/$(word 1,$(subst ., ,$(PKG_VERSION))).$(word 2,$(subst ., ,$(PKG_VERSION)))
16 PKG_HASH:=3652c7f072d7b031a6b5edd623f77ebc5dcd2ae698598abcc89ff39ca75add30
17
18 PKG_MAINTAINER:=Peter Wagner <tripolar@gmx.at>
19 PKG_LICENSE:=LGPL-2.1-or-later
20 PKG_LICENSE_FILES:=COPYING
21 PKG_CPE_ID:=cpe:/a:gnome:glib
22
23 PKG_BUILD_DIR:=$(BUILD_DIR)/glib-$(PKG_VERSION)
24 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/glib-$(PKG_VERSION)
25 PKG_CONFIG_DEPENDS:=CONFIG_BUILD_NLS
26 PKG_FORTIFY_SOURCE:=0
27 PKG_BUILD_FLAGS:=gc-sections
28
29 include $(INCLUDE_DIR)/host-build.mk
30 include $(INCLUDE_DIR)/package.mk
31 include $(INCLUDE_DIR)/nls.mk
32 include $(INCLUDE_DIR)/meson.mk
33
34 define Package/glib2
35 SECTION:=libs
36 CATEGORY:=Libraries
37 DEPENDS:=$(ICONV_DEPENDS) $(INTL_DEPENDS) +zlib +libpthread +libffi +libattr +libpcre2
38 TITLE:=glib 2.0
39 URL:=http://www.gtk.org/
40 endef
41
42 define Package/glib2/description
43 The GLib library of C routines
44 endef
45
46 COMP_ARGS= \
47 -Dselinux=disabled \
48 -Dlibmount=disabled \
49 -Dman=false \
50 -Ddtrace=false \
51 -Dsystemtap=false \
52 -Dsysprof=disabled \
53 -Dgtk_doc=false \
54 -Dbsymbolic_functions=true \
55 -Dforce_posix_threads=true \
56 -Dtests=false \
57 -Dinstalled_tests=false \
58 -Doss_fuzz=disabled \
59 -Dglib_debug=disabled \
60 -Dglib_assert=false \
61 -Dglib_checks=true \
62 -Dlibelf=disabled
63
64 MESON_HOST_ARGS += $(COMP_ARGS) -Dxattr=false -Ddefault_library=static -Dnls=disabled -Dwrap_mode=forcefallback
65 MESON_ARGS += $(COMP_ARGS) -Dxattr=true -Db_lto=true -Ddefault_library=both -Dnls=$(if $(CONFIG_BUILD_NLS),en,dis)abled
66
67 define Build/InstallDev
68 $(INSTALL_DIR) $(1)/usr/bin
69 $(CP) \
70 $(PKG_INSTALL_DIR)/usr/bin/* \
71 $(1)/usr/bin/
72
73 $(INSTALL_DIR) $(1)/usr/include
74 $(CP) \
75 $(PKG_INSTALL_DIR)/usr/include/glib-2.0 \
76 $(1)/usr/include/
77 $(CP) \
78 $(PKG_INSTALL_DIR)/usr/lib/glib-2.0/include/*.h \
79 $(1)/usr/include/glib-2.0/
80 $(CP) \
81 $(PKG_INSTALL_DIR)/usr/include/gio-unix-2.0 \
82 $(1)/usr/include/
83
84 $(INSTALL_DIR) $(1)/usr/lib
85 $(CP) \
86 $(PKG_INSTALL_DIR)/usr/lib/glib-2.0 \
87 $(1)/usr/lib/
88
89 $(CP) \
90 $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a} \
91 $(1)/usr/lib/
92
93 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
94 $(INSTALL_DATA) \
95 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
96 $(1)/usr/lib/pkgconfig
97
98 $(INSTALL_DIR) $(2)/share/aclocal/
99 $(INSTALL_DATA) \
100 $(PKG_INSTALL_DIR)/usr/share/aclocal/*.m4 \
101 $(2)/share/aclocal/
102
103 $(INSTALL_DIR) $(1)/usr/share/glib-2.0
104 $(CP) \
105 $(PKG_INSTALL_DIR)/usr/share/glib-2.0/codegen \
106 $(1)/usr/share/glib-2.0/
107 endef
108
109 define Package/glib2/install
110 $(INSTALL_DIR) $(1)/usr/lib
111 $(CP) \
112 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
113 $(1)/usr/lib/
114 endef
115
116 $(eval $(call HostBuild))
117 $(eval $(call BuildPackage,glib2))