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
|
--- apk-tools-2.6.6/src/apk.c.orig 2016-02-09 15:57:53.000000000 +0100
+++ apk-tools-2.6.6/src/apk.c 2016-03-09 10:24:39.763540600 +0100
@@ -425,12 +425,15 @@
static void apk_applet_register_builtin(void)
{
+#if 0
extern apk_init_func_t __start_initapplets[], __stop_initapplets[];
apk_init_func_t *p;
list_init(&apk_applet_list);
for (p = __start_initapplets; p < __stop_initapplets; p++)
(*p)();
+#endif
+ list_init(&apk_applet_list);
}
int main(int argc, char **argv)
--- apk-tools-2.6.6/src/Makefile.orig 2016-02-09 15:57:53.000000000 +0100
+++ apk-tools-2.6.6/src/Makefile 2016-03-09 10:28:09.862286100 +0100
@@ -1,26 +1,20 @@
PKGDEPS := openssl zlib
-PKG_CONFIG ?= pkg-config
LUAAPK ?= yes
# lua module
ifneq ($(LUAAPK),)
LUA_VERSION ?= 5.2
LUA_PC ?= lua$(LUA_VERSION)
-LUA_LIBDIR ?= /usr/lib/lua/$(LUA_VERSION)
+LUA_LIBDIR ?= $(PREFIX)/lib/lua/$(LUA_VERSION)
LIBAPK := YesPlease
shlibs-y += apk.so
apk.so-objs := lua-apk.o
-CFLAGS_lua-apk.o := -DAPK_VERSION=\"$(FULL_VERSION)\" \
- $(shell $(PKG_CONFIG) $(LUA_PC) --cflags)
+CFLAGS_lua-apk.o := -DAPK_VERSION=\"$(FULL_VERSION)\"
LUA_LIB-y := $(obj)/apk.so
install-LUA_LIB-y := $(INSTALLDIR) $(DESTDIR)$(LUA_LIBDIR) && \
$(INSTALL) $(LUA_LIB-y) $(DESTDIR)$(LUA_LIBDIR)
endif
-ifeq ($(shell $(PKG_CONFIG) --print-errors --exists $(PKGDEPS) || echo fail),fail)
-$(error Build dependencies are not met)
-endif
-
progs-y += apk
apk-objs := apk.o add.o del.o fix.o update.o info.o \
search.o upgrade.o cache.o ver.o index.o fetch.o \
@@ -65,10 +59,8 @@
LDFLAGS_apk += -L$(obj)
LDFLAGS_apk-test += -L$(obj)
-CFLAGS_ALL += $(shell $(PKG_CONFIG) --cflags $(PKGDEPS))
-LIBS := /usr/lib/libfetch.a \
+LIBS := $(PREFIX)/lib/libfetch.a \
-Wl,--as-needed \
- $(shell $(PKG_CONFIG) --libs $(PKGDEPS)) \
-Wl,--no-as-needed
$(obj)/apk: $(LIBAPK-y)
--- apk-tools-2.6.6/Make.rules.orig 2016-02-09 15:57:53.000000000 +0100
+++ apk-tools-2.6.6/Make.rules 2016-03-09 10:44:12.457459300 +0100
@@ -70,7 +70,7 @@
INSTALLDIR := $(INSTALL) -d
CFLAGS ?= -g -O2
-CFLAGS_ALL := -Werror -Wall -Wstrict-prototypes -D_GNU_SOURCE -std=gnu99 -fPIC
+CFLAGS_ALL := -Wall -Wstrict-prototypes -D_GNU_SOURCE -std=gnu99 -fPIC
CFLAGS_ALL += $(CFLAGS)
LDFLAGS ?= -g
@@ -225,7 +225,7 @@
quiet_cmd_ld = LD $@
cmd_ld = $(CC) $(ld_flags) -o $@ \
$(addprefix $(obj)/,$($(@F)-objs)) \
- $(LIBS) $(LIBS_$(@F))
+ $(LIBS) $(LIBS_$(@F)) $(LDFLAGS_LIBS)
$(__progs): override local-target-prereqs=$(addprefix $(obj)/,$($(*F)-objs))
|