Blame apk-tools-2.6.6.local.patch

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