On Wed, 13 Oct 2021, Tracey Emery wrote:

> Hello,
> 
> Here is an update for devel/makeesparduino, to 6.5.0. This update is a
> major redo of the original makefile, which includes support for OpenBSD,
> which gets rid of local patching.
> 
> This update does not need to wait for the xtensa-lx106-elf and has been
> tested on amd64 and sparc64. This has only been tested on amd64 for
> xtensa-esp32-elf.
> 
> Also, the MESSAGE file has been edited to inform the user of the
> requirement of a LOCALBASE environment setting.
> 
> Ok?

ok paco@

> 
> -- 
> 
> Tracey Emery
> 
> diff c909a65b2d2d0588e08c36b096953a7d9819aa2e 
> /home/tracey/port_updates/makeesparduino
> blob - 49770a3cfba52343f8f634a89bb9cfebcf71531f
> file + Makefile
> --- Makefile
> +++ Makefile
> @@ -4,7 +4,7 @@ COMMENT =             makefile for ESP8266 and ESP32 Arduino 
> proj
>  
>  GH_ACCOUNT =         plerup
>  GH_PROJECT =         makeEspArduino
> -GH_TAGNAME =         5.0.2
> +GH_TAGNAME =         6.5.0
>  
>  PKGNAME =            makeesparduino-${GH_TAGNAME}
>  
> @@ -15,18 +15,22 @@ MAINTAINER =              Tracey Emery 
> <tra...@openbsd.org>
>  #LGPLv2.1
>  PERMIT_PACKAGE =     Yes
>  
> +MODULES =            lang/python
> +
>  RUN_DEPENDS +=               devel/arduino \
>                       devel/gmake
>  
>  NO_TEST =            Yes
>  NO_BUILD =           Yes
>  
> -post-patch:
> -     ${SUBST_CMD} ${WRKDIST}/makeEspArduino.mk
> -
>  do-install:
>       ${INSTALL_DATA_DIR} ${PREFIX}/share/makeEspArduino
>       cp -r ${WRKDIST}/*.mk ${PREFIX}/share/makeEspArduino/
> +     cp -r ${WRKDIST}/os ${PREFIX}/share/makeEspArduino/
>       cp -r ${WRKDIST}/tools ${PREFIX}/share/makeEspArduino/
>  
> +post-install:
> +     ${MODPY_BIN} ${MODPY_LIBDIR}/compileall.py \
> +             ${PREFIX}/share/makeEspArduino/tools
> +
>  .include <bsd.port.mk>
> blob - 8b19b44d19e8d93a1018250b08c9426343c7a949
> file + distinfo
> --- distinfo
> +++ distinfo
> @@ -1,2 +1,2 @@
> -SHA256 (makeEspArduino-5.0.2.tar.gz) = 
> Xm/HwKIToQ2zJxLkSOvSNJh9jUkAf2MQqD0WCGCAdYk=
> -SIZE (makeEspArduino-5.0.2.tar.gz) = 25007
> +SHA256 (makeEspArduino-6.5.0.tar.gz) = 
> OaCqXL0sCd+S75nSwIfixKLMF+L3FisEGX5pRY4Nk58=
> +SIZE (makeEspArduino-6.5.0.tar.gz) = 31191
> blob - a70019af2e2d7511a5691eab18ed54eac854a288
> file + /dev/null
> --- patches/patch-makeEspArduino_mk
> +++ /dev/null
> @@ -1,96 +0,0 @@
> -$OpenBSD: patch-makeEspArduino_mk,v 1.2 2020/05/18 22:11:43 tracey Exp $
> -
> -Index: makeEspArduino.mk
> ---- makeEspArduino.mk.orig
> -+++ makeEspArduino.mk
> -@@ -26,8 +26,13 @@ __TOOLS_DIR := $(dir $(__THIS_FILE))tools
> - CHIP ?= esp8266
> - 
> - # Serial flashing parameters
> --UPLOAD_PORT ?= $(shell ls -1tr /dev/tty*USB* 2>/dev/null | tail -1)
> --UPLOAD_PORT := $(if $(UPLOAD_PORT),$(UPLOAD_PORT),/dev/ttyS0)
> -+ifeq ($(OS), OpenBSD)
> -+    UPLOAD_PORT ?= $(shell ls -1tr /dev/tty*U* 2>/dev/null | tail -1)
> -+    UPLOAD_PORT := $(if $(UPLOAD_PORT),$(UPLOAD_PORT),/dev/ttyU0)
> -+else
> -+    UPLOAD_PORT ?= $(shell ls -1tr /dev/tty*USB* 2>/dev/null | tail -1)
> -+    UPLOAD_PORT := $(if $(UPLOAD_PORT),$(UPLOAD_PORT),/dev/ttyS0)
> -+endif
> - 
> - # OTA parameters
> - OTA_ADDR ?=
> -@@ -57,7 +62,7 @@ FS_REST_DIR ?= $(BUILD_DIR)/file_system
> - 
> - # Bootloader
> - BOOT_LOADER ?= $(ESP_ROOT)/bootloaders/eboot/eboot.elf
> --
> -+#XXX: HERE
> - 
> #====================================================================================
> - # Standard build logic and values
> - 
> #====================================================================================
> -@@ -70,6 +75,8 @@ git_description = $(shell git -C  $(1) describe --tags
> - time_string = $(shell date +$(1))
> - ifeq ($(OS), Darwin)
> -   find_files = $(shell find -E $2 -regex ".*\.($1)" | sed 's/\/\//\//')
> -+else ifeq ($(OS), OpenBSD)
> -+  find_files = $(shell find $2 | awk '/.*\.($1)/')
> - else
> -   find_files = $(shell find $2 -regextype posix-egrep -regex ".*\.($1)")
> - endif
> -@@ -81,20 +88,33 @@ ifndef ESP_ROOT
> -     ARDUINO_ROOT = $(shell cygpath -m $(LOCALAPPDATA)/Arduino15)
> -   else ifeq ($(OS), Darwin)
> -     ARDUINO_ROOT = $(HOME)/Library/Arduino15
> -+  else ifeq ($(OS), OpenBSD)
> -+    ARDUINO_ROOT = ${LOCALBASE}/share/arduino
> -   else
> -     ARDUINO_ROOT = $(HOME)/.arduino15
> -   endif
> -   ARDUINO_ESP_ROOT = $(ARDUINO_ROOT)/packages/$(CHIP)
> --  ESP_ROOT := $(lastword $(wildcard $(ARDUINO_ESP_ROOT)/hardware/$(CHIP)/*))
> -+  ifeq ($(OS), OpenBSD)
> -+    ESP_ROOT = $(ARDUINO_ROOT)/hardware/espressif/$(CHIP)
> -+    ARDUINO_LIBS = ${LOCALBASE}/share/arduino/libraries
> -+  else
> -+    ESP_ROOT := $(lastword $(wildcard 
> $(ARDUINO_ESP_ROOT)/hardware/$(CHIP)/*))
> -+    ARDUINO_LIBS = $(shell grep -o "sketchbook.path=.*" 
> $(ARDUINO_ROOT)/preferences.txt 2>/dev/null | cut -f2- -d=)/libraries
> -+  endif
> -   ifeq ($(ESP_ROOT),)
> -     $(error No installed version of $(CHIP) Arduino found)
> -   endif
> --  ARDUINO_LIBS = $(shell grep -o "sketchbook.path=.*" 
> $(ARDUINO_ROOT)/preferences.txt 2>/dev/null | cut -f2- -d=)/libraries
> -   ESP_ARDUINO_VERSION := $(notdir $(ESP_ROOT))
> -   # Find used version of compiler and tools
> --  COMP_PATH := $(lastword $(wildcard $(ARDUINO_ESP_ROOT)/tools/xtensa-*/*))
> --  ESPTOOL_PATH := $(lastword $(wildcard 
> $(ARDUINO_ESP_ROOT)/tools/esptool*/*))
> --  MKSPIFFS_PATH := $(lastword $(wildcard 
> $(ARDUINO_ESP_ROOT)/tools/mkspiffs/*/*))
> -+  ifeq ($(OS), OpenBSD)
> -+    COMP_PATH := ${LOCALBASE}/bin
> -+    ESPTOOL_PATH := ${LOCALBASE}/bin
> -+    MKSPIFFS_PATH := ${LOCALBASE}/bin
> -+  else
> -+    COMP_PATH := $(lastword $(wildcard 
> $(ARDUINO_ESP_ROOT)/tools/xtensa-*/*))
> -+    ESPTOOL_PATH := $(lastword $(wildcard 
> $(ARDUINO_ESP_ROOT)/tools/esptool*/*))
> -+    MKSPIFFS_PATH := $(lastword $(wildcard 
> $(ARDUINO_ESP_ROOT)/tools/mkspiffs/*/*))
> -+  endif
> - else
> -   # Location defined, assume it is a git clone
> -   ESP_ARDUINO_VERSION = $(call git_description,$(ESP_ROOT))
> -@@ -215,6 +235,8 @@ LWIP_VARIANT ?= $(shell $(BOARD_OP) $(BOARD) first_lwi
> - # Handle possible changed state i.e. make command line parameters or 
> changed git versions
> - ifeq ($(OS), Darwin)
> -   CMD_LINE := $(shell ps $$PPID -o command | tail -1)
> -+else ifeq ($(OS), OpenBSD)
> -+  CMD_LINE := $(shell ps $$PPID -o command | tail -1)
> - else
> -   CMD_LINE := $(shell tr "\0" " " </proc/$$PPID/cmdline)
> - endif
> -@@ -515,6 +537,8 @@ DEFAULT_GOAL ?= all
> - # Build threads, default is using all cpus
> - ifeq ($(OS), Darwin)
> -   BUILD_THREADS ?= $(shell sysctl -n hw.ncpu)
> -+else ifeq ($(OS), OpenBSD)
> -+  BUILD_THREADS ?= $(shell sysctl -n hw.ncpuonline)
> - else
> -   BUILD_THREADS ?= $(shell nproc)
> - endif
> blob - 31e60d9c4bfd8994fe897caf1de5942bb9fb6015
> file + /dev/null
> --- patches/patch-tools_parse_arduino_pl
> +++ /dev/null
> @@ -1,13 +0,0 @@
> -$OpenBSD: patch-tools_parse_arduino_pl,v 1.1 2020/05/18 22:11:43 tracey Exp $
> -
> -Index: tools/parse_arduino.pl
> ---- tools/parse_arduino.pl.orig
> -+++ tools/parse_arduino.pl
> -@@ -22,6 +22,7 @@ my $os = shift;
> - $os =~ s/Windows_NT/windows/;
> - $os =~ s/Linux/linux/;
> - $os =~ s/Darwin/macosx/;
> -+$os =~ s/OpenBSD/openbsd/;
> - my $lwipvariant = shift;
> - my %vars;
> - 
> blob - 823ecc5c1609e9b5d849d4b5b9b5af02799ba5d0
> file + pkg/MESSAGE
> --- pkg/MESSAGE
> +++ pkg/MESSAGE
> @@ -3,3 +3,8 @@ desired Espressif chipset.
>  
>  If you haven't already, please use pkg_add to install arduino-esp8266,
>  arduino-esp32, or both.
> +
> +Also, the LOCALBASE path will need to be added to your environment. For
> +temporary usage, do:
> +
> +$ env LOCALBASE=${LOCALBASE} gmake -f 
> ${LOCALBASE}/share/makeEspArduino/makeEspArduino.mk
> blob - 18c68e009c9ce1bc081f0bde07c1422a54d66ad1
> file + pkg/PLIST
> --- pkg/PLIST
> +++ pkg/PLIST
> @@ -1,9 +1,18 @@
> -@comment $OpenBSD: PLIST,v 1.2 2020/05/18 22:11:43 tracey Exp $
> +@comment $OpenBSD: PLIST,v$
>  share/makeEspArduino/
>  share/makeEspArduino/makeEspArduino.mk
> +share/makeEspArduino/os/
> +share/makeEspArduino/os/Darwin.mk
> +share/makeEspArduino/os/OpenBSD.mk
> +share/makeEspArduino/os/Windows_NT.mk
>  share/makeEspArduino/tools/
> +${MODPY_COMMENT}share/makeEspArduino/tools/${MODPY_PYCACHE}/
> +share/makeEspArduino/tools/${MODPY_PYCACHE}py_wrap.${MODPY_PYC_MAGIC_TAG}pyc
>  share/makeEspArduino/tools/board_op.pl
> -share/makeEspArduino/tools/find_inc.pl
> +share/makeEspArduino/tools/crash_tool.pl
> +share/makeEspArduino/tools/find_src.pl
>  share/makeEspArduino/tools/mem_use.pl
> +share/makeEspArduino/tools/obj_info.pl
>  share/makeEspArduino/tools/parse_arduino.pl
> +share/makeEspArduino/tools/py_wrap.py
>  share/makeEspArduino/tools/vscode.pl
> 

-- 
Paco Esteban.
0x5818130B8A6DBC03

Reply via email to