pkgsrc-Changes archive

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

CVS commit: pkgsrc/sysutils/u-boot



Module Name:    pkgsrc
Committed By:   thorpej
Date:           Sat Jun 20 22:26:15 UTC 2020

Modified Files:
        pkgsrc/sysutils/u-boot: u-boot.mk

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 pkgsrc/sysutils/u-boot/u-boot.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/sysutils/u-boot/u-boot.mk
diff -u pkgsrc/sysutils/u-boot/u-boot.mk:1.27 pkgsrc/sysutils/u-boot/u-boot.mk:1.28
--- pkgsrc/sysutils/u-boot/u-boot.mk:1.27       Fri Jun 19 22:27:39 2020
+++ pkgsrc/sysutils/u-boot/u-boot.mk    Sat Jun 20 22:26:15 2020
@@ -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 @@ PATCHDIR?=   ${.CURDIR}/../../sysutils/u-b
 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 @@ LICENSE=    gnu-gpl-v2
 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 @@ post-patch:
 .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