summaryrefslogtreecommitdiff
path: root/target/tools
diff options
context:
space:
mode:
Diffstat (limited to 'target/tools')
-rw-r--r--target/tools/mtd-utils/Makefile24
-rw-r--r--target/tools/mtd-utils/patches/lzo.patch80
-rw-r--r--target/tools/squashfs/Makefile10
-rw-r--r--target/tools/squashfs/patches/cppflags.patch12
-rw-r--r--target/tools/squashfs/patches/honour-cflags.patch11
-rw-r--r--target/tools/squashfs/patches/squashfs-bsd.patch245
-rw-r--r--target/tools/squashfs/patches/uClibc-compat.patch24
-rw-r--r--target/tools/xz/Makefile28
8 files changed, 150 insertions, 284 deletions
diff --git a/target/tools/mtd-utils/Makefile b/target/tools/mtd-utils/Makefile
new file mode 100644
index 000000000..3c90f81c8
--- /dev/null
+++ b/target/tools/mtd-utils/Makefile
@@ -0,0 +1,24 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:= mtd-utils
+PKG_VERSION:= 1.5
+PKG_RELEASE:= 1
+PKG_MD5SUM:= fbc1e3560a2c941ed2c94a73ae74348c
+PKG_SITES:= http://openadk.org/distfiles/
+
+include ../rules.mk
+
+all: ${STAGING_HOST_DIR}/bin/mkfs.jffs2
+
+$(WRKBUILD)/.compiled: ${WRKDIST}/.prepared
+ ${MAKE} -C ${WRKBUILD} CC='${CC_FOR_BUILD}' CPPFLAGS='-DWITHOUT_XATTR=1 -D_GNU_SOURCE -I./include'
+ touch $@
+
+${STAGING_HOST_DIR}/bin/mkfs.jffs2: $(WRKBUILD)/.compiled
+ $(INSTALL_BIN) $(WRKBUILD)/mkfs.jffs2 \
+ ${STAGING_HOST_DIR}/bin
+
+include $(TOPDIR)/mk/tools.mk
diff --git a/target/tools/mtd-utils/patches/lzo.patch b/target/tools/mtd-utils/patches/lzo.patch
new file mode 100644
index 000000000..6d6469ef6
--- /dev/null
+++ b/target/tools/mtd-utils/patches/lzo.patch
@@ -0,0 +1,80 @@
+diff -Nur mtd-utils-1.5.orig/compr.c mtd-utils-1.5/compr.c
+--- mtd-utils-1.5.orig/compr.c 2013-12-24 10:42:36.000000000 +0100
++++ mtd-utils-1.5/compr.c 2013-12-25 22:18:17.000000000 +0100
+@@ -517,9 +517,6 @@
+ #ifdef CONFIG_JFFS2_RTIME
+ jffs2_rtime_init();
+ #endif
+-#ifdef CONFIG_JFFS2_LZO
+- jffs2_lzo_init();
+-#endif
+ return 0;
+ }
+
+@@ -531,8 +528,5 @@
+ #ifdef CONFIG_JFFS2_ZLIB
+ jffs2_zlib_exit();
+ #endif
+-#ifdef CONFIG_JFFS2_LZO
+- jffs2_lzo_exit();
+-#endif
+ return 0;
+ }
+diff -Nur mtd-utils-1.5.orig/Makefile mtd-utils-1.5/Makefile
+--- mtd-utils-1.5.orig/Makefile 2013-12-24 10:42:36.000000000 +0100
++++ mtd-utils-1.5/Makefile 2013-12-25 22:22:52.000000000 +0100
+@@ -26,18 +26,12 @@
+ rfddump rfdformat \
+ serve_image recv_image \
+ sumtool jffs2reader
+-UBI_BINS = \
+- ubiupdatevol ubimkvol ubirmvol ubicrc32 ubinfo ubiattach \
+- ubidetach ubinize ubiformat ubirename mtdinfo ubirsvol
+
+ BINS = $(MTD_BINS)
+-BINS += mkfs.ubifs/mkfs.ubifs
+-BINS += $(addprefix ubi-utils/,$(UBI_BINS))
+ SCRIPTS = flash_eraseall
+
+ TARGETS = $(BINS)
+ TARGETS += lib/libmtd.a
+-TARGETS += ubi-utils/libubi.a
+
+ OBJDEPS = $(BUILDDIR)/include/version.h
+
+@@ -84,12 +78,12 @@
+ #
+ # Utils in top level
+ #
+-obj-mkfs.jffs2 = compr_rtime.o compr_zlib.o compr_lzo.o compr.o rbtree.o
+-LDFLAGS_mkfs.jffs2 = $(ZLIBLDFLAGS) $(LZOLDFLAGS)
+-LDLIBS_mkfs.jffs2 = -lz $(LZOLDLIBS)
++obj-mkfs.jffs2 = compr_rtime.o compr_zlib.o compr.o rbtree.o
++LDFLAGS_mkfs.jffs2 = $(ZLIBLDFLAGS)
++LDLIBS_mkfs.jffs2 = -lz
+
+-LDFLAGS_jffs2reader = $(ZLIBLDFLAGS) $(LZOLDFLAGS)
+-LDLIBS_jffs2reader = -lz $(LZOLDLIBS)
++LDFLAGS_jffs2reader = $(ZLIBLDFLAGS)
++LDLIBS_jffs2reader = -lz
+
+ $(foreach v,$(MTD_BINS),$(eval $(call mkdep,,$(v))))
+
+@@ -104,8 +98,8 @@
+ #
+ obj-mkfs.ubifs = crc16.o lpt.o compr.o devtable.o \
+ hashtable/hashtable.o hashtable/hashtable_itr.o
+-LDFLAGS_mkfs.ubifs = $(ZLIBLDFLAGS) $(LZOLDFLAGS) $(UUIDLDFLAGS)
+-LDLIBS_mkfs.ubifs = -lz -llzo2 -lm -luuid
++LDFLAGS_mkfs.ubifs = $(ZLIBLDFLAGS) $(UUIDLDFLAGS)
++LDLIBS_mkfs.ubifs = -lz -lm -luuid
+ $(call mkdep,mkfs.ubifs/,mkfs.ubifs,,ubi-utils/libubi.a)
+
+ #
+@@ -119,6 +113,3 @@
+ obj-mtdinfo = libubigen.a
+ obj-ubinize = libubigen.a libiniparser.a
+ obj-ubiformat = libubigen.a libscan.a
+-
+-$(foreach v,libubi.a libubigen.a libiniparser.a libscan.a,$(eval $(call _mkdep,ubi-utils/,$(v))))
+-$(foreach v,$(UBI_BINS),$(eval $(call mkdep,ubi-utils/,$(v),libubi.a ubiutils-common.o)))
diff --git a/target/tools/squashfs/Makefile b/target/tools/squashfs/Makefile
index bcc966274..94b3a0115 100644
--- a/target/tools/squashfs/Makefile
+++ b/target/tools/squashfs/Makefile
@@ -4,9 +4,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:= squashfs
-PKG_VERSION:= 4.0
-PKG_RELEASE:= 2
-PKG_MD5SUM:= a3c23391da4ebab0ac4a75021ddabf96
+PKG_VERSION:= 4.2
+PKG_RELEASE:= 1
+PKG_MD5SUM:= 1b7a781fb4cf8938842279bd3e8ee852
PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=squashfs/}
DISTFILES:= ${PKG_NAME}${PKG_VERSION}.tar.gz
@@ -17,7 +17,9 @@ include ../rules.mk
all: ${STAGING_HOST_DIR}/bin/mksquashfs
$(WRKBUILD)/.compiled: ${WRKDIST}/.prepared
- ${MAKE} -C ${WRKBUILD}/squashfs-tools CC='${CC_FOR_BUILD}'
+ ${MAKE} -C ${WRKBUILD}/squashfs-tools CC='${CC_FOR_BUILD}' \
+ XZ_SUPPORT=1 CPPFLAGS_FOR_BUILD=$(CPPFLAGS_FOR_BUILD) \
+ EXTRA_LDFLAGS=$(LDFLAGS_FOR_BUILD)
touch $@
${STAGING_HOST_DIR}/bin/mksquashfs: $(WRKBUILD)/.compiled
diff --git a/target/tools/squashfs/patches/cppflags.patch b/target/tools/squashfs/patches/cppflags.patch
new file mode 100644
index 000000000..1432ea3cf
--- /dev/null
+++ b/target/tools/squashfs/patches/cppflags.patch
@@ -0,0 +1,12 @@
+diff -Nur squashfs4.2.orig/squashfs-tools/Makefile squashfs4.2/squashfs-tools/Makefile
+--- squashfs4.2.orig/squashfs-tools/Makefile 2011-02-28 21:04:15.000000000 +0100
++++ squashfs4.2/squashfs-tools/Makefile 2013-12-27 13:49:22.000000000 +0100
+@@ -93,7 +93,7 @@
+ # End of BUILD options section #
+ ###############################################
+
+-INCLUDEDIR = -I.
++INCLUDEDIR = -I. $(CPPFLAGS_FOR_BUILD)
+ INSTALL_DIR = /usr/local/bin
+
+ MKSQUASHFS_OBJS = mksquashfs.o read_fs.o sort.o swap.o pseudo.o compressor.o
diff --git a/target/tools/squashfs/patches/honour-cflags.patch b/target/tools/squashfs/patches/honour-cflags.patch
deleted file mode 100644
index a50d94263..000000000
--- a/target/tools/squashfs/patches/honour-cflags.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- squashfs4.0/squashfs-tools/Makefile~ Sun Apr 5 02:03:12 2009
-+++ squashfs4.0/squashfs-tools/Makefile Fri Jan 7 16:16:46 2011
-@@ -2,7 +2,7 @@ INSTALL_DIR = /usr/local/bin
-
- INCLUDEDIR = .
-
--CFLAGS := -I$(INCLUDEDIR) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -O2
-+CFLAGS := -I$(INCLUDEDIR) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -O2 ${CFLAGS_FOR_BUILD}
-
- all: mksquashfs unsquashfs
-
diff --git a/target/tools/squashfs/patches/squashfs-bsd.patch b/target/tools/squashfs/patches/squashfs-bsd.patch
deleted file mode 100644
index 578b9017f..000000000
--- a/target/tools/squashfs/patches/squashfs-bsd.patch
+++ /dev/null
@@ -1,245 +0,0 @@
---- squashfs4.0~/squashfs-tools/mksquashfs.c Sun Apr 5 21:22:24 2009
-+++ squashfs4.0/squashfs-tools/mksquashfs.c Fri Jan 7 20:36:08 2011
-@@ -24,6 +24,7 @@
- #define FALSE 0
- #define TRUE 1
-
-+#include <sys/param.h>
- #include <pwd.h>
- #include <grp.h>
- #include <time.h>
-@@ -3688,23 +3689,9 @@ void initialise_threads()
- signal(SIGUSR1, sigusr1_handler);
-
- if(processors == -1) {
--#ifndef linux
-- int mib[2];
-- size_t len = sizeof(processors);
--
-- mib[0] = CTL_HW;
--#ifdef HW_AVAILCPU
-- mib[1] = HW_AVAILCPU;
-+#if defined(BSD)
-+ processors = 1;
- #else
-- mib[1] = HW_NCPU;
--#endif
--
-- if(sysctl(mib, 2, &processors, &len, NULL, 0) == -1) {
-- ERROR("Failed to get number of available processors. "
-- "Defaulting to 1\n");
-- processors = 1;
-- }
--#else
- processors = get_nprocs();
- #endif
- }
-@@ -3974,9 +3961,15 @@ int excluded(struct pathnames *paths, ch
- int match = use_regex ?
- regexec(path->name[i].preg, name, (size_t) 0,
- NULL, 0) == 0 :
-+#if defined(BSD)
- fnmatch(path->name[i].name, name,
-+ FNM_PATHNAME|FNM_PERIOD) ==
-+ 0;
-+#else
-+ fnmatch(path->name[i].name, name,
- FNM_PATHNAME|FNM_PERIOD|FNM_EXTMATCH) ==
- 0;
-+#endif
-
- if(match && path->name[i].paths == NULL) {
- /* match on a leaf component, any subdirectories
---- squashfs4.0~/squashfs-tools/mksquashfs.h Thu Feb 19 18:30:44 2009
-+++ squashfs4.0/squashfs-tools/mksquashfs.h Fri Jan 7 20:40:01 2011
-@@ -24,7 +24,9 @@
- *
- */
-
--#if __BYTE_ORDER == __BIG_ENDIAN
-+#ifndef __BYTE_ORDER
-+#error Which endianness? __BYTE_ORDER is not defined.
-+#elif __BYTE_ORDER == __BIG_ENDIAN
- #define SQUASHFS_SWAP_SHORTS(s, d, n) swap_le16_num(s, d, n)
- #define SQUASHFS_SWAP_INTS(s, d, n) swap_le32_num(s, d, n)
- #define SQUASHFS_SWAP_LONG_LONGS(s, d, n) swap_le64_num(s, d, n)
-@@ -34,11 +36,13 @@
- #define SWAP_LE64(s, d, field) swap_le64(&((s)->field), &((d)->field))
- #define SWAP_LES16(s, d, field) swap_le16((unsigned short *) &((s)->field), \
- (unsigned short *) &((d)->field))
--#else
-+#elif __BYTE_ORDER == __LITTLE_ENDIAN
- #define SQUASHFS_MEMCPY(s, d, n) memcpy(d, s, n)
- #define SQUASHFS_SWAP_SHORTS(s, d, n) memcpy(d, s, n * sizeof(short))
- #define SQUASHFS_SWAP_INTS(s, d, n) memcpy(d, s, n * sizeof(int))
- #define SQUASHFS_SWAP_LONG_LONGS(s, d, n) \
- memcpy(d, s, n * sizeof(long long))
-+#else
-+#error Which endianness (PDP endian? Worse?)
- #endif
- #endif
---- squashfs4.0~/squashfs-tools/pseudo.c Sun Apr 5 02:01:34 2009
-+++ squashfs4.0/squashfs-tools/pseudo.c Fri Jan 7 20:35:31 2011
-@@ -30,6 +30,11 @@
- #include <string.h>
- #include <stdlib.h>
- #include <sys/types.h>
-+#include <sys/param.h>
-+
-+#if defined(BSD)
-+#include <sys/stat.h>
-+#endif
-
- #include "pseudo.h"
-
---- squashfs4.0~/squashfs-tools/read_fs.h Thu Feb 19 18:28:56 2009
-+++ squashfs4.0/squashfs-tools/read_fs.h Fri Jan 7 20:40:00 2011
-@@ -24,7 +24,9 @@
- *
- */
-
--#if __BYTE_ORDER == __BIG_ENDIAN
-+#ifndef __BYTE_ORDER
-+#error Which endianness? __BYTE_ORDER is not defined.
-+#elif __BYTE_ORDER == __BIG_ENDIAN
- #define SQUASHFS_SWAP_SHORTS(d, s, n) swap_le16_num(s, d, n)
- #define SQUASHFS_SWAP_INTS(d, s, n) swap_le32_num(s, d, n)
- #define SQUASHFS_SWAP_LONG_LONGS(d, s, n) swap_le64_num(s, d, n)
-@@ -34,11 +36,13 @@
- #define SWAP_LE64(d, s, field) swap_le64(&((s)->field), &((d)->field))
- #define SWAP_LES16(d, s, field) swap_le16((unsigned short *) &((s)->field), \
- (unsigned short *) &((d)->field))
--#else
-+#elif __BYTE_ORDER == __LITTLE_ENDIAN
- #define SQUASHFS_MEMCPY(d, s, n) memcpy(d, s, n)
- #define SQUASHFS_SWAP_SHORTS(d, s, n) memcpy(d, s, n * sizeof(short))
- #define SQUASHFS_SWAP_INTS(d, s, n) memcpy(d, s, n * sizeof(int))
- #define SQUASHFS_SWAP_LONG_LONGS(d, s, n) \
- memcpy(d, s, n * sizeof(long long))
-+#else
-+#error Which endianness (PDP endian? Worse?)
- #endif
- #endif
---- squashfs4.0~/squashfs-tools/squashfs_compat.h Mon Mar 16 04:27:03 2009
-+++ squashfs4.0/squashfs-tools/squashfs_compat.h Fri Jan 7 20:39:59 2011
-@@ -768,12 +768,16 @@ typedef union squashfs_inode_header_2 sq
- * macros used to swap each structure entry, taking into account
- * bitfields and different bitfield placing conventions on differing architectures
- */
--#if __BYTE_ORDER == __BIG_ENDIAN
-+#ifndef __BYTE_ORDER
-+#error Which endianness? __BYTE_ORDER is not defined.
-+#elif __BYTE_ORDER == __BIG_ENDIAN
- /* convert from big endian to little endian */
- #define SQUASHFS_SWAP(value, p, pos, tbits) _SQUASHFS_SWAP(value, p, pos, tbits, b_pos)
--#else
-+#elif __BYTE_ORDER == __LITTLE_ENDIAN
- /* convert from little endian to big endian */
- #define SQUASHFS_SWAP(value, p, pos, tbits) _SQUASHFS_SWAP(value, p, pos, tbits, 64 - tbits - b_pos)
-+#else
-+#error Which endianness (PDP endian? Worse?)
- #endif
-
- #define _SQUASHFS_SWAP(value, p, pos, tbits, SHIFT) {\
---- squashfs4.0~/squashfs-tools/squashfs_swap.h Fri Feb 20 19:41:56 2009
-+++ squashfs4.0/squashfs-tools/squashfs_swap.h Fri Jan 7 20:39:59 2011
-@@ -27,7 +27,9 @@
- * macros to convert each stucture from big endian to little endian
- */
-
--#if __BYTE_ORDER == __BIG_ENDIAN
-+#ifndef __BYTE_ORDER
-+#error Which endianness? __BYTE_ORDER is not defined.
-+#elif __BYTE_ORDER == __BIG_ENDIAN
- extern void swap_le16(unsigned short *, unsigned short *);
- extern void swap_le32(unsigned int *, unsigned int *);
- extern void swap_le64(long long *, long long *);
-@@ -256,7 +258,7 @@ extern void inswap_le64_num(long long *,
- #define SQUASHFS_INSWAP_SHORTS(s, n) inswap_le16_num(s, n)
- #define SQUASHFS_INSWAP_INTS(s, n) inswap_le32_num(s, n)
- #define SQUASHFS_INSWAP_LONG_LONGS(s, n) inswap_le64_num(s, n)
--#else
-+#elif __BYTE_ORDER == __LITTLE_ENDIAN
- #define SQUASHFS_SWAP_SUPER_BLOCK(s, d) \
- SQUASHFS_MEMCPY(s, d, sizeof(*(s)))
- #define SQUASHFS_SWAP_DIR_INDEX(s, d) \
-@@ -308,5 +310,7 @@ extern void inswap_le64_num(long long *,
- #define SQUASHFS_INSWAP_SHORTS(s, n)
- #define SQUASHFS_INSWAP_INTS(s, n)
- #define SQUASHFS_INSWAP_LONG_LONGS(s, n)
-+#else
-+#error Which endianness (PDP endian? Worse?)
- #endif
- #endif
---- squashfs4.0~/squashfs-tools/swap.c Thu Mar 26 04:39:52 2009
-+++ squashfs4.0/squashfs-tools/swap.c Fri Jan 7 20:40:00 2011
-@@ -27,7 +27,9 @@
- #include <endian.h>
- #endif
-
--#if __BYTE_ORDER == __BIG_ENDIAN
-+#ifndef __BYTE_ORDER
-+#error Which endianness? __BYTE_ORDER is not defined.
-+#elif __BYTE_ORDER == __BIG_ENDIAN
- void swap_le16(unsigned short *src, unsigned short *dest)
- {
- unsigned char *s = (unsigned char *) src;
-@@ -120,4 +122,6 @@ void inswap_le##BITS##_num(TYPE *s, int
- INSWAP_LE_NUM(16, unsigned short)
- INSWAP_LE_NUM(32, unsigned int)
- INSWAP_LE_NUM(64, long long)
-+#elif __BYTE_ORDER != __LITTLE_ENDIAN
-+#error Which endianness (PDP endian? Worse?)
- #endif
---- squashfs4.0~/squashfs-tools/unsquashfs.c Sun Apr 5 21:22:42 2009
-+++ squashfs4.0/squashfs-tools/unsquashfs.c Fri Jan 7 20:35:31 2011
-@@ -21,6 +21,8 @@
- * unsquashfs.c
- */
-
-+#include <sys/param.h>
-+
- #include "unsquashfs.h"
- #include "squashfs_swap.h"
- #include "squashfs_compat.h"
-@@ -1193,10 +1195,17 @@ int matches(struct pathnames *paths, cha
- struct pathname *path = paths->path[n];
- for(i = 0; i < path->names; i++) {
- int match = use_regex ?
-+#if defined(BSD)
- regexec(path->name[i].preg, name, (size_t) 0,
- NULL, 0) == 0 : fnmatch(path->name[i].name,
-+ name, FNM_PATHNAME|FNM_PERIOD) ==
-+ 0;
-+#else
-+ regexec(path->name[i].preg, name, (size_t) 0,
-+ NULL, 0) == 0 : fnmatch(path->name[i].name,
- name, FNM_PATHNAME|FNM_PERIOD|FNM_EXTMATCH) ==
- 0;
-+#endif
- if(match && path->name[i].paths == NULL)
- /*
- * match on a leaf component, any subdirectories
-@@ -1795,21 +1804,7 @@ void initialise_threads(int fragment_buf
-
- if(processors == -1) {
- #ifndef linux
-- int mib[2];
-- size_t len = sizeof(processors);
--
-- mib[0] = CTL_HW;
--#ifdef HW_AVAILCPU
-- mib[1] = HW_AVAILCPU;
--#else
-- mib[1] = HW_NCPU;
--#endif
--
-- if(sysctl(mib, 2, &processors, &len, NULL, 0) == -1) {
-- ERROR("Failed to get number of available processors. "
-- "Defaulting to 1\n");
-- processors = 1;
-- }
-+ processors = 1;
- #else
- processors = get_nprocs();
- #endif
diff --git a/target/tools/squashfs/patches/uClibc-compat.patch b/target/tools/squashfs/patches/uClibc-compat.patch
deleted file mode 100644
index 00f2b22c0..000000000
--- a/target/tools/squashfs/patches/uClibc-compat.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -Nur squashfs4.0.orig/squashfs-tools/mksquashfs.c squashfs4.0/squashfs-tools/mksquashfs.c
---- squashfs4.0.orig/squashfs-tools/mksquashfs.c 2009-04-05 23:22:48.000000000 +0200
-+++ squashfs4.0/squashfs-tools/mksquashfs.c 2011-03-18 22:04:00.000000000 +0100
-@@ -3705,7 +3705,7 @@
- processors = 1;
- }
- #else
-- processors = get_nprocs();
-+ processors = sysconf(_SC_NPROCESSORS_CONF);
- #endif
- }
-
-diff -Nur squashfs4.0.orig/squashfs-tools/unsquashfs.c squashfs4.0/squashfs-tools/unsquashfs.c
---- squashfs4.0.orig/squashfs-tools/unsquashfs.c 2009-04-05 23:23:06.000000000 +0200
-+++ squashfs4.0/squashfs-tools/unsquashfs.c 2011-03-18 22:03:31.000000000 +0100
-@@ -1811,7 +1811,7 @@
- processors = 1;
- }
- #else
-- processors = get_nprocs();
-+ processors = sysconf(_SC_NPROCESSORS_CONF);
- #endif
- }
-
diff --git a/target/tools/xz/Makefile b/target/tools/xz/Makefile
new file mode 100644
index 000000000..6cefbb476
--- /dev/null
+++ b/target/tools/xz/Makefile
@@ -0,0 +1,28 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:= xz
+PKG_VERSION:= 5.0.5
+PKG_RELEASE:= 1
+PKG_MD5SUM:= 1b7a781fb4cf8938842279bd3e8ee852
+PKG_SITES:= http://tukaani.org/xz/
+
+include ../rules.mk
+
+all: $(WRKBUILD)/.installed
+
+$(WRKBUILD)/.configured: ${WRKDIST}/.prepared
+ (cd ${WRKBUILD}; ./configure --prefix=$(STAGING_HOST_DIR)/usr)
+ touch $@
+
+$(WRKBUILD)/.compiled: $(WRKBUILD)/.configured
+ ${MAKE} -C ${WRKBUILD}
+ touch $@
+
+$(WRKBUILD)/.installed: $(WRKBUILD)/.compiled
+ ${MAKE} -C ${WRKBUILD} install
+ touch $@
+
+include $(TOPDIR)/mk/tools.mk