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.

127 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.66.0
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=glib-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@GNOME/glib/2.66
  13. PKG_HASH:=c5a66bf143065648c135da4c943d2ac23cce15690fc91c358013b2889111156c
  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 -liconv $(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. -Dgtk_doc=false \
  51. -Dbsymbolic_functions=true \
  52. -Dforce_posix_threads=true \
  53. -Dfam=false \
  54. -Dinstalled_tests=false \
  55. -Dnls=$(if $(CONFIG_BUILD_NLS),en,dis)abled \
  56. -Doss_fuzz=disabled \
  57. -Dglib_assert=false \
  58. -Dglib_checks=false
  59. MESON_HOST_ARGS += $(COMP_ARGS) -Dxattr=false
  60. MESON_ARGS += $(COMP_ARGS) -Dxattr=true -Db_lto=true
  61. define Build/InstallDev
  62. $(INSTALL_DIR) $(1)/usr/bin
  63. $(CP) \
  64. $(PKG_INSTALL_DIR)/usr/bin/* \
  65. $(1)/usr/bin/
  66. $(INSTALL_DIR) $(1)/usr/include
  67. $(CP) \
  68. $(PKG_INSTALL_DIR)/usr/include/glib-2.0 \
  69. $(1)/usr/include/
  70. $(CP) \
  71. $(PKG_INSTALL_DIR)/usr/lib/glib-2.0/include/*.h \
  72. $(1)/usr/include/glib-2.0/
  73. $(CP) \
  74. $(PKG_INSTALL_DIR)/usr/include/gio-unix-2.0 \
  75. $(1)/usr/include/
  76. $(INSTALL_DIR) $(1)/usr/lib
  77. $(CP) \
  78. $(PKG_INSTALL_DIR)/usr/lib/glib-2.0 \
  79. $(1)/usr/lib/
  80. $(CP) \
  81. $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a} \
  82. $(1)/usr/lib/
  83. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  84. ifneq ($(INTL_FULL),)
  85. $(SED) '/^Libs:/s/$$$$/ -lintl/' \
  86. $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/glib-2.0.pc
  87. endif
  88. $(INSTALL_DATA) \
  89. $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
  90. $(1)/usr/lib/pkgconfig
  91. $(INSTALL_DIR) $(2)/share/aclocal/
  92. $(INSTALL_DATA) \
  93. $(PKG_INSTALL_DIR)/usr/share/aclocal/*.m4 \
  94. $(2)/share/aclocal/
  95. $(INSTALL_DIR) $(1)/usr/share/glib-2.0
  96. $(CP) \
  97. $(PKG_INSTALL_DIR)/usr/share/glib-2.0/codegen \
  98. $(1)/usr/share/glib-2.0/
  99. endef
  100. define Package/glib2/install
  101. $(INSTALL_DIR) $(1)/usr/lib
  102. $(CP) \
  103. $(PKG_INSTALL_DIR)/usr/lib/*.so* \
  104. $(1)/usr/lib/
  105. endef
  106. $(eval $(call HostBuild))
  107. $(eval $(call BuildPackage,glib2))