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:   bad
Date:           Sun Oct  6 17:02:10 UTC 2019

Modified Files:
        pkgsrc/sysutils/u-boot: Makefile distinfo u-boot.mk
        pkgsrc/sysutils/u-boot/patches: patch-Makefile patch-lib_bch.c
            patch-scripts_dtc_pylibfdt_Makefile

Log Message:
fix build of u-boot using pylibfdt on macOS.

u-boot.mk:
  pass PYTHON2, PYTHONCONFIG and PYTHONLIBPATH in ALL_ENV
patch-Makefile:
  make PYTHON2 overridable.  Add PYTHONCONFIG and BYTHONLIBPATH.
patch-lib_bch.c:
  #include <libkern/OSByteOrder.h> and use OSSwapHostToBigInt32
  as in u-boot master ab8fc41302 "fix compile error on macOS Mojave".
patch-scripts_dtc_pylibfdt_Makefile:
  determine PYTHONCLFAGS and PYTHONLIBS by asking PYTHONCONFIG.
  build PYTHONLDFLAGS from PYTHONLIBPATH and PYTHONLIBS
  add PYTHON{LD.C}FLAGS to LDFLAGS and CPPFLAGS in cmd_pymod.

bump PKGREVISION

tested with u-boot-nanopi-mi.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 pkgsrc/sysutils/u-boot/Makefile
cvs rdiff -u -r1.27 -r1.28 pkgsrc/sysutils/u-boot/distinfo
cvs rdiff -u -r1.20 -r1.21 pkgsrc/sysutils/u-boot/u-boot.mk
cvs rdiff -u -r1.2 -r1.3 pkgsrc/sysutils/u-boot/patches/patch-Makefile
cvs rdiff -u -r1.3 -r1.4 pkgsrc/sysutils/u-boot/patches/patch-lib_bch.c
cvs rdiff -u -r1.1 -r1.2 \
    pkgsrc/sysutils/u-boot/patches/patch-scripts_dtc_pylibfdt_Makefile

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/Makefile
diff -u pkgsrc/sysutils/u-boot/Makefile:1.19 pkgsrc/sysutils/u-boot/Makefile:1.20
--- pkgsrc/sysutils/u-boot/Makefile:1.19        Sat Jul 13 17:42:01 2019
+++ pkgsrc/sysutils/u-boot/Makefile     Sun Oct  6 17:02:10 2019
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.19 2019/07/13 17:42:01 jmcneill Exp $
+# $NetBSD: Makefile,v 1.20 2019/10/06 17:02:10 bad Exp $
 #
 
 .include "../../sysutils/u-boot/u-boot-version.mk"
 
 DISTNAME=      u-boot-${UBOOT_VERSION}
-PKGREVISION=   5
+PKGREVISION=   6
 CATEGORIES=    meta-pkgs sysutils u-boot
 MASTER_SITES=  # empty
 

Index: pkgsrc/sysutils/u-boot/distinfo
diff -u pkgsrc/sysutils/u-boot/distinfo:1.27 pkgsrc/sysutils/u-boot/distinfo:1.28
--- pkgsrc/sysutils/u-boot/distinfo:1.27        Sun Oct  6 14:01:20 2019
+++ pkgsrc/sysutils/u-boot/distinfo     Sun Oct  6 17:02:10 2019
@@ -1,10 +1,10 @@
-$NetBSD: distinfo,v 1.27 2019/10/06 14:01:20 bad Exp $
+$NetBSD: distinfo,v 1.28 2019/10/06 17:02:10 bad Exp $
 
 SHA1 (u-boot-2018.11.tar.bz2) = e58e86c633ad3e2613196e0c0b0a7760ae5966d6
 RMD160 (u-boot-2018.11.tar.bz2) = f63c67750951d0e2883935a5d4cc3252f51a5453
 SHA512 (u-boot-2018.11.tar.bz2) = 1ea0bbb5f5e6d4c60b3a6bd345d1fa6e9da025daf36f47e8392bab34cb432c2e3633d903efb260f71fff87dffd6f2bf09ac900e96b3d4247073958d83b89ceff
 Size (u-boot-2018.11.tar.bz2) = 13045125 bytes
