Date: Sat, 11 Jul 2020 18:09:58 +0000 (UTC) From: Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r542013 - head/multimedia/py-cec/files Message-ID: <202007111809.06BI9wsp038990@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sunpoet Date: Sat Jul 11 18:09:58 2020 New Revision: 542013 URL: https://svnweb.freebsd.org/changeset/ports/542013 Log: Fix build with libcec 6.0.0+ Added: head/multimedia/py-cec/files/ head/multimedia/py-cec/files/patch-cec.cpp (contents, props changed) Added: head/multimedia/py-cec/files/patch-cec.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/multimedia/py-cec/files/patch-cec.cpp Sat Jul 11 18:09:58 2020 (r542013) @@ -0,0 +1,37 @@ +--- cec.cpp.orig 2019-11-12 05:53:01 UTC ++++ cec.cpp +@@ -612,14 +612,22 @@ PyObject * set_port(PyObject * self, PyObject * args) + + PyObject * can_persist_config(PyObject * self, PyObject * args) { + if( PyArg_ParseTuple(args, ":can_persist_config") ) { ++#if CEC_LIB_VERSION_MAJOR >= 5 ++ RETURN_BOOL(CEC_adapter->CanSaveConfiguration()); ++#else + RETURN_BOOL(CEC_adapter->CanPersistConfiguration()); ++#endif + } + return NULL; + } + + PyObject * persist_config(PyObject * self, PyObject * args) { + if( PyArg_ParseTuple(args, ":persist_config") ) { ++#if CEC_LIB_VERSION_MAJOR >= 5 ++ if( ! CEC_adapter->CanSaveConfiguration() ) { ++#else + if( ! CEC_adapter->CanPersistConfiguration() ) { ++#endif + PyErr_SetString(PyExc_NotImplementedError, + "Cannot persist configuration"); + return NULL; +@@ -629,7 +637,11 @@ PyObject * persist_config(PyObject * self, PyObject * + PyErr_SetString(PyExc_IOError, "Could not get configuration"); + return NULL; + } ++#if CEC_LIB_VERSION_MAJOR >= 5 ++ RETURN_BOOL(CEC_adapter->SetConfiguration(&config)); ++#else + RETURN_BOOL(CEC_adapter->PersistConfiguration(&config)); ++#endif + } + return NULL; + }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202007111809.06BI9wsp038990>