aboutsummaryrefslogtreecommitdiff
path: root/devel/libnxt
diff options
context:
space:
mode:
authorEdwin Groothuis <edwin@FreeBSD.org>2007-09-23 02:56:44 +0000
committerEdwin Groothuis <edwin@FreeBSD.org>2007-09-23 02:56:44 +0000
commitce923a0103df941b9487eb5421226fce10dd60b6 (patch)
tree82b56ae68cb776ef3db134575c44ae293d528ede /devel/libnxt
parent403f96dca0a890aeaa9118f7491dfad31b3a41f7 (diff)
downloadports-ce923a0103df941b9487eb5421226fce10dd60b6.tar.gz
ports-ce923a0103df941b9487eb5421226fce10dd60b6.zip
Notes
Diffstat (limited to 'devel/libnxt')
-rw-r--r--devel/libnxt/Makefile40
-rw-r--r--devel/libnxt/distinfo3
-rw-r--r--devel/libnxt/files/patch-SConstruct21
-rw-r--r--devel/libnxt/files/patch-lowlevel.c29
-rw-r--r--devel/libnxt/files/pkg-message.in7
-rw-r--r--devel/libnxt/pkg-descr3
-rw-r--r--devel/libnxt/pkg-plist10
7 files changed, 113 insertions, 0 deletions
diff --git a/devel/libnxt/Makefile b/devel/libnxt/Makefile
new file mode 100644
index 000000000000..4fef57a5dab2
--- /dev/null
+++ b/devel/libnxt/Makefile
@@ -0,0 +1,40 @@
+# New ports collection makefile for: libnxt
+# Date created: 2007-05-05
+# Whom: Jason Bacon <bacon11@tds.net>
+#
+# $FreeBSD$
+#
+
+PORTNAME= libnxt
+PORTVERSION= 0.3
+CATEGORIES= devel
+MASTER_SITES= http://libnxt.googlecode.com/files/ \
+ http://personalpages.tds.net/~jwbacon/Ports/distfiles/
+
+MAINTAINER= bacon@smithers.neuro.mcw.edu
+COMMENT= Lego NXT library
+
+LIB_DEPENDS= usb-0.1.8:${PORTSDIR}/devel/libusb
+BUILD_DEPENDS= scons:${PORTSDIR}/devel/scons \
+ python:${PORTSDIR}/lang/python
+
+SUB_FILES= pkg-message
+USE_LDCONFIG= yes
+
+do-build:
+ (cd ${WRKSRC}; scons)
+
+do-install:
+ ${MKDIR} ${PREFIX}/include/libnxt
+ ${INSTALL_PROGRAM} ${WRKSRC}/fwflash ${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/fwexec ${PREFIX}/bin
+ ${INSTALL_DATA} ${WRKSRC}/libnxt.a ${PREFIX}/lib
+ ${MKDIR} ${PREFIX}/include/libnxt
+.for file in ${WRKSRC}/*.h
+ ${INSTALL_DATA} ${WRKSRC}/${file} ${PREFIX}/include/libnxt
+.endfor
+
+post-install:
+ @${CAT} ${WRKDIR}/pkg-message
+
+.include <bsd.port.mk>
diff --git a/devel/libnxt/distinfo b/devel/libnxt/distinfo
new file mode 100644
index 000000000000..e5a3936adc62
--- /dev/null
+++ b/devel/libnxt/distinfo
@@ -0,0 +1,3 @@
+MD5 (libnxt-0.3.tar.gz) = 05be5f5b8822f10e4fc4e1dea7d5e770
+SHA256 (libnxt-0.3.tar.gz) = fe310cb917ec69d4e20f9d70ef96d9eec51d0434a8a3580c8a6615488526f8cf
+SIZE (libnxt-0.3.tar.gz) = 16247
diff --git a/devel/libnxt/files/patch-SConstruct b/devel/libnxt/files/patch-SConstruct
new file mode 100644
index 000000000000..7178e41f7ea2
--- /dev/null
+++ b/devel/libnxt/files/patch-SConstruct
@@ -0,0 +1,21 @@
+--- SConstruct.orig Sat Apr 21 23:41:39 2007
++++ SConstruct Sat May 5 13:02:19 2007
+@@ -9,7 +9,7 @@
+ else:
+ endian = '_NXT_LITTLE_ENDIAN'
+
+-BuildEnv = Environment(CCFLAGS=['-Wall', '-std=gnu99',
++BuildEnv = Environment(CCFLAGS=['-Wall', '-std=gnu99','-I/usr/local/include',
+ '-g', '-ggdb', '-D' + endian])
+ if auto_libs:
+ BuildEnv.ParseConfig('pkg-config --cflags --libs ' + auto_libs)
+@@ -24,7 +24,7 @@
+ LIBS='usb'))
+
+ Default(BuildEnv.Program('fwflash', 'main_fwflash.c',
+- LIBS=['usb', 'nxt'], LIBPATH='.'))
++ LIBS=['usb', 'nxt'], LIBPATH=['.','/usr/local/lib']))
+
+ Default(BuildEnv.Program('fwexec', 'main_fwexec.c',
+- LIBS=['usb', 'nxt'], LIBPATH='.'))
++ LIBS=['usb', 'nxt'], LIBPATH=['.','/usr/local/lib']))
diff --git a/devel/libnxt/files/patch-lowlevel.c b/devel/libnxt/files/patch-lowlevel.c
new file mode 100644
index 000000000000..55bccf96de73
--- /dev/null
+++ b/devel/libnxt/files/patch-lowlevel.c
@@ -0,0 +1,29 @@
+--- lowlevel.c.orig Sat May 5 16:14:13 2007
++++ lowlevel.c Sat May 5 16:14:37 2007
+@@ -103,7 +103,7 @@
+ return NXT_CONFIGURATION_ERROR;
+ }
+
+- ret = usb_claim_interface(nxt->hdl, 1);
++ ret = usb_claim_interface(nxt->hdl, 0);
+ if (ret < 0)
+ {
+ usb_close(nxt->hdl);
+@@ -115,7 +115,7 @@
+ nxt_recv_buf(nxt, buf, 2);
+ if (memcmp(buf, "\n\r", 2) != 0)
+ {
+- usb_release_interface(nxt->hdl, 1);
++ usb_release_interface(nxt->hdl, 0);
+ usb_close(nxt->hdl);
+ return NXT_HANDSHAKE_FAILED;
+ }
+@@ -127,7 +127,7 @@
+ nxt_error_t
+ nxt_close(nxt_t *nxt)
+ {
+- usb_release_interface(nxt->hdl, 1);
++ usb_release_interface(nxt->hdl, 0);
+ usb_close(nxt->hdl);
+ free(nxt);
+
diff --git a/devel/libnxt/files/pkg-message.in b/devel/libnxt/files/pkg-message.in
new file mode 100644
index 000000000000..b5a3721e16fc
--- /dev/null
+++ b/devel/libnxt/files/pkg-message.in
@@ -0,0 +1,7 @@
+
+-------------------------------------------------------------------------
+Using libnxt in your programs will require the following compile options:
+
+ -I%%PREFIX%%/include/libnxt
+ -L%%PREFIX%%/lib -lnxt
+-------------------------------------------------------------------------
diff --git a/devel/libnxt/pkg-descr b/devel/libnxt/pkg-descr
new file mode 100644
index 000000000000..c3806a2fe79c
--- /dev/null
+++ b/devel/libnxt/pkg-descr
@@ -0,0 +1,3 @@
+Lego Mindstorms NXT firmware management tools and library.
+
+WWW: http://libnxt.googlecode.com
diff --git a/devel/libnxt/pkg-plist b/devel/libnxt/pkg-plist
new file mode 100644
index 000000000000..d2b6915c882e
--- /dev/null
+++ b/devel/libnxt/pkg-plist
@@ -0,0 +1,10 @@
+bin/fwexec
+bin/fwflash
+include/libnxt/error.h
+include/libnxt/firmware.h
+include/libnxt/flash.h
+include/libnxt/flash_routine.h
+include/libnxt/lowlevel.h
+include/libnxt/samba.h
+lib/libnxt.a
+@dirrm include/libnxt