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.

121 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:=3
  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:=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-libelf \
  40. --disable-selinux \
  41. --with-libiconv=gnu \
  42. --with-pcre=internal \
  43. --disable-libmount
  44. CONFIGURE_ARGS += \
  45. --enable-shared \
  46. --enable-static \
  47. --disable-debug \
  48. --disable-selinux \
  49. --disable-libmount \
  50. --disable-fam \
  51. --disable-gtk-doc-html \
  52. --disable-man \
  53. --with-libiconv=gnu \
  54. --with-pcre=internal
  55. CONFIGURE_VARS += \
  56. glib_cv_stack_grows=no \
  57. glib_cv_uscore=no \
  58. ac_cv_path_GLIB_GENMARSHAL=$(STAGING_DIR_HOSTPKG)/bin/glib-genmarshal \
  59. ac_cv_func_mmap_fixed_mapped=yes \
  60. ac_cv_func_posix_getpwuid_r=yes \
  61. ac_cv_func_posix_getgrgid_r=yes
  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,la} \
  83. $(1)/usr/lib/
  84. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  85. $(INSTALL_DATA) \
  86. $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
  87. $(1)/usr/lib/pkgconfig
  88. $(INSTALL_DIR) $(2)/share/aclocal/
  89. $(INSTALL_DATA) \
  90. $(PKG_INSTALL_DIR)/usr/share/aclocal/*.m4 \
  91. $(2)/share/aclocal/
  92. endef
  93. define Package/glib2/install
  94. $(INSTALL_DIR) $(1)/usr/lib
  95. $(CP) \
  96. $(PKG_INSTALL_DIR)/usr/lib/*.so* \
  97. $(1)/usr/lib/
  98. endef
  99. $(eval $(call HostBuild))
  100. $(eval $(call BuildPackage,glib2))