summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Pratt2025-05-31 18:07:05 +0000
committerRobert Marko2025-07-26 12:38:08 +0000
commit774ce21c6671427e5a28c5183acb0065549feeea (patch)
treeb755a555e39b8290338cec9c44204dfc7a0d6a7a
parentb07b8c8b4331d4ffcdbb5112f007778451dfa3f5 (diff)
downloadopenwrt-774ce21c6671427e5a28c5183acb0065549feeea.tar.gz
tools/gnulib: use exact directory copy for install
The python implementation of gnulib-tool uses a hidden file as the independent main function. A copy with glob ('*') does not include hidden files at the top level directory, so use whole directory copy instead and remove the patch for a non-hidden python file. Ensure the directory does not already exist by attempting uninstall first to remove it and by not using "install" to create a directory. Rename the clean target to uninstall, as it handles the staging directory and not the build directory. Removed: - 021-python-main.patch Signed-off-by: Michael Pratt <mcpratt@pm.me> Link: https://github.com/openwrt/openwrt/pull/16522 Signed-off-by: Robert Marko <robimarko@gmail.com>
-rw-r--r--tools/gnulib/Makefile6
-rw-r--r--tools/gnulib/patches/021-python-main.patch15
2 files changed, 3 insertions, 18 deletions
diff --git a/tools/gnulib/Makefile b/tools/gnulib/Makefile
index f708299549..245ba6be7d 100644
--- a/tools/gnulib/Makefile
+++ b/tools/gnulib/Makefile
@@ -14,14 +14,14 @@ define Host/Configure
endef
define Host/Install
+ $(call Host/Uninstall)
$(INSTALL_DIR) $(1)/share/aclocal
$(INSTALL_DATA) $(HOST_BUILD_DIR)/m4/*.m4 $(1)/share/aclocal/
- $(INSTALL_DIR) $(1)/share/gnulib
- $(CP) $(HOST_BUILD_DIR)/* $(1)/share/gnulib/
+ $(CP) $(HOST_BUILD_DIR)/ $(1)/share/gnulib/
ln -sf ../share/gnulib/gnulib-tool $(STAGING_DIR_HOST)/bin/gnulib-tool
endef
-define Host/Clean
+define Host/Uninstall
rm -rf $(STAGING_DIR_HOST)/bin/gnulib-tool $(STAGING_DIR_HOST)/share/gnulib
endef
diff --git a/tools/gnulib/patches/021-python-main.patch b/tools/gnulib/patches/021-python-main.patch
deleted file mode 100644
index 1edb1d28a9..0000000000
--- a/tools/gnulib/patches/021-python-main.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- /dev/null
-+++ b/gnulib-tool-main.py
-@@ -0,0 +1,4 @@
-+from pygnulib import main
-+
-+if __name__ == '__main__':
-+ main.main_with_exception_handling()
---- a/gnulib-tool.py
-+++ b/gnulib-tool.py
-@@ -157,4 +157,4 @@ fi
- profiler_args=
- # For profiling, cf. <https://docs.python.org/3/library/profile.html>.
- #profiler_args="-m cProfile -s tottime"
--exec python3 $profiler_args "$gnulib_dir/.gnulib-tool.py" "$@"
-+exec python3 $profiler_args "$gnulib_dir/gnulib-tool-main.py" "$@"