From owner-svn-ports-all@freebsd.org Sat Jul 11 18:09:59 2020 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5890436B773; Sat, 11 Jul 2020 18:09:59 +0000 (UTC) (envelope-from sunpoet@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B3ycR1h8wz4JwT; Sat, 11 Jul 2020 18:09:59 +0000 (UTC) (envelope-from sunpoet@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1E7A316F60; Sat, 11 Jul 2020 18:09:59 +0000 (UTC) (envelope-from sunpoet@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06BI9x5q038991; Sat, 11 Jul 2020 18:09:59 GMT (envelope-from sunpoet@FreeBSD.org) Received: (from sunpoet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06BI9wsp038990; Sat, 11 Jul 2020 18:09:58 GMT (envelope-from sunpoet@FreeBSD.org) Message-Id: <202007111809.06BI9wsp038990@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sunpoet set sender to sunpoet@FreeBSD.org using -f From: Sunpoet Po-Chuan Hsieh Date: Sat, 11 Jul 2020 18:09:58 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r542013 - head/multimedia/py-cec/files X-SVN-Group: ports-head X-SVN-Commit-Author: sunpoet X-SVN-Commit-Paths: head/multimedia/py-cec/files X-SVN-Commit-Revision: 542013 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2020 18:09:59 -0000 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; + }