diff options
author | Kevin Lo <kevlo@FreeBSD.org> | 2017-11-04 13:54:05 +0000 |
---|---|---|
committer | Kevin Lo <kevlo@FreeBSD.org> | 2017-11-04 13:54:05 +0000 |
commit | 8d8b48607a95c6eae7cbef566f3d6d4ec94867b6 (patch) | |
tree | 38ff49e303c78f39bef41b44e96cea8770514ed8 /multimedia/py-cec | |
parent | ef0062d20a75c115f724c5f5d97c871193d27b86 (diff) | |
download | ports-8d8b48607a95c6eae7cbef566f3d6d4ec94867b6.tar.gz ports-8d8b48607a95c6eae7cbef566f3d6d4ec94867b6.zip |
Notes
Diffstat (limited to 'multimedia/py-cec')
-rw-r--r-- | multimedia/py-cec/Makefile | 4 | ||||
-rw-r--r-- | multimedia/py-cec/distinfo | 6 | ||||
-rw-r--r-- | multimedia/py-cec/files/patch-cec.cpp | 109 | ||||
-rw-r--r-- | multimedia/py-cec/files/patch-device.cpp | 25 |
4 files changed, 5 insertions, 139 deletions
diff --git a/multimedia/py-cec/Makefile b/multimedia/py-cec/Makefile index dc4270920220..0f8c14589c2d 100644 --- a/multimedia/py-cec/Makefile +++ b/multimedia/py-cec/Makefile @@ -1,8 +1,7 @@ # $FreeBSD$ PORTNAME= cec -PORTVERSION= 0.2.5 -PORTREVISION= 1 +PORTVERSION= 0.2.6 CATEGORIES= multimedia python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -11,6 +10,7 @@ MAINTAINER= kevlo@FreeBSD.org COMMENT= Python bindings for libcec LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= libcec.so:multimedia/libcec diff --git a/multimedia/py-cec/distinfo b/multimedia/py-cec/distinfo index caefaafc6994..727de0c0d750 100644 --- a/multimedia/py-cec/distinfo +++ b/multimedia/py-cec/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1470924935 -SHA256 (cec-0.2.5.tar.gz) = 7de65012e54943013dbb193383a1904a9ade08f90eaa5c78c1ea5b23e8252162 -SIZE (cec-0.2.5.tar.gz) = 8513 +TIMESTAMP = 1509802845 +SHA256 (cec-0.2.6.tar.gz) = ebd8aaa3ac3c55d15bb40595eefc114a88fd98e9495e2fe919b40713ae570e81 +SIZE (cec-0.2.6.tar.gz) = 16933 diff --git a/multimedia/py-cec/files/patch-cec.cpp b/multimedia/py-cec/files/patch-cec.cpp deleted file mode 100644 index ed65ee0baf56..000000000000 --- a/multimedia/py-cec/files/patch-cec.cpp +++ /dev/null @@ -1,109 +0,0 @@ ---- cec.cpp.orig 2017-04-14 13:57:59.489525000 +0000 -+++ cec.cpp 2017-04-14 15:16:14.322425000 +0000 -@@ -93,7 +93,7 @@ using namespace CEC; - #endif - - // cec_adapter_descriptor and DetectAdapters were introduced in 2.1.0 --#if CEC_LIB_VERSION_MAJOR >= 2 && CEC_LIB_VERSION_MINOR >= 1 -+#if CEC_LIB_VERSION_MAJOR >=3 || CEC_LIB_VERSION_MAJOR >= 2 && CEC_LIB_VERSION_MINOR >= 1 - #define CEC_ADAPTER_TYPE cec_adapter_descriptor - #define CEC_FIND_ADAPTERS DetectAdapters - #define HAVE_CEC_ADAPTER_DESCRIPTOR 1 -@@ -520,36 +520,34 @@ static PyMethodDef CecMethods[] = { - libcec_configuration * CEC_config; - ICECCallbacks * CEC_callbacks; - --int log_cb(void * self, const cec_log_message message) { -+void log_cb(void * self, const cec_log_message* message) { - debug("got log callback\n"); - PyGILState_STATE gstate; - gstate = PyGILState_Ensure(); -- int level = message.level; -- long int time = message.time; -+ int level = message->level; -+ long int time = message->time; - PyObject * args = Py_BuildValue("(iils)", EVENT_LOG, - level, - time, -- message.message); -+ message->message); - trigger_event(EVENT_LOG, args); - Py_DECREF(args); - PyGILState_Release(gstate); -- return 1; - } - --int keypress_cb(void * self, const cec_keypress key) { -+void keypress_cb(void * self, const cec_keypress* key) { - debug("got keypress callback\n"); - PyGILState_STATE gstate; - gstate = PyGILState_Ensure(); - PyObject * args = Py_BuildValue("(iBI)", EVENT_KEYPRESS, -- key.keycode, -- key.duration); -+ key->keycode, -+ key->duration); - trigger_event(EVENT_KEYPRESS, args); - Py_DECREF(args); - PyGILState_Release(gstate); -- return 1; - } - --int command_cb(void * self, const cec_command command) { -+void command_cb(void * self, const cec_command* command) { - debug("got command callback\n"); - PyGILState_STATE gstate; - gstate = PyGILState_Ensure(); -@@ -560,10 +558,9 @@ int command_cb(void * self, const cec_co - //trigger_event(EVENT_COMMAND, args); - Py_DECREF(args); - PyGILState_Release(gstate); -- return 1; - } - --int config_cb(void * self, const libcec_configuration) { -+void config_cb(void * self, const libcec_configuration*) { - debug("got config callback\n"); - PyGILState_STATE gstate; - gstate = PyGILState_Ensure(); -@@ -578,10 +575,9 @@ int config_cb(void * self, const libcec_ - //trigger_event(EVENT_CONFIG_CHANGE, args); - Py_DECREF(args); - PyGILState_Release(gstate); -- return 1; - } - --int alert_cb(void * self, const libcec_alert alert, const libcec_parameter p) { -+void alert_cb(void * self, const libcec_alert alert, const libcec_parameter p) { - debug("got alert callback\n"); - PyGILState_STATE gstate; - gstate = PyGILState_Ensure(); -@@ -595,7 +591,6 @@ int alert_cb(void * self, const libcec_a - trigger_event(EVENT_ALERT, args); - Py_DECREF(args); - PyGILState_Release(gstate); -- return 1; - } - - int menu_cb(void * self, const cec_menu_state menu) { -@@ -654,13 +649,13 @@ PyMODINIT_FUNC initcec(void) { - #if CEC_LIB_VERSION_MAJOR > 1 || ( CEC_LIB_VERSION_MAJOR == 1 && CEC_LIB_VERSION_MINOR >= 7 ) - CEC_callbacks->Clear(); - #endif -- CEC_callbacks->CBCecLogMessage = log_cb; -- CEC_callbacks->CBCecKeyPress = keypress_cb; -- CEC_callbacks->CBCecCommand = command_cb; -- CEC_callbacks->CBCecConfigurationChanged = config_cb; -- CEC_callbacks->CBCecAlert = alert_cb; -- CEC_callbacks->CBCecMenuStateChanged = menu_cb; -- CEC_callbacks->CBCecSourceActivated = activated_cb; -+ CEC_callbacks->logMessage = log_cb; -+ CEC_callbacks->keyPress = keypress_cb; -+ CEC_callbacks->commandReceived = command_cb; -+ CEC_callbacks->configurationChanged = config_cb; -+ CEC_callbacks->alert = alert_cb; -+ CEC_callbacks->menuStateChanged = menu_cb; -+ CEC_callbacks->sourceActivated = activated_cb; - - CEC_config->callbacks = CEC_callbacks; - diff --git a/multimedia/py-cec/files/patch-device.cpp b/multimedia/py-cec/files/patch-device.cpp deleted file mode 100644 index ea7d9b399bb6..000000000000 --- a/multimedia/py-cec/files/patch-device.cpp +++ /dev/null @@ -1,25 +0,0 @@ ---- device.cpp.orig 2017-04-14 15:17:22.504454000 +0000 -+++ device.cpp 2017-04-14 15:27:24.544699000 +0000 -@@ -244,17 +244,17 @@ static PyObject * Device_new(PyTypeObjec - - if( !(self->cecVersion = Py_BuildValue("s", ver_str)) ) return NULL; - -- cec_osd_name name; -+ std::string name; - Py_BEGIN_ALLOW_THREADS - name = adapter->GetDeviceOSDName(self->addr); - Py_END_ALLOW_THREADS -- if( !(self->osdName = Py_BuildValue("s", name.name)) ) return NULL; -+ if( !(self->osdName = Py_BuildValue("s", name.c_str())) ) return NULL; - -- cec_menu_language lang; -+ std::string lang; - Py_BEGIN_ALLOW_THREADS -- adapter->GetDeviceMenuLanguage(self->addr, &lang); -+ lang = adapter->GetDeviceMenuLanguage(self->addr); - Py_END_ALLOW_THREADS -- if( !(self->lang = Py_BuildValue("s", lang.language)) ) return NULL; -+ if( !(self->lang = Py_BuildValue("s", lang.c_str())) ) return NULL; - } - - return (PyObject *)self; |