summaryrefslogtreecommitdiff
path: root/sysutils/u-boot
diff options
context:
space:
mode:
authorjmcneill <jmcneill@pkgsrc.org>2017-08-12 16:44:33 +0000
committerjmcneill <jmcneill@pkgsrc.org>2017-08-12 16:44:33 +0000
commit1a89ca1c29aa6dd53599f9e3e22895ca2f76f30e (patch)
treee78719de77c23028faa316aee9cb172a5054bef1 /sysutils/u-boot
parent2978854c7ac297653224e7d37a50b2e706899db6 (diff)
downloadpkgsrc-1a89ca1c29aa6dd53599f9e3e22895ca2f76f30e.tar.gz
Fixes to get U-Boot building on NetBSD.
Diffstat (limited to 'sysutils/u-boot')
-rw-r--r--sysutils/u-boot/distinfo3
-rw-r--r--sysutils/u-boot/patches/patch-lib_bch.c13
-rw-r--r--sysutils/u-boot/u-boot.mk20
3 files changed, 31 insertions, 5 deletions
diff --git a/sysutils/u-boot/distinfo b/sysutils/u-boot/distinfo
index a25e75f6150..0fac7ecb830 100644
--- a/sysutils/u-boot/distinfo
+++ b/sysutils/u-boot/distinfo
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.1 2017/08/12 14:23:43 jmcneill Exp $
+$NetBSD: distinfo,v 1.2 2017/08/12 16:44:33 jmcneill Exp $
SHA1 (u-boot-2017.07.tar.bz2) = 517c33f41e2969f3b5b88e9ae3c042acfe1bde05
RMD160 (u-boot-2017.07.tar.bz2) = b0d83a55b6daabdec28d85fdfb814a529c8d5eb9
SHA512 (u-boot-2017.07.tar.bz2) = 821175dd414e1fd0e5b6d9293a5766cbc8ae63a2361e82309f67e92c02b881263a7832dba0bcfc820b036a582981ddc20a8f484f2995d110f3240907a3ff7a95
Size (u-boot-2017.07.tar.bz2) = 11282262 bytes
+SHA1 (patch-lib_bch.c) = e346680a94696713f6d0e71e965283b9bdfbbdbf
diff --git a/sysutils/u-boot/patches/patch-lib_bch.c b/sysutils/u-boot/patches/patch-lib_bch.c
new file mode 100644
index 00000000000..4b3af52bb76
--- /dev/null
+++ b/sysutils/u-boot/patches/patch-lib_bch.c
@@ -0,0 +1,13 @@
+$NetBSD: patch-lib_bch.c,v 1.1 2017/08/12 16:44:33 jmcneill Exp $
+
+--- lib/bch.c.orig 2017-07-10 17:07:38.000000000 +0000
++++ lib/bch.c
+@@ -61,7 +61,7 @@
+ #include <linux/bitops.h>
+ #else
+ #include <errno.h>
+-#if defined(__FreeBSD__)
++#if defined(__FreeBSD__) || defined(__NetBSD__)
+ #include <sys/endian.h>
+ #else
+ #include <endian.h>
diff --git a/sysutils/u-boot/u-boot.mk b/sysutils/u-boot/u-boot.mk
index 6e4e60c5cc0..ca464adc54f 100644
--- a/sysutils/u-boot/u-boot.mk
+++ b/sysutils/u-boot/u-boot.mk
@@ -1,4 +1,4 @@
-# $NetBSD: u-boot.mk,v 1.1 2017/08/12 14:23:43 jmcneill Exp $
+# $NetBSD: u-boot.mk,v 1.2 2017/08/12 16:44:33 jmcneill Exp $
UBOOT_VERSION?= 2017.07
PKGNAME= u-boot-${UBOOT_TARGET}-${UBOOT_VERSION}
@@ -6,17 +6,28 @@ DISTNAME?= u-boot-${UBOOT_VERSION}
DISTINFO_FILE?= ${.CURDIR}/../../sysutils/u-boot/distinfo
CATEGORIES= sysutils
EXTRACT_SUFX= .tar.bz2
+PATCHDIR= ${.CURDIR}/../../sysutils/u-boot/patches
HOMEPAGE?= https://www.denx.de/wiki/U-Boot
MASTER_SITES?= ftp://ftp.denx.de/pub/u-boot/
-BUILD_DEPENDS+= dtc>=1.4.2:../../sysutils/dtc
+TOOL_DEPENDS+= dtc>=1.4.2:../../sysutils/dtc
+TOOL_DEPENDS+= swig>=1.3:../../devel/swig
COMMENT= Das U-Boot, the Universal Boot Loader (${UBOOT_CONFIG})
LICENSE= gnu-gpl-v2
-USE_LANGUAGES= c c++
-USE_TOOLS+= gmake
+USE_LANGUAGES= c c++
+USE_TOOLS+= gmake gsed pkg-config
+PYTHON_FOR_BUILD_ONLY= yes
+
+REPLACE_INTERPRETER+= python2
+REPLACE.python2.old= .*/usr/bin/env.*python2*
+REPLACE.python2.new= ${PYTHONBIN}
+REPLACE_FILES.python2= scripts/fill_scrapyard.py \
+ tools/binman/binman.py \
+ tools/genboardscfg.py \
+ tools/moveconfig.py
MAKE_ENV+= ${UBOOT_ENV}
@@ -33,4 +44,5 @@ do-install:
${DESTDIR}${PREFIX}/share/u-boot/${UBOOT_TARGET}
.endfor
+.include "../../lang/python/tool.mk"
.include "../../mk/bsd.pkg.mk"