summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorjmcneill <jmcneill@pkgsrc.org>2015-02-13 11:12:23 +0000
committerjmcneill <jmcneill@pkgsrc.org>2015-02-13 11:12:23 +0000
commit2a9b02b93227c6e047b88b36430299e571b30deb (patch)
tree8e848d8bb5b4141e2de3090b4e19c3b5db08663a /misc
parent3e2c172aa9a1cbd4c886489cdbedc9d365e5baf3 (diff)
downloadpkgsrc-2a9b02b93227c6e047b88b36430299e571b30deb.tar.gz
Import libcec-2.2.0 as misc/libcec.
libCEC allows you in combination with the right hardware to control your device with your TV remote control. Utilising your existing HDMI cabling, it allows developers to interact with other HDMI devices without having to worry about the communication overhead, handshaking, and the various ways of sending a message for each vendor.
Diffstat (limited to 'misc')
-rw-r--r--misc/libcec/DESCR5
-rw-r--r--misc/libcec/Makefile31
-rw-r--r--misc/libcec/PLIST8
-rw-r--r--misc/libcec/distinfo8
-rw-r--r--misc/libcec/patches/patch-configure.ac35
-rw-r--r--misc/libcec/patches/patch-src_lib_platform_posix_os-types.h13
-rw-r--r--misc/libcec/patches/patch-src_lib_platform_posix_serialport.cpp31
7 files changed, 131 insertions, 0 deletions
diff --git a/misc/libcec/DESCR b/misc/libcec/DESCR
new file mode 100644
index 00000000000..d9b7eb6bd02
--- /dev/null
+++ b/misc/libcec/DESCR
@@ -0,0 +1,5 @@
+libCEC allows you in combination with the right hardware to control your
+device with your TV remote control. Utilising your existing HDMI cabling,
+it allows developers to interact with other HDMI devices without having to
+worry about the communication overhead, handshaking, and the various ways
+of sending a message for each vendor.
diff --git a/misc/libcec/Makefile b/misc/libcec/Makefile
new file mode 100644
index 00000000000..09629eb2164
--- /dev/null
+++ b/misc/libcec/Makefile
@@ -0,0 +1,31 @@
+# $NetBSD: Makefile,v 1.1 2015/02/13 11:12:23 jmcneill Exp $
+
+DISTNAME= libcec-2.2.0-repack
+PKGNAME= libcec-2.2.0
+CATEGORIES= misc
+MASTER_SITES= https://github.com/Pulse-Eight/libcec/archive/
+
+MAINTAINER= pkgsrc-users@NetBSD.org
+HOMEPAGE= http://libcec.pulse-eight.com/
+COMMENT= USB CEC Adapter communication Library
+LICENSE= gnu-gpl-v2
+
+WRKSRC= ${WRKDIR}/libcec-libcec-2.2.0-repack
+GNU_CONFIGURE= yes
+USE_TOOLS+= pkg-config gmake autoconf automake autoreconf
+USE_LANGUAGES= c c++
+USE_LIBTOOL= yes
+
+PKGCONFIG_OVERRIDE+= src/lib/libcec.pc.in
+
+pre-configure:
+ cd ${WRKSRC} && autoreconf -fi
+
+.if !empty(MACHINE_ARCH:M*arm*)
+CONFIGURE_ARGS+= --with-rpi-include-path=${PREFIX}/include
+CONFIGURE_ARGS+= --with-rpi-lib-path=${PREFIX}/lib
+.include "../../misc/raspberrypi-userland/buildlink3.mk"
+.endif
+
+.include "../../x11/libXrandr/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/misc/libcec/PLIST b/misc/libcec/PLIST
new file mode 100644
index 00000000000..ea2bbe7e013
--- /dev/null
+++ b/misc/libcec/PLIST
@@ -0,0 +1,8 @@
+@comment $NetBSD: PLIST,v 1.1 2015/02/13 11:12:23 jmcneill Exp $
+bin/cec-client
+include/libcec/cec.h
+include/libcec/cecc.h
+include/libcec/cecloader.h
+include/libcec/cectypes.h
+lib/libcec.la
+lib/pkgconfig/libcec.pc
diff --git a/misc/libcec/distinfo b/misc/libcec/distinfo
new file mode 100644
index 00000000000..09488094232
--- /dev/null
+++ b/misc/libcec/distinfo
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1 2015/02/13 11:12:23 jmcneill Exp $
+
+SHA1 (libcec-2.2.0-repack.tar.gz) = 42e19328c5b05b5fff27bcdf80e7acc329201913
+RMD160 (libcec-2.2.0-repack.tar.gz) = a4620c45d78a8e0305fdc15e35e8b964b57f3eef
+Size (libcec-2.2.0-repack.tar.gz) = 1099286 bytes
+SHA1 (patch-configure.ac) = 6a873fd774c4c31db81c627ce009d9dec0c03c82
+SHA1 (patch-src_lib_platform_posix_os-types.h) = a7f0c9726d5a48d4706258c3edcbb41c96e90601
+SHA1 (patch-src_lib_platform_posix_serialport.cpp) = 2b47f04bf1849ed310ac29ebe9ae10bad0ded8a4
diff --git a/misc/libcec/patches/patch-configure.ac b/misc/libcec/patches/patch-configure.ac
new file mode 100644
index 00000000000..61260a4e863
--- /dev/null
+++ b/misc/libcec/patches/patch-configure.ac
@@ -0,0 +1,35 @@
+$NetBSD: patch-configure.ac,v 1.1 2015/02/13 11:12:23 jmcneill Exp $
+
+--- configure.ac.orig 2014-10-31 19:11:22.000000000 +0000
++++ configure.ac
+@@ -81,7 +81,7 @@ AC_ARG_WITH([rpi-include-path],
+ AC_ARG_WITH([rpi-lib-path],
+ [AS_HELP_STRING([--with-rpi-lib-path],
+ [location of the Raspberry Pi libraries (location of libbcm_host.so, default is auto)])],
+- [RPI_LIBS="-L$withval"])
++ [RPI_LIBS="-Wl,-R$withval -L$withval"])
+
+ ## only check for the RPi API on ARM targets
+ if test "x$use_rpi" != "xno"; then
+@@ -139,7 +139,7 @@ use_adapter_detection="yes"
+ use_lockdev="no"
+ SUPPRESS_MANGLING_WARNINGS=" -Wno-psabi"
+ case "${host}" in
+- *-*-linux*)
++ *-*-linux*|*-*-netbsd*)
+ ## search for udev if pkg-config was found
+ if test "x$HAVE_PKG_CONFIG" = "xyes" ; then
+ PKG_CHECK_MODULES([UDEV],[libudev],use_udev="yes",AC_MSG_WARN($msg_udev_missing))
+@@ -160,7 +160,11 @@ case "${host}" in
+ AC_CHECK_LIB(lockdev,dev_unlock,,[use_lockdev="no";AC_MSG_WARN($msg_lockdev_missing)])
+
+ AC_CHECK_HEADER(time.h,,AC_MSG_ERROR($msg_required_header_missing))
+- AC_CHECK_HEADER(sys/prctl.h,,AC_MSG_ERROR($msg_required_header_missing))
++ case "${host}" in
++ *-*-linux*)
++ AC_CHECK_HEADER(sys/prctl.h,,AC_MSG_ERROR($msg_required_header_missing))
++ ;;
++ esac
+
+ ## search for the RPi API. we need to check a couple of things to see if
+ ## it's recent enough and contains the calls needed for libCEC to operate
diff --git a/misc/libcec/patches/patch-src_lib_platform_posix_os-types.h b/misc/libcec/patches/patch-src_lib_platform_posix_os-types.h
new file mode 100644
index 00000000000..1aff05e191e
--- /dev/null
+++ b/misc/libcec/patches/patch-src_lib_platform_posix_os-types.h
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_lib_platform_posix_os-types.h,v 1.1 2015/02/13 11:12:23 jmcneill Exp $
+
+--- src/lib/platform/posix/os-types.h.orig 2014-10-31 19:11:22.000000000 +0000
++++ src/lib/platform/posix/os-types.h
+@@ -36,7 +36,7 @@
+ #include <string.h>
+ #include <errno.h>
+ #include <sys/time.h>
+-#if !defined(__APPLE__) && !defined(__FreeBSD__)
++#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__NetBSD__)
+ #include <sys/prctl.h>
+ #endif
+ #include <pthread.h>
diff --git a/misc/libcec/patches/patch-src_lib_platform_posix_serialport.cpp b/misc/libcec/patches/patch-src_lib_platform_posix_serialport.cpp
new file mode 100644
index 00000000000..4a4e1bf15db
--- /dev/null
+++ b/misc/libcec/patches/patch-src_lib_platform_posix_serialport.cpp
@@ -0,0 +1,31 @@
+$NetBSD: patch-src_lib_platform_posix_serialport.cpp,v 1.1 2015/02/13 11:12:23 jmcneill Exp $
+
+--- src/lib/platform/posix/serialport.cpp.orig 2014-10-31 19:11:22.000000000 +0000
++++ src/lib/platform/posix/serialport.cpp
+@@ -37,7 +37,7 @@
+ #include "lib/platform/util/baudrate.h"
+ #include "lib/platform/posix/os-socket.h"
+
+-#if defined(__APPLE__) || defined(__FreeBSD__)
++#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__)
+ #ifndef XCASE
+ #define XCASE 0
+ #endif
+@@ -58,7 +58,7 @@ using namespace PLATFORM;
+
+ inline bool RemoveLock(const char *strDeviceName)
+ {
+- #if !defined(__APPLE__) && !defined(__FreeBSD__) && defined(HAVE_LOCKDEV)
++ #if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && defined(HAVE_LOCKDEV)
+ return dev_unlock(strDeviceName, 0) == 0;
+ #else
+ (void)strDeviceName; // silence unused warning
+@@ -126,7 +126,7 @@ bool CSerialSocket::Open(uint64_t iTimeo
+ return false;
+ }
+
+- #if !defined(__APPLE__) && !defined(__FreeBSD__) && defined(HAVE_LOCKDEV)
++ #if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && defined(HAVE_LOCKDEV)
+ if (dev_lock(m_strName.c_str()) != 0)
+ {
+ m_strError = "Couldn't lock the serial port";