Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/u-boot Newer versions of U-boot that use the ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/858a6abcd42a
branches:  trunk
changeset: 434717:858a6abcd42a
user:      thorpej <thorpej%pkgsrc.org@localhost>
date:      Sat Jun 20 22:26:15 2020 +0000

description:
Newer versions of U-boot that use the pylibfdt module don't build with
Python 2 and Swig 1.  Add some .mk file gyrations to auto-select the
correct tools for u-boot-2020.* and later.

diffstat:

 sysutils/u-boot/u-boot.mk |  25 ++++++++++++++++++++++---
 1 files changed, 22 insertions(+), 3 deletions(-)

diffs (57 lines):

diff -r 7ec038aa2a66 -r 858a6abcd42a sysutils/u-boot/u-boot.mk
--- a/sysutils/u-boot/u-boot.mk Sat Jun 20 21:38:14 2020 +0000
+++ b/sysutils/u-boot/u-boot.mk Sat Jun 20 22:26:15 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: u-boot.mk,v 1.27 2020/06/19 22:27:39 mrg Exp $
+# $NetBSD: u-boot.mk,v 1.28 2020/06/20 22:26:15 thorpej Exp $
 
 .include "../../sysutils/u-boot/u-boot-version.mk"
 
@@ -12,8 +12,17 @@
 HOMEPAGE?=     https://www.denx.de/wiki/U-Boot
 MASTER_SITES?= ftp://ftp.denx.de/pub/u-boot/
 
+.if !empty(UBOOT_VERSION:M202[0-9].*)
+PYTHON_VERSIONS_ACCEPTED= 37
+UBOOT_SWIG_VERSION=    3
+.endif
+
 TOOL_DEPENDS+= dtc>=1.4.2:../../sysutils/dtc
+.if !empty(UBOOT_SWIG_VERSION:M3)
+TOOL_DEPENDS+= swig3>=swig-3.0.12:../../devel/swig3
+.else
 TOOL_DEPENDS+= swig>=1.3:../../devel/swig
+.endif
 
 COMMENT=       Das U-Boot, the Universal Boot Loader (${UBOOT_CONFIG})
 LICENSE=       gnu-gpl-v2
@@ -21,10 +30,15 @@
 USE_LANGUAGES=         c c++
 USE_TOOLS+=            bison gmake gsed pkg-config gawk
 PYTHON_FOR_BUILD_ONLY= yes
+PYTHON_VERSIONS_ACCEPTED?=     27
+.include "../../lang/python/tool.mk"
+
+.if !empty(_PYTHON_VERSION_37_OK:M)
+ALL_ENV+=              PYTHON3=${PYTHONBIN} PYTHONCONFIG=${PYTHONCONFIG}
+.else
 ALL_ENV+=              PYTHON2=${PYTHONBIN} PYTHONCONFIG=${PYTHONCONFIG}
+.endif
 ALL_ENV+=              PYTHONLIBPATH=-L$(LOCALBASE)/lib
-PYTHON_VERSIONS_ACCEPTED=      27
-.include "../../lang/python/tool.mk"
 
 .if defined(PKGREVISION) && !empty(PKGREVISION) && (${PKGREVISION} != "0")
 UBOOT_ENV+=    UBOOT_PKGREVISION=nb${PKGREVISION}
@@ -39,6 +53,11 @@
 .endfor
 
 do-configure:
+.if !empty(UBOOT_SWIG_VERSION:M3)
+       ${MKDIR} -p ${BUILDLINK_DIR}/bin
+       ${RM} -f ${BUILDLINK_DIR}/bin/swig3.0
+       ${LN} -s ${PREFIX}/bin/swig3.0 ${BUILDLINK_DIR}/bin/swig
+.endif
        cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${UBOOT_CONFIG}
 
 do-build:



Home | Main Index | Thread Index | Old Index