openbsd-ports/devel/arduino-makefile/patches/patch-Arduino_mk

26 lines
1.2 KiB
Plaintext

Index: Arduino.mk
--- Arduino.mk.orig
+++ Arduino.mk
@@ -283,7 +283,7 @@ ifndef ARDUINO_VERSION
# Remove all the decimals, remove anything before/including ":", remove anything after/including "+" and finally grab the last 5 bytes.
# Works for 1.0 and 1.0.1 and 1.6.10 and debian-style 2:1.0.5+dfsg2-4
VERSION_FILE := $(ARDUINO_DIR)/lib/version.txt
- AUTO_ARDUINO_VERSION := $(shell [ -e $(VERSION_FILE) ] && cat $(VERSION_FILE) | sed -e 's/^[0-9]://g' -e 's/[.]//g' -e 's/\+.*//g' | head -c5)
+ AUTO_ARDUINO_VERSION := $(shell [ -e $(VERSION_FILE) ] && cat $(VERSION_FILE) | sed -e 's/^[0-9]://g' -e 's/[.]//g' -e 's/\+.*//g' | dd bs=1 count=5 status=none)
ifdef AUTO_ARDUINO_VERSION
ARDUINO_VERSION = $(AUTO_ARDUINO_VERSION)
$(call show_config_variable,ARDUINO_VERSION,[AUTODETECTED])
@@ -428,6 +428,12 @@ ifndef AVR_TOOLS_DIR
else
AVRDUDE_CONF = $(AVR_TOOLS_DIR)/../avrdude.conf
endif
+ endif
+
+ else ifeq ($(CURRENT_OS),OPENBSD)
+
+ ifndef AVRDUDE_CONF
+ AVRDUDE_CONF = ${SYSCONFDIR}/avrdude.conf
endif
else