aboutsummaryrefslogtreecommitdiff
path: root/main/apk-tools/apk-tools-static.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/apk-tools/apk-tools-static.patch')
-rw-r--r--main/apk-tools/apk-tools-static.patch65
1 files changed, 0 insertions, 65 deletions
diff --git a/main/apk-tools/apk-tools-static.patch b/main/apk-tools/apk-tools-static.patch
deleted file mode 100644
index c122964b45..0000000000
--- a/main/apk-tools/apk-tools-static.patch
+++ /dev/null
@@ -1,65 +0,0 @@
1commit dd6008995a8e8509d71ffa906c837e7a320e8a15
2Author: Timo Teräs <timo.teras@iki.fi>
3Date: Wed Jun 30 16:53:56 2010 +0300
4
5 static build: do not use openssl engines
6
7 We want minimal static build. And this now also breaks with our openssl
8 since it tries to automatically dlopen some of the engine modules.
9
10diff --git a/.gitignore b/.gitignore
11index f6f9cf6..2b22f52 100644
12--- a/.gitignore
13+++ b/.gitignore
14@@ -1,4 +1,5 @@
15 apk
16+apk.static
17 *.o
18 *.d
19 *.cmd
20diff --git a/src/Makefile b/src/Makefile
21index bea288e..c9cda6a 100644
22--- a/src/Makefile
23+++ b/src/Makefile
24@@ -41,9 +41,10 @@ endif
25
26 CFLAGS_ALL += -D_ATFILE_SOURCE
27 CFLAGS_apk.o := -DAPK_VERSION=\"$(FULL_VERSION)\"
28+CFLAGS_apk-static.o := -DAPK_VERSION=\"$(FULL_VERSION)\" -DOPENSSL_NO_ENGINE
29
30 progs-$(STATIC) += apk.static
31-apk.static-objs := $(apk-objs)
32+apk.static-objs := $(filter-out apk.o,$(apk-objs)) apk-static.o
33 LDFLAGS_apk.static := -static
34 LDFLAGS_apk += -nopie -L$(obj)
35
36diff --git a/src/apk-static.c b/src/apk-static.c
37new file mode 120000
38index 0000000..bf745af
39--- /dev/null
40+++ b/src/apk-static.c
41@@ -0,0 +1 @@
42+apk.c
43\ No newline at end of file
44diff --git a/src/apk.c b/src/apk.c
45index 81bb950..4196f74 100644
46--- a/src/apk.c
47+++ b/src/apk.c
48@@ -12,13 +12,17 @@
49 #include <stdio.h>
50 #include <fcntl.h>
51 #include <ctype.h>
52+#include <errno.h>
53 #include <stdarg.h>
54 #include <stdlib.h>
55 #include <string.h>
56 #include <getopt.h>
57 #include <sys/stat.h>
58
59+#include <openssl/crypto.h>
60+#ifndef OPENSSL_NO_ENGINE
61 #include <openssl/engine.h>
62+#endif
63
64 #include "apk_defines.h"
65 #include "apk_database.h"