File 0368-otp-Make-public_key-part-of-bootstrap.patch of Package erlang

From 5568577b3e5a1a98a86c90c1e3241ac4cecea237 Mon Sep 17 00:00:00 2001
From: Lukas Larsson <lukas@erlang.org>
Date: Mon, 3 May 2021 10:57:14 +0200
Subject: [PATCH 2/7] otp: Make public_key part of bootstrap

This is needed in order for ssh to use include_lib
of public_key when building.
---
 .gitignore   |  1 +
 Makefile.in  | 13 +++++++++++++
 lib/Makefile |  2 +-
 3 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/Makefile.in b/Makefile.in
index b8c07a31f1..f159f9fedf 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -744,6 +744,8 @@ tertiary_bootstrap_copy:
 	$(V_at)if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/common_test/include ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/common_test/include ; fi
 	$(V_at)if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/runtime_tools ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/runtime_tools ; fi
 	$(V_at)if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/runtime_tools/include ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/runtime_tools/include ; fi
+	$(V_at)if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/public_key ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/public_key ; fi
+	$(V_at)if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/public_key/include ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/public_key/include ; fi
 	$(V_at)if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/erl_interface ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/erl_interface ; fi
 	$(V_at)if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/erl_interface/include ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/erl_interface/include ; fi
 	$(V_at)if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/jinterface/ ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/jinterface/ ; fi
@@ -820,6 +822,17 @@ tertiary_bootstrap_copy:
 			${INSTALL_DATA} -p $$x $$TF; \
 		true; \
 	done
+#	copy public_key includes to be able to compile with include_lib
+	$(V_at)for x in lib/public_key/include/*.hrl; do \
+		BN=`basename $$x`; \
+		TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/public_key/include/$$BN; \
+		test -f  $$TF && \
+		test '!' -z "`find $$x -newer $$TF -print`" && \
+			${INSTALL_DATA} -p $$x $$TF; \
+		test '!' -f $$TF && \
+			${INSTALL_DATA} -p $$x $$TF; \
+		true; \
+	done
 #	copy erl_interface includes
 	$(V_at)for x in lib/erl_interface/include/*.h; do \
 		BN=`basename $$x`; \
diff --git a/lib/Makefile b/lib/Makefile
index b607334732..a66ac85f55 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -67,7 +67,7 @@ else
       endif
     else
       ifdef TERTIARY_BOOTSTRAP
-        SUB_DIRECTORIES = snmp sasl erl_interface jinterface syntax_tools wx
+        SUB_DIRECTORIES = snmp sasl erl_interface jinterface syntax_tools wx public_key
       else
         ifdef DOC_BOOTSTRAP
           SUB_DIRECTORIES = xmerl edoc erl_docgen public_key
-- 
2.26.2

openSUSE Build Service is sponsored by