diff options
author | marino <marino@FreeBSD.org> | 2014-08-04 05:25:42 +0800 |
---|---|---|
committer | marino <marino@FreeBSD.org> | 2014-08-04 05:25:42 +0800 |
commit | cf05beae40c9ad9044b06daa974124ca237bb87a (patch) | |
tree | 3cbfc03fa6e81c3ceb3247f9d88dc3fd9052a8b7 /devel/lnphost | |
parent | a6e79d64930ab1d17ee6c82775259c8f84935655 (diff) | |
download | freebsd-ports-gnome-cf05beae40c9ad9044b06daa974124ca237bb87a.tar.gz freebsd-ports-gnome-cf05beae40c9ad9044b06daa974124ca237bb87a.tar.zst freebsd-ports-gnome-cf05beae40c9ad9044b06daa974124ca237bb87a.zip |
Add new port: devel/lnphost
PR: 182288
Submitted by: Jason Bacon
=================================================================
A library supporting IR communication over the Lego Mindstorms IR tower.
It can be used from C programs on Posix compliant platforms, supports
multiple protocols and is designed to be a replacement for lnpd.
Diffstat (limited to 'devel/lnphost')
-rw-r--r-- | devel/lnphost/Makefile | 32 | ||||
-rw-r--r-- | devel/lnphost/distinfo | 2 | ||||
-rw-r--r-- | devel/lnphost/files/patch-Include-lnphost.h | 11 | ||||
-rw-r--r-- | devel/lnphost/files/patch-Makefile | 65 | ||||
-rw-r--r-- | devel/lnphost/pkg-descr | 5 |
5 files changed, 115 insertions, 0 deletions
diff --git a/devel/lnphost/Makefile b/devel/lnphost/Makefile new file mode 100644 index 000000000000..2c7965eac91c --- /dev/null +++ b/devel/lnphost/Makefile @@ -0,0 +1,32 @@ +# Created by: Jason Bacon <jwbacon@tds.net> +# $FreeBSD$ + +PORTNAME= lnphost +PORTVERSION= 1.0a +CATEGORIES= devel +MASTER_SITES= SF + +MAINTAINER= jwbacon@tds.net +COMMENT= Lego RCX iinfrared communication API + +LICENSE= GPLv2 + +USES= zip gmake +WRKSRC= ${WRKDIR}/lnphost +CFLAGS+= -DHAVE_STRING_H + +PLIST_FILES= bin/lnpdump \ + lib/lnphost.a \ + include/lnphost.h \ + man/man1/lnpdump.1.gz + +MAKE_ARGS= PREFIX=${STAGEDIR}${PREFIX} + +# Use system getopt +post-patch: + ${RM} ${WRKSRC}/Include/getopt.h ${WRKSRC}/Modules/getopt.c + +post-install: + ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/lnpdump + +.include <bsd.port.mk> diff --git a/devel/lnphost/distinfo b/devel/lnphost/distinfo new file mode 100644 index 000000000000..6db45c0aeee1 --- /dev/null +++ b/devel/lnphost/distinfo @@ -0,0 +1,2 @@ +SHA256 (lnphost-1.0a.zip) = 194aa84b926b6b2a742184d45ad88ef3e8c6976ad28fdfb8cea1ed69cc236641 +SIZE (lnphost-1.0a.zip) = 30007 diff --git a/devel/lnphost/files/patch-Include-lnphost.h b/devel/lnphost/files/patch-Include-lnphost.h new file mode 100644 index 000000000000..2e7a286a1863 --- /dev/null +++ b/devel/lnphost/files/patch-Include-lnphost.h @@ -0,0 +1,11 @@ +--- Include/lnphost.h.orig Sat Nov 20 14:22:00 2004 ++++ Include/lnphost.h Thu Sep 13 22:22:20 2007 +@@ -21,6 +21,8 @@ + + #if defined(LINUX) || defined(linux) + #define LNP_DEFAULTDEVICE "/dev/ttyS0" ++#elif defined (__FreeBSD__) ++#define LNP_DEFAULTDEVICE "/dev/cuad0" + #elif defined (__CYGWIN__) || (_WIN32) + #define LNP_DEFAULTDEVICE "com1" + #else diff --git a/devel/lnphost/files/patch-Makefile b/devel/lnphost/files/patch-Makefile new file mode 100644 index 000000000000..95c92e149f4f --- /dev/null +++ b/devel/lnphost/files/patch-Makefile @@ -0,0 +1,65 @@ +--- Makefile.orig Fri Mar 18 10:20:31 2005 ++++ Makefile Thu Sep 13 21:14:41 2007 +@@ -8,16 +8,20 @@ + endif + + PROGRAMS=$(patsubst %.c,%$(EXT),$(wildcard *.c)) +-BINDIR=/usr/local/bin +-MANDIR=/usr/share/man/man1 ++LIBS=lnphost.a + +-all: $(PROGRAMS) ++BINDIR=${PREFIX}/bin ++MANDIR=${PREFIX}/man/man1 ++LIBDIR=${PREFIX}/lib ++INCDIR=${PREFIX}/include ++ ++all: $(PROGRAMS) $(LIBS) + + clean: +- make -C Docs clean +- rm -f *~ */*~ +- rm -f $(patsubst %.c,%.o,$(wildcard Modules/*.c)) +- rm -f $(patsubst %.c,%$(EXT),$(wildcard *.c)) ++ ${MAKE} -C Docs clean ++ ${RM} -f *~ */*~ ++ ${RM} -f $(patsubst %.c,%.o,$(wildcard Modules/*.c)) ++ ${RM} -f $(patsubst %.c,%$(EXT),$(wildcard *.c)) + + needroot: + @if [ ! $$UID -eq 0 ]; then \ +@@ -26,21 +30,27 @@ + fi + + install: all needroot +- make -C Docs all +- install -g root -o root -m 644 Docs/lnpdump.1.gz $(MANDIR) +- install -g root -o root -m 755 lnpdump$(EXT) $(BINDIR) ++ ${MAKE} -C Docs all ++ install -g 0 -o 0 -m 644 Docs/lnpdump.1 $(MANDIR) ++ install -g 0 -o 0 -m 755 lnpdump$(EXT) $(BINDIR) ++ install -g 0 -o 0 -m 0644 lnphost.a $(LIBDIR) ++ install -g 0 -o 0 -m 0644 Include/lnphost.h $(INCDIR) + + remove: needroot +- rm -f $(MANDIR)/lnpdump.1.gz +- rm -f $(BINDIR)/lnpdump$(EXT) ++ ${RM} -f $(MANDIR)/lnpdump.1.gz ++ ${RM} -f $(BINDIR)/lnpdump$(EXT) ++ ${RM} -f $(LIBDIR)/lnphost.a ++ ${RM} -f $(INCDIR)/lnphost.h + +-lnpdump$(EXT): lnpdump.c Modules/getopt.o Modules/lnphost.o ++lnpdump$(EXT): lnpdump.c Modules/lnphost.o + $(CC) $(CFLAGS) -Wall -IInclude -o $@ $+ -lpthread + + Modules/%.o: Modules/%.c Include/%.h + $(CC) $(CFLAGS) -Wall -IInclude -c -o $@ $< + + +-posrecv$(EXT): posrecv.c Modules/getopt.o Modules/lnphost.o ++posrecv$(EXT): posrecv.c Modules/lnphost.o + $(CC) $(CFLAGS) -Wall -IInclude -o $@ $+ -lpthread + ++lnphost.a: Modules/lnphost.o ++ $(AR) r lnphost.a Modules/lnphost.o diff --git a/devel/lnphost/pkg-descr b/devel/lnphost/pkg-descr new file mode 100644 index 000000000000..fbad3b8ad97d --- /dev/null +++ b/devel/lnphost/pkg-descr @@ -0,0 +1,5 @@ +A library supporting IR communication over the Lego Mindstorms IR tower. +It can be used from C programs on Posix compliant platforms, supports +multiple protocols and is designed to be a replacement for lnpd. + +WWW: http://sourceforge.net/projects/lnphost/?source=directory |