shairplay: remove
[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:=5
13
14 PKG_SOURCE:=glib-$(PKG_VERSION).tar.xz
15 PKG_SOURCE_URL:=@GNOME/glib/$(basename $(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 PKG_CONFIG_DEPENDS:=CONFIG_BUILD_NLS
25 PKG_FORTIFY_SOURCE:=0
26 PKG_BUILD_FLAGS:=gc-sections
27
28 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/glib-$(PKG_VERSION)
29 HOST_BUILD_DEPENDS:=pcre2/host libffi/host
30
31 include $(INCLUDE_DIR)/host-build.mk
32 include $(INCLUDE_DIR)/package.mk
33 include $(INCLUDE_DIR)/nls.mk
34 include $(INCLUDE_DIR)/meson.mk
35
36 define Package/glib2
37 SECTION:=libs
38 CATEGORY:=Libraries
39 DEPENDS:=$(ICONV_DEPENDS) $(INTL_DEPENDS) +zlib +libpthread +libffi +libattr +libpcre2
40 TITLE:=glib 2.0
41 URL:=http://www.gtk.org/
42 endef
43
44 define Package/glib2/description
45 The GLib library of C routines
46 endef
47
48 COMP_ARGS= \
49 -Dselinux=disabled \
50 -Dlibmount=disabled \
51 -Dman=false \
52 -Ddtrace=false \
53 -Dsystemtap=false \
54 -Dsysprof=disabled \
55 -Dgtk_doc=false \
56 -Dbsymbolic_functions=true \
57 -Dforce_posix_threads=true \
58 -Dtests=false \
59 -Dinstalled_tests=false \
60 -Doss_fuzz=disabled \
61 -Dglib_debug=disabled \
62 -Dglib_assert=false \
63 -Dglib_checks=true \
64 -Dlibelf=disabled
65
66 MESON_HOST_ARGS += $(COMP_ARGS) -Dxattr=false -Ddefault_library=static -Dnls=disabled
67 MESON_ARGS += $(COMP_ARGS) -Dxattr=true -Db_lto=true -Ddefault_library=both -Dnls=$(if $(CONFIG_BUILD_NLS),en,dis)abled
68
69 define Build/InstallDev
70 $(INSTALL_DIR) $(1)/usr/bin
71 $(CP) \
72 $(PKG_INSTALL_DIR)/usr/bin/* \
73 $(1)/usr/bin/
74
75 $(INSTALL_DIR) $(1)/usr/include
76 $(CP) \
77 $(PKG_INSTALL_DIR)/usr/include/glib-2.0 \
78 $(1)/usr/include/
79 $(CP) \
80 $(PKG_INSTALL_DIR)/usr/lib/glib-2.0/include/*.h \
81 $(1)/usr/include/glib-2.0/
82 $(CP) \
83 $(PKG_INSTALL_DIR)/usr/include/gio-unix-2.0 \
84 $(1)/usr/include/
85
86 $(INSTALL_DIR) $(1)/usr/lib
87 $(CP) \
88 $(PKG_INSTALL_DIR)/usr/lib/glib-2.0 \
89 $(1)/usr/lib/
90
91 $(CP) \
92 $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a} \
93 $(1)/usr/lib/
94
95 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
96 $(INSTALL_DATA) \
97 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
98 $(1)/usr/lib/pkgconfig
99
100 $(INSTALL_DIR) $(2)/share/aclocal/
101 $(INSTALL_DATA) \
102 $(PKG_INSTALL_DIR)/usr/share/aclocal/*.m4 \
103 $(2)/share/aclocal/
104
105 $(INSTALL_DIR) $(1)/usr/share/glib-2.0
106 $(CP) \
107 $(PKG_INSTALL_DIR)/usr/share/glib-2.0/codegen \
108 $(1)/usr/share/glib-2.0/
109 endef
110
111 define Package/glib2/install
112 $(INSTALL_DIR) $(1)/usr/lib
113 $(CP) \
114 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
115 $(1)/usr/lib/
116 endef
117
118 $(eval $(call HostBuild))
119 $(eval $(call BuildPackage,glib2))