From dca3c4f948039a320c631bfb4483ce0d355c4a74 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Wed, 16 Nov 2022 18:02:05 +0100 Subject: [PATCH] Parallelize symbol collection for renaming (#27819) --- .../parallelize-symbol-collection.patch | 46 +++++++++++++++++++ ports/libunistring/portfile.cmake | 1 + ports/libunistring/vcpkg.json | 2 +- versions/baseline.json | 2 +- versions/l-/libunistring.json | 5 ++ 5 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 ports/libunistring/parallelize-symbol-collection.patch diff --git a/ports/libunistring/parallelize-symbol-collection.patch b/ports/libunistring/parallelize-symbol-collection.patch new file mode 100644 index 00000000000..f0e1be6594a --- /dev/null +++ b/ports/libunistring/parallelize-symbol-collection.patch @@ -0,0 +1,46 @@ +diff --git a/lib/Makefile.am b/lib/Makefile.am +index 382d2bc..d9f0144 100644 +--- a/lib/Makefile.am ++++ b/lib/Makefile.am +@@ -274,6 +274,25 @@ endif + # But don't hide symbols that start with "libintl_locale", for the reason + # stated in localename-table.h. + all check install: config.h ++%_exported: ++ @d=`echo "$@" | sed -e 's,/[^/]*$$,,'`; \ ++ test "$$d" = "$@" || mkdir -p "$$d" ; \ ++ true >"$@" || exit 1 ; \ ++ f=`echo "$@" | sed -e 's,_exported$$,,'`; \ ++ case $$f in \ ++ *.res.lo ) ;; \ ++ *.c | *.$(OBJEXT) | *.lo ) \ ++ sf=`echo "$$f" | sed -e 's,\\.[^.]*$$,,'`.c; \ ++ test -f $$sf || sf=$(srcdir)/$$sf; \ ++ of=`echo "$$f" | sed -e 's,^.*/,,' -e 's,\\.[^.]*$$,,'`.$(OBJEXT); \ ++ echo "$(COMPILE) -c $$sf && sh ./exported.sh $$of 1>>$@" ; \ ++ $(COMPILE) -c $$sf || exit 1; \ ++ sh ./exported.sh $$of 1>>"$@"; \ ++ rm -f $$of `echo "$$of" | sed -e 's,\\.$(OBJEXT)$$,.lo,'`; \ ++ ;; \ ++ esac ++libunistring_la_EXPORTED = $(libunistring_la_SOURCES:%=%_exported) $(libunistring_la_LIBADD:%=%_exported) ++exported: $(libunistring_la_EXPORTED) + config.h: $(BUILT_SOURCES) $(srcdir)/libunistring.sym + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + : "Avoid double inclusion, to avoid a warning about redefinitions."; \ +@@ -285,10 +304,14 @@ config.h: $(BUILT_SOURCES) $(srcdir)/libunistring.sym + echo '#endif /* UNISTRING_CONFIG_H */'; \ + } > config.h && \ + if test -n "$(NAMESPACING)" && test -n "$(HAVE_GLOBAL_SYMBOL_PIPE)"; then \ ++ echo "Collecting symbols to be renamed"; \ ++ $(MAKE) exported && \ + { \ + { \ +- for f in $(libunistring_la_SOURCES) $(libunistring_la_LIBADD); do \ ++ for f in $(libunistring_la_EXPORTED); do \ + case $$f in \ ++ *_exported ) cat $$f 1>&5; ;; \ ++ * ) ;; \ + *.res.lo ) ;; \ + *.c | *.$(OBJEXT) | *.lo ) \ + sf=`echo "$$f" | sed -e 's,\\.[^.]*$$,,'`.c; \ diff --git a/ports/libunistring/portfile.cmake b/ports/libunistring/portfile.cmake index 02056592c10..5f213378d9a 100644 --- a/ports/libunistring/portfile.cmake +++ b/ports/libunistring/portfile.cmake @@ -16,6 +16,7 @@ vcpkg_extract_source_archive(SOURCE_PATH PATCHES disable-gnulib-fetch.patch disable-subdirs.patch + parallelize-symbol-collection.patch ) vcpkg_configure_make( diff --git a/ports/libunistring/vcpkg.json b/ports/libunistring/vcpkg.json index b4118f5a141..d3dc3e759c3 100644 --- a/ports/libunistring/vcpkg.json +++ b/ports/libunistring/vcpkg.json @@ -1,7 +1,7 @@ { "name": "libunistring", "version": "1.1", - "port-version": 1, + "port-version": 2, "description": "GNU libunistring provides functions for manipulating Unicode strings and for manipulating C strings according to the Unicode standard.", "homepage": "https://www.gnu.org/software/libunistring/", "license": "LGPL-3.0-or-later OR GPL-2.0-or-later", diff --git a/versions/baseline.json b/versions/baseline.json index 7e2698eab98..18cf7e2b2c9 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4322,7 +4322,7 @@ }, "libunistring": { "baseline": "1.1", - "port-version": 1 + "port-version": 2 }, "liburing": { "baseline": "2.2", diff --git a/versions/l-/libunistring.json b/versions/l-/libunistring.json index 1875803be5d..7945beb56f0 100644 --- a/versions/l-/libunistring.json +++ b/versions/l-/libunistring.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "8bcb2f939ea16732abab03352b951cf12713bc54", + "version": "1.1", + "port-version": 2 + }, { "git-tree": "a5511958230904a505b18af4043c5b51512d8684", "version": "1.1",