summaryrefslogtreecommitdiff
path: root/dev-libs/libtomcrypt/files/libtomcrypt-1.18.2-slibtool.patch
blob: b783ed1d2440edac6bec880104169603ac01bd01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
https://github.com/libtom/libtomcrypt/pull/433
(and then https://github.com/libtom/libtomcrypt/commit/4b3ef7890156a55889b6657e4b295a77907c1f0f)

https://bugs.gentoo.org/777084

From ccc18b9eda52c31cc70a3e46eb33b87b3c076d65 Mon Sep 17 00:00:00 2001
From: orbea <orbea@fredslev.dk>
Date: Mon, 13 Aug 2018 19:20:37 -0700
Subject: [PATCH] makefile.shared: Support rlibtool.

When building libtomcrypt with rlibtool instead of libtool it will fail
when rlibtool fails to parse the generated libtool which does not exist.

Since rlibtool should be the default choice for most slibtool users in
the future this patch will use slibtool-shared instead which will
correctly build the shared library.

This could also help build the shared library on additional targets and
hosts where the stock libtool does not have shared libraries enabled.
---
 makefile.shared | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/makefile.shared b/makefile.shared
index 98ec2b501..c72f2ac8d 100644
--- a/makefile.shared
+++ b/makefile.shared
@@ -16,19 +16,24 @@
 
 PLATFORM := $(shell uname | sed -e 's/_.*//')
 
+ifeq ($(LIBTOOL),rlibtool)
+  TGTLIBTOOL:=slibtool-shared
+endif
+
 ifndef LIBTOOL
   ifeq ($(PLATFORM), Darwin)
     LIBTOOL:=glibtool
   else
     LIBTOOL:=libtool
   endif
+  TGTLIBTOOL=$(LIBTOOL)
 endif
 ifeq ($(PLATFORM), CYGWIN)
   NO_UNDEFINED:=-no-undefined
 endif
-LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(CC)
-INSTALL_CMD = $(LIBTOOL) --mode=install install
-UNINSTALL_CMD = $(LIBTOOL) --mode=uninstall rm
+LTCOMPILE = $(TGTLIBTOOL) --mode=compile --tag=CC $(CC)
+INSTALL_CMD = $(TGTLIBTOOL) --mode=install install
+UNINSTALL_CMD = $(TGTLIBTOOL) --mode=uninstall rm
 
 #Output filenames for various targets.
 ifndef LIBNAME
@@ -49,15 +54,15 @@ src/ciphers/aes/aes_enc.o: src/ciphers/aes/aes.c src/ciphers/aes/aes_tab.c
 LOBJECTS = $(OBJECTS:.o=.lo)
 
 $(LIBNAME): $(OBJECTS)
-	$(LIBTOOL) --mode=link --tag=CC $(CC) $(LTC_LDFLAGS) $(LOBJECTS) $(EXTRALIBS) -o $@ -rpath $(LIBPATH) -version-info $(VERSION_LT) $(NO_UNDEFINED)
+	$(TGTLIBTOOL) --mode=link --tag=CC $(CC) $(LTC_LDFLAGS) $(LOBJECTS) $(EXTRALIBS) -o $@ -rpath $(LIBPATH) -version-info $(VERSION_LT) $(NO_UNDEFINED)
 
 test: $(call print-help,test,Builds the library and the 'test' application to run all self-tests) $(LIBNAME) $(TOBJECTS)
-	$(LIBTOOL) --mode=link --tag=CC $(CC) $(LTC_LDFLAGS) -o $(TEST) $(TOBJECTS) $(LIBNAME) $(EXTRALIBS)
+	$(TGTLIBTOOL) --mode=link --tag=CC $(CC) $(LTC_LDFLAGS) -o $(TEST) $(TOBJECTS) $(LIBNAME) $(EXTRALIBS)
 
 # build the demos from a template
 define DEMO_template
 $(1): $(call print-help,$(1),Builds the library and the '$(1)' demo) demos/$(1).o $$(LIBNAME)
-	$$(LIBTOOL) --mode=link --tag=CC $$(CC) $$(LTC_LDFLAGS) $$^ $$(EXTRALIBS) -o $(1)
+	$$(TGTLIBTOOL) --mode=link --tag=CC $$(CC) $$(LTC_LDFLAGS) $$^ $$(EXTRALIBS) -o $(1)
 endef
 
 $(foreach demo, $(strip $(DEMOS)), $(eval $(call DEMO_template,$(demo))))
From 4b3ef7890156a55889b6657e4b295a77907c1f0f Mon Sep 17 00:00:00 2001
From: Steffen Jaeckel <s@jaeckel.eu>
Date: Mon, 3 Jun 2019 09:32:06 +0200
Subject: [PATCH] TGTLIBTOOL wasn't always defined

---
 makefile.shared | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/makefile.shared b/makefile.shared
index c72f2ac8d..e63d77032 100644
--- a/makefile.shared
+++ b/makefile.shared
@@ -18,19 +18,22 @@ PLATFORM := $(shell uname | sed -e 's/_.*//')
 
 ifeq ($(LIBTOOL),rlibtool)
   TGTLIBTOOL:=slibtool-shared
-endif
-
-ifndef LIBTOOL
-  ifeq ($(PLATFORM), Darwin)
-    LIBTOOL:=glibtool
+else
+  ifndef LIBTOOL
+    ifeq ($(PLATFORM), Darwin)
+      TGTLIBTOOL:=glibtool
+    else
+      TGTLIBTOOL:=libtool
+    endif
   else
-    LIBTOOL:=libtool
+    TGTLIBTOOL=$(LIBTOOL)
   endif
-  TGTLIBTOOL=$(LIBTOOL)
 endif
+
 ifeq ($(PLATFORM), CYGWIN)
   NO_UNDEFINED:=-no-undefined
 endif
+
 LTCOMPILE = $(TGTLIBTOOL) --mode=compile --tag=CC $(CC)
 INSTALL_CMD = $(TGTLIBTOOL) --mode=install install
 UNINSTALL_CMD = $(TGTLIBTOOL) --mode=uninstall rm