aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--community/mtd-utils/0001-unittests-test_lib-Include-proper-header-for-_IOC_SI.patch27
-rw-r--r--community/mtd-utils/0002-unittests-libmtd_test-Include-fcntl-header.patch26
-rw-r--r--community/mtd-utils/0003-unittests-Define-the-use-of-_GNU_SOURCE.patch29
-rw-r--r--community/mtd-utils/APKBUILD21
4 files changed, 98 insertions, 5 deletions
diff --git a/community/mtd-utils/0001-unittests-test_lib-Include-proper-header-for-_IOC_SI.patch b/community/mtd-utils/0001-unittests-test_lib-Include-proper-header-for-_IOC_SI.patch
new file mode 100644
index 0000000000..7fa734c4e9
--- /dev/null
+++ b/community/mtd-utils/0001-unittests-test_lib-Include-proper-header-for-_IOC_SI.patch
@@ -0,0 +1,27 @@
+From f602ef9a7de97e4d9fd016b2aaa08ec5b4f86710 Mon Sep 17 00:00:00 2001
+From: Olliver Schinagl <oliver@schinagl.nl>
+Date: Mon, 15 Apr 2019 09:47:34 +0200
+Subject: [PATCH 1/3] unittests/test_lib: Include proper header for _IOC_SIZE
+
+The macro _IOC_SIZE is not part of sys/ioctl.h but lives in asm/ioctl.h
+so we should include the proper header. If we do not, some systems
+complain during linking that they cannot find the symbol _IOC_SIZE()
+which was not expanded by the pre-compiler.
+
+Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
+---
+ tests/unittests/test_lib.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/tests/unittests/test_lib.h b/tests/unittests/test_lib.h
+index 7a6a003..cd94d9f 100644
+--- a/tests/unittests/test_lib.h
++++ b/tests/unittests/test_lib.h
+@@ -1,3 +1,4 @@
++#include <asm/ioctl.h>
+ #include <stdarg.h>
+ #include <setjmp.h>
+ #include <stddef.h>
+--
+2.20.1
+
diff --git a/community/mtd-utils/0002-unittests-libmtd_test-Include-fcntl-header.patch b/community/mtd-utils/0002-unittests-libmtd_test-Include-fcntl-header.patch
new file mode 100644
index 0000000000..ef36ebc8f4
--- /dev/null
+++ b/community/mtd-utils/0002-unittests-libmtd_test-Include-fcntl-header.patch
@@ -0,0 +1,26 @@
+From 051b912155115d0966d90917aa2b601d958461a4 Mon Sep 17 00:00:00 2001
+From: Olliver Schinagl <oliver@schinagl.nl>
+Date: Mon, 15 Apr 2019 09:49:06 +0200
+Subject: [PATCH 2/3] unittests/libmtd_test: Include fcntl header
+
+The test library for the mtd unit tests include various type's and
+macro's that officially live in fcntl. Each file and header should
+always properly include what they use, so lets add the fcntl headers.
+
+Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
+---
+ tests/unittests/libmtd_test.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/tests/unittests/libmtd_test.c b/tests/unittests/libmtd_test.c
+index 633d94a..176d2ef 100644
+--- a/tests/unittests/libmtd_test.c
++++ b/tests/unittests/libmtd_test.c
+@@ -1,3 +1,4 @@
++#include <fcntl.h>
+ #include <stdarg.h>
+ #include <setjmp.h>
+ #include <stddef.h>
+--
+2.20.1
+
diff --git a/community/mtd-utils/0003-unittests-Define-the-use-of-_GNU_SOURCE.patch b/community/mtd-utils/0003-unittests-Define-the-use-of-_GNU_SOURCE.patch
new file mode 100644
index 0000000000..b795317889
--- /dev/null
+++ b/community/mtd-utils/0003-unittests-Define-the-use-of-_GNU_SOURCE.patch
@@ -0,0 +1,29 @@
+From 3022a9900380b4547d158ce3cca59b71b5a32780 Mon Sep 17 00:00:00 2001
+From: Olliver Schinagl <oliver@schinagl.nl>
+Date: Mon, 15 Apr 2019 09:50:22 +0200
+Subject: [PATCH 3/3] unittests: Define the use of _GNU_SOURCE
+
+The unittest suite actually makes use of some _GNU extensions during the
+build (loff_t for example). So lets enable this in the makefile.
+
+Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
+---
+ tests/unittests/Makemodule.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/unittests/Makemodule.am b/tests/unittests/Makemodule.am
+index b7ae575..df1041d 100644
+--- a/tests/unittests/Makemodule.am
++++ b/tests/unittests/Makemodule.am
+@@ -6,7 +6,7 @@ ubilib_test_CPPFLAGS = -O0 --std=gnu99 $(CMOCKA_CFLAGS) -I$(top_srcdir)/include
+ mtdlib_test_SOURCES = tests/unittests/libmtd_test.c lib/libmtd.c lib/libmtd_legacy.c
+ mtdlib_test_LDADD = $(CMOCKA_LIBS)
+ mtdlib_test_LDFLAGS = -Wl,--wrap=open -Wl,--wrap=close -Wl,--wrap=ioctl -Wl,--wrap=read -Wl,--wrap=lseek -Wl,--wrap=write
+-mtdlib_test_CPPFLAGS = -O0 --std=gnu99 $(CMOCKA_CFLAGS) -I$(top_srcdir)/lib/ -I$(top_srcdir)/include -DSYSFS_ROOT='"$(top_srcdir)/tests/unittests/sysfs_mock"'
++mtdlib_test_CPPFLAGS = -O0 -D_GNU_SOURCE --std=gnu99 $(CMOCKA_CFLAGS) -I$(top_srcdir)/lib/ -I$(top_srcdir)/include -DSYSFS_ROOT='"$(top_srcdir)/tests/unittests/sysfs_mock"'
+
+ TEST_BINS = \
+ ubilib_test \
+--
+2.20.1
+
diff --git a/community/mtd-utils/APKBUILD b/community/mtd-utils/APKBUILD
index 84442f5d6a..2e2cc2e763 100644
--- a/community/mtd-utils/APKBUILD
+++ b/community/mtd-utils/APKBUILD
@@ -1,6 +1,6 @@
# Maintainer: Olliver Schinagl <oliver@schinagl.nl>
pkgname=mtd-utils
-pkgver=2.0.0
+pkgver=2.1.0
pkgrel=0
pkgdesc="Utilities for handling MTD devices, and for dealing with FTL, NFTL JFFS2, etc."
url="http://www.linux-mtd.infradead.org/"
@@ -8,18 +8,28 @@ arch="all"
license="GPL-2.0-only"
makedepends="
acl-dev
+ autoconf
+ automake
+ libtool
linux-headers
lzo-dev
+ openssl-dev
util-linux-dev
zlib-dev
"
subpackages="${pkgname}-doc"
+_githash="1dba7944fe18978415a3ffc43932359a36b99b25"
source="
- ftp://ftp.infradead.org/pub/mtd-utils/${pkgname}-${pkgver}.tar.bz2
+ ${pkgname}-${pkgver}.tar.gz::http://git.infradead.org/mtd-utils.git/snapshot/${_githash}.tar.gz
+ 0001-unittests-test_lib-Include-proper-header-for-_IOC_SI.patch
+ 0002-unittests-libmtd_test-Include-fcntl-header.patch
+ 0003-unittests-Define-the-use-of-_GNU_SOURCE.patch
"
+builddir="${srcdir}/${pkgname}-$(echo "${_githash}" | cut -c1-7)"
build()
{
+ ./autogen.sh
./configure \
--build="${CBUILD}" \
--host="${CHOST}" \
@@ -34,6 +44,7 @@ package()
make DESTDIR="${pkgdir}" install
}
-md5sums="70b80fccdfc1b536a91deefb91f4e2be mtd-utils-2.0.0.tar.bz2"
-sha256sums="20a377aa86af4c102e930b0d0bb9859e3a10aeb16445f6a1273989b206a717c8 mtd-utils-2.0.0.tar.bz2"
-sha512sums="52d3fab58d254fd672f53b3f1868b19ca572a8f257fc86519d7afc7979776afa37c0f21d63cc9e9cdc2e342f1cfb2d077b07847f18f6484dc660077ee347f2fb mtd-utils-2.0.0.tar.bz2"
+sha512sums="bb64b6cbdaee3c731ed1dc136064507fbfffe8a45879b0c4024a2b46d320875252f42af8dc268b30247ebb81a7a89b951e19a896bb415de38877c45b031e1081 mtd-utils-2.1.0.tar.gz
+70013f50fad529e94733cd86349d4efe4d99c5febd7c407ab3db0c2995fd6be0524b3ebc59537ff13a4be9a8f63100468a9faa8590ea4d84f79995398b0fd7d9 0001-unittests-test_lib-Include-proper-header-for-_IOC_SI.patch
+eb6d72e2810218c90044f562ec2d58543f42066ca4719ec5c1199dfdebeacacbde931b59ad12a39df7834fb2b8cef240bed839840c11b3cac9761dd44e63bca8 0002-unittests-libmtd_test-Include-fcntl-header.patch
+e29c485a96b959c26f39a0a05a78e2a562f2bda0a2acc7ed532b6ebda46139f9e4c88b4df0f9dc13051dd5aa50ad60f82880f3da412b59d46fca527a88a30f5d 0003-unittests-Define-the-use-of-_GNU_SOURCE.patch"