-SHA1 (patch-Makefile) = 068765a3e73fc0747d080cc7a5e2ff0b79e8fd9a
+SHA1 (patch-Makefile) = 5b86d70e05620cc3133faf508e983e2fe6ca6603
 SHA1 (patch-arch_arm_cpu_armv8_Kconfig) = 63cbbf2e3cebd46793fc03cc8e62297f6dc01aa9
 SHA1 (patch-arch_arm_dts_Makefile) = 184fdb8b04b25c0c827823779874306ce1bc746d
 SHA1 (patch-arch_arm_dts_sun8i-h2-plus-bananapi-m2-zero.dts) = aaa530a5f520eea0cb5dcece0b730e23db59eb40
@@ -19,8 +19,8 @@ SHA1 (patch-drivers_video_sunxi_sunxi__d
 SHA1 (patch-include_configs_tegra-common-post.h) = dfc081d2a3f7cd32e340b03f6c77c629bffd29b4
 SHA1 (patch-include_configs_tegra-common.h) = 4cda8f9df2c7fc2b9cd9d4139ec679a42648e4f8
 SHA1 (patch-include_image.h) = c9b134b2b5624a1e6c9f091a2192185b8d0f85fe
-SHA1 (patch-lib_bch.c) = b1f1c7418f1004c151b9e5e06ab7047a1736ae47
+SHA1 (patch-lib_bch.c) = 90ed120d00218ae79e317bc3c3019a04e68dbaeb
 SHA1 (patch-lib_efi__loader_efi__boottime.c) = 66aa3b95470a737154e6e082447aed0078092047
 SHA1 (patch-lib_efi__loader_efi__variable.c) = 1955870b22e358a4bded9e85fd89c74419aeed0d
-SHA1 (patch-scripts_dtc_pylibfdt_Makefile) = e312a372e393332191e715934279eb5e049ba008
+SHA1 (patch-scripts_dtc_pylibfdt_Makefile) = 539a77db792bbd479b5c7cf81c0a8e114c859d9d
 SHA1 (patch-tools_imx__cntr__image.sh) = 715647e3b77b505513ae79b4fe673f4f7f9bf042

Index: pkgsrc/sysutils/u-boot/u-boot.mk
diff -u pkgsrc/sysutils/u-boot/u-boot.mk:1.20 pkgsrc/sysutils/u-boot/u-boot.mk:1.21
--- pkgsrc/sysutils/u-boot/u-boot.mk:1.20       Fri Jul 26 10:22:07 2019
+++ pkgsrc/sysutils/u-boot/u-boot.mk    Sun Oct  6 17:02:10 2019
@@ -1,4 +1,4 @@
-# $NetBSD: u-boot.mk,v 1.20 2019/07/26 10:22:07 tnn Exp $
+# $NetBSD: u-boot.mk,v 1.21 2019/10/06 17:02:10 bad Exp $
 
 .include "../../sysutils/u-boot/u-boot-version.mk"
 
@@ -21,6 +21,8 @@ LICENSE=      gnu-gpl-v2
 USE_LANGUAGES=         c c++
 USE_TOOLS+=            bison gmake gsed pkg-config
 PYTHON_FOR_BUILD_ONLY= yes
+ALL_ENV+=              PYTHON2=${PYTHONBIN} PYTHONCONFIG=${PYTHONCONFIG}
+ALL_ENV+=              PYTHONLIBPATH=-L$(LOCALBASE)/lib
 PYTHON_VERSIONS_ACCEPTED=      27
 
 SUBST_CLASSES+=                pythonpath

Index: pkgsrc/sysutils/u-boot/patches/patch-Makefile
diff -u pkgsrc/sysutils/u-boot/patches/patch-Makefile:1.2 pkgsrc/sysutils/u-boot/patches/patch-Makefile:1.3
--- pkgsrc/sysutils/u-boot/patches/patch-Makefile:1.2   Sun Oct  6 13:25:25 2019
+++ pkgsrc/sysutils/u-boot/patches/patch-Makefile       Sun Oct  6 17:02:10 2019
@@ -1,8 +1,19 @@
-$NetBSD: patch-Makefile,v 1.2 2019/10/06 13:25:25 bad Exp $
+$NetBSD: patch-Makefile,v 1.3 2019/10/06 17:02:10 bad Exp $
 
 --- Makefile.orig      2018-11-14 16:10:06.000000000 +0000
 +++ Makefile
-@@ -1472,7 +1472,7 @@ prepare: prepare0
+@@ -359,7 +359,9 @@ YACC               = bison
+ AWK           = awk
+ PERL          = perl
+ PYTHON                ?= python
+-PYTHON2               = python2
++PYTHON2               ?= python2
++PYTHONCONFIG  ?= $(PYTHON)-config
++PYTHONLIBPATH ?=#empty but overridable
+ PYTHON3               = python3
+ DTC           ?= $(objtree)/scripts/dtc/dtc
+ CHECK         = sparse
+@@ -1472,7 +1474,7 @@ prepare: prepare0
  
  define filechk_version.h
        (echo \#define PLAIN_VERSION \"$(UBOOTRELEASE)\"; \
@@ -11,7 +22,7 @@ $NetBSD: patch-Makefile,v 1.2 2019/10/06
        echo \#define CC_VERSION_STRING \"$$(LC_ALL=C $(CC) --version | head -n 1)\"; \
        echo \#define LD_VERSION_STRING \"$$(LC_ALL=C $(LD) --version | head -n 1)\"; )
  endef
-@@ -1619,12 +1619,12 @@ CHANGELOG:
+@@ -1619,12 +1621,12 @@ CHANGELOG:
  # make distclean Remove editor backup files, patch leftover files and the like
  
  # Directories & files removed with 'make clean'

Index: pkgsrc/sysutils/u-boot/patches/patch-lib_bch.c
diff -u pkgsrc/sysutils/u-boot/patches/patch-lib_bch.c:1.3 pkgsrc/sysutils/u-boot/patches/patch-lib_bch.c:1.4
--- pkgsrc/sysutils/u-boot/patches/patch-lib_bch.c:1.3  Sun Oct  8 12:09:43 2017
+++ pkgsrc/sysutils/u-boot/patches/patch-lib_bch.c      Sun Oct  6 17:02:10 2019
@@ -1,8 +1,8 @@
-$NetBSD: patch-lib_bch.c,v 1.3 2017/10/08 12:09:43 jmcneill Exp $
+$NetBSD: patch-lib_bch.c,v 1.4 2019/10/06 17:02:10 bad Exp $
 
---- lib/bch.c.orig     2017-09-11 18:10:40.000000000 +0000
+--- lib/bch.c.orig     2018-11-14 16:10:06.000000000 +0000
 +++ lib/bch.c
-@@ -61,8 +61,10 @@
+@@ -60,8 +60,11 @@
  #include <linux/bitops.h>
  #else
  #include <errno.h>
@@ -11,22 +11,23 @@ $NetBSD: patch-lib_bch.c,v 1.3 2017/10/0
  #include <sys/endian.h>
 +#elif defined(__APPLE__)
 +#include <machine/endian.h>
++#include <libkern/OSByteOrder.h>
  #else
  #include <endian.h>
  #endif
-@@ -71,7 +73,11 @@
+@@ -70,7 +73,11 @@
  #include <string.h>
  
  #undef cpu_to_be32
 +#if defined(__APPLE__)
-+#define cpu_to_be32 htonl
++#define cpu_to_be32 OSSwapHostToBigInt32
 +#else
  #define cpu_to_be32 htobe32
 +#endif
  #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
  #define kmalloc(size, flags)  malloc(size)
  #define kzalloc(size, flags)  calloc(1, size)
-@@ -117,7 +123,7 @@ struct gf_poly_deg1 {
+@@ -116,7 +123,7 @@ struct gf_poly_deg1 {
  };
  
  #ifdef USE_HOSTCC

Index: pkgsrc/sysutils/u-boot/patches/patch-scripts_dtc_pylibfdt_Makefile
diff -u pkgsrc/sysutils/u-boot/patches/patch-scripts_dtc_pylibfdt_Makefile:1.1 pkgsrc/sysutils/u-boot/patches/patch-scripts_dtc_pylibfdt_Makefile:1.2
--- pkgsrc/sysutils/u-boot/patches/patch-scripts_dtc_pylibfdt_Makefile:1.1      Sun Oct  6 14:01:20 2019
+++ pkgsrc/sysutils/u-boot/patches/patch-scripts_dtc_pylibfdt_Makefile  Sun Oct  6 17:02:10 2019
@@ -1,8 +1,8 @@
-$NetBSD: patch-scripts_dtc_pylibfdt_Makefile,v 1.1 2019/10/06 14:01:20 bad Exp $
+$NetBSD: patch-scripts_dtc_pylibfdt_Makefile,v 1.2 2019/10/06 17:02:10 bad Exp $
 
 --- scripts/dtc/pylibfdt/Makefile.orig 2018-11-14 16:10:06.000000000 +0000
 +++ scripts/dtc/pylibfdt/Makefile
-@@ -13,6 +13,12 @@ include $(LIBFDT_srcdir)/Makefile.libfdt
+@@ -13,15 +13,25 @@ include $(LIBFDT_srcdir)/Makefile.libfdt
  PYLIBFDT_srcs = $(addprefix $(LIBFDT_srcdir)/,$(LIBFDT_SRCS)) \
                $(obj)/libfdt.i
  
@@ -12,11 +12,18 @@ $NetBSD: patch-scripts_dtc_pylibfdt_Make
 +  pymod_quiet_flag =
 +endif
 +
++PYTHONCFLAGS  := $(shell $(PYTHONCONFIG) --cflags)
++PYTHONLIBS    := $(shell $(PYTHONCONFIG) --libs)
++PYTHONLDFLAGS := $(PYTHONLIBPATH) $(PYTHONLIBS)
++
  quiet_cmd_pymod = PYMOD   $@
        cmd_pymod = unset CROSS_COMPILE; unset CFLAGS; \
                CC="$(HOSTCC)" LDSHARED="$(HOSTCC) -shared " \
-@@ -21,7 +27,7 @@ quiet_cmd_pymod = PYMOD   $@
-               CPPFLAGS="$(HOSTCFLAGS) -I$(LIBFDT_srcdir)" OBJDIR=$(obj) \
+-              LDFLAGS="$(HOSTLDFLAGS)" \
++              LDFLAGS="$(HOSTLDFLAGS) $(PYTHONLDFLAGS)" \
+               VERSION="u-boot-$(UBOOTVERSION)" \
+-              CPPFLAGS="$(HOSTCFLAGS) -I$(LIBFDT_srcdir)" OBJDIR=$(obj) \
++              CPPFLAGS="$(PYTHONCFLAGS) $(HOSTCFLAGS) -I$(LIBFDT_srcdir)" OBJDIR=$(obj) \
                SOURCES="$(PYLIBFDT_srcs)" \
                SWIG_OPTS="-I$(LIBFDT_srcdir) -I$(LIBFDT_srcdir)/.." \
 -              $(PYTHON) $< --quiet build_ext --inplace



Home | Main Index | Thread Index | Old Index