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.

131 lines
3.2 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.68.4
  10. PKG_RELEASE:=$(AUTORELEASE)
  11. PKG_SOURCE:=glib-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@GNOME/glib/2.68
  13. PKG_HASH:=62fd061d08a75492617e625a73e2c05e259f831acbb8e1f8b9c81f23f7993a3b
  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:=meson/host gettext-full libiconv/host
  21. HOST_BUILD_DEPENDS:=meson/host gettext-full/host libiconv/host libffi/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 ../../devel/meson/meson.mk
  28. define Package/glib2
  29. SECTION:=libs
  30. CATEGORY:=Libraries
  31. DEPENDS:=$(ICONV_DEPENDS) $(INTL_DEPENDS) +zlib +libpthread +libffi +libattr
  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 += -liconv -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. -Ddefault_library=both \
  43. -Diconv=external \
  44. -Dselinux=disabled \
  45. -Dlibmount=disabled \
  46. -Dinternal_pcre=true \
  47. -Dman=false \
  48. -Ddtrace=false \
  49. -Dsystemtap=false \
  50. -Dsysprof=disabled \
  51. -Dgtk_doc=false \
  52. -Dbsymbolic_functions=true \
  53. -Dforce_posix_threads=true \
  54. -Dfam=false \
  55. -Dtests=false \
  56. -Dinstalled_tests=false \
  57. -Dnls=$(if $(CONFIG_BUILD_NLS),en,dis)abled \
  58. -Doss_fuzz=disabled \
  59. -Dglib_debug=disabled \
  60. -Dglib_assert=false \
  61. -Dglib_checks=false \
  62. -Dlibelf=disabled
  63. MESON_HOST_ARGS += $(COMP_ARGS) -Dxattr=false
  64. MESON_ARGS += $(COMP_ARGS) -Dxattr=true -Db_lto=true
  65. define Build/InstallDev
  66. $(INSTALL_DIR) $(1)/usr/bin
  67. $(CP) \
  68. $(PKG_INSTALL_DIR)/usr/bin/* \
  69. $(1)/usr/bin/
  70. $(INSTALL_DIR) $(1)/usr/include
  71. $(CP) \
  72. $(PKG_INSTALL_DIR)/usr/include/glib-2.0 \
  73. $(1)/usr/include/
  74. $(CP) \
  75. $(PKG_INSTALL_DIR)/usr/lib/glib-2.0/include/*.h \
  76. $(1)/usr/include/glib-2.0/
  77. $(CP) \
  78. $(PKG_INSTALL_DIR)/usr/include/gio-unix-2.0 \
  79. $(1)/usr/include/
  80. $(INSTALL_DIR) $(1)/usr/lib
  81. $(CP) \
  82. $(PKG_INSTALL_DIR)/usr/lib/glib-2.0 \
  83. $(1)/usr/lib/
  84. $(CP) \
  85. $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a} \
  86. $(1)/usr/lib/
  87. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  88. ifneq ($(INTL_FULL),)
  89. $(SED) '/^Libs:/s/$$$$/ -lintl/' \
  90. $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/glib-2.0.pc
  91. endif
  92. $(INSTALL_DATA) \
  93. $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
  94. $(1)/usr/lib/pkgconfig
  95. $(INSTALL_DIR) $(2)/share/aclocal/
  96. $(INSTALL_DATA) \
  97. $(PKG_INSTALL_DIR)/usr/share/aclocal/*.m4 \
  98. $(2)/share/aclocal/
  99. $(INSTALL_DIR) $(1)/usr/share/glib-2.0
  100. $(CP) \
  101. $(PKG_INSTALL_DIR)/usr/share/glib-2.0/codegen \
  102. $(1)/usr/share/glib-2.0/
  103. endef
  104. define Package/glib2/install
  105. $(INSTALL_DIR) $(1)/usr/lib
  106. $(CP) \
  107. $(PKG_INSTALL_DIR)/usr/lib/*.so* \
  108. $(1)/usr/lib/
  109. endef
  110. $(eval $(call HostBuild))
  111. $(eval $(call BuildPackage,glib2))