Date: Wednesday, July 25, 2018 @ 12:34:09
  Author: arcanis
Revision: 363379

archrelease: copy trunk to community-staging-x86_64

Added:
  canorus/repos/community-staging-x86_64/
  canorus/repos/community-staging-x86_64/PKGBUILD
    (from rev 363378, canorus/trunk/PKGBUILD)
  canorus/repos/community-staging-x86_64/python-3.7.patch
    (from rev 363378, canorus/trunk/python-3.7.patch)

------------------+
 PKGBUILD         |   39 ++++++++++++++++
 python-3.7.patch |  126 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 165 insertions(+)

Copied: canorus/repos/community-staging-x86_64/PKGBUILD (from rev 363378, 
canorus/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD                           (rev 0)
+++ community-staging-x86_64/PKGBUILD   2018-07-25 12:34:09 UTC (rev 363379)
@@ -0,0 +1,39 @@
+# $Id$
+# Maintainer: Sergej Pupykin <pupykin.s+a...@gmail.com>
+# Maintainer: Arch Linux Pro Audio <d...@archaudio.org>
+# Contributor: Coenraad van der Westhuizen <chwesthui...@gmail.com>
+# Contributor: hm_b <holger (at) music-nerds (dot) net>
+
+pkgname=canorus
+pkgver=0.7.3rc3
+pkgrel=1
+pkgdesc="A free music score editor"
+arch=('x86_64')
+url="http://www.canorus.org/";
+license=('GPL')
+depends=('qt5-svg' 'qt5-webengine' 'alsa-lib' 'zlib' 'python')
+makedepends=('cmake' 'swig' 'qt5-tools' 'ruby')
+source=("http://downloads.sourceforge.net/project/canorus/0.7.3/canorus-${pkgver}.tar.bz2";
+        "python-3.7.patch")
+sha256sums=('c5d470ac6cae696472dcb7176e0cd4545b883ff84ae2dc767a8956546f5b4b15'
+            '5474199c0f02e4ec1ea6062b2aa9fb48cdeab9ba4c895f236918aed43a18c070')
+
+prepare() {
+  patch -p0 -i "${srcdir}/python-3.7.patch"
+}
+
+build() {
+  cd $pkgname-$pkgver
+  # stringop-truncation will be fixes in swig, see 
https://github.com/swig/swig/issues/893
+  export CXXFLAGS+=" -Wno-misleading-indentation -Wno-dangling-else 
-Wno-stringop-truncation"
+  cmake . -DCMAKE_INSTALL_PREFIX="$pkgdir"/usr \
+       -DDEFAULT_DATA_DIR="/usr/share/canorus"
+}
+
+package() {
+  cd $pkgname-$pkgver
+  make install
+  install -d "$pkgdir"/usr/share/{applications,pixmaps}
+  cp canorus.desktop "$pkgdir"/usr/share/applications
+  cp "$pkgdir"/usr/share/{canorus/images/clogosm.png,pixmaps/canorus.png}
+}

Copied: canorus/repos/community-staging-x86_64/python-3.7.patch (from rev 
363378, canorus/trunk/python-3.7.patch)
===================================================================
--- community-staging-x86_64/python-3.7.patch                           (rev 0)
+++ community-staging-x86_64/python-3.7.patch   2018-07-25 12:34:09 UTC (rev 
363379)
@@ -0,0 +1,126 @@
+diff -ruN canorus-0.7.3rc3-orig/src/scripting/swigpython.cpp 
canorus-0.7.3rc3/src/scripting/swigpython.cpp
+--- canorus-0.7.3rc3-orig/src/scripting/swigpython.cpp 2018-07-25 
14:59:07.105433821 +0300
++++ canorus-0.7.3rc3/src/scripting/swigpython.cpp      2018-07-25 
15:01:53.615606426 +0300
+@@ -81,13 +81,14 @@
+     PyEval_ReleaseLock();
+ 
+        // my section with thread initialization
+-PyEval_AcquireLock();
++    PyThreadState *state = nullptr;
++PyEval_AcquireThread(state);
+     PyInterpreterState * mainInterpreterState = mainThreadState->interp;
+ 
+     pycliThreadState = PyThreadState_New(mainInterpreterState);
+     PyThreadState_Swap(mainThreadState);
+ 
+-PyEval_ReleaseLock();
++PyEval_ReleaseThread(state);
+ }
+ 
+ /*!
+@@ -136,7 +137,8 @@
+       QString moduleName = fileName.left(fileName.lastIndexOf(".py"));
+       moduleName = moduleName.remove(0, moduleName.lastIndexOf("/")+1);
+ 
+-      PyEval_AcquireLock();
++      PyThreadState *state = nullptr;
++      PyEval_AcquireThread(state);
+       
+       PyObject *pyModule;
+       if (autoReload) {
+@@ -152,11 +154,11 @@
+       } else {
+               pyModule = 
PyImport_ImportModule((char*)moduleName.toStdString().c_str());
+       }
+-      if (PyErr_Occurred()) { PyErr_Print(); PyEval_ReleaseLock(); return 
NULL; }
++      if (PyErr_Occurred()) { PyErr_Print(); PyEval_ReleaseThread(state); 
return NULL; }
+ 
+       // Get function object
+       PyObject *pyFunction = PyObject_GetAttrString(pyModule, 
(char*)function.toStdString().c_str());
+-      if (PyErr_Occurred()) { PyErr_Print(); PyEval_ReleaseLock(); return 
NULL; }
++      if (PyErr_Occurred()) { PyErr_Print(); PyEval_ReleaseThread(state); 
return NULL; }
+ 
+       // Call the actual function
+       PyObject *ret;
+@@ -164,7 +166,7 @@
+               ret = PyEval_CallObject(pyFunction, pyArgs);
+       else
+               ret = PyEval_CallObject(pyFunction, NULL);
+-      if (PyErr_Occurred()) { PyErr_Print(); PyEval_ReleaseLock(); return 
NULL; }
++      if (PyErr_Occurred()) { PyErr_Print(); PyEval_ReleaseThread(state); 
return NULL; }
+ 
+ //    Py_DECREF(pyFunction); // -Matevz
+ //    Py_DECREF(pyModule); // -Matevz
+@@ -172,7 +174,7 @@
+ //    for (int i=0; i<args.size(); i++)
+ //            Py_DECREF(args[i]); // -Matevz
+ 
+-    PyEval_ReleaseLock();
++    PyEval_ReleaseThread(state);
+       return ret;
+ }
+ 
+@@ -189,7 +191,8 @@
+ void *CASwigPython::callPycli(void*) {
+ 
+ 
+-    PyEval_AcquireLock();
++    PyThreadState *state = nullptr;
++    PyEval_AcquireThread(state);
+     PyThreadState_Swap(pycliThreadState);
+ 
+       QString fileName = thr_fileName;
+@@ -208,20 +211,20 @@
+ 
+       PyObject *pyModule = 
PyImport_ImportModule((char*)moduleName.toStdString().c_str());
+ 
+-      if (PyErr_Occurred()) { PyErr_Print(); PyEval_ReleaseLock(); return 
NULL; }
++      if (PyErr_Occurred()) { PyErr_Print(); PyEval_ReleaseThread(state); 
return NULL; }
+ 
+       // Get function object
+ 
+       //PyObject *pyFunction = PyObject_GetAttrString(pyModule, "pycli");
+       PyObject *pyFunction = PyObject_GetAttrString(pyModule, 
(char*)function.toStdString().c_str());
+ 
+-      if (PyErr_Occurred()) { PyErr_Print(); PyEval_ReleaseLock(); return 
NULL; }
++      if (PyErr_Occurred()) { PyErr_Print(); PyEval_ReleaseThread(state); 
return NULL; }
+ 
+       // Call the actual function
+       //
+       PyObject *ret;
+       ret = PyEval_CallObject(pyFunction, pyArgs);
+-      if (PyErr_Occurred()) { PyErr_Print(); PyEval_ReleaseLock(); return 
NULL; }
++      if (PyErr_Occurred()) { PyErr_Print(); PyEval_ReleaseThread(state); 
return NULL; }
+ 
+ //    Py_DECREF(pyFunction); // -Matevz
+ //    Py_DECREF(pyArgs); /// \todo Crashes if uncommented?!d
+@@ -231,7 +234,7 @@
+ 
+ 
+     PyThreadState_Swap(mainThreadState);
+-    PyEval_ReleaseLock();
++    PyEval_ReleaseThread(state);
+ 
+ //    pthread_exit((void*)NULL);
+     return ret;
+diff -ruN canorus-0.7.3rc3-orig/src/widgets/pyconsole.cpp 
canorus-0.7.3rc3/src/widgets/pyconsole.cpp
+--- canorus-0.7.3rc3-orig/src/widgets/pyconsole.cpp    2018-07-25 
15:07:33.211427602 +0300
++++ canorus-0.7.3rc3/src/widgets/pyconsole.cpp 2018-07-25 15:12:44.513167871 
+0300
+@@ -305,14 +305,15 @@
+ 
+ // blocking operation;
+ PyThreadState_Swap(CASwigPython::mainThreadState);
+-PyEval_ReleaseLock();
++PyEval_ReleaseThread(CASwigPython::mainThreadState);
+ 
+ //Py_BEGIN_ALLOW_THREADS
+       _thrWaitMut->lock();
+       _thrWait->wait(_thrWaitMut);
+ //Py_END_ALLOW_THREADS
+ 
+-PyEval_AcquireLock();
++PyThreadState *state = nullptr;
++PyEval_AcquireThread(state);
+ PyThreadState_Swap(CASwigPython::pycliThreadState);
+ 
+       QString *str = new QString(_bufSend);   //put contents of _bufSend into 
buffer \todo: synch

Reply via email to