You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

128 lines
3.1 KiB

  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.70.0
  10. PKG_RELEASE:=$(AUTORELEASE)
  11. PKG_SOURCE:=glib-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@GNOME/glib/2.70
  13. PKG_HASH:=200d7df811c5ba634afbf109f14bb40ba7fde670e89389885da14e27c0840742
  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. HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/glib-$(PKG_VERSION)
  20. PKG_BUILD_DEPENDS:=libiconv/host
  21. HOST_BUILD_DEPENDS:=libiconv/host libffi/host pcre/host
  22. PKG_CONFIG_DEPENDS:=CONFIG_BUILD_NLS
  23. PKG_INSTALL:=1
  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 +libpcre
  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. HOST_LDFLAGS += -Wl,-rpath,$(STAGING_DIR_HOSTPKG)/lib
  39. TARGET_CFLAGS += -ffunction-sections -fdata-sections
  40. TARGET_LDFLAGS += -Wl,--gc-sections $(if $(INTL_FULL),-lintl)
  41. COMP_ARGS= \
  42. -Diconv=external \
  43. -Dselinux=disabled \
  44. -Dlibmount=disabled \
  45. -Dman=false \
  46. -Ddtrace=false \
  47. -Dsystemtap=false \
  48. -Dsysprof=disabled \
  49. -Dgtk_doc=false \
  50. -Dbsymbolic_functions=true \
  51. -Dforce_posix_threads=true \
  52. -Dfam=false \
  53. -Dtests=false \
  54. -Dinstalled_tests=false \
  55. -Doss_fuzz=disabled \
  56. -Dglib_debug=disabled \
  57. -Dglib_assert=false \
  58. -Dglib_checks=false \
  59. -Dlibelf=disabled
  60. MESON_HOST_ARGS += $(COMP_ARGS) -Dxattr=false -Ddefault_library=static -Dnls=disabled
  61. MESON_ARGS += $(COMP_ARGS) -Dxattr=true -Db_lto=true -Ddefault_library=both -Dnls=$(if $(CONFIG_BUILD_NLS),en,dis)abled
  62. define Build/InstallDev
  63. $(INSTALL_DIR) $(1)/usr/bin
  64. $(CP) \
  65. $(PKG_INSTALL_DIR)/usr/bin/* \
  66. $(1)/usr/bin/
  67. $(INSTALL_DIR) $(1)/usr/include
  68. $(CP) \
  69. $(PKG_INSTALL_DIR)/usr/include/glib-2.0 \
  70. $(1)/usr/include/
  71. $(CP) \
  72. $(PKG_INSTALL_DIR)/usr/lib/glib-2.0/include/*.h \
  73. $(1)/usr/include/glib-2.0/
  74. $(CP) \
  75. $(PKG_INSTALL_DIR)/usr/include/gio-unix-2.0 \
  76. $(1)/usr/include/
  77. $(INSTALL_DIR) $(1)/usr/lib
  78. $(CP) \
  79. $(PKG_INSTALL_DIR)/usr/lib/glib-2.0 \
  80. $(1)/usr/lib/
  81. $(CP) \
  82. $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a} \
  83. $(1)/usr/lib/
  84. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  85. ifneq ($(INTL_FULL),)
  86. $(SED) '/^Libs:/s/$$$$/ -lintl/' \
  87. $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/glib-2.0.pc
  88. endif
  89. $(INSTALL_DATA) \
  90. $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
  91. $(1)/usr/lib/pkgconfig
  92. $(INSTALL_DIR) $(2)/share/aclocal/
  93. $(INSTALL_DATA) \
  94. $(PKG_INSTALL_DIR)/usr/share/aclocal/*.m4 \
  95. $(2)/share/aclocal/
  96. $(INSTALL_DIR) $(1)/usr/share/glib-2.0
  97. $(CP) \
  98. $(PKG_INSTALL_DIR)/usr/share/glib-2.0/codegen \
  99. $(1)/usr/share/glib-2.0/
  100. endef
  101. define Package/glib2/install
  102. $(INSTALL_DIR) $(1)/usr/lib
  103. $(CP) \
  104. $(PKG_INSTALL_DIR)/usr/lib/*.so* \
  105. $(1)/usr/lib/
  106. endef
  107. $(eval $(call HostBuild))
  108. $(eval $(call BuildPackage,glib2))