Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Aug 2014 21:25:42 +0000 (UTC)
From:      John Marino <marino@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r363938 - in head/devel: . lnphost lnphost/files
Message-ID:  <53dea8d7.5e7c.1f6773bc@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marino
Date: Sun Aug  3 21:25:42 2014
New Revision: 363938
URL: http://svnweb.freebsd.org/changeset/ports/363938
QAT: https://qat.redports.org/buildarchive/r363938/

Log:
  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.

Added:
  head/devel/lnphost/
  head/devel/lnphost/Makefile   (contents, props changed)
  head/devel/lnphost/distinfo   (contents, props changed)
  head/devel/lnphost/files/
  head/devel/lnphost/files/patch-Include-lnphost.h   (contents, props changed)
  head/devel/lnphost/files/patch-Makefile   (contents, props changed)
  head/devel/lnphost/pkg-descr   (contents, props changed)
Modified:
  head/devel/Makefile

Modified: head/devel/Makefile
==============================================================================
--- head/devel/Makefile	Sun Aug  3 21:08:11 2014	(r363937)
+++ head/devel/Makefile	Sun Aug  3 21:25:42 2014	(r363938)
@@ -1189,6 +1189,7 @@
     SUBDIR += lm4tools
     SUBDIR += lmdbg
     SUBDIR += lndir
+    SUBDIR += lnphost
     SUBDIR += lockfree-malloc
     SUBDIR += log4c
     SUBDIR += log4cplus

Added: head/devel/lnphost/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/lnphost/Makefile	Sun Aug  3 21:25:42 2014	(r363938)
@@ -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>

Added: head/devel/lnphost/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/lnphost/distinfo	Sun Aug  3 21:25:42 2014	(r363938)
@@ -0,0 +1,2 @@
+SHA256 (lnphost-1.0a.zip) = 194aa84b926b6b2a742184d45ad88ef3e8c6976ad28fdfb8cea1ed69cc236641
+SIZE (lnphost-1.0a.zip) = 30007

Added: head/devel/lnphost/files/patch-Include-lnphost.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/lnphost/files/patch-Include-lnphost.h	Sun Aug  3 21:25:42 2014	(r363938)
@@ -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

Added: head/devel/lnphost/files/patch-Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/lnphost/files/patch-Makefile	Sun Aug  3 21:25:42 2014	(r363938)
@@ -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

Added: head/devel/lnphost/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/lnphost/pkg-descr	Sun Aug  3 21:25:42 2014	(r363938)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53dea8d7.5e7c.1f6773bc>