summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2016-03-09 10:45:09 +0100
committerLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2016-03-09 10:45:09 +0100
commit5a3901a1577bd99715893ce41b0d778af341df07 (patch)
tree3130c208f86ce90798f9cf1c7741bf6676d31f7a
parent6d967c862d7c1289cbecab527014b86e9ac6d1a0 (diff)
downloadmidipix_build-5a3901a1577bd99715893ce41b0d778af341df07.tar.bz2
midipix_build-5a3901a1577bd99715893ce41b0d778af341df07.tar.xz
Adds libfetch and apk-tools.
l---------367.libfetch.build1
-rw-r--r--367.libfetch.vars11
l---------368.apk_tools.build1
-rw-r--r--apk-tools-2.6.6.local.patch74
-rw-r--r--build.vars18
-rw-r--r--libfetch-2.33.local.patch31
-rw-r--r--pkg.build3
7 files changed, 135 insertions, 4 deletions
diff --git a/367.libfetch.build b/367.libfetch.build
new file mode 120000
index 00000000..52bb82e5
--- /dev/null
+++ b/367.libfetch.build
@@ -0,0 +1 @@
+pkg.build \ No newline at end of file
diff --git a/367.libfetch.vars b/367.libfetch.vars
new file mode 100644
index 00000000..b1b9d775
--- /dev/null
+++ b/367.libfetch.vars
@@ -0,0 +1,11 @@
+#
+# . ./build.vars and set -o errexit are assumed.
+#
+
+pkg_libfetch_extract_post() {
+ cd ${PKG_SUBDIR} && \
+ fetch http://git.alpinelinux.org/cgit/aports/plain/main/libfetch/Makefile && \
+ cd ${OLDPWD};
+};
+
+# vim:filetype=sh
diff --git a/368.apk_tools.build b/368.apk_tools.build
new file mode 120000
index 00000000..52bb82e5
--- /dev/null
+++ b/368.apk_tools.build
@@ -0,0 +1 @@
+pkg.build \ No newline at end of file
diff --git a/apk-tools-2.6.6.local.patch b/apk-tools-2.6.6.local.patch
index 5a863a99..ab7a6afd 100644
--- a/apk-tools-2.6.6.local.patch
+++ b/apk-tools-2.6.6.local.patch
@@ -1,5 +1,66 @@
---- apk-tools-2.6.6/Make.rules.orig 2016-02-09 14:57:53.000000000 +0000
-+++ apk-tools-2.6.6/Make.rules 2016-02-13 19:04:27.012687754 +0000
+--- 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
@@ -9,3 +70,12 @@
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))
+
diff --git a/build.vars b/build.vars
index 1a6a9c2d..88af8126 100644
--- a/build.vars
+++ b/build.vars
@@ -42,7 +42,7 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}";
: ${WGET_ARGS:="-N --no-check-certificate"};
: ${WORKDIR:=${PREFIX}/tmp};
-: ${PKG_BUILD_NAMES:="apk_tools bash binutils binutils_host bzip2 coreutils curl dalist dash diffutils findutils gawk git glib gmp grep gzip hexcurse irssi less libarchive libelf libffi libressl libz make mpc mpfr nano ncurses ncursestw ncursesw ntapi ntcon ntctty openssh pacman patch pemagine popt psxscl psxstub psxtypes rsync sed tar util_linux which xz zsh"};
+: ${PKG_BUILD_NAMES:="apk_tools bash binutils binutils_host bzip2 coreutils curl dalist dash diffutils findutils gawk git glib gmp grep gzip hexcurse irssi less libarchive libelf libfetch libffi libnbcompat libressl libz make mpc mpfr nano ncurses ncursestw ncursesw ntapi ntcon ntctty openssh pacman patch pemagine popt psxscl psxstub psxtypes rsync sed tar util_linux which xz zsh"};
: ${PKG_BUILD_VARS:="AR_BUILD AR_CONFIGURE AUTOGEN BUILD_DIR BUILD_TYPE CC_BUILD CC_CONFIGURE CC_INSTALL CFLAGS_BUILD_EXTRA CFLAGS_CONFIGURE CFLAGS_CONFIGURE_EXTRA CFLAGS_INSTALL_EXTRA CONFIGURE_ARGS CONFIGURE_ARGS_EXTRA ENV_VARS_EXTRA FNAME GIT_ARGS_EXTRA INSTALL_TARGET LDFLAGS_BUILD_EXTRA LDFLAGS_CONFIGURE LDFLAGS_CONFIGURE_EXTRA LDFLAGS_INSTALL_EXTRA LIBFILES_FIX LIBTOOL_MIDIPIX LIBTOOL_MIDIPIX_FIX MAKEFLAGS_BUILD MAKEFLAGS_BUILD_EXTRA MAKEFLAGS_INSTALL MAKEFLAGS_INSTALL_EXTRA NO_CLEAN PATCHES_EXTRA_URL PREFIX_EXTRA RANLIB_INSTALL SHA256SUM SUBDIR URL URL_FNAME URL_TYPE VERSION"};
: ${PKG_LVL0_CFLAGS_CONFIGURE:=-O0};
: ${PKG_LVL0_CONFIGURE_ARGS:="-C --host=${HOST_NATIVE} --prefix= --target=${TARGET}"};
@@ -66,7 +66,9 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}";
: ${PKG_APK_TOOLS_VERSION:=2.6.6};
: ${PKG_APK_TOOLS_SHA256SUM:=7e5e86c856ce236c7fd54605ee0b1dbf59920398d3b33f9f6ff0e5f98e6828af};
: ${PKG_APK_TOOLS_URL:=http://git.alpinelinux.org/cgit/apk-tools/snapshot/apk-tools-${PKG_APK_TOOLS_VERSION}.tar.bz2};
-: ${PKG_APK_TOOLS_MAKEFLAGS_BUILD_EXTRA:=CROSS_COMPILE=${HOST_NATIVE}- LUAAPK= PKG_CONFIG_PATH=${PREFIX_LVL3}/lib/pkgconfig VERBOSE=1};
+: ${PKG_APK_TOOLS_MAKEFLAGS_INSTALL_EXTRA:=MANDIR=/share/man DOCDIR=/share/doc/apk};
+: ${PKG_APK_TOOLS_BUILD_DIR:=apk-tools-${PKG_APK_TOOLS_VERSION}};
+: ${PKG_APK_TOOLS_ENV_VARS_EXTRA:=CFLAGS=--sysroot=${PREFIX_LVL3},CROSS_COMPILE=${HOST_NATIVE}-,LUAAPK=,PKG_CONFIG_PATH=${PREFIX_LVL3}/lib/pkgconfig,VERBOSE=1,PREFIX=${PREFIX_LVL3},LDFLAGS_LIBS=--sysroot=${PREFIX_LVL3} -lcrypto -lssl -lz};
: ${PKG_BZIP2_VERSION:=1.0.6};
: ${PKG_BZIP2_SHA256SUM:=a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd};
: ${PKG_BZIP2_URL:=http://www.bzip.org/1.0.6/bzip2-${PKG_BZIP2_VERSION}.tar.gz};
@@ -183,11 +185,23 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}";
: ${PKG_LIBELF_CONFIGURE_ARGS:="--host=${HOST_NATIVE} --prefix=${PREFIX_LVL1} --target=${TARGET}"};
: ${PKG_LIBELF_LIBFILES_FIX:=1};
: ${PKG_LIBELF_MAKEFLAGS_INSTALL:=};
+: ${PKG_LIBFETCH_VERSION:=2.33};
+: ${PKG_LIBFETCH_SHA256SUM:=3226f53d5ad29cc27510db968ef0d37bf4554b8aaaeadcd56e23067213b08943};
+: ${PKG_LIBFETCH_URL:=https://sources.archlinux.org/other/libfetch/libfetch-${PKG_LIBFETCH_VERSION}.tar.gz};
+: ${PKG_LIBFETCH_BUILD_DIR:=libfetch-${PKG_LIBFETCH_VERSION}};
+: ${PKG_LIBFETCH_ENV_VARS_EXTRA:=CFLAGS=--sysroot=${PREFIX_LVL3},LDFLAGS=--sysroot=${PREFIX_LVL3}};
+: ${PKG_LIBFETCH_LIBFILES_FIX:=1};
+: ${PKG_LIBFETCH_MAKEFLAGS_BUILD_EXTRA:=E=echo Q= AR=${TARGET}-ar CC=${TARGET}-gcc LD=${TARGET}-gcc};
+: ${PKG_LIBFETCH_MAKEFLAGS_INSTALL_EXTRA:=E=echo Q= prefix=};
: ${PKG_LIBFFI_VERSION:=3.2.1};
: ${PKG_LIBFFI_SHA256SUM:=d06ebb8e1d9a22d19e38d63fdb83954253f39bedc5d46232a05645685722ca37};
: ${PKG_LIBFFI_URL=ftp://sourceware.org/pub/libffi/libffi-${PKG_LIBFFI_VERSION}.tar.gz};
: ${PKG_LIBFFI_LIBTOOL_MIDIPIX:=1};
: ${PKG_LIBFFI_CFLAGS_CONFIGURE_EXTRA:=-D_WIN64};
+: ${PKG_LIBNBCOMPAT_URL:=http://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/pkgtools/libnbcompat/files};
+: ${PKG_LIBNBCOMPAT_URL_TYPE:=wget_recursive};
+: ${PKG_LIBNBCOMPAT_BUILD_DIR:=libnbcompat};
+: ${PKG_LIBNBCOMPAT_SUBDIR:=libnbcompat};
: ${PKG_LIBRESSL_VERSION:=2.2.6};
: ${PKG_LIBRESSL_SHA256SUM:=1ee19994cffd047d40f63ba149115dba18a681b0cc923beec301bf424b58d64f};
: ${PKG_LIBRESSL_URL:=http://ftp.eu.openbsd.org/pub/OpenBSD/LibreSSL/libressl-${PKG_LIBRESSL_VERSION}.tar.gz};
diff --git a/libfetch-2.33.local.patch b/libfetch-2.33.local.patch
new file mode 100644
index 00000000..f957b918
--- /dev/null
+++ b/libfetch-2.33.local.patch
@@ -0,0 +1,31 @@
+--- libfetch-2.33/Makefile.orig 2016-03-09 09:49:37.000000000 +0100
++++ libfetch-2.33/Makefile 2016-03-09 10:10:17.701283800 +0100
+@@ -22,7 +22,7 @@
+
+ ifeq ($(strip $(FETCH_WITH_OPENSSL)), true)
+ CFLAGS+= -DWITH_SSL
+-LDFLAGS= -lssl -lcrypto
++LDFLAGS_LIBS+= -lssl -lcrypto
+ endif
+
+ ifeq ($(strip $(DEBUG)), true)
+@@ -65,7 +65,7 @@
+ libfetch.so: $(GEN) $(INCS) $(OBJS)
+ $(E) " build " $@
+ $(Q) rm -f $@
+- $(Q) $(LD) $(LDFLAGS) *.o -shared -o $@
++ $(Q) $(LD) $(LDFLAGS) *.o -shared -o $@ $(LDFLAGS_LIBS)
+
+ libfetch.a: $(GEN) $(INCS) $(OBJS)
+ $(E) " build " $@
+--- libfetch-2.33/common.h.orig 2010-08-23 22:40:48.000000000 +0200
++++ libfetch-2.33/common.h 2016-03-09 10:01:24.270907600 +0100
+@@ -47,7 +47,7 @@
+
+ #if !defined(__sun) && !defined(__hpux) && !defined(__INTERIX) && \
+ !defined(__digital__) && !defined(__linux) && !defined(__MINT__) && \
+- !defined(__sgi)
++ !defined(__sgi) && !defined(__midipix__)
+ #define HAVE_SA_LEN
+ #endif
+
diff --git a/pkg.build b/pkg.build
index db232107..222ec4df 100644
--- a/pkg.build
+++ b/pkg.build
@@ -21,6 +21,9 @@ elif [ "${PKG_URL_TYPE:-wget}" = wget ] &&\
! is_build_script_done extract; then
rm_if_exists ${PKG_SUBDIR};
tar -axf ${PKG_FNAME};
+ if test_cmd pkg_${PKG_NAME}_extract_post; then
+ pkg_${PKG_NAME}_extract_post;
+ fi;
set_build_script_done extract -build_dir;
fi;
if [ -z "${PKG_BUILD_DIR}" ]; then