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.

89 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:=2
  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. include $(INCLUDE_DIR)/package.mk
  17. include $(INCLUDE_DIR)/kernel.mk
  18. define Package/libtalloc
  19. SECTION:=libs
  20. CATEGORY:=Libraries
  21. TITLE:=Core memory allocator used in Samba
  22. DEPENDS:=$(ICONV_DEPENDS) +libattr
  23. URL:=https://talloc.samba.org/talloc/doc/html/index.html
  24. endef
  25. define Package/libtalloc/description
  26. talloc is a hierarchical, reference counted memory pool system with destructors.
  27. endef
  28. CROSS = " \
  29. \nChecking simple C program: \"hello world\" \
  30. \nrpath library support: (127, \"\") \
  31. \n-Wl,--version-script support: (127, \"\") \
  32. \nChecking getconf LFS_CFLAGS: NO \
  33. \nChecking for large file support without additional flags: OK \
  34. \nChecking correct behavior of strtoll: OK \
  35. \nChecking for working strptime: NO \
  36. \nChecking for C99 vsnprintf: \"1\" \
  37. \nChecking for HAVE_SHARED_MMAP: NO \
  38. \nChecking for HAVE_MREMAP: NO \
  39. \nChecking for HAVE_INCOHERENT_MMAP: (2, \"\") \
  40. \nChecking for HAVE_SECURE_MKSTEMP: OK \
  41. \n"
  42. define Build/Configure
  43. (cd $(PKG_BUILD_DIR); \
  44. echo -e >cache.txt $(CROSS) " \
  45. \nChecking uname machine type: \"$(ARCH)\" \
  46. \nChecking uname release type: \"$(LINUX_VERSION)\" \
  47. \nChecking uname sysname type: \"Linux\" \
  48. \nChecking uname version type: \"$(LINUX_UNAME_VERSION)\" \
  49. \n" ; \
  50. $(CONFIGURE_VARS) \
  51. ./buildtools/bin/waf configure \
  52. --prefix=/usr \
  53. --sysconfdir=/etc \
  54. --localstatedir=/var \
  55. --with-libiconv="$(ICONV_PREFIX)" \
  56. --cross-compile \
  57. --cross-answers=cache.txt \
  58. --disable-python \
  59. --disable-rpath \
  60. --disable-rpath-install \
  61. )
  62. endef
  63. define Build/InstallDev
  64. $(INSTALL_DIR) $(1)/usr/lib
  65. $(CP) $(PKG_BUILD_DIR)/bin/default/libtalloc.so $(1)/usr/lib/
  66. $(INSTALL_DIR) $(1)/usr/include
  67. $(CP) $(PKG_BUILD_DIR)/*.h $(1)/usr/include/
  68. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  69. $(CP) $(PKG_BUILD_DIR)/bin/default/talloc.pc $(1)/usr/lib/pkgconfig/
  70. endef
  71. define Package/libtalloc/install
  72. $(INSTALL_DIR) $(1)/usr/lib
  73. $(CP) $(PKG_BUILD_DIR)/bin/default/libtalloc.so $(1)/usr/lib/libtalloc.so.$(MAJOR_VERSION)
  74. (cd $(1)/usr/lib; ln -sf libtalloc.so.$(MAJOR_VERSION) libtalloc.so)
  75. endef
  76. $(eval $(call BuildPackage,libtalloc))