From nobody Mon Jan 29 03:56:43 2024 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TNZHJ2w4Lz581yl; Mon, 29 Jan 2024 03:56:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TNZHJ15vnz4F0C; Mon, 29 Jan 2024 03:56:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706500604; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F7akqYku9MD1RmKBEfU16uRHQB6TtlYvZtKYxf+Zqlk=; b=lvZEvriJ4NnnPTX2p+mE4+f7s5zX75h2wa+JowCsNnfvejaGnCmuwB8fBRUz4O0c8x4qcD kQR7Osgg9d3V5REEa8AfALyhwsHwAcs5jCopfIICYe5C/iUdjP03OfLzJ9CXUHNOGYVFqu K+NRKOKgyvbgcKBNto/aXHljUUKFr4R3RlHiR2naRrwU9n/NUd+L1y+vfTY55lkU4ycVD4 6mSLD0nLg7qMWFpspvHZUQO2HR01exOdNuz3tc1EP8lfGEybUP4c0977SB54SlczCeaMga RYH6T1OFyn6rXrJ44zlccJdZpIq37PnkMjaTUevxJsx8kcKn7wKhmJkneOTVQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706500604; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F7akqYku9MD1RmKBEfU16uRHQB6TtlYvZtKYxf+Zqlk=; b=kF1CfkkhcDfDut3v+DgVlx5NvqYz24rCSWIvqhMWv43njCLX7DXlsXZomIw5M7pEezwUO+ 09mvvHPrVRy4Z9kV0BvMzuX6LQuc1W5G/nsEtldQGOW0UPhbHRzC41WSiVkzNC8qkeU0OI oik970a3SBnG3uUjcfJly6of/Vu0rE635pi1TbwNtnY4oSnyH6Ajr+RyCXz9hUWOeWMLkr WhARJAzQWEqHs0RD3RZpqqieQ6iEdlia2FXApMj9q4vJVVLbD/6ZQZUOvsdgi47nnGlz3Y LVCoaDhxcQacL/C+uEm2cPbowGOCmdVQ6lmnykvIu2HaGEOOSYH8qFhkToQzqg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706500604; a=rsa-sha256; cv=none; b=rG+gJ4BcZzWQaGEKlRjoRg8tGqWXKNrp6IFQI7sfbtib2MSTgWhFgIAxx27pc+T8NATAkt 1rIUPK/MW5TY3UQh0BcrXsVa6DscOsBXrtX1p9QgKm/ppEpB3DH9iEaeOFQhkkSlPONkxa Nl0/UG+pWrs6CwlUdq7IIzWJPL/15nsP6YzU6DaFEyyfV1B/5YlufOakj1YZ0kS98V69N/ 9NV1QEowBaX/0l09lrTU/Q+NS9wlCHzLmcLbabjdBazZj/nQ6FuusMjq/F6SO9MtZSSVfo hCGcJ1yk8CHJI5KB24jQwJeelDo8F1KRaR50qNbknYF4YkghbbQzFf/ISSbIcw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TNZHJ08s4zc0V; Mon, 29 Jan 2024 03:56:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40T3uhH3026228; Mon, 29 Jan 2024 03:56:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40T3uhcY026225; Mon, 29 Jan 2024 03:56:43 GMT (envelope-from git) Date: Mon, 29 Jan 2024 03:56:43 GMT Message-Id: <202401290356.40T3uhcY026225@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Craig Leres Subject: git: b7e58607846e - main - devel/arduino: Update optional ATMEGA644P patches List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: leres X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b7e58607846ea12bd14d79557d4a245adfcda88d Auto-Submitted: auto-generated The branch main has been updated by leres: URL: https://cgit.FreeBSD.org/ports/commit/?id=b7e58607846ea12bd14d79557d4a245adfcda88d commit b7e58607846ea12bd14d79557d4a245adfcda88d Author: Craig Leres AuthorDate: 2024-01-29 03:56:21 +0000 Commit: Craig Leres CommitDate: 2024-01-29 03:56:21 +0000 devel/arduino: Update optional ATMEGA644P patches - Rename patches to match makepatch naming conventions - Add atmega1284 to boards.txt - Add digitalPinToInterrupt() to pins_arduino.h - Minor Makefile inprovements - Remove unused extrapatch-hardware-arduino-boards.txt-arlcd --- devel/arduino/Makefile | 51 ++++++++++------------ .../files/extrapatch-hardware-arduino-boards.txt | 27 ------------ .../extrapatch-hardware-arduino-boards.txt-arlcd | 23 ---------- .../files/extrapatch-hardware_arduino_boards.txt | 43 ++++++++++++++++++ ...h-hardware_arduino_cores_arduino_WInterrupts.c} | 0 ...re_arduino_variants_atmega644p_pins__arduino.h} | 13 ++++-- ...dware_arduino_cores_arduino_HardwareSerial.cpp} | 0 7 files changed, 76 insertions(+), 81 deletions(-) diff --git a/devel/arduino/Makefile b/devel/arduino/Makefile index caec5626f34e..c1f5614fd27b 100644 --- a/devel/arduino/Makefile +++ b/devel/arduino/Makefile @@ -1,6 +1,6 @@ PORTNAME= arduino PORTVERSION= 1.0.6 -PORTREVISION= 4 +PORTREVISION= 5 PORTEPOCH= 1 CATEGORIES= devel java lang MASTER_SITES= https://arduino.cc/download.php?f=/ @@ -47,23 +47,24 @@ DESKTOP_ENTRIES= "Arduino" "Arduino IDE" \ OPTIONS_DEFINE= ATMEGA644P DOCS EXAMPLES UARDUNO OPTIONS_SUB= -ATMEGA644P_DESC= ATmega644p patches +ATMEGA644P_DESC= ATmega644p/ATmega1284p patches DOCS_DESC= Install the reference documents UARDUNO_DESC= Kernel module for Arduino Uno USB interface INSLIST= arduino hardware lib libraries logo.png revisions.txt tools +ATMEGA644P_EXTRA_PATCHES= \ + ${FILESDIR}/extrapatch-hardware_arduino_boards.txt \ + ${FILESDIR}/extrapatch-hardware_arduino_cores_arduino_WInterrupts.c \ + ${FILESDIR}/extrapatch-hardware_arduino_variants_atmega644p_pins__arduino.h + # Add serial drivers for those who are new to this. UARDUNO_RUN_DEPENDS+= ${KMODDIR}/uarduno.ko:comms/uarduno -.include +pre-patch-ATMEGA644P-on: + ${MKDIR} ${WRKSRC}/hardware/arduino/variants/atmega644p -.if ${PORT_OPTIONS:MATMEGA644P} -EXTRA_PATCHES+= \ - ${FILESDIR}/extrapatch-hardware-arduino-boards.txt \ - ${FILESDIR}/extrapatch-hardware-arduino-cores-arduino-WInterrupts.c \ - ${FILESDIR}/extrapatch-hardware-arduino-variants-atmega644p-pins_arduino.h -.endif +.include .if ! empty(PORT_OPTIONS:MDOCS) INSLIST+= reference @@ -79,42 +80,38 @@ INSLIST+= examples FIND_EXPR= "${FIND_EXCLUDES} -prune" -.if ${PORT_OPTIONS:MATMEGA644P} -pre-patch: - @${MKDIR} ${WRKSRC}/hardware/arduino/variants/atmega644p -.endif - post-patch: - @${RM} -r ${WRKSRC}/hardware/tools/ - @${MKDIR} ${WRKSRC}/hardware/tools/avr/ - @${LN} -s ${PREFIX}/bin ${WRKSRC}/hardware/tools/avr/bin - @${LN} -s ${PREFIX}/etc ${WRKSRC}/hardware/tools/avr/etc + ${RM} -r ${WRKSRC}/hardware/tools/ + ${MKDIR} ${WRKSRC}/hardware/tools/avr/ + ${LN} -s ${PREFIX}/bin ${WRKSRC}/hardware/tools/avr/bin + ${LN} -s ${PREFIX}/etc ${WRKSRC}/hardware/tools/avr/etc # Remove broken jar, and Linux C6 based libraries. - @${RM} ${WRKSRC}/lib/RXTXcomm.jar + ${RM} ${WRKSRC}/lib/RXTXcomm.jar # This port relys on comms/RXTX working without Linux C6 compatibility. - @${RM} ${WRKSRC}/lib/librxtxSerial.so - @${RM} ${WRKSRC}/lib/librxtxSerial64.so + ${RM} ${WRKSRC}/lib/librxtxSerial.so + ${RM} ${WRKSRC}/lib/librxtxSerial64.so # Map the RXTX port for our use - @${LN} -s ${JAVA_HOME}/jre/lib/ext/RXTXcomm.jar ${WRKSRC}/lib/RXTXcomm.jar + ${LN} -s ${JAVA_HOME}/jre/lib/ext/RXTXcomm.jar ${WRKSRC}/lib/RXTXcomm.jar # Add in links to the libraries compiled in RXTX for the above jar to use based on architecture. .if ${ARCH} == i386 - @${LN} -s ${JAVA_HOME}/jre/lib/i386/librxtxSerial.so ${WRKSRC}/lib/librxtxSerial.so + ${LN} -s ${JAVA_HOME}/jre/lib/i386/librxtxSerial.so ${WRKSRC}/lib/librxtxSerial.so .endif .if ${ARCH} == amd64 - @${LN} -s ${JAVA_HOME}/jre/lib/amd64/librxtxSerial.so ${WRKSRC}/lib/librxtxSerial64.so + ${LN} -s ${JAVA_HOME}/jre/lib/amd64/librxtxSerial.so ${WRKSRC}/lib/librxtxSerial64.so .endif - @${MV} ${WRKSRC}/reference/img/logo.png ${WRKSRC}/ - @${RM} -r ${WRKSRC}/reference/img/ + ${MV} ${WRKSRC}/reference/img/logo.png ${WRKSRC}/ + ${RM} -r ${WRKSRC}/reference/img/ do-install: ${MKDIR} ${STAGEDIR}${PREFIX}/${PORTNAME} - (cd ${WRKSRC}/ && ${COPYTREE_SHARE} "${INSLIST}" ${STAGEDIR}${PREFIX}/${PORTNAME} ${FIND_EXPR}) + (cd ${WRKSRC}/ && ${COPYTREE_SHARE} "${INSLIST}" ${STAGEDIR}${PREFIX}/${PORTNAME} \ + ${FIND_EXPR}) ${INSTALL_SCRIPT} ${WRKDIR}/arduino ${STAGEDIR}${PREFIX}/bin/ .include diff --git a/devel/arduino/files/extrapatch-hardware-arduino-boards.txt b/devel/arduino/files/extrapatch-hardware-arduino-boards.txt deleted file mode 100644 index 3fa8bc21ff78..000000000000 --- a/devel/arduino/files/extrapatch-hardware-arduino-boards.txt +++ /dev/null @@ -1,27 +0,0 @@ ---- hardware/arduino/boards.txt.orig 2017-03-15 17:34:53 UTC -+++ hardware/arduino/boards.txt -@@ -525,6 +525,24 @@ atmega8.build.variant=standard - - ############################################################## - -+atmega644.name=ATmega644 -+atmega644.upload.protocol=stk500 -+atmega644.upload.maximum_size=63488 -+atmega644.upload.speed=38400 -+atmega644.bootloader.low_fuses=0xFF -+atmega644.bootloader.high_fuses=0xDC -+atmega644.bootloader.extended_fuses=0xFD -+atmega644.bootloader.path=atmega644p -+atmega644.bootloader.file=atmega644p -+atmega644.bootloader.unlock_bits=0x3F -+atmega644.bootloader.lock_bits=0x0F -+atmega644.build.mcu=atmega644p -+atmega644.build.f_cpu=16000000L -+atmega644.build.core=atmega644 -+atmega644.build.variant=atmega644p -+ -+############################################################## -+ - robotControl.name=Arduino Robot Control - robotControl.upload.protocol=avr109 - robotControl.upload.maximum_size=28672 diff --git a/devel/arduino/files/extrapatch-hardware-arduino-boards.txt-arlcd b/devel/arduino/files/extrapatch-hardware-arduino-boards.txt-arlcd deleted file mode 100644 index 97cc41ece469..000000000000 --- a/devel/arduino/files/extrapatch-hardware-arduino-boards.txt-arlcd +++ /dev/null @@ -1,23 +0,0 @@ ---- hardware/arduino/boards.txt.orig 2013-07-14 10:31:43.000000000 -0700 -+++ hardware/arduino/boards.txt 2013-07-21 12:43:56.000000000 -0700 -@@ -601,3 +601,20 @@ - robotMotor.build.core=robot - robotMotor.build.variant=robot_motor - -+############################################################## -+ -+arlcd.name=EarthLCD arLCD -+arlcd.upload.protocol=arduino -+arlcd.upload.maximum_size=32256 -+arlcd.upload.speed=115200 -+arlcd.bootloader.low_fuses=0xff -+arlcd.bootloader.high_fuses=0xde -+arlcd.bootloader.extended_fuses=0x05 -+arlcd.bootloader.path=optiboot -+arlcd.bootloader.file=optiboot_atmega328.hex -+arlcd.bootloader.unlock_bits=0x3F -+arlcd.bootloader.lock_bits=0x0F -+arlcd.build.mcu=atmega328 -+arlcd.build.f_cpu=16000000L -+arlcd.build.core=arduino -+arlcd.build.variant=standard diff --git a/devel/arduino/files/extrapatch-hardware_arduino_boards.txt b/devel/arduino/files/extrapatch-hardware_arduino_boards.txt new file mode 100644 index 000000000000..51d32c307b06 --- /dev/null +++ b/devel/arduino/files/extrapatch-hardware_arduino_boards.txt @@ -0,0 +1,43 @@ +--- hardware/arduino/boards.txt.orig 2024-01-29 02:52:44 UTC ++++ hardware/arduino/boards.txt +@@ -565,3 +565,40 @@ robotMotor.build.pid=0x8039 + robotMotor.build.core=robot + robotMotor.build.variant=robot_motor + ++############################################################## ++ ++atmega644.name=ATmega644 ++atmega644.upload.protocol=stk500 ++atmega644.upload.maximum_size=63488 ++atmega644.upload.speed=38400 ++atmega644.bootloader.low_fuses=0xFF ++atmega644.bootloader.high_fuses=0xDC ++atmega644.bootloader.extended_fuses=0xFD ++atmega644.bootloader.path=atmega644p ++atmega644.bootloader.file=atmega644p ++atmega644.bootloader.unlock_bits=0x3F ++atmega644.bootloader.lock_bits=0x0F ++atmega644.build.mcu=atmega644p ++atmega644.build.f_cpu=16000000L ++atmega644.build.core=atmega644 ++atmega644.build.variant=atmega644p ++ ++############################################################## ++ ++atmega1284.name=ATmega1284 ++atmega1284.upload.protocol=stk500 ++atmega1284.upload.maximum_size=129024 ++atmega1284.upload.speed=38400 ++atmega1284.bootloader.low_fuses=0xFF ++atmega1284.bootloader.high_fuses=0xDC ++atmega1284.bootloader.extended_fuses=0xFD ++atmega1284.bootloader.path=atmega1284p ++atmega1284.bootloader.file=atmega1284p ++atmega1284.bootloader.unlock_bits=0x3F ++atmega1284.bootloader.lock_bits=0x0F ++atmega1284.build.mcu=atmega1284p ++atmega1284.build.f_cpu=16000000L ++atmega1284.build.core=atmega1284 ++atmega1284.build.variant=atmega644p ++ ++############################################################## diff --git a/devel/arduino/files/extrapatch-hardware-arduino-cores-arduino-WInterrupts.c b/devel/arduino/files/extrapatch-hardware_arduino_cores_arduino_WInterrupts.c similarity index 100% rename from devel/arduino/files/extrapatch-hardware-arduino-cores-arduino-WInterrupts.c rename to devel/arduino/files/extrapatch-hardware_arduino_cores_arduino_WInterrupts.c diff --git a/devel/arduino/files/extrapatch-hardware-arduino-variants-atmega644p-pins_arduino.h b/devel/arduino/files/extrapatch-hardware_arduino_variants_atmega644p_pins__arduino.h similarity index 94% rename from devel/arduino/files/extrapatch-hardware-arduino-variants-atmega644p-pins_arduino.h rename to devel/arduino/files/extrapatch-hardware_arduino_variants_atmega644p_pins__arduino.h index 2035d4aa45df..7e70247eb6e4 100644 --- a/devel/arduino/files/extrapatch-hardware-arduino-variants-atmega644p-pins_arduino.h +++ b/devel/arduino/files/extrapatch-hardware_arduino_variants_atmega644p_pins__arduino.h @@ -1,6 +1,6 @@ ---- /dev/null 2012-12-26 20:59:44.000000000 -0800 -+++ hardware/arduino/variants/atmega644p/pins_arduino.h 2012-12-26 21:12:00.000000000 -0800 -@@ -0,0 +1,224 @@ +--- hardware/arduino/variants/atmega644p/pins_arduino.h.orig 2024-01-29 03:40:21 UTC ++++ hardware/arduino/variants/atmega644p/pins_arduino.h +@@ -0,0 +1,229 @@ +/* + pins_arduino.h - Pin definition functions for Arduino + Part of Arduino - http://www.arduino.cc/ @@ -22,7 +22,7 @@ + Free Software Foundation, Inc., 59 Temple Place, Suite 330, + Boston, MA 02111-1307 USA + -+ $Id: pins_arduino.h 5 2012-07-30 03:39:31Z leres $ ++ $Id: pins_arduino.h,v 1.2 2021/06/20 20:01:08 leres Exp $ +*/ + +#ifndef Pins_Arduino_h @@ -60,6 +60,11 @@ +#define digitalPinToPCMSKbit(p) (((p) <= 7) ? (p) : (((p) <= 13) ? ((p) - 8) : ((p) - 14))) +#endif + ++#define digitalPinToInterrupt(p) \ ++ ((p) == 2 ? 2 : \ ++ ((p) == 10 ? 0 : \ ++ ((p) == 11 ? 1 : NOT_AN_INTERRUPT))) ++ +#ifdef ARDUINO_MAIN + +// Digital pins are also used for the analog output (software PWM). diff --git a/devel/arduino/files/patch-hardware-arduino-cores-arduino-HardwareSerial.cpp b/devel/arduino/files/patch-hardware_arduino_cores_arduino_HardwareSerial.cpp similarity index 100% rename from devel/arduino/files/patch-hardware-arduino-cores-arduino-HardwareSerial.cpp rename to devel/arduino/files/patch-hardware_arduino_cores_arduino_HardwareSerial.cpp