0026-tools-add-tar-host-build-required-for-sort-name-which-was-only-added-in-the-latest-version.patch 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. From: Matthias Schiffer <mschiffer@universe-factory.net>
  2. Date: Sun, 24 Apr 2016 08:44:30 +0200
  3. Subject: tools: add tar host build, required for --sort=name which was only added in the latest version
  4. Signed-off-by: Felix Fietkau <nbd@openwrt.org>
  5. Backport of r46876
  6. diff --git a/tools/Makefile b/tools/Makefile
  7. index c6cded8..98ce8c5 100644
  8. --- a/tools/Makefile
  9. +++ b/tools/Makefile
  10. @@ -81,6 +81,9 @@ endif
  11. # dependency for tools which have patches directory
  12. $(foreach tool, $(tools-y), $(if $(wildcard $(curdir)/$(tool)/patches),$(eval $(curdir)/$(tool)/compile += $(curdir)/patch/install)))
  13. +$(foreach tool, $(tools-y), $(eval $(curdir)/$(tool)/compile += $(curdir)/tar/install))
  14. +tools-y += tar
  15. +
  16. $(curdir)/builddirs := $(tools-y) $(tools-dep) $(tools-)
  17. $(curdir)/builddirs-default := $(tools-y)
  18. diff --git a/tools/tar/Makefile b/tools/tar/Makefile
  19. new file mode 100644
  20. index 0000000..975e783
  21. --- /dev/null
  22. +++ b/tools/tar/Makefile
  23. @@ -0,0 +1,30 @@
  24. +#
  25. +# Copyright (C) 2015 OpenWrt.org
  26. +#
  27. +# This is free software, licensed under the GNU General Public License v2.
  28. +# See /LICENSE for more information.
  29. +#
  30. +include $(TOPDIR)/rules.mk
  31. +
  32. +PKG_NAME:=tar
  33. +PKG_VERSION:=1.28
  34. +
  35. +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  36. +PKG_SOURCE_URL:=@GNU/tar
  37. +PKG_MD5SUM:=49b6306167724fe48f419a33a5beb857
  38. +
  39. +HOST_BUILD_PARALLEL := 1
  40. +
  41. +include $(INCLUDE_DIR)/host-build.mk
  42. +
  43. +HOSTCC := $(HOSTCC_NOCACHE)
  44. +HOSTCXX := $(HOSTCXX_NOCACHE)
  45. +
  46. +HOST_CONFIGURE_ARGS += \
  47. + --without-posix-acls \
  48. + --without-selinux \
  49. + --without-xattrs \
  50. + --disable-acl \
  51. + --disable-nls
  52. +
  53. +$(eval $(call HostBuild))
  54. diff --git a/tools/tar/patches/100-fix_xattr_disable.patch b/tools/tar/patches/100-fix_xattr_disable.patch
  55. new file mode 100644
  56. index 0000000..5735bd2
  57. --- /dev/null
  58. +++ b/tools/tar/patches/100-fix_xattr_disable.patch
  59. @@ -0,0 +1,17 @@
  60. +--- a/lib/xattr-at.c
  61. ++++ b/lib/xattr-at.c
  62. +@@ -18,6 +18,8 @@
  63. +
  64. + #include <config.h>
  65. +
  66. ++#ifdef HAVE_XATTRS
  67. ++
  68. + #include "xattr-at.h"
  69. + #include "openat.h"
  70. +
  71. +@@ -108,3 +110,5 @@
  72. + #undef AT_FUNC_RESULT
  73. + #undef AT_FUNC_POST_FILE_PARAM_DECLS
  74. + #undef AT_FUNC_POST_FILE_ARGS
  75. ++
  76. ++#endif