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.

120 lines
2.7 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.58.3
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=glib-$(PKG_VERSION).tar.xz
  12. PKG_BUILD_DIR:=$(BUILD_DIR)/glib-$(PKG_VERSION)
  13. PKG_SOURCE_URL:=@GNOME/glib/2.58
  14. PKG_HASH:=8f43c31767e88a25da72b52a40f3301fefc49a665b56dc10ee7cc9565cbe7481
  15. PKG_BUILD_PARALLEL:=1
  16. HOST_BUILD_PARALLEL:=1
  17. PKG_BUILD_DEPENDS:=glib2/host gettext
  18. HOST_BUILD_DEPENDS:=gettext-full/host libiconv/host libffi/host
  19. PKG_INSTALL:=1
  20. PKG_USE_MIPS16:=0
  21. PKG_FIXUP:=autoreconf
  22. HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/glib-$(PKG_VERSION)
  23. include $(INCLUDE_DIR)/host-build.mk
  24. include $(INCLUDE_DIR)/package.mk
  25. include $(INCLUDE_DIR)/nls.mk
  26. define Package/glib2
  27. SECTION:=libs
  28. CATEGORY:=Libraries
  29. DEPENDS:=$(ICONV_DEPENDS) $(INTL_DEPENDS) +zlib +libpthread +libffi +libattr
  30. TITLE:=glib 2.0
  31. MAINTAINER:=Peter Wagner <tripolar@gmx.at>
  32. URL:=http://www.gtk.org/
  33. endef
  34. define Package/glib2/description
  35. The GLib library of C routines
  36. endef
  37. TARGET_CFLAGS += -Wno-error=implicit-function-declaration
  38. HOST_CONFIGURE_ARGS += \
  39. --disable-selinux \
  40. --with-libiconv=gnu \
  41. --with-pcre=internal \
  42. --disable-libmount
  43. CONFIGURE_ARGS += \
  44. --enable-shared \
  45. --enable-static \
  46. --disable-debug \
  47. --disable-selinux \
  48. --disable-libmount \
  49. --disable-fam \
  50. --disable-gtk-doc-html \
  51. --disable-man \
  52. --with-libiconv=gnu \
  53. --with-pcre=internal
  54. CONFIGURE_VARS += \
  55. glib_cv_stack_grows=no \
  56. glib_cv_uscore=no \
  57. ac_cv_path_GLIB_GENMARSHAL=$(STAGING_DIR_HOSTPKG)/bin/glib-genmarshal \
  58. ac_cv_func_mmap_fixed_mapped=yes \
  59. ac_cv_func_posix_getpwuid_r=yes \
  60. ac_cv_func_posix_getgrgid_r=yes
  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,la} \
  82. $(1)/usr/lib/
  83. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  84. $(INSTALL_DATA) \
  85. $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
  86. $(1)/usr/lib/pkgconfig
  87. $(INSTALL_DIR) $(2)/share/aclocal/
  88. $(INSTALL_DATA) \
  89. $(PKG_INSTALL_DIR)/usr/share/aclocal/*.m4 \
  90. $(2)/share/aclocal/
  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))