aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia
diff options
context:
space:
mode:
authorriggs <riggs@FreeBSD.org>2016-04-17 02:00:46 +0800
committerriggs <riggs@FreeBSD.org>2016-04-17 02:00:46 +0800
commit34dbb352f15f582a4c3123ae56bc6c9c53896463 (patch)
tree56516d9f2a0adeaf491f108b5127bae88943cc4a /multimedia
parentd90fb3c6c62d5e8fae30ed80869f2964772865ef (diff)
downloadfreebsd-ports-gnome-34dbb352f15f582a4c3123ae56bc6c9c53896463.tar.gz
freebsd-ports-gnome-34dbb352f15f582a4c3123ae56bc6c9c53896463.tar.zst
freebsd-ports-gnome-34dbb352f15f582a4c3123ae56bc6c9c53896463.zip
Update to upstream version 3.1.0, introduce OPTIONS for PYTHON, X11 and RPI
Details - Turn existing python wrapper and X11 support into default OPTIONS - Introduce RPI non-default OPTION on armv6 PR: 208161 Submitted by: mickael.maillot@gmail.com Approved by: maintainer timeout
Diffstat (limited to 'multimedia')
-rw-r--r--multimedia/libcec/Makefile46
-rw-r--r--multimedia/libcec/distinfo4
-rw-r--r--multimedia/libcec/files/patch-configure.ac27
-rw-r--r--multimedia/libcec/files/patch-src_libcec_cmake_SetBuildInfo.cmake17
-rw-r--r--multimedia/libcec/pkg-message2
-rw-r--r--multimedia/libcec/pkg-plist12
6 files changed, 66 insertions, 42 deletions
diff --git a/multimedia/libcec/Makefile b/multimedia/libcec/Makefile
index bb956efd4b83..6fe992106602 100644
--- a/multimedia/libcec/Makefile
+++ b/multimedia/libcec/Makefile
@@ -2,9 +2,8 @@
# $FreeBSD$
PORTNAME= libcec
-PORTVERSION= 2.2.0
+PORTVERSION= 3.1.0
DISTVERSIONPREFIX= ${PORTNAME}-
-DISTVERSIONSUFFIX= -repack
CATEGORIES= multimedia
MAINTAINER= manuel.creach@icloud.com
@@ -13,20 +12,49 @@ COMMENT= Library to control Pulse-Eight's HDMI-CEC adapter
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
+LIB_DEPENDS= libp8-platform.so:devel/p8-platform
+
USE_GITHUB= yes
GH_ACCOUNT= Pulse-Eight
-GNU_CONFIGURE= yes
-USES= alias autoreconf pathfix pkgconfig libtool
-PATHFIX_MAKEFILEIN=Makefile.am
-USE_XORG= x11 xproto xrandr
+USES= alias cmake compiler:c++11-lib pkgconfig
USE_LDCONFIG= yes
-INSTALL_TARGET= install-strip
+CMAKE_ARGS= -DCMAKE_REQUIRED_INCLUDES:PATH="${LOCALBASE}/include" \
+ -DCMAKE_REQUIRED_FLAGS:STRING="-L${LOCALBASE}/lib"
+
+OPTIONS_DEFINE= PYTHON X11
+OPTIONS_DEFAULT= PYTHON X11
+OPTIONS_DEFINE_armv6= RPI
+OPTIONS_DEFAULT_armv6=
+OPTIONS_SUB= yes
+
+PYTHON_DESC= build python wrapper
+PYTHON_BUILD_DEPENDS+= swig3.0:devel/swig30
+RPI_DESC= build libcec support for raspberrypi
+RPI_CMAKE_ON= -DRPI_INCLUDE_DIR=${LOCALBASE}/include -DRPI_LIB_DIR=${LOCALBASE}/lib
+RPI_LIB_DEPENDS= libbcm_host.so:misc/raspberrypi-userland
.include <bsd.port.options.mk>
-.if ${ARCH} == armv6
-CONFIGURE_ARGS= --disable-rpi
+.if ${PORT_OPTIONS:MPYTHON}
+USES+= python:build
+.else
+CMAKE_ARGS+= -DSKIP_PYTHON_WRAPPER:BOOL=true
+.endif
+
+.if ${PORT_OPTIONS:MX11}
+USE_XORG= x11 xproto xrandr
+.endif
+
+post-patch:
+ @${REINPLACE_CMD} 's|$${GIT_REVISION}|${PORTVERSION}|g' \
+ ${WRKSRC}/src/libcec/cmake/SetBuildInfo.cmake
+ @${REINPLACE_CMD} -e '/SOVERSION/ s|\.0||' \
+ -e 's|$${CMAKE_INSTALL_LIBDIR_NOARCH}/pkgconfig|libdata/pkgconfig|' \
+ ${WRKSRC}/src/libcec/CMakeLists.txt
+.if ! ${PORT_OPTIONS:MPYTHON}
+ @${REINPLACE_CMD} '/pyCecClient/d' \
+ ${WRKSRC}/CMakeLists.txt
.endif
.include <bsd.port.mk>
diff --git a/multimedia/libcec/distinfo b/multimedia/libcec/distinfo
index 32c8bc61b231..402dfac3e747 100644
--- a/multimedia/libcec/distinfo
+++ b/multimedia/libcec/distinfo
@@ -1,2 +1,2 @@
-SHA256 (Pulse-Eight-libcec-libcec-2.2.0-repack_GH0.tar.gz) = 5d8c8de65354de82299c163078538d7b3ba0a59c5789bb4b23619be4d154aecd
-SIZE (Pulse-Eight-libcec-libcec-2.2.0-repack_GH0.tar.gz) = 1099286
+SHA256 (Pulse-Eight-libcec-libcec-3.1.0_GH0.tar.gz) = 09109d21a1b03f42c9e341d12600f2e4c41038d640269fa75408e2d36126f921
+SIZE (Pulse-Eight-libcec-libcec-3.1.0_GH0.tar.gz) = 1097121
diff --git a/multimedia/libcec/files/patch-configure.ac b/multimedia/libcec/files/patch-configure.ac
deleted file mode 100644
index fc90984f4e7e..000000000000
--- a/multimedia/libcec/files/patch-configure.ac
+++ /dev/null
@@ -1,27 +0,0 @@
---- configure.ac.orig 2014-12-16 12:03:01.000000000 +0100
-+++ configure.ac 2014-12-16 12:05:57.000000000 +0100
-@@ -236,6 +236,24 @@
- AM_CONDITIONAL(USE_X11_RANDR, false)
- SUPPRESS_MANGLING_WARNINGS=""
- ;;
-+ *-*-freebsd*)
-+ SUPPRESS_MANGLING_WARNINGS=""
-+ ## search for X11/xrandr
-+ libs_tmp="$LIBS"
-+ use_x11_xrandr="yes"
-+ AC_CHECK_HEADER(X11/Xlib.h,,[use_x11_xrandr="no"])
-+ AC_CHECK_HEADER(X11/Xatom.h,,[use_x11_xrandr="no"])
-+ AC_CHECK_HEADER(X11/extensions/Xrandr.h,,[use_x11_xrandr="no"])
-+ AC_CHECK_LIB(X11,XOpenDisplay,,[use_x11_xrandr="no"])
-+ AC_CHECK_LIB(Xrandr,XRRGetScreenResources,,[use_x11_xrandr="no"])
-+ if test "x$use_x11_xrandr" = "xyes"; then
-+ AC_DEFINE([HAVE_RANDR],[1],[Define to 1 to include support for the X11 randr extension])
-+ AM_CONDITIONAL(USE_X11_RANDR, true)
-+ else
-+ AM_CONDITIONAL(USE_X11_RANDR, false)
-+ LIBS="$libs_tmp"
-+ fi
-+ ;;
- esac
-
- ## define the build info
diff --git a/multimedia/libcec/files/patch-src_libcec_cmake_SetBuildInfo.cmake b/multimedia/libcec/files/patch-src_libcec_cmake_SetBuildInfo.cmake
new file mode 100644
index 000000000000..6357b2f8b1a6
--- /dev/null
+++ b/multimedia/libcec/files/patch-src_libcec_cmake_SetBuildInfo.cmake
@@ -0,0 +1,17 @@
+--- src/libcec/cmake/SetBuildInfo.cmake.orig 2016-01-20 00:52:02 UTC
++++ src/libcec/cmake/SetBuildInfo.cmake
+@@ -14,14 +14,7 @@ else()
+ set(LIB_INFO "")
+
+ # add git revision to compile info
+- find_program(HAVE_GIT_BIN git /bin /usr/bin /usr/local/bin)
+- if(HAVE_GIT_BIN)
+- exec_program(${CMAKE_CURRENT_SOURCE_DIR}/../../support/git-rev.sh HEAD OUTPUT_VARIABLE GIT_REVISION)
+- message(STATUS "git found: ${GIT_REVISION}")
+- endif()
+- if (GIT_REVISION)
+ set(LIB_INFO "git revision: ${GIT_REVISION},")
+- endif()
+
+ # add compilation date to compile info
+ find_program(HAVE_DATE_BIN date /bin /usr/bin /usr/local/bin)
diff --git a/multimedia/libcec/pkg-message b/multimedia/libcec/pkg-message
index 9195606d4a68..d8e17642691d 100644
--- a/multimedia/libcec/pkg-message
+++ b/multimedia/libcec/pkg-message
@@ -16,4 +16,4 @@ devfs_system_ruleset="system"
Then restart devfs to load the new rule:
-% /etc/rc.d/devfs restart
+% service devfs restart
diff --git a/multimedia/libcec/pkg-plist b/multimedia/libcec/pkg-plist
index 7f09aa2d4b05..9563c96b5a5c 100644
--- a/multimedia/libcec/pkg-plist
+++ b/multimedia/libcec/pkg-plist
@@ -1,10 +1,16 @@
bin/cec-client
+bin/cec-client-3.1.0
+bin/cecc-client
+bin/cecc-client-3.1.0
+%%PYTHON%%bin/pyCecClient.py
include/libcec/cec.h
include/libcec/cecc.h
include/libcec/cecloader.h
include/libcec/cectypes.h
-lib/libcec.a
+include/libcec/version.h
lib/libcec.so
-lib/libcec.so.2
-lib/libcec.so.2.0.1
+lib/libcec.so.3
+lib/libcec.so.3.1.0
+%%PYTHON%%%%PYTHON_LIBDIR%%/dist-packages/cec/__init__.py
+%%PYTHON%%%%PYTHON_LIBDIR%%/dist-packages/cec/_cec.so
libdata/pkgconfig/libcec.pc