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.

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