From d8a3cfe3d7691fd44ee341b4753c602c10b7db7b Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Tue, 25 Oct 2016 21:00:47 +0200 Subject: toybox: new package --- package/toybox/Makefile | 30 ++++++++++++++++++++++++++ package/toybox/patches/patch-lib_lib_h | 12 +++++++++++ package/toybox/patches/patch-lib_portability_h | 22 +++++++++++++++++++ package/toybox/patches/patch-scripts_make_sh | 8 +++++++ 4 files changed, 72 insertions(+) create mode 100644 package/toybox/Makefile create mode 100644 package/toybox/patches/patch-lib_lib_h create mode 100644 package/toybox/patches/patch-lib_portability_h create mode 100644 package/toybox/patches/patch-scripts_make_sh diff --git a/package/toybox/Makefile b/package/toybox/Makefile new file mode 100644 index 000000000..c46bd2f30 --- /dev/null +++ b/package/toybox/Makefile @@ -0,0 +1,30 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(ADK_TOPDIR)/rules.mk + +PKG_NAME:= toybox +PKG_VERSION:= 0.7.1 +PKG_RELEASE:= 1 +PKG_HASH:= 5bb3069f58faf12940d5cfde3209ac7f63210bebdd9023979b0c20cede126ea7 +PKG_DESCR:= linux tools collection +PKG_SECTION:= base/apps +PKG_URL:= http://landley.net/toybox/ +PKG_SITES:= http://landley.net/toybox/downloads/ + +DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.gz + +include $(ADK_TOPDIR)/mk/package.mk + +$(eval $(call PKG_template,TOYBOX,toybox,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION))) + +CONFIG_STYLE:= manual +XAKE_FLAGS+= CC="gcc" V=1 PREFIX="$(WRKINST)" + +do-configure: + cd $(WRKBUILD); PATH='$(HOST_PATH)' $(MAKE) defconfig + +toybox-install: + $(CP) $(WRKINST)/* $(IDIR_TOYBOX)/ + +include $(ADK_TOPDIR)/mk/pkg-bottom.mk diff --git a/package/toybox/patches/patch-lib_lib_h b/package/toybox/patches/patch-lib_lib_h new file mode 100644 index 000000000..0697acb22 --- /dev/null +++ b/package/toybox/patches/patch-lib_lib_h @@ -0,0 +1,12 @@ +--- toybox-0.7.1.orig/lib/lib.h 2016-06-01 00:33:23.000000000 +0200 ++++ toybox-0.7.1/lib/lib.h 2016-10-16 12:33:42.000000000 +0200 +@@ -201,7 +201,9 @@ int qstrcmp(const void *a, const void *b + void create_uuid(char *uuid); + char *show_uuid(char *uuid); + char *next_printf(char *s, char **start); ++#ifndef __APPLE__ + char *strnstr(char *line, char *str); ++#endif + int dev_minor(int dev); + int dev_major(int dev); + int dev_makedev(int major, int minor); diff --git a/package/toybox/patches/patch-lib_portability_h b/package/toybox/patches/patch-lib_portability_h new file mode 100644 index 000000000..25c24d19c --- /dev/null +++ b/package/toybox/patches/patch-lib_portability_h @@ -0,0 +1,22 @@ +--- toybox-0.7.1.orig/lib/portability.h 2016-06-01 00:33:23.000000000 +0200 ++++ toybox-0.7.1/lib/portability.h 2016-10-16 12:32:11.000000000 +0200 +@@ -22,7 +22,9 @@ + + // This isn't in the spec, but it's how we determine what libc we're using. + ++#ifndef __APPLE__ + #include ++#endif + + // Types various replacement prototypes need + #include +@@ -211,7 +213,9 @@ ssize_t getline(char **lineptr, size_t * + + // Linux headers not listed by POSIX or LSB + #include ++#ifndef __APPLE__ + #include ++#endif + + // Android is missing some headers and functions + // "generated/config.h" is included first diff --git a/package/toybox/patches/patch-scripts_make_sh b/package/toybox/patches/patch-scripts_make_sh new file mode 100644 index 000000000..dfbad59a7 --- /dev/null +++ b/package/toybox/patches/patch-scripts_make_sh @@ -0,0 +1,8 @@ +--- toybox-0.7.1.orig/scripts/make.sh 2016-06-01 00:33:23.000000000 +0200 ++++ toybox-0.7.1/scripts/make.sh 2016-10-16 12:27:17.000000000 +0200 +@@ -1,4 +1,5 @@ + #!/bin/bash ++set -x + + # Grab default values for $CFLAGS and such. + -- cgit v1.2.3