- Update libcec to 2.2.0 [1]

- Unbreak consumers after update [2]
- No PORTREVISION bumps because binary compatible

PR:		196299
Differential Revision:	https://reviews.freebsd.org/D1900
Submitted by:	mickael.maillot@gmail.com (maintainer) [1]
Submitted by:	Ben Woods <woodsb02@gmail.com> (maintainer) [2]
This commit is contained in:
Jan Beich 2015-02-28 14:20:10 +00:00
parent 9d4e9b4532
commit 782b0d9f8c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=380144
7 changed files with 138 additions and 7 deletions

View file

@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= libcec
PORTVERSION= 2.1.4
PORTVERSION= 2.2.0
CATEGORIES= multimedia
MASTER_SITES= GH
@ -14,20 +14,18 @@ LICENSE_FILE= ${WRKSRC}/COPYING
USE_GITHUB= yes
GH_ACCOUNT= Pulse-Eight
GH_COMMIT= 81e3821
GH_COMMIT= 2a80b46
GH_TAGNAME= ${PORTNAME}-${PORTVERSION}-repack
USES= alias pathfix pkgconfig libtool
PATHFIX_MAKEFILEIN=Makefile.am
USE_XORG= x11 xproto xrandr
USE_AUTOTOOLS= aclocal autoheader automake autoconf libtoolize
ACLOCAL_ARGS= -I.
AUTOMAKE_ARGS= --add-missing
USE_LDCONFIG= yes
INSTALL_TARGET= install-strip
post-patch:
${REINPLACE_CMD} 's;-Wno-psabi;;' ${WRKSRC}/configure.ac
.include <bsd.port.options.mk>
.if ${ARCH} == armv6

View file

@ -1,2 +1,2 @@
SHA256 (libcec-2.1.4.tar.gz) = b8e869cc16a5c73a0da4443911cfd0e931f17324bdaad8210b0de085db0573ea
SIZE (libcec-2.1.4.tar.gz) = 1093922
SHA256 (libcec-2.2.0.tar.gz) = 63c3a4936d074bcfea21a0301bb1bedc6b5abba280e296b12fdca15addcedee9
SIZE (libcec-2.2.0.tar.gz) = 1099260

View file

@ -0,0 +1,27 @@
--- 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

View file

@ -100,6 +100,7 @@ CEC_DESC= Control plexhometheater over HDMI with TV remote
OPTIONS_DEFAULT= CEC LIRC
CEC_BUILD_DEPENDS= libcec>=2.2.0:${PORTSDIR}/multimedia/libcec
CEC_LIB_DEPENDS= libcec.so:${PORTSDIR}/multimedia/libcec
CEC_CMAKE_OFF= -DCMAKE_DISABLE_FIND_PACKAGE_CEC:BOOL=true

View file

@ -0,0 +1,52 @@
Origin: https://github.com/xbmc/xbmc/pull/5610
--- system/peripherals.xml.orig 2014-08-25 20:29:00.000000000 +0800
+++ system/peripherals.xml 2014-12-31 07:15:34.972922137 +0800
@@ -28,7 +28,7 @@
<setting key="device_type" type="int" value="1" configurable="0" />
<setting key="wake_devices_advanced" type="string" value="" configurable="0" />
<setting key="standby_devices_advanced" type="string" value="" configurable="0" />
- <setting key="double_tap_timeout_ms" type="int" min="0" value="2000" configurable="0" />
+ <setting key="double_tap_timeout_ms" type="int" min="0" value="300" configurable="0" />
</peripheral>
<peripheral vendor_product="2548:1001,2548:1002" bus="usb" name="Pulse-Eight CEC Adapter" mapTo="cec">
--- xbmc/peripherals/bus/virtual/PeripheralBusCEC.cpp.orig 2014-08-25 20:29:00.000000000 +0800
+++ xbmc/peripherals/bus/virtual/PeripheralBusCEC.cpp 2014-12-31 07:15:34.976923956 +0800
@@ -101,6 +101,8 @@
break;
case ADAPTERTYPE_RPI:
result.m_mappedBusType = PERIPHERAL_BUS_RPI;
+ // the Pi's adapter cannot be removed, no need to rescan
+ m_bNeedsPolling = false;
break;
default:
break;
--- xbmc/peripherals/devices/PeripheralCecAdapter.cpp.orig 2014-08-25 20:29:00.000000000 +0800
+++ xbmc/peripherals/devices/PeripheralCecAdapter.cpp 2014-12-31 07:15:34.986923118 +0800
@@ -1302,8 +1302,8 @@
void CPeripheralCecAdapter::SetConfigurationFromSettings(void)
{
- // use the same client version as libCEC version
- m_configuration.clientVersion = CEC_CLIENT_VERSION_CURRENT;
+ // client version matches the version of libCEC that we originally used the API from
+ m_configuration.clientVersion = CEC_CLIENT_VERSION_2_2_0;
// device name 'XBMC'
snprintf(m_configuration.strDeviceName, 13, "%s", GetSettingString("device_name").c_str());
@@ -1378,8 +1378,13 @@
m_configuration.bPowerOffOnStandby = iStandbyAction == 13011 ? 1 : 0;
m_configuration.bShutdownOnStandby = iStandbyAction == 13005 ? 1 : 0;
- // double tap prevention timeout in ms
+#if defined(CEC_DOUBLE_TAP_TIMEOUT_MS_OLD)
+ // double tap prevention timeout in ms. libCEC uses 50ms units for this in 2.2.0, so divide by 50
+ m_configuration.iDoubleTapTimeout50Ms = GetSettingInt("double_tap_timeout_ms") / 50;
+#else
+ // backwards compatibility. will be removed once the next major release of libCEC is out
m_configuration.iDoubleTapTimeoutMs = GetSettingInt("double_tap_timeout_ms");
+#endif
}
void CPeripheralCecAdapter::ReadLogicalAddresses(const CStdString &strString, cec_logical_addresses &addresses)

View file

@ -96,6 +96,7 @@ AIRTUNES_CONFIGURE_ENABLE= airtunes
AVAHI_LIB_DEPENDS= libavahi-client.so:${PORTSDIR}/net/avahi-app
AVAHI_CONFIGURE_ENABLE= avahi
CEC_BUILD_DEPENDS= libcec>=2.2.0:${PORTSDIR}/multimedia/libcec
CEC_LIB_DEPENDS= libcec.so:${PORTSDIR}/multimedia/libcec
CEC_CONFIGURE_ENABLE= libcec

View file

@ -0,0 +1,52 @@
Origin: https://github.com/xbmc/xbmc/pull/5610
--- system/peripherals.xml.orig 2014-08-25 20:29:00.000000000 +0800
+++ system/peripherals.xml 2014-12-31 07:15:34.972922137 +0800
@@ -28,7 +28,7 @@
<setting key="device_type" type="int" value="1" configurable="0" />
<setting key="wake_devices_advanced" type="string" value="" configurable="0" />
<setting key="standby_devices_advanced" type="string" value="" configurable="0" />
- <setting key="double_tap_timeout_ms" type="int" min="0" value="2000" configurable="0" />
+ <setting key="double_tap_timeout_ms" type="int" min="0" value="300" configurable="0" />
</peripheral>
<peripheral vendor_product="2548:1001,2548:1002" bus="usb" name="Pulse-Eight CEC Adapter" mapTo="cec">
--- xbmc/peripherals/bus/virtual/PeripheralBusCEC.cpp.orig 2014-08-25 20:29:00.000000000 +0800
+++ xbmc/peripherals/bus/virtual/PeripheralBusCEC.cpp 2014-12-31 07:15:34.976923956 +0800
@@ -101,6 +101,8 @@
break;
case ADAPTERTYPE_RPI:
result.m_mappedBusType = PERIPHERAL_BUS_RPI;
+ // the Pi's adapter cannot be removed, no need to rescan
+ m_bNeedsPolling = false;
break;
default:
break;
--- xbmc/peripherals/devices/PeripheralCecAdapter.cpp.orig 2014-08-25 20:29:00.000000000 +0800
+++ xbmc/peripherals/devices/PeripheralCecAdapter.cpp 2014-12-31 07:15:34.986923118 +0800
@@ -1302,8 +1302,8 @@
void CPeripheralCecAdapter::SetConfigurationFromSettings(void)
{
- // use the same client version as libCEC version
- m_configuration.clientVersion = CEC_CLIENT_VERSION_CURRENT;
+ // client version matches the version of libCEC that we originally used the API from
+ m_configuration.clientVersion = CEC_CLIENT_VERSION_2_2_0;
// device name 'XBMC'
snprintf(m_configuration.strDeviceName, 13, "%s", GetSettingString("device_name").c_str());
@@ -1378,8 +1378,13 @@
m_configuration.bPowerOffOnStandby = iStandbyAction == 13011 ? 1 : 0;
m_configuration.bShutdownOnStandby = iStandbyAction == 13005 ? 1 : 0;
- // double tap prevention timeout in ms
+#if defined(CEC_DOUBLE_TAP_TIMEOUT_MS_OLD)
+ // double tap prevention timeout in ms. libCEC uses 50ms units for this in 2.2.0, so divide by 50
+ m_configuration.iDoubleTapTimeout50Ms = GetSettingInt("double_tap_timeout_ms") / 50;
+#else
+ // backwards compatibility. will be removed once the next major release of libCEC is out
m_configuration.iDoubleTapTimeoutMs = GetSettingInt("double_tap_timeout_ms");
+#endif
}
void CPeripheralCecAdapter::ReadLogicalAddresses(const CStdString &strString, cec_logical_addresses &addresses)