summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpawel <pawel@FreeBSD.org>2012-07-21 09:17:05 +0000
committerpawel <pawel@FreeBSD.org>2012-07-21 09:17:05 +0000
commit7ed0d809f73b713bbea82da4ad3f6f2821ada2d9 (patch)
treecf4e56bc6450bb289dc612b30c606e6d9ce9dca6
parent3b28e768079bc94dea0f096804d762d753c60c13 (diff)
downloadFreeBSD-ports-7ed0d809f73b713bbea82da4ad3f6f2821ada2d9.zip
FreeBSD-ports-7ed0d809f73b713bbea82da4ad3f6f2821ada2d9.tar.gz
A Multi-Protocol Infrared Remote Library for the Arduino
This IR remote library, written by Ken Shirriff, lets you both send and receive IR remote codes in multiple protocols. It supports NEC, Sony SIRC, Philips RC5, Philips RC6, and raw protocols. WWW: http://www.arcfn.com/2009/08/multi-protocol-infrared-remote-library.html PR: ports/163806 Submitted by: Craig Leres <leres@ee.lbl.gov>
-rw-r--r--devel/Makefile1
-rw-r--r--devel/arduino-irremote/Makefile62
-rw-r--r--devel/arduino-irremote/distinfo2
-rw-r--r--devel/arduino-irremote/files/patch-IRremoteInt.h22
-rw-r--r--devel/arduino-irremote/pkg-descr7
5 files changed, 94 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index e07d11b..b5ca618 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -52,6 +52,7 @@
SUBDIR += apr2
SUBDIR += arduino
SUBDIR += arduino-glcd
+ SUBDIR += arduino-irremote
SUBDIR += arduino-mk
SUBDIR += argouml
SUBDIR += argp-standalone
diff --git a/devel/arduino-irremote/Makefile b/devel/arduino-irremote/Makefile
new file mode 100644
index 0000000..132a783
--- /dev/null
+++ b/devel/arduino-irremote/Makefile
@@ -0,0 +1,62 @@
+# New ports collection makefile for: arduino-irremote
+# Date created: 02 Apr 2011
+# Whom: Craig Leres <leres@ee.lbl.gov>
+#
+# $FreeBSD$
+#
+
+PORTNAME= arduino-irremote
+PORTVERSION= 0.1
+CATEGORIES= devel
+MASTER_SITES= http://files.arcfn.com/files/
+DISTNAME= IRremote
+
+MAINTAINER= leres@ee.lbl.gov
+COMMENT= Multi-protocol infrared remote library for the Arduino
+
+LICENSE= LGPL21
+
+RUN_DEPENDS= arduino:${PORTSDIR}/devel/arduino
+
+WRKSRC= ${WRKDIR}/IRremote
+USE_ZIP= yes
+USE_DOS2UNIX= yes
+
+NO_BUILD= yes
+
+PLIST_FILES= arduino/libraries/IRremote/IRremote.cpp \
+ arduino/libraries/IRremote/IRremote.h \
+ arduino/libraries/IRremote/IRremoteInt.h \
+ arduino/libraries/IRremote/keywords.txt
+PLIST_DIRS= arduino/libraries/IRremote
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MEXAMPLES}
+PLIST_FILES+= ${EXAMPLESDIR_REL}/IRrecord/IRrecord.pde \
+ ${EXAMPLESDIR_REL}/IRrecvDemo/IRrecvDemo.pde \
+ ${EXAMPLESDIR_REL}/IRrecvDump/IRrecvDump.pde \
+ ${EXAMPLESDIR_REL}/IRrelay/IRrelay.pde \
+ ${EXAMPLESDIR_REL}/IRsendDemo/IRsendDemo.pde \
+ ${EXAMPLESDIR_REL}/IRtest/IRtest.pde
+PLIST_DIRS+= ${EXAMPLESDIR_REL}/IRrecord \
+ ${EXAMPLESDIR_REL}/IRrecvDemo \
+ ${EXAMPLESDIR_REL}/IRrecvDump \
+ ${EXAMPLESDIR_REL}/IRrelay \
+ ${EXAMPLESDIR_REL}/IRsendDemo \
+ ${EXAMPLESDIR_REL}/IRtest \
+ ${EXAMPLESDIR_REL}
+.endif
+
+do-install:
+ ${MKDIR} ${PREFIX}/arduino/libraries/IRremote
+ ${INSTALL_DATA} ${WRKSRC}/IRremote.cpp ${PREFIX}/arduino/libraries/IRremote
+ ${INSTALL_DATA} ${WRKSRC}/IRremote.h ${PREFIX}/arduino/libraries/IRremote
+ ${INSTALL_DATA} ${WRKSRC}/IRremoteInt.h ${PREFIX}/arduino/libraries/IRremote
+ ${INSTALL_DATA} ${WRKSRC}/keywords.txt ${PREFIX}/arduino/libraries/IRremote
+.if ${PORT_OPTIONS:MEXAMPLES}
+ ${MKDIR} ${EXAMPLESDIR}
+ cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${EXAMPLESDIR}
+.endif
+
+.include <bsd.port.mk>
diff --git a/devel/arduino-irremote/distinfo b/devel/arduino-irremote/distinfo
new file mode 100644
index 0000000..39a091e
--- /dev/null
+++ b/devel/arduino-irremote/distinfo
@@ -0,0 +1,2 @@
+SHA256 (IRremote.zip) = 2eff9847285330796b1fc8bf007f4a2f16dea7546ba1fcbaef1592a2235a60d4
+SIZE (IRremote.zip) = 23732
diff --git a/devel/arduino-irremote/files/patch-IRremoteInt.h b/devel/arduino-irremote/files/patch-IRremoteInt.h
new file mode 100644
index 0000000..0d93789
--- /dev/null
+++ b/devel/arduino-irremote/files/patch-IRremoteInt.h
@@ -0,0 +1,22 @@
+$FreeBSD$
+
+--- IRremoteInt.h.orig 2009-09-05 23:55:48.000000000 -0700
++++ IRremoteInt.h 2011-12-27 15:40:59.000000000 -0800
+@@ -12,12 +12,16 @@
+ #ifndef IRremoteint_h
+ #define IRremoteint_h
+
++#if defined(ARDUINO) && ARDUINO >= 100
++#include <Arduino.h>
++#else
+ #include <WProgram.h>
++#endif
+
+ #define CLKFUDGE 5 // fudge factor for clock interrupt overhead
+ #define CLK 256 // max value for clock (timer 2)
+ #define PRESCALE 8 // timer2 clock prescale
+-#define SYSCLOCK 16000000 // main Arduino clock
++#define SYSCLOCK F_CPU // main Arduino clock
+ #define CLKSPERUSEC (SYSCLOCK/PRESCALE/1000000) // timer clocks per microsecond
+
+ #define ERR 0
diff --git a/devel/arduino-irremote/pkg-descr b/devel/arduino-irremote/pkg-descr
new file mode 100644
index 0000000..6204a36
--- /dev/null
+++ b/devel/arduino-irremote/pkg-descr
@@ -0,0 +1,7 @@
+A Multi-Protocol Infrared Remote Library for the Arduino
+
+This IR remote library, written by Ken Shirriff, lets you both send
+and receive IR remote codes in multiple protocols. It supports NEC,
+Sony SIRC, Philips RC5, Philips RC6, and raw protocols.
+
+WWW: http://www.arcfn.com/2009/08/multi-protocol-infrared-remote-library.html
OpenPOWER on IntegriCloud