1
0

Makefile 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=glib2
  9. PKG_VERSION:=2.74.0
  10. PKG_RELEASE:=5
  11. PKG_SOURCE:=glib-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@GNOME/glib/$(basename $(PKG_VERSION))
  13. PKG_HASH:=3652c7f072d7b031a6b5edd623f77ebc5dcd2ae698598abcc89ff39ca75add30
  14. PKG_MAINTAINER:=Peter Wagner <tripolar@gmx.at>
  15. PKG_LICENSE:=LGPL-2.1-or-later
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_CPE_ID:=cpe:/a:gnome:glib
  18. PKG_BUILD_DIR:=$(BUILD_DIR)/glib-$(PKG_VERSION)
  19. PKG_CONFIG_DEPENDS:=CONFIG_BUILD_NLS
  20. PKG_FORTIFY_SOURCE:=0
  21. PKG_BUILD_FLAGS:=gc-sections
  22. HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/glib-$(PKG_VERSION)
  23. HOST_BUILD_DEPENDS:=pcre2/host libffi/host
  24. include $(INCLUDE_DIR)/host-build.mk
  25. include $(INCLUDE_DIR)/package.mk
  26. include $(INCLUDE_DIR)/nls.mk
  27. include $(INCLUDE_DIR)/meson.mk
  28. define Package/glib2
  29. SECTION:=libs
  30. CATEGORY:=Libraries
  31. DEPENDS:=$(ICONV_DEPENDS) $(INTL_DEPENDS) +zlib +libpthread +libffi +libattr +libpcre2
  32. TITLE:=glib 2.0
  33. URL:=http://www.gtk.org/
  34. endef
  35. define Package/glib2/description
  36. The GLib library of C routines
  37. endef
  38. COMP_ARGS= \
  39. -Dselinux=disabled \
  40. -Dlibmount=disabled \
  41. -Dman=false \
  42. -Ddtrace=false \
  43. -Dsystemtap=false \
  44. -Dsysprof=disabled \
  45. -Dgtk_doc=false \
  46. -Dbsymbolic_functions=true \
  47. -Dforce_posix_threads=true \
  48. -Dtests=false \
  49. -Dinstalled_tests=false \
  50. -Doss_fuzz=disabled \
  51. -Dglib_debug=disabled \
  52. -Dglib_assert=false \
  53. -Dglib_checks=true \
  54. -Dlibelf=disabled
  55. MESON_HOST_ARGS += $(COMP_ARGS) -Dxattr=false -Ddefault_library=static -Dnls=disabled
  56. MESON_ARGS += $(COMP_ARGS) -Dxattr=true -Db_lto=true -Ddefault_library=both -Dnls=$(if $(CONFIG_BUILD_NLS),en,dis)abled
  57. define Build/InstallDev
  58. $(INSTALL_DIR) $(1)/usr/bin
  59. $(CP) \
  60. $(PKG_INSTALL_DIR)/usr/bin/* \
  61. $(1)/usr/bin/
  62. $(INSTALL_DIR) $(1)/usr/include
  63. $(CP) \
  64. $(PKG_INSTALL_DIR)/usr/include/glib-2.0 \
  65. $(1)/usr/include/
  66. $(CP) \
  67. $(PKG_INSTALL_DIR)/usr/lib/glib-2.0/include/*.h \
  68. $(1)/usr/include/glib-2.0/
  69. $(CP) \
  70. $(PKG_INSTALL_DIR)/usr/include/gio-unix-2.0 \
  71. $(1)/usr/include/
  72. $(INSTALL_DIR) $(1)/usr/lib
  73. $(CP) \
  74. $(PKG_INSTALL_DIR)/usr/lib/glib-2.0 \
  75. $(1)/usr/lib/
  76. $(CP) \
  77. $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a} \
  78. $(1)/usr/lib/
  79. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  80. $(INSTALL_DATA) \
  81. $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
  82. $(1)/usr/lib/pkgconfig
  83. $(INSTALL_DIR) $(2)/share/aclocal/
  84. $(INSTALL_DATA) \
  85. $(PKG_INSTALL_DIR)/usr/share/aclocal/*.m4 \
  86. $(2)/share/aclocal/
  87. $(INSTALL_DIR) $(1)/usr/share/glib-2.0
  88. $(CP) \
  89. $(PKG_INSTALL_DIR)/usr/share/glib-2.0/codegen \
  90. $(1)/usr/share/glib-2.0/
  91. endef
  92. define Package/glib2/install
  93. $(INSTALL_DIR) $(1)/usr/lib
  94. $(CP) \
  95. $(PKG_INSTALL_DIR)/usr/lib/*.so* \
  96. $(1)/usr/lib/
  97. endef
  98. $(eval $(call HostBuild))
  99. $(eval $(call BuildPackage,glib2))