aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main/apk-tools/0001-Makefile-do-not-require-lua-pkgconfig-unless-you-int.patch42
-rw-r--r--main/apk-tools/APKBUILD13
-rw-r--r--main/apk-tools/apk-tools-static.patch65
3 files changed, 3 insertions, 117 deletions
diff --git a/main/apk-tools/0001-Makefile-do-not-require-lua-pkgconfig-unless-you-int.patch b/main/apk-tools/0001-Makefile-do-not-require-lua-pkgconfig-unless-you-int.patch
deleted file mode 100644
index 52ef141863..0000000000
--- a/main/apk-tools/0001-Makefile-do-not-require-lua-pkgconfig-unless-you-int.patch
+++ /dev/null
@@ -1,42 +0,0 @@
1From fc4c60f233ebe9fe85b7b03d0cf5deec4ab1b32d Mon Sep 17 00:00:00 2001
2From: Natanael Copa <ncopa@alpinelinux.org>
3Date: Wed, 16 Jun 2010 07:37:17 +0000
4Subject: [PATCH] Makefile: do not require lua pkgconfig unless you intend build lua module
5
6---
7 src/Makefile | 11 ++++++-----
8 1 files changed, 6 insertions(+), 5 deletions(-)
9
10diff --git a/src/Makefile b/src/Makefile
11index 50f9664..bea288e 100644
12--- a/src/Makefile
13+++ b/src/Makefile
14@@ -1,12 +1,9 @@
15-PKGDEPS := openssl zlib lua
16-
17-ifeq ($(shell pkg-config --print-errors --exists $(PKGDEPS) || echo fail),fail)
18-$(error Build dependencies are not met)
19-endif
20+PKGDEPS := openssl zlib
21
22 # lua module
23 ifneq ($(LUAAPK),)
24 LIBAPK := YesPlease
25+PKGDEPS += lua
26 shlibs-y += apk.so
27 apk.so-objs := lua-apk.o
28 CFLAGS_lua-apk.o := -DAPK_VERSION=\"$(FULL_VERSION)\"
29@@ -16,6 +13,10 @@ install-LUA_LIB-y := $(INSTALLDIR) $(DESTDIR)$(LUA_LIBDIR) \
30 $(INSTALL) $(LUA_LIB-y) $(DESTDIR)$(LUA_LIBDIR)
31 endif
32
33+ifeq ($(shell pkg-config --print-errors --exists $(PKGDEPS) || echo fail),fail)
34+$(error Build dependencies are not met)
35+endif
36+
37 progs-y += apk
38 apk-objs := apk.o add.o del.o fix.o update.o info.o \
39 search.o upgrade.o cache.o ver.o index.o fetch.o \
40--
411.7.1
42
diff --git a/main/apk-tools/APKBUILD b/main/apk-tools/APKBUILD
index 90cff68dc2..f64df8a815 100644
--- a/main/apk-tools/APKBUILD
+++ b/main/apk-tools/APKBUILD
@@ -1,14 +1,12 @@
1# Maintainer: Natanael Copa <ncopa@alpinelinux.org> 1# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
2pkgname=apk-tools 2pkgname=apk-tools
3pkgver=2.0.5 3pkgver=2.0.6
4pkgrel=1 4pkgrel=0
5pkgdesc="Alpine Package Keeper - package manager for alpine" 5pkgdesc="Alpine Package Keeper - package manager for alpine"
6subpackages="$pkgname-static" 6subpackages="$pkgname-static"
7depends= 7depends=
8makedepends="zlib-dev openssl-dev pkgconfig" 8makedepends="zlib-dev openssl-dev pkgconfig"
9source="http://git.alpinelinux.org/cgit/$pkgname/snapshot/$pkgname-$pkgver.tar.bz2 9source="http://git.alpinelinux.org/cgit/$pkgname/snapshot/$pkgname-$pkgver.tar.bz2
10 0001-Makefile-do-not-require-lua-pkgconfig-unless-you-int.patch
11 apk-tools-static.patch
12 " 10 "
13 11
14url="http://git.alpinelinux.org/cgit/apk-tools/" 12url="http://git.alpinelinux.org/cgit/apk-tools/"
@@ -22,9 +20,6 @@ prepare() {
22 *.patch) patch -p1 -i "$srcdir"/$i || return 1 20 *.patch) patch -p1 -i "$srcdir"/$i || return 1
23 esac 21 esac
24 done 22 done
25 # the patch includes a symlink
26 rm -f src/apk-static.c
27 ln -s apk.c src/apk-static.c
28} 23}
29 24
30build() { 25build() {
@@ -52,6 +47,4 @@ static() {
52 "$subpkgdir"/sbin/apk.static 47 "$subpkgdir"/sbin/apk.static
53} 48}
54 49
55md5sums="7f9234ab210557b064d7bd9b42833f0a apk-tools-2.0.5.tar.bz2 50md5sums="5933a61f91f44c5c534f8a62e6effb65 apk-tools-2.0.6.tar.bz2"
56f63d483b724e8e9344ce8cb965d5ed22 0001-Makefile-do-not-require-lua-pkgconfig-unless-you-int.patch
573c1f21719a6c4aba51333cf0d88c5600 apk-tools-static.patch"
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"