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.

91 lines
2.6 KiB

  1. #
  2. # This is free software, licensed under the GNU General Public License v2.
  3. # See /LICENSE for more information.
  4. #
  5. include $(TOPDIR)/rules.mk
  6. PKG_NAME:=talloc
  7. PKG_VERSION:=2.3.1
  8. MAJOR_VERSION:=2
  9. PKG_RELEASE:=1
  10. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  11. PKG_SOURCE_URL:=https://www.samba.org/ftp/talloc
  12. PKG_HASH:=ef4822d2fdafd2be8e0cabc3ec3c806ae29b8268e932c5e9a4cd5585f37f9f77
  13. PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
  14. PKG_LICENSE:=LGPL-3.0-or-later
  15. PKG_BUILD_PARALLEL:=0
  16. HOST_BUILD_DEPENDS:=python/host
  17. include $(INCLUDE_DIR)/package.mk
  18. include $(INCLUDE_DIR)/kernel.mk
  19. define Package/libtalloc
  20. SECTION:=libs
  21. CATEGORY:=Libraries
  22. TITLE:=Core memory allocator used in Samba
  23. DEPENDS:=$(ICONV_DEPENDS) +libattr
  24. URL:=https://talloc.samba.org/talloc/doc/html/index.html
  25. endef
  26. define Package/libtalloc/description
  27. talloc is a hierarchical, reference counted memory pool system with destructors.
  28. endef
  29. CROSS = " \
  30. \nChecking simple C program: \"hello world\" \
  31. \nrpath library support: (127, \"\") \
  32. \n-Wl,--version-script support: (127, \"\") \
  33. \nChecking getconf LFS_CFLAGS: NO \
  34. \nChecking for large file support without additional flags: OK \
  35. \nChecking correct behavior of strtoll: OK \
  36. \nChecking for working strptime: NO \
  37. \nChecking for C99 vsnprintf: \"1\" \
  38. \nChecking for HAVE_SHARED_MMAP: NO \
  39. \nChecking for HAVE_MREMAP: NO \
  40. \nChecking for HAVE_INCOHERENT_MMAP: (2, \"\") \
  41. \nChecking for HAVE_SECURE_MKSTEMP: OK \
  42. \n"
  43. define Build/Configure
  44. (cd $(PKG_BUILD_DIR); \
  45. echo -e >cache.txt $(CROSS) " \
  46. \nChecking uname machine type: \"$(ARCH)\" \
  47. \nChecking uname release type: \"$(LINUX_VERSION)\" \
  48. \nChecking uname sysname type: \"Linux\" \
  49. \nChecking uname version type: \"$(LINUX_UNAME_VERSION)\" \
  50. \n" ; \
  51. $(CONFIGURE_VARS) \
  52. ./buildtools/bin/waf configure \
  53. --prefix=/usr \
  54. --sysconfdir=/etc \
  55. --localstatedir=/var \
  56. --with-libiconv="$(ICONV_PREFIX)" \
  57. --cross-compile \
  58. --cross-answers=cache.txt \
  59. --disable-python \
  60. --disable-rpath \
  61. --disable-rpath-install \
  62. )
  63. endef
  64. define Build/InstallDev
  65. $(INSTALL_DIR) $(1)/usr/lib
  66. $(CP) $(PKG_BUILD_DIR)/bin/default/libtalloc.so $(1)/usr/lib/
  67. $(INSTALL_DIR) $(1)/usr/include
  68. $(CP) $(PKG_BUILD_DIR)/*.h $(1)/usr/include/
  69. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  70. $(CP) $(PKG_BUILD_DIR)/bin/default/talloc.pc $(1)/usr/lib/pkgconfig/
  71. endef
  72. define Package/libtalloc/install
  73. $(INSTALL_DIR) $(1)/usr/lib
  74. $(CP) $(PKG_BUILD_DIR)/bin/default/libtalloc.so $(1)/usr/lib/libtalloc.so.$(MAJOR_VERSION)
  75. (cd $(1)/usr/lib; ln -sf libtalloc.so.$(MAJOR_VERSION) libtalloc.so)
  76. endef
  77. $(eval $(call BuildPackage,libtalloc))