diff options
Diffstat (limited to 'gnu/packages/patches')
41 files changed, 1245 insertions, 2492 deletions
diff --git a/gnu/packages/patches/avogadro-boost148.patch b/gnu/packages/patches/avogadro-boost148.patch deleted file mode 100644 index f244f14674..0000000000 --- a/gnu/packages/patches/avogadro-boost148.patch +++ /dev/null @@ -1,69 +0,0 @@ -Index: avogadro-1.2.0/libavogadro/src/pythonengine_p.h -=================================================================== ---- avogadro-1.2.0.orig/libavogadro/src/pythonengine_p.h -+++ avogadro-1.2.0/libavogadro/src/pythonengine_p.h -@@ -31,7 +31,9 @@ - - #include <avogadro/global.h> - #include <avogadro/engine.h> -+#ifndef Q_MOC_RUN - #include <boost/python.hpp> -+#endif - - namespace Avogadro { - -Index: avogadro-1.2.0/libavogadro/src/pythonextension_p.h -=================================================================== ---- avogadro-1.2.0.orig/libavogadro/src/pythonextension_p.h -+++ avogadro-1.2.0/libavogadro/src/pythonextension_p.h -@@ -33,7 +33,9 @@ - #include <avogadro/extension.h> - #include <avogadro/primitive.h> - #include <avogadro/glwidget.h> -+#ifndef Q_MOC_RUN - #include <boost/python.hpp> -+#endif - - #include <QWidget> - #include <QList> -Index: avogadro-1.2.0/libavogadro/src/pythontool_p.h -=================================================================== ---- avogadro-1.2.0.orig/libavogadro/src/pythontool_p.h -+++ avogadro-1.2.0/libavogadro/src/pythontool_p.h -@@ -31,7 +31,9 @@ - - #include <avogadro/global.h> - #include <avogadro/tool.h> -+#ifndef Q_MOC_RUN - #include <boost/python.hpp> -+#endif - - #include <QObject> - #include <QAction> -Index: avogadro-1.2.0/libavogadro/src/pythoninterpreter.h -=================================================================== ---- avogadro-1.2.0.orig/libavogadro/src/pythoninterpreter.h -+++ avogadro-1.2.0/libavogadro/src/pythoninterpreter.h -@@ -26,7 +26,9 @@ - #define PYTHONINTERPRETER_H - - #include <avogadro/global.h> -+#ifndef Q_MOC_RUN - #include <boost/python.hpp> -+#endif - #include <avogadro/primitive.h> - #include <QString> - -Index: avogadro-1.2.0/libavogadro/src/pythonscript.h -=================================================================== ---- avogadro-1.2.0.orig/libavogadro/src/pythonscript.h -+++ avogadro-1.2.0/libavogadro/src/pythonscript.h -@@ -27,6 +27,8 @@ - #define PYTHONSCRIPT_H - - #include <avogadro/global.h> -+#ifndef Q_MOC_RUN - #include <boost/python.hpp> -+#endif - - #include "pythonerror.h" diff --git a/gnu/packages/patches/avogadro-eigen3-update.patch b/gnu/packages/patches/avogadro-eigen3-update.patch deleted file mode 100644 index a5f669292f..0000000000 --- a/gnu/packages/patches/avogadro-eigen3-update.patch +++ /dev/null @@ -1,603 +0,0 @@ -From 43af3c117b0b3220b15c2fe2895b94bbd83d3a60 Mon Sep 17 00:00:00 2001 -From: Claudio Fernandes <claudiosf.claudio@gmail.com> -Date: Sun, 15 Jan 2017 21:23:39 -0200 -Subject: [PATCH] Adapt Avogadro to Eigen 3.3 - ---- - CMakeLists.txt | 9 +------ - avogadro/src/mainwindow.cpp | 5 ++-- - libavogadro/src/camera.cpp | 10 ++++---- - libavogadro/src/camera.h | 14 +++++------ - libavogadro/src/engines/wireengine.cpp | 4 ++-- - .../crystallography/crystallographyextension.cpp | 2 +- - .../crystallography/ui/ceviewoptionswidget.cpp | 2 +- - .../src/extensions/orca/orcaanalysedialog.cpp | 1 - - .../src/extensions/orca/orcainputdialog.cpp | 1 - - .../src/extensions/qtaim/qtaimmathutilities.cpp | 1 + - .../qtaim/qtaimwavefunctionevaluator.cpp | 28 +++++++++++----------- - .../extensions/surfaces/openqube/gamessukout.cpp | 1 + - .../src/extensions/surfaces/openqube/slaterset.cpp | 6 +++-- - libavogadro/src/glpainter_p.cpp | 14 +++++------ - libavogadro/src/glwidget.cpp | 4 ++-- - libavogadro/src/molecule.cpp | 26 ++++++++++++++++++-- - libavogadro/src/navigate.cpp | 2 +- - libavogadro/src/tools/bondcentrictool.cpp | 28 +++++++++++----------- - libavogadro/src/tools/manipulatetool.cpp | 17 +++++++------ - libavogadro/src/tools/navigatetool.cpp | 3 ++- - libavogadro/src/tools/skeletontree.cpp | 7 +++--- - libavogadro/src/tools/skeletontree.h | 2 +- - 22 files changed, 102 insertions(+), 85 deletions(-) - ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -231,14 +231,7 @@ if(NOT Linguist_FOUND) - message(WARNING " Qt4 Linguist not found, please install it if you want Avogadro translations") - endif() - --find_package(Eigen3) # find and setup Eigen3 if available --if(NOT EIGEN3_FOUND) -- message(STATUS "Cannot find Eigen3, trying Eigen2") -- find_package(Eigen2 REQUIRED) # Some version is required --else() --# Use Stage10 Eigen3 support -- set (EIGEN2_SUPPORT_STAGE10_FULL_EIGEN2_API TRUE) --endif() -+find_package(Eigen3 REQUIRED) # find and setup Eigen3 if available - - find_package(ZLIB REQUIRED) - find_package(OpenBabel2 REQUIRED) # find and setup OpenBabel ---- a/avogadro/src/mainwindow.cpp -+++ b/avogadro/src/mainwindow.cpp -@@ -115,7 +115,6 @@ - #include <QDebug> - - #include <Eigen/Geometry> --#include <Eigen/Array> - #define USEQUAT - // This is a "hidden" exported Qt function on the Mac for Qt-4.x. - #ifdef Q_WS_MAC -@@ -2775,7 +2774,7 @@ protected: - linearGoal.row(1) = linearGoal.row(2).cross(linearGoal.row(0)); - - // calculate the translation matrix -- Transform3d goal(linearGoal); -+ Projective3d goal(linearGoal); - - goal.pretranslate(- 3.0 * (d->glWidget->radius() + CAMERA_NEAR_DISTANCE) * Vector3d::UnitZ()); - -@@ -2840,7 +2839,7 @@ protected: - Matrix3d linearGoal = Matrix3d::Identity(); - - // calculate the translation matrix -- Transform3d goal(linearGoal); -+ Projective3d goal(linearGoal); - - goal.pretranslate(- 3.0 * (d->glWidget->radius() + CAMERA_NEAR_DISTANCE) * Vector3d::UnitZ()); - ---- a/libavogadro/src/camera.cpp -+++ b/libavogadro/src/camera.cpp -@@ -47,7 +47,7 @@ namespace Avogadro - - CameraPrivate() {}; - -- Eigen::Transform3d modelview, projection; -+ Eigen::Projective3d modelview, projection; - const GLWidget *parent; - double angleOfViewY; - double orthoScale; -@@ -169,20 +169,20 @@ namespace Avogadro - - double Camera::distance(const Eigen::Vector3d & point) const - { -- return ( d->modelview * point ).norm(); -+ return ( d->modelview * point.homogeneous() ).head<3>().norm(); - } - -- void Camera::setModelview(const Eigen::Transform3d &matrix) -+ void Camera::setModelview(const Eigen::Projective3d &matrix) - { - d->modelview = matrix; - } - -- const Eigen::Transform3d & Camera::modelview() const -+ const Eigen::Projective3d & Camera::modelview() const - { - return d->modelview; - } - -- Eigen::Transform3d & Camera::modelview() -+ Eigen::Projective3d & Camera::modelview() - { - return d->modelview; - } ---- a/libavogadro/src/camera.h -+++ b/libavogadro/src/camera.h -@@ -101,16 +101,16 @@ namespace Avogadro { - double angleOfViewY() const; - /** Sets 4x4 "modelview" matrix representing the camera orientation and position. - * @param matrix the matrix to copy from -- * @sa Eigen::Transform3d & modelview(), applyModelview() */ -- void setModelview(const Eigen::Transform3d &matrix); -+ * @sa Eigen::Projective3d & modelview(), applyModelview() */ -+ void setModelview(const Eigen::Projective3d &matrix); - /** @return a constant reference to the 4x4 "modelview" matrix representing - * the camera orientation and position -- * @sa setModelview(), Eigen::Transform3d & modelview() */ -- const Eigen::Transform3d & modelview() const; -+ * @sa setModelview(), Eigen::Projective3d & modelview() */ -+ const Eigen::Projective3d & modelview() const; - /** @return a non-constant reference to the 4x4 "modelview" matrix representing - * the camera orientation and position -- * @sa setModelview(), const Eigen::Transform3d & modelview() const */ -- Eigen::Transform3d & modelview(); -+ * @sa setModelview(), const Eigen::Projective3d & modelview() const */ -+ Eigen::Projective3d & modelview(); - /** Calls gluPerspective() or glOrtho() with parameters automatically chosen - * for rendering the GLWidget's molecule with this camera. Should be called - * only in GL_PROJECTION matrix mode. Example code is given -@@ -342,7 +342,7 @@ namespace Avogadro { - * @return {x/w, y/w, z/w} vector - */ - Eigen::Vector3d V4toV3DivW(const Eigen::Vector4d & v4) { -- return v4.start<3>()/v4.w(); -+ return v4.head<3>()/v4.w(); - } - }; - ---- a/libavogadro/src/engines/wireengine.cpp -+++ b/libavogadro/src/engines/wireengine.cpp -@@ -109,7 +109,7 @@ namespace Avogadro { - const Camera *camera = pd->camera(); - - // perform a rough form of frustum culling -- Eigen::Vector3d transformedPos = pd->camera()->modelview() * v; -+ Eigen::Vector3d transformedPos = (pd->camera()->modelview() * v.homogeneous()).head<3>(); - double dot = transformedPos.z() / transformedPos.norm(); - if(dot > -0.8) - return true; -@@ -167,7 +167,7 @@ namespace Avogadro { - map = pd->colorMap(); // fall back to global color map - - // perform a rough form of frustum culling -- Eigen::Vector3d transformedEnd1 = pd->camera()->modelview() * v1; -+ Eigen::Vector3d transformedEnd1 = (pd->camera()->modelview() * v1.homogeneous()).head<3>(); - double dot = transformedEnd1.z() / transformedEnd1.norm(); - if(dot > -0.8) - return true; // i.e., don't bother rendering ---- a/libavogadro/src/extensions/crystallography/crystallographyextension.cpp -+++ b/libavogadro/src/extensions/crystallography/crystallographyextension.cpp -@@ -1989,7 +1989,7 @@ namespace Avogadro - // fix coordinates - // Apply COB matrix: - Eigen::Matrix3d invCob; -- cob.computeInverse(&invCob); -+ invCob = cob.inverse(); - for (QList<Eigen::Vector3d>::iterator - it = fcoords.begin(), - it_end = fcoords.end(); ---- a/libavogadro/src/extensions/crystallography/ui/ceviewoptionswidget.cpp -+++ b/libavogadro/src/extensions/crystallography/ui/ceviewoptionswidget.cpp -@@ -139,7 +139,7 @@ namespace Avogadro - { - // View into a Miller plane - Camera *camera = m_glWidget->camera(); -- Eigen::Transform3d modelView; -+ Eigen::Projective3d modelView; - modelView.setIdentity(); - - // OK, so we want to rotate to look along the normal at the plane ---- a/libavogadro/src/extensions/orca/orcaanalysedialog.cpp -+++ b/libavogadro/src/extensions/orca/orcaanalysedialog.cpp -@@ -41,7 +41,6 @@ - #include <openbabel/mol.h> - - #include <Eigen/Geometry> --#include <Eigen/LeastSquares> - - #include <vector> - ---- a/libavogadro/src/extensions/orca/orcainputdialog.cpp -+++ b/libavogadro/src/extensions/orca/orcainputdialog.cpp -@@ -33,7 +33,6 @@ - #include <openbabel/mol.h> - - #include <Eigen/Geometry> --#include <Eigen/LeastSquares> - - #include <vector> - ---- a/libavogadro/src/extensions/qtaim/qtaimmathutilities.cpp -+++ b/libavogadro/src/extensions/qtaim/qtaimmathutilities.cpp -@@ -28,6 +28,7 @@ - - #include <cmath> - #include <Eigen/QR> -+#include <Eigen/Eigenvalues> - - namespace Avogadro { - namespace QTAIMMathUtilities { ---- a/libavogadro/src/extensions/qtaim/qtaimwavefunctionevaluator.cpp -+++ b/libavogadro/src/extensions/qtaim/qtaimwavefunctionevaluator.cpp -@@ -35,21 +35,21 @@ namespace Avogadro - m_nprim=wfn.numberOfGaussianPrimitives(); - m_nnuc=wfn.numberOfNuclei(); - -- m_nucxcoord=Map<Matrix<qreal,Dynamic,1> >(wfn.xNuclearCoordinates(),m_nnuc); -- m_nucycoord=Map<Matrix<qreal,Dynamic,1> >(wfn.yNuclearCoordinates(),m_nnuc); -- m_nuczcoord=Map<Matrix<qreal,Dynamic,1> >(wfn.zNuclearCoordinates(),m_nnuc); -- m_nucz=Map<Matrix<qint64,Dynamic,1> >(wfn.nuclearCharges(),m_nnuc); -- m_X0=Map<Matrix<qreal,Dynamic,1> >(wfn.xGaussianPrimitiveCenterCoordinates(),m_nprim,1); -- m_Y0=Map<Matrix<qreal,Dynamic,1> >(wfn.yGaussianPrimitiveCenterCoordinates(),m_nprim,1); -- m_Z0=Map<Matrix<qreal,Dynamic,1> >(wfn.zGaussianPrimitiveCenterCoordinates(),m_nprim,1); -- m_xamom=Map<Matrix<qint64,Dynamic,1> >(wfn.xGaussianPrimitiveAngularMomenta(),m_nprim,1); -- m_yamom=Map<Matrix<qint64,Dynamic,1> >(wfn.yGaussianPrimitiveAngularMomenta(),m_nprim,1); -- m_zamom=Map<Matrix<qint64,Dynamic,1> >(wfn.zGaussianPrimitiveAngularMomenta(),m_nprim,1); -- m_alpha=Map<Matrix<qreal,Dynamic,1> >(wfn.gaussianPrimitiveExponentCoefficients(),m_nprim,1); -+ m_nucxcoord=Map<Matrix<qreal,Dynamic,1> >(const_cast<qreal*>(wfn.xNuclearCoordinates()),m_nnuc); -+ m_nucycoord=Map<Matrix<qreal,Dynamic,1> >(const_cast<qreal*>(wfn.yNuclearCoordinates()),m_nnuc); -+ m_nuczcoord=Map<Matrix<qreal,Dynamic,1> >(const_cast<qreal*>(wfn.zNuclearCoordinates()),m_nnuc); -+ m_nucz=Map<Matrix<qint64,Dynamic,1> >(const_cast<qint64*>(wfn.nuclearCharges()),m_nnuc); -+ m_X0=Map<Matrix<qreal,Dynamic,1> >(const_cast<qreal*>(wfn.xGaussianPrimitiveCenterCoordinates()),m_nprim,1); -+ m_Y0=Map<Matrix<qreal,Dynamic,1> >(const_cast<qreal*>(wfn.yGaussianPrimitiveCenterCoordinates()),m_nprim,1); -+ m_Z0=Map<Matrix<qreal,Dynamic,1> >(const_cast<qreal*>(wfn.zGaussianPrimitiveCenterCoordinates()),m_nprim,1); -+ m_xamom=Map<Matrix<qint64,Dynamic,1> >(const_cast<qint64*>(wfn.xGaussianPrimitiveAngularMomenta()),m_nprim,1); -+ m_yamom=Map<Matrix<qint64,Dynamic,1> >(const_cast<qint64*>(wfn.yGaussianPrimitiveAngularMomenta()),m_nprim,1); -+ m_zamom=Map<Matrix<qint64,Dynamic,1> >(const_cast<qint64*>(wfn.zGaussianPrimitiveAngularMomenta()),m_nprim,1); -+ m_alpha=Map<Matrix<qreal,Dynamic,1> >(const_cast<qreal*>(wfn.gaussianPrimitiveExponentCoefficients()),m_nprim,1); - // TODO Implement screening for unoccupied molecular orbitals. -- m_occno=Map<Matrix<qreal,Dynamic,1> >(wfn.molecularOrbitalOccupationNumbers(),m_nmo,1); -- m_orbe=Map<Matrix<qreal,Dynamic,1> >(wfn.molecularOrbitalEigenvalues(),m_nmo,1); -- m_coef=Map<Matrix<qreal,Dynamic,Dynamic,RowMajor> >(wfn.molecularOrbitalCoefficients(),m_nmo,m_nprim); -+ m_occno=Map<Matrix<qreal,Dynamic,1> >(const_cast<qreal*>(wfn.molecularOrbitalOccupationNumbers()),m_nmo,1); -+ m_orbe=Map<Matrix<qreal,Dynamic,1> >(const_cast<qreal*>(wfn.molecularOrbitalEigenvalues()),m_nmo,1); -+ m_coef=Map<Matrix<qreal,Dynamic,Dynamic,RowMajor> >(const_cast<qreal*>(wfn.molecularOrbitalCoefficients()),m_nmo,m_nprim); - m_totalEnergy=wfn.totalEnergy(); - m_virialRatio=wfn.virialRatio(); - ---- a/libavogadro/src/extensions/surfaces/openqube/gamessukout.cpp -+++ b/libavogadro/src/extensions/surfaces/openqube/gamessukout.cpp -@@ -19,6 +19,7 @@ - using Eigen::Vector3d; - using std::vector; - -+#include <iostream> - #include <fstream> - - namespace OpenQube ---- a/libavogadro/src/extensions/surfaces/openqube/slaterset.cpp -+++ b/libavogadro/src/extensions/surfaces/openqube/slaterset.cpp -@@ -25,9 +25,9 @@ - - #include "cube.h" - --#include <Eigen/Array> - #include <Eigen/LU> - #include <Eigen/QR> -+#include <Eigen/Eigenvalues> - - #include <cmath> - -@@ -250,7 +250,9 @@ bool SlaterSet::initialize() - - SelfAdjointEigenSolver<MatrixXd> s(m_overlap); - MatrixXd p = s.eigenvectors(); -- MatrixXd m = p * s.eigenvalues().cwise().inverse().cwise().sqrt().asDiagonal() * p.inverse(); -+ // TODO check if this is correct -+ MatrixXd m1 = (s.eigenvalues().array().inverse().sqrt()); -+ MatrixXd m = p.array()*(m1.diagonal().array())*p.inverse().array(); - m_normalized = m * m_eigenVectors; - - if (!(m_overlap*m*m).isIdentity()) ---- a/libavogadro/src/glpainter_p.cpp -+++ b/libavogadro/src/glpainter_p.cpp -@@ -789,13 +789,13 @@ namespace Avogadro - } else { - points[theta-1] = Eigen::AngleAxisd(theta * (M_PI / 180.0) / 2, n) * u; - } -- points[theta-1] = d->widget->camera()->modelview() * (origin + points[theta-1]); -+ points[theta-1] = (d->widget->camera()->modelview() * (origin + points[theta-1]).homogeneous()).head<3>(); - } - - // Get vectors representing the points' positions in terms of the model view. -- Eigen::Vector3d _origin = d->widget->camera()->modelview() * origin; -- Eigen::Vector3d _direction1 = d->widget->camera()->modelview() * (origin+u); -- Eigen::Vector3d _direction2 = d->widget->camera()->modelview() * (origin+v); -+ Eigen::Vector3d _origin = (d->widget->camera()->modelview() * origin.homogeneous()).head<3>(); -+ Eigen::Vector3d _direction1 = (d->widget->camera()->modelview() * (origin+u).homogeneous()).head<3>(); -+ Eigen::Vector3d _direction2 = (d->widget->camera()->modelview() * (origin+v).homogeneous()).head<3>(); - - glPushAttrib(GL_ALL_ATTRIB_BITS); - glPushMatrix(); -@@ -880,12 +880,12 @@ namespace Avogadro - } else { - points[theta-1] = Eigen::AngleAxisd(theta * (M_PI / 180.0) / 2, n) * u; - } -- points[theta-1] = d->widget->camera()->modelview() * (origin + points[theta-1]); -+ points[theta-1] = (d->widget->camera()->modelview() * (origin + points[theta-1]).homogeneous()).head<3>(); - } - - // Get vectors representing the points' positions in terms of the model view. -- Eigen::Vector3d _direction1 = d->widget->camera()->modelview() * (origin + u); -- Eigen::Vector3d _direction2 = d->widget->camera()->modelview() * (origin + v); -+ Eigen::Vector3d _direction1 = (d->widget->camera()->modelview() * (origin + u).homogeneous()).head<3>(); -+ Eigen::Vector3d _direction2 = (d->widget->camera()->modelview() * (origin + v).homogeneous()).head<3>(); - - glPushAttrib(GL_ALL_ATTRIB_BITS); - glPushMatrix(); ---- a/libavogadro/src/glwidget.cpp -+++ b/libavogadro/src/glwidget.cpp -@@ -765,7 +765,7 @@ namespace Avogadro { - GLfloat fogColor[4]= {static_cast<GLfloat>(d->background.redF()), static_cast<GLfloat>(d->background.greenF()), - static_cast<GLfloat>(d->background.blueF()), static_cast<GLfloat>(d->background.alphaF())}; - glFogfv(GL_FOG_COLOR, fogColor); -- Vector3d distance = camera()->modelview() * d->center; -+ Vector3d distance = (camera()->modelview() * d->center.homogeneous()).head<3>(); - double distanceToCenter = distance.norm(); - glFogf(GL_FOG_DENSITY, 1.0); - glHint(GL_FOG_HINT, GL_NICEST); -@@ -1711,7 +1711,7 @@ namespace Avogadro { - - if (d->renderModelViewDebug) { - // Model view matrix: -- const Eigen::Transform3d &modelview = d->camera->modelview(); -+ const Eigen::Projective3d &modelview = d->camera->modelview(); - y += d->pd->painter()->drawText - (x, y, tr("ModelView row 1: %L1 %L2 %L3 %L4") - .arg(modelview(0, 0), 6, 'f', 2, ' ') ---- a/libavogadro/src/molecule.cpp -+++ b/libavogadro/src/molecule.cpp -@@ -38,7 +38,7 @@ - #include "zmatrix.h" - - #include <Eigen/Geometry> --#include <Eigen/LeastSquares> -+#include <Eigen/Eigenvalues> - - #include <vector> - -@@ -1907,7 +1907,29 @@ namespace Avogadro{ - } - d->center /= static_cast<double>(nAtoms); - Eigen::Hyperplane<double, 3> planeCoeffs; -- Eigen::fitHyperplane(numAtoms(), atomPositions, &planeCoeffs); -+ //Eigen::fitHyperplane(numAtoms(), atomPositions, &planeCoeffs); -+ -+ // TODO check if this is OK -+ /************************/ -+ typedef Eigen::Matrix<double,3,3> CovMatrixType; -+ typedef Eigen::Vector3d VectorType; -+ -+ VectorType mean = d->center; -+ int size=3; -+ int numPoints=numAtoms(); -+ VectorType ** points=atomPositions; -+ CovMatrixType covMat = CovMatrixType::Zero(size, size); -+ VectorType remean = VectorType::Zero(size); -+ for(int i = 0; i < numPoints; ++i) -+ { -+ VectorType diff = (*(points[i]) - mean).conjugate(); -+ covMat += diff * diff.adjoint(); -+ } -+ Eigen::SelfAdjointEigenSolver<CovMatrixType> eig(covMat); -+ planeCoeffs.normal() = eig.eigenvectors().col(0); -+ /************************/ -+ -+ - delete[] atomPositions; - d->normalVector = planeCoeffs.normal(); - } ---- a/libavogadro/src/navigate.cpp -+++ b/libavogadro/src/navigate.cpp -@@ -40,7 +40,7 @@ namespace Avogadro { - void Navigate::zoom(GLWidget *widget, const Eigen::Vector3d &goal, - double delta) - { -- Vector3d transformedGoal = widget->camera()->modelview() * goal; -+ Vector3d transformedGoal = (widget->camera()->modelview() * goal.homogeneous()).head<3>(); - double distanceToGoal = transformedGoal.norm(); - - double t = ZOOM_SPEED * delta; ---- a/libavogadro/src/tools/bondcentrictool.cpp -+++ b/libavogadro/src/tools/bondcentrictool.cpp -@@ -578,8 +578,8 @@ namespace Avogadro { - - Vector3d clicked = *m_clickedAtom->pos(); - -- Vector3d axis = Vector3d(0, 0, ((widget->camera()->modelview() * other).z() >= -- (widget->camera()->modelview() * center).z() ? -1 : 1)); -+ Vector3d axis = Vector3d(0, 0, ((widget->camera()->modelview() * other.homogeneous()).z() >= -+ (widget->camera()->modelview() * center.homogeneous()).z() ? -1 : 1)); - - Vector3d centerProj = widget->camera()->project(center); - centerProj -= Vector3d(0,0,centerProj.z()); -@@ -673,8 +673,8 @@ namespace Avogadro { - - Vector3d clicked = *m_clickedAtom->pos(); - -- Vector3d axis = Vector3d(0, 0, ((widget->camera()->modelview() * other).z() >= -- (widget->camera()->modelview() * center).z() ? -1 : 1)); -+ Vector3d axis = Vector3d(0, 0, ((widget->camera()->modelview() * other.homogeneous()).z() >= -+ (widget->camera()->modelview() * center.homogeneous()).z() ? -1 : 1)); - - Vector3d centerProj = widget->camera()->project(center); - centerProj -= Vector3d(0,0,centerProj.z()); -@@ -1362,10 +1362,10 @@ namespace Avogadro { - - planeVec = length * (planeVec / planeVec.norm()); - -- Vector3d topLeft = widget->camera()->modelview() * (left + planeVec); -- Vector3d topRight = widget->camera()->modelview() * (right + planeVec); -- Vector3d botRight = widget->camera()->modelview() * (right - planeVec); -- Vector3d botLeft = widget->camera()->modelview() * (left - planeVec); -+ Vector3d topLeft = (widget->camera()->modelview() * (left + planeVec).homogeneous()).head<3>(); -+ Vector3d topRight = (widget->camera()->modelview() * (right + planeVec).homogeneous()).head<3>(); -+ Vector3d botRight = (widget->camera()->modelview() * (right - planeVec).homogeneous()).head<3>(); -+ Vector3d botLeft = (widget->camera()->modelview() * (left - planeVec).homogeneous()).head<3>(); - - float alpha = 0.4; - double lineWidth = 1.5; -@@ -1444,10 +1444,10 @@ namespace Avogadro { - C = D + ((C-D).normalized() * minWidth); - } - -- Vector3d topLeft = widget->camera()->modelview() * D; -- Vector3d topRight = widget->camera()->modelview() * C; -- Vector3d botRight = widget->camera()->modelview() * B; -- Vector3d botLeft = widget->camera()->modelview() * A; -+ Vector3d topLeft = (widget->camera()->modelview() * D.homogeneous()).head<3>(); -+ Vector3d topRight = (widget->camera()->modelview() * C.homogeneous()).head<3>(); -+ Vector3d botRight = (widget->camera()->modelview() * B.homogeneous()).head<3>(); -+ Vector3d botLeft = (widget->camera()->modelview() * A.homogeneous()).head<3>(); - - float alpha = 0.4; - double lineWidth = 1.5; -@@ -1506,12 +1506,12 @@ namespace Avogadro { - Vector3d positionVector) - { - //Rotate skeleton around a particular axis and center point -- Eigen::Transform3d rotation; -+ Eigen::Projective3d rotation; - rotation = Eigen::AngleAxisd(angle, rotationVector); - rotation.pretranslate(centerVector); - rotation.translate(-centerVector); - -- return rotation*positionVector; -+ return (rotation*positionVector.homogeneous()).head<3>(); - } - - // ########## showAnglesChanged ########## ---- a/libavogadro/src/tools/manipulatetool.cpp -+++ b/libavogadro/src/tools/manipulatetool.cpp -@@ -40,7 +40,6 @@ - #include <QAbstractButton> - - using Eigen::Vector3d; --using Eigen::Transform3d; - using Eigen::AngleAxisd; - - namespace Avogadro { -@@ -138,7 +137,7 @@ namespace Avogadro { - double yRotate = m_settingsWidget->yRotateSpinBox->value() * DEG_TO_RAD; - double zRotate = m_settingsWidget->zRotateSpinBox->value() * DEG_TO_RAD; - -- Eigen::Transform3d rotation; -+ Eigen::Projective3d rotation; - rotation.matrix().setIdentity(); - rotation.translation() = center; - rotation.rotate(AngleAxisd(xRotate, Vector3d::UnitX()) -@@ -152,12 +151,12 @@ namespace Avogadro { - if (p->type() == Primitive::AtomType) { - Atom *atom = static_cast<Atom*>(p); - tempPos = translate + *(atom->pos()); -- atom->setPos(rotation * tempPos); -+ atom->setPos((rotation * tempPos.homogeneous()).head<3>()); - } - } else { - foreach(Atom *atom, widget->molecule()->atoms()) { - tempPos = translate + *(atom->pos()); -- atom->setPos(rotation * tempPos); -+ atom->setPos((rotation * tempPos.homogeneous()).head<3>()); - } - } - -@@ -199,7 +198,7 @@ namespace Avogadro { - widget->setCursor(Qt::SizeVerCursor); - - // Move the selected atom(s) in to or out of the screen -- Vector3d transformedGoal = widget->camera()->modelview() * *goal; -+ Vector3d transformedGoal = (widget->camera()->modelview() * goal->homogeneous()).head<3>(); - double distanceToGoal = transformedGoal.norm(); - - double t = ZOOM_SPEED * delta; -@@ -255,7 +254,7 @@ namespace Avogadro { - - // Rotate the selected atoms about the center - // rotate only selected primitives -- Transform3d fragmentRotation; -+ Eigen::Projective3d fragmentRotation; - fragmentRotation.matrix().setIdentity(); - fragmentRotation.translation() = *center; - fragmentRotation.rotate( -@@ -266,7 +265,7 @@ namespace Avogadro { - - foreach(Primitive *p, widget->selectedPrimitives()) - if (p->type() == Primitive::AtomType) -- static_cast<Atom *>(p)->setPos(fragmentRotation * *static_cast<Atom *>(p)->pos()); -+ static_cast<Atom *>(p)->setPos((fragmentRotation * static_cast<Atom *>(p)->pos()->homogeneous()).head<3>()); - widget->molecule()->update(); - } - -@@ -274,7 +273,7 @@ namespace Avogadro { - double delta) const - { - // Tilt the selected atoms about the center -- Transform3d fragmentRotation; -+ Eigen::Projective3d fragmentRotation; - fragmentRotation.matrix().setIdentity(); - fragmentRotation.translation() = *center; - fragmentRotation.rotate(AngleAxisd(delta * ROTATION_SPEED, widget->camera()->backTransformedZAxis())); -@@ -282,7 +281,7 @@ namespace Avogadro { - - foreach(Primitive *p, widget->selectedPrimitives()) - if (p->type() == Primitive::AtomType) -- static_cast<Atom *>(p)->setPos(fragmentRotation * *static_cast<Atom *>(p)->pos()); -+ static_cast<Atom *>(p)->setPos((fragmentRotation * static_cast<Atom *>(p)->pos()->homogeneous()).head<3>()); - widget->molecule()->update(); - } - ---- a/libavogadro/src/tools/navigatetool.cpp -+++ b/libavogadro/src/tools/navigatetool.cpp -@@ -92,7 +92,8 @@ namespace Avogadro { - double sumOfWeights = 0.; - QList<Atom*> atoms = widget->molecule()->atoms(); - foreach (Atom *atom, atoms) { -- Vector3d transformedAtomPos = widget->camera()->modelview() * *atom->pos(); -+ Vector3d transformedAtomPos = (widget->camera()->modelview() * -+ atom->pos()->homogeneous()).head<3>(); - double atomDistance = transformedAtomPos.norm(); - double dot = transformedAtomPos.z() / atomDistance; - double weight = exp(-30. * (1. + dot)); ---- a/libavogadro/src/tools/skeletontree.cpp -+++ b/libavogadro/src/tools/skeletontree.cpp -@@ -29,6 +29,7 @@ - #include <avogadro/atom.h> - #include <avogadro/bond.h> - #include <avogadro/molecule.h> -+#include <iostream> - - using namespace Eigen; - using namespace std; -@@ -221,7 +222,7 @@ namespace Avogadro { - { - if (m_rootNode) { - //Rotate skeleton around a particular axis and center point -- Eigen::Transform3d rotation; -+ Eigen::Projective3d rotation; - rotation = Eigen::AngleAxisd(angle, rotationAxis); - rotation.pretranslate(centerVector); - rotation.translate(-centerVector); -@@ -248,11 +249,11 @@ namespace Avogadro { - // ########## recursiveRotate ########## - - void SkeletonTree::recursiveRotate(Node* n, -- const Eigen::Transform3d &rotationMatrix) -+ const Eigen::Projective3d &rotationMatrix) - { - // Update the root node with the new position - Atom* a = n->atom(); -- a->setPos(rotationMatrix * (*a->pos())); -+ a->setPos((rotationMatrix * (*a->pos()).homogeneous()).head<3>()); - a->update(); - - // Now update the children ---- a/libavogadro/src/tools/skeletontree.h -+++ b/libavogadro/src/tools/skeletontree.h -@@ -230,6 +230,6 @@ namespace Avogadro { - * @param centerVector Center location to rotate around. - */ - void recursiveRotate(Node* n, -- const Eigen::Transform3d &rotationMatrix); -+ const Eigen::Projective3d &rotationMatrix); - - }; - } // End namespace Avogadro
\ No newline at end of file diff --git a/gnu/packages/patches/avogadro-python-eigen-lib.patch b/gnu/packages/patches/avogadro-python-eigen-lib.patch deleted file mode 100644 index ac9f2e30af..0000000000 --- a/gnu/packages/patches/avogadro-python-eigen-lib.patch +++ /dev/null @@ -1,161 +0,0 @@ -From 2d4be7ede177a8df7340fe3b209698d591ee8a04 Mon Sep 17 00:00:00 2001 -From: Claudio Fernandes <claudiosf.claudio@gmail.com> -Date: Mon, 16 Jan 2017 19:48:23 -0200 -Subject: [PATCH] Adapt libavogadro/python to Eigen 3.3 - ---- - libavogadro/src/python/camera.cpp | 2 +- - libavogadro/src/python/eigen.cpp | 60 +++++++++++++++++++-------------------- - 2 files changed, 31 insertions(+), 31 deletions(-) - -diff --git a/libavogadro/src/python/camera.cpp b/libavogadro/src/python/camera.cpp -index 69ca87bf8..30b32af7d 100644 ---- a/libavogadro/src/python/camera.cpp -+++ b/libavogadro/src/python/camera.cpp -@@ -10,7 +10,7 @@ using namespace Avogadro; - void export_Camera() - { - -- const Eigen::Transform3d& (Camera::*modelview_ptr)() const = &Camera::modelview; -+ const Eigen::Projective3d& (Camera::*modelview_ptr)() const = &Camera::modelview; - Eigen::Vector3d (Camera::*unProject_ptr1)(const Eigen::Vector3d&) const = &Camera::unProject; - Eigen::Vector3d (Camera::*unProject_ptr2)(const QPoint&, const Eigen::Vector3d&) const = &Camera::unProject; - Eigen::Vector3d (Camera::*unProject_ptr3)(const QPoint&) const = &Camera::unProject; -diff --git a/libavogadro/src/python/eigen.cpp b/libavogadro/src/python/eigen.cpp -index c1faedbcc..20b4e719d 100644 ---- a/libavogadro/src/python/eigen.cpp -+++ b/libavogadro/src/python/eigen.cpp -@@ -305,9 +305,9 @@ template <> struct ScalarTraits<double> - struct innerclass - { - // -- // Eigen::Transform3d --> python array (4x4) -+ // Eigen::Projective3d --> python array (4x4) - // -- static PyObject* convert(Eigen::Transform3d const &trans) -+ static PyObject* convert(Eigen::Projective3d const &trans) - { - npy_intp dims[2] = { 4, 4 }; - PyObject *result = PyArray_SimpleNew(2, dims, PyArray_DOUBLE); -@@ -321,9 +321,9 @@ template <> struct ScalarTraits<double> - return incref(result); - } - // -- // Eigen::Transform3d* --> python array (4x4) -+ // Eigen::Projective3d* --> python array (4x4) - // -- static PyObject* convert(Eigen::Transform3d *trans) -+ static PyObject* convert(Eigen::Projective3d *trans) - { - npy_intp dims[2] = { 4, 4 }; - PyObject *result = PyArray_SimpleNew(2, dims, PyArray_DOUBLE); -@@ -337,9 +337,9 @@ template <> struct ScalarTraits<double> - return incref(result); - } - // -- // const Eigen::Transform3d* --> python array (4x4) -+ // const Eigen::Projective3d* --> python array (4x4) - // -- static PyObject* convert(const Eigen::Transform3d *trans) -+ static PyObject* convert(const Eigen::Projective3d *trans) - { - npy_intp dims[2] = { 4, 4 }; - PyObject *result = PyArray_SimpleNew(2, dims, PyArray_DOUBLE); -@@ -358,10 +358,10 @@ template <> struct ScalarTraits<double> - Transform3d_to_python_array() - { - #ifndef WIN32 -- to_python_converter<Eigen::Transform3d, innerclass>(); -+ to_python_converter<Eigen::Projective3d, innerclass>(); - #endif -- to_python_converter<Eigen::Transform3d*, innerclass>(); -- to_python_converter<const Eigen::Transform3d*, innerclass>(); -+ to_python_converter<Eigen::Projective3d*, innerclass>(); -+ to_python_converter<const Eigen::Projective3d*, innerclass>(); - } - - }; -@@ -373,17 +373,17 @@ template <> struct ScalarTraits<double> - // Insert an rvalue from_python converter at the tail of the - // chain. Used for implicit conversions - // -- // python array --> Eigen::Transform3d -+ // python array --> Eigen::Projective3d - // - // used for: - // -- // void function(Eigen::Transform3d vec) -- // void function(Eigen::Transform3d & vec) -- // void function(const Eigen::Transform3d & vec) -+ // void function(Eigen::Projective3d vec) -+ // void function(Eigen::Projective3d & vec) -+ // void function(const Eigen::Projective3d & vec) - // -- converter::registry::push_back( &convertible, &construct, type_id<Eigen::Transform3d>() ); -+ converter::registry::push_back( &convertible, &construct, type_id<Eigen::Projective3d>() ); - -- converter::registry::insert( &convert, type_id<Eigen::Transform3d>() ); -+ converter::registry::insert( &convert, type_id<Eigen::Projective3d>() ); - } - - static void* convert(PyObject *obj_ptr) -@@ -401,7 +401,7 @@ template <> struct ScalarTraits<double> - throw_error_already_set(); // the 1D array does not have exactly 3 elements - - double *values = reinterpret_cast<double*>(array->data); -- Eigen::Transform3d *c_obj = new Eigen::Transform3d(); -+ Eigen::Projective3d *c_obj = new Eigen::Projective3d(); - double *dataPtr = c_obj->data(); - - for (int i = 0; i < 16; ++i) -@@ -432,7 +432,7 @@ template <> struct ScalarTraits<double> - // I think this is a better way to get at the double array, where is this - // deleted though? Does Boost::Python do it? - double *values = reinterpret_cast<double*>(array->data); -- Eigen::Transform3d *storage = new Eigen::Transform3d(); -+ Eigen::Projective3d *storage = new Eigen::Projective3d(); - double *dataPtr = storage->data(); - - for (int i = 0; i < 16; ++i) -@@ -467,21 +467,21 @@ class EigenUnitTestHelper - void set_vector3d_ptr(Eigen::Vector3d* vec) { m_vector3d = *vec; } - void set_const_vector3d_ptr(const Eigen::Vector3d* const vec) { m_vector3d = *vec; } - -- //Eigen::Transform3d transform3d() { return m_transform3d; } -- //Eigen::Transform3d& transform3d_ref() { return m_transform3d; } -- const Eigen::Transform3d& const_transform3d_ref() { return m_transform3d; } -- Eigen::Transform3d* transform3d_ptr() { return &m_transform3d; } -- const Eigen::Transform3d* const_transform3d_ptr() { return &m_transform3d; } -- -- //void set_transform3d(Eigen::Transform3d vec) { m_transform3d = vec; } -- //void set_transform3d_ref(Eigen::Transform3d& vec) { m_transform3d = vec; } -- void set_const_transform3d_ref(const Eigen::Transform3d& vec) { m_transform3d = vec; } -- void set_transform3d_ptr(Eigen::Transform3d* vec) { m_transform3d = *vec; } -- void set_const_transform3d_ptr(const Eigen::Transform3d* const vec) { m_transform3d = *vec; } -+ //Eigen::Projective3d transform3d() { return m_transform3d; } -+ //Eigen::Projective3d& transform3d_ref() { return m_transform3d; } -+ const Eigen::Projective3d& const_transform3d_ref() { return m_transform3d; } -+ Eigen::Projective3d* transform3d_ptr() { return &m_transform3d; } -+ const Eigen::Projective3d* const_transform3d_ptr() { return &m_transform3d; } -+ -+ //void set_transform3d(Eigen::Projective3d vec) { m_transform3d = vec; } -+ //void set_transform3d_ref(Eigen::Projective3d& vec) { m_transform3d = vec; } -+ void set_const_transform3d_ref(const Eigen::Projective3d& vec) { m_transform3d = vec; } -+ void set_transform3d_ptr(Eigen::Projective3d* vec) { m_transform3d = *vec; } -+ void set_const_transform3d_ptr(const Eigen::Projective3d* const vec) { m_transform3d = *vec; } - - private: - Eigen::Vector3d m_vector3d; -- Eigen::Transform3d m_transform3d; -+ Eigen::Projective3d m_transform3d; - - }; - #endif -@@ -529,6 +529,6 @@ void export_Eigen() - Vector3x_to_python_array<Eigen::Vector3i>(); - Vector3x_from_python_array<Eigen::Vector3i>(); - -- // Eigen::Transform3d -+ // Eigen::Projective3d - Transform3d_to_python_array(); - Transform3d_from_python_array(); diff --git a/gnu/packages/patches/c++-gsl-find-system-gtest.patch b/gnu/packages/patches/c++-gsl-find-system-gtest.patch new file mode 100644 index 0000000000..2def650292 --- /dev/null +++ b/gnu/packages/patches/c++-gsl-find-system-gtest.patch @@ -0,0 +1,96 @@ +From f5cf01083baf7e8dc8318db3648bc6098dc32d67 Mon Sep 17 00:00:00 2001 +From: Nicholas Guriev <guriev-ns@ya.ru> +Date: Sat, 18 Apr 2020 13:30:17 +0300 +Subject: [PATCH] Search for GoogleTest via pkg-config first + +--- + tests/CMakeLists.txt | 55 ++++++++++++++++++++++++-------------------- + 1 file changed, 30 insertions(+), 25 deletions(-) + +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index 02193197..53d475c2 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -1,36 +1,41 @@ + cmake_minimum_required(VERSION 3.0.2) + + project(GSLTests CXX) ++include(FindPkgConfig) + + # will make visual studio generated project group files + set_property(GLOBAL PROPERTY USE_FOLDERS ON) + +-configure_file(CMakeLists.txt.in googletest-download/CMakeLists.txt) +-execute_process( +- COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" . +- RESULT_VARIABLE result +- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download +-) +-if(result) +- message(FATAL_ERROR "CMake step for googletest failed: ${result}") +-endif() ++pkg_search_module(GTestMain gtest_main) ++if (NOT GTestMain_FOUND) ++ configure_file(CMakeLists.txt.in googletest-download/CMakeLists.txt) ++ execute_process( ++ COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" . ++ RESULT_VARIABLE result ++ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download ++ ) ++ if(result) ++ message(FATAL_ERROR "CMake step for googletest failed: ${result}") ++ endif() + +-execute_process( +- COMMAND ${CMAKE_COMMAND} --build . +- RESULT_VARIABLE result +- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download +-) +-if(result) +- message(FATAL_ERROR "CMake step for googletest failed: ${result}") +-endif() ++ execute_process( ++ COMMAND ${CMAKE_COMMAND} --build . ++ RESULT_VARIABLE result ++ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download ++ ) ++ if(result) ++ message(FATAL_ERROR "CMake step for googletest failed: ${result}") ++ endif() + +-set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) ++ set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) ++ set(GTestMain_LIBRARIES gtest_main) + +-add_subdirectory( +- ${CMAKE_CURRENT_BINARY_DIR}/googletest-src +- ${CMAKE_CURRENT_BINARY_DIR}/googletest-build +- EXCLUDE_FROM_ALL +-) ++ add_subdirectory( ++ ${CMAKE_CURRENT_BINARY_DIR}/googletest-src ++ ${CMAKE_CURRENT_BINARY_DIR}/googletest-build ++ EXCLUDE_FROM_ALL ++ ) ++endif() + + if (MSVC AND (GSL_CXX_STANDARD EQUAL 17)) + set(GSL_CPLUSPLUS_OPT -Zc:__cplusplus -permissive-) +@@ -149,7 +154,7 @@ function(add_gsl_test name) + target_link_libraries(${name} + GSL + gsl_tests_config +- gtest_main ++ ${GTestMain_LIBRARIES} + ) + add_test( + ${name} +@@ -254,7 +259,7 @@ function(add_gsl_test_noexcept name) + target_link_libraries(${name} + GSL + gsl_tests_config_noexcept +- gtest_main ++ ${GTestMain_LIBRARIES} + ) + add_test( + ${name} diff --git a/gnu/packages/patches/clementine-fix-sqlite.patch b/gnu/packages/patches/clementine-fix-sqlite.patch deleted file mode 100644 index f9d44f9074..0000000000 --- a/gnu/packages/patches/clementine-fix-sqlite.patch +++ /dev/null @@ -1,23 +0,0 @@ -Patch downloaded from https://github.com/clementine-player/Clementine/pull/5669 . - -diff -ruN clementine-1.3.1.565.gd20c2244a.orig/src/core/database.cpp clementine-1.3.1.565.gd20c2244a/src/core/database.cpp ---- clementine-1.3.1.565.gd20c2244a.orig/src/core/database.cpp 2018-07-07 23:59:24.018540126 +0200 -+++ clementine-1.3.1.565.gd20c2244a/src/core/database.cpp 2018-07-08 00:04:47.991551728 +0200 -@@ -265,6 +265,17 @@ - StaticInit(); - - { -+ -+#ifdef SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER -+ // In case sqlite>=3.12 is compiled without -DSQLITE_ENABLE_FTS3_TOKENIZER -+ // (generally a good idea due to security reasons) the fts3 support should be enabled explicitly. -+ QVariant v = db.driver()->handle(); -+ if (v.isValid() && qstrcmp(v.typeName(), "sqlite3*") == 0) { -+ sqlite3 *handle = *static_cast<sqlite3**>(v.data()); -+ if (handle) sqlite3_db_config(handle, SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER, 1, NULL); -+ } -+#endif -+ - QSqlQuery set_fts_tokenizer(db); - set_fts_tokenizer.prepare("SELECT fts3_tokenizer(:name, :pointer)"); - set_fts_tokenizer.bindValue(":name", "unicode"); diff --git a/gnu/packages/patches/clementine-remove-crypto++-dependency.patch b/gnu/packages/patches/clementine-remove-crypto++-dependency.patch deleted file mode 100644 index e7cf80ddee..0000000000 --- a/gnu/packages/patches/clementine-remove-crypto++-dependency.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 3202b8b..473ecb9 100755 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -279,14 +279,6 @@ optional_component(LIBPULSE ON "Pulse audio integration" - - optional_component(VISUALISATIONS ON "Visualisations") - --if(NOT HAVE_SPOTIFY_BLOB AND NOT CRYPTOPP_FOUND) -- message(FATAL_ERROR "Either crypto++ must be available or the non-GPL Spotify " -- "code must be compiled in") --elseif(CRYPTOPP_FOUND) -- set(HAVE_CRYPTOPP ON) -- set(HAVE_SPOTIFY_DOWNLOADER ON) --endif() -- - # Find DBus if it's enabled - if (HAVE_DBUS) - find_package(Qt5 COMPONENTS DBus) diff --git a/gnu/packages/patches/clementine-use-openssl.patch b/gnu/packages/patches/clementine-use-openssl.patch deleted file mode 100644 index 1fbf3d2b8a..0000000000 --- a/gnu/packages/patches/clementine-use-openssl.patch +++ /dev/null @@ -1,67 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 4022c383b..3202b8b69 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -83,6 +83,7 @@ pkg_check_modules(LIBPULSE libpulse) - pkg_check_modules(LIBXML libxml-2.0) - pkg_check_modules(SPOTIFY libspotify>=12.1.45) - pkg_check_modules(TAGLIB REQUIRED taglib>=1.6) -+pkg_check_modules(OPENSSL REQUIRED openssl) - - if (WIN32) - find_package(ZLIB REQUIRED) -@@ -381,20 +382,6 @@ if(GMOCK_INCLUDE_DIRS) - endif(GTEST_INCLUDE_DIRS) - endif(GMOCK_INCLUDE_DIRS) - --# Use the system's sha2 if it's available. --find_path(SHA2_INCLUDE_DIRS sha2.h) --find_library(SHA2_LIBRARIES sha2) --if(SHA2_LIBRARIES AND SHA2_INCLUDE_DIRS) -- message(STATUS "Using system sha2 library") -- set(USE_SYSTEM_SHA2 ON) --else() -- message(STATUS "Using builtin sha2 library") -- set(USE_SYSTEM_SHA2 OFF) -- add_subdirectory(3rdparty/sha2) -- set(SHA2_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/sha2) -- set(SHA2_LIBRARIES sha2) --endif() -- - # Use the system libmygpo-qt5 if a recent enough version was found - if(LIBMYGPO_QT5_FOUND) - set(MYGPOQT5_LIBRARIES ${LIBMYGPO_QT5_LIBRARIES}) -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 6e24c9726..104d044d9 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -29,7 +29,6 @@ include_directories(${LIBPROJECTM_INCLUDE_DIRS}) - include_directories(${QTSINGLEAPPLICATION_INCLUDE_DIRS}) - include_directories(${QTIOCOMPRESSOR_INCLUDE_DIRS}) - include_directories(${QXT_INCLUDE_DIRS}) --include_directories(${SHA2_INCLUDE_DIRS}) - include_directories(${CHROMAPRINT_INCLUDE_DIRS}) - include_directories(${MYGPOQT5_INCLUDE_DIRS}) - -@@ -1223,7 +1222,7 @@ target_link_libraries(clementine_lib - libclementine-common - libclementine-tagreader - libclementine-remote -- ${SHA2_LIBRARIES} -+ ${OPENSSL_LIBRARIES} - ${TAGLIB_LIBRARIES} - ${MYGPOQT5_LIBRARIES} - ${CHROMAPRINT_LIBRARIES} -diff --git a/src/core/utilities.cpp b/src/core/utilities.cpp -index ce76f22da..80bf623fb 100644 ---- a/src/core/utilities.cpp -+++ b/src/core/utilities.cpp -@@ -52,7 +52,7 @@ - #include "config.h" - #include "timeconstants.h" - --#include "sha2.h" -+#include <openssl/sha.h> - - #if defined(Q_OS_UNIX) - #include <sys/statvfs.h> diff --git a/gnu/packages/patches/emacs-scheme-complete-scheme-r5rs-info.patch b/gnu/packages/patches/emacs-scheme-complete-scheme-r5rs-info.patch deleted file mode 100644 index 6c49bdcdde..0000000000 --- a/gnu/packages/patches/emacs-scheme-complete-scheme-r5rs-info.patch +++ /dev/null @@ -1,14 +0,0 @@ -Fix completion for R5RS Scheme. -See https://github.com/ashinn/scheme-complete/issues/1 - ---- scheme-complete-master/scheme-complete.el.orig 2015-12-25 21:59:09.896909029 +0100 -+++ scheme-complete-master/scheme-complete.el 2015-12-25 21:59:17.924993998 +0100 -@@ -591,7 +591,7 @@ - '((exact->inexact (lambda (z) z)) - (inexact->exact (lambda (z) z))) - (mapcar #'(lambda (x) -- (list x (scheme-env-lookup *scheme-r7rs-info* x))) -+ (scheme-env-lookup *scheme-r7rs-info* x)) - *scheme-r5rs-bindings*)))) - *scheme-r5rs-info*) - diff --git a/gnu/packages/patches/emacs-undohist-ignored.patch b/gnu/packages/patches/emacs-undohist-ignored.patch deleted file mode 100644 index c1ad827a26..0000000000 --- a/gnu/packages/patches/emacs-undohist-ignored.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 52bfd419bf9022726048f818d955b8ea10a16d5c Mon Sep 17 00:00:00 2001 -From: Patrick Mosby <info@schreiblogade.de> -Date: Mon, 7 Sep 2015 09:05:56 +0200 -Subject: [PATCH] Don't save undo file for ignored files. - -This fixes #4. ---- - undohist.el | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/undohist.el b/undohist.el -index b184a26..de60356 100644 ---- a/undohist.el -+++ b/undohist.el -@@ -164,7 +164,8 @@ To use undohist, you just call this function." - undohist-ignored-files))) - - (defun undohist-save-1 () -- (when (consp buffer-undo-list) -+ (when (and (consp buffer-undo-list) -+ (undohist-recover-file-p (buffer-file-name (current-buffer)))) - (let ((file (make-undohist-file-name (buffer-file-name))) - (contents `((digest . ,(md5 (current-buffer))) - (undo-list . ,(undohist-encode buffer-undo-list))))) --- -2.21.0 - diff --git a/gnu/packages/patches/freebayes-devendor-deps.patch b/gnu/packages/patches/freebayes-devendor-deps.patch new file mode 100644 index 0000000000..9886de11fb --- /dev/null +++ b/gnu/packages/patches/freebayes-devendor-deps.patch @@ -0,0 +1,152 @@ +This patch is original to Guix, ongoing work to upstream bits as possible. + +From 9acc56db5e7469f5976be38b52ba4993de98ee38 Mon Sep 17 00:00:00 2001 +From: Efraim Flashner <efraim@flashner.co.il> +Date: Sun, 17 Jan 2021 13:27:17 +0200 +Subject: [PATCH] devendor-dependants + +--- + meson.build | 84 +++++++++++++++++++++++++++++++++++++++++------------ + 1 file changed, 66 insertions(+), 18 deletions(-) + +diff --git a/meson.build b/meson.build +index f6bf242..bded4af 100644 +--- a/meson.build ++++ b/meson.build +@@ -9,8 +9,13 @@ project('freebayes', ['cpp', 'c'], + + zlib_dep = dependency('zlib') + lzma_dep = dependency('liblzma') ++simde_dep = dependency('simde') + bzip2_dep = dependency('bz2lib', required: false) + htslib_dep = dependency('htslib', required : false) ++tabixpp_dep = dependency('tabixpp', required : false) ++fastahack_dep = dependency('fastahack', required : false) ++smithwaterman_dep = dependency('smithwaterman', required : false) ++vcflib_dep = dependency('vcflib', required: false) + thread_dep = dependency('threads') + + if htslib_dep.found() +@@ -59,6 +64,56 @@ else + ] + endif + ++if tabixpp_dep.found() ++ tabixpp_includes = '' ++ tabixpp_src = [] ++else ++ tabixpp_includes = [ ++ 'vcflib/tabixpp', ++ ] ++ tabixpp_src = [ ++ 'vcflib/tabixpp/tabix.cpp', ++ ] ++endif ++ ++if vcflib_dep.found() ++ vcflib_includes = '' ++ vcflib_src = [] ++else ++ vcflib_includes = [ ++ 'vcflib/src', ++ 'vcflib/multichoose', ++ 'vcflib/filevercmp', ++ ] ++ vcflib_src = [ ++ 'vcflib/src/Variant.cpp', ++ ] ++endif ++ ++if fastahack_dep.found() ++ fastahack_src = [] ++else ++ fastahack_src = [ ++ 'vcflib/fastahack/Fasta.cpp', ++ 'vcflib/src/split.cpp', ++ ] ++endif ++ ++if smithwaterman_dep.found() ++ smithwaterman_includes = '' ++ smithwaterman_src = [] ++else ++ smithwaterman_includes = [ ++ 'vcflib/smithwaterman', ++ ] ++ smithwaterman_src = [ ++ 'vcflib/smithwaterman/SmithWatermanGotoh.cpp', ++ 'vcflib/smithwaterman/disorder.cpp', ++ 'vcflib/smithwaterman/Repeats.cpp', ++ 'vcflib/smithwaterman/LeftAlign.cpp', ++ 'vcflib/smithwaterman/IndelAllele.cpp', ++ ] ++endif + + + # +@@ -105,23 +160,18 @@ seqlib_src = [ + ] + + vcflib_src = [ +- 'vcflib/tabixpp/tabix.cpp', +- 'vcflib/src/Variant.cpp', +- 'vcflib/smithwaterman/SmithWatermanGotoh.cpp', +- 'vcflib/smithwaterman/disorder.cpp', +- 'vcflib/smithwaterman/Repeats.cpp', +- 'vcflib/smithwaterman/LeftAlign.cpp', +- 'vcflib/smithwaterman/IndelAllele.cpp', ++ vcflib_src, ++ tabixpp_src, ++ smithwaterman_src, + ] + + bamleftalign_src = [ + 'src/bamleftalign.cpp', + 'src/IndelAllele.cpp', + 'contrib/SeqLib/src/BamWriter.cpp', +- 'vcflib/fastahack/Fasta.cpp', +- 'vcflib/smithwaterman/LeftAlign.cpp', +- 'vcflib/smithwaterman/IndelAllele.cpp', +- 'vcflib/src/split.cpp', ++ fastahack_src, ++ smithwaterman_src, ++ vcflib_src, + 'src/LeftAlign.cpp', + ] + +@@ -134,11 +184,9 @@ incdir = include_directories( + 'ttmath', + 'contrib', + 'contrib/SeqLib', +- 'vcflib/src', +- 'vcflib/tabixpp', +- 'vcflib/smithwaterman', +- 'vcflib/multichoose', +- 'vcflib/filevercmp') ++ tabixpp_includes, ++ smithwaterman_includes, ++ vcflib_includes) + + c_args = ['-fpermissive','-w'] + cpp_args = ['-fpermissive','-w','-Wc++14-compat'] +@@ -152,7 +200,7 @@ executable('freebayes', + include_directories : incdir, + cpp_args : cpp_args, + c_args : c_args, +- dependencies: [zlib_dep, lzma_dep, htslib_dep, thread_dep], ++ dependencies: [zlib_dep, lzma_dep, simde_dep, htslib_dep, tabixpp_dep, smithwaterman_dep, vcflib_dep, thread_dep], + install: true + ) + +@@ -165,7 +213,7 @@ executable('bamleftalign', + include_directories : incdir, + cpp_args : cpp_args, + c_args : c_args, +- dependencies: [zlib_dep, lzma_dep, htslib_dep, thread_dep], ++ dependencies: [zlib_dep, lzma_dep, simde_dep, htslib_dep, tabixpp_dep, fastahack_dep, smithwaterman_dep, vcflib_dep, thread_dep], + install: true + ) + +-- +2.30.0 + diff --git a/gnu/packages/patches/gpsbabel-fix-i686-test.patch b/gnu/packages/patches/gpsbabel-fix-i686-test.patch new file mode 100644 index 0000000000..5ba0305113 --- /dev/null +++ b/gnu/packages/patches/gpsbabel-fix-i686-test.patch @@ -0,0 +1,46 @@ +https://github.com/gpsbabel/gpsbabel/commit/465a74194d53acea5c8d74c5cf3cb2940546ec92.patch +Can be removed next release + +From 465a74194d53acea5c8d74c5cf3cb2940546ec92 Mon Sep 17 00:00:00 2001 +From: tsteven4 <13596209+tsteven4@users.noreply.github.com> +Date: Fri, 7 Aug 2020 11:29:22 -0600 +Subject: [PATCH] fix i386 regression error with engima. (#620) + +this was motivated by the test failure seen at +https://buildd.debian.org/status/fetch.php?pkg=gpsbabel&arch=i386&ver=1.7.0%2Bds-4&stamp=1596794554&raw=0 +--- + enigma.cc | 13 ++++++++++--- + 1 file changed, 10 insertions(+), 3 deletions(-) + +diff --git a/enigma.cc b/enigma.cc +index 850f27b4e..32fea92d6 100644 +--- a/enigma.cc ++++ b/enigma.cc +@@ -21,9 +21,16 @@ + + */ + ++#include <cmath> // for fabs, lround ++#include <cstdint> // for int32_t, uint8_t, uint32_t ++#include <cstdlib> // for abs ++#include <cstring> // for strlen, memcpy, memset ++ ++#include <QtCore/QString> // for QString ++ + #include "defs.h" +-#include <cmath> +-#include <cstdlib> ++#include "gbfile.h" // for gbfclose, gbfopen_le, gbfread, gbfwrite, gbfile ++ + + #define MYNAME "Enigma binary route and waypoint file format" + +@@ -177,7 +184,7 @@ enigma_waypt_disp(const Waypoint* wpt) + le_write32(&ewpt.longitude, decToEnigmaPosition(wpt->longitude)); + ewpt.waypoint_type = WTYPE_WAYPOINT; + if (wpt->altitude != unknown_alt) { +- le_write32(&ewpt.data.wp_altitude, METERS_TO_FEET(wpt->altitude) + 1000); ++ le_write32(&ewpt.data.wp_altitude, lround(METERS_TO_FEET(wpt->altitude)) + 1000); + } + if (wpt->shortname != nullptr) { + ewpt.shortname_len = (uint8_t) min(6, strlen(CSTRc(wpt->shortname))); diff --git a/gnu/packages/patches/gpsbabel-minizip.patch b/gnu/packages/patches/gpsbabel-minizip.patch deleted file mode 100644 index 8f3bb36f57..0000000000 --- a/gnu/packages/patches/gpsbabel-minizip.patch +++ /dev/null @@ -1,13 +0,0 @@ -Patch taken from https://sources.debian.org/data/main/g/gpsbabel/1.5.3-2/debian/patches/use_minizip. - ---- a/Makefile.in -+++ b/Makefile.in -@@ -120,7 +120,7 @@ LIBOBJS = queue.o route.o waypt.o filter - src/core/usasciicodec.o\ - src/core/ziparchive.o \ - $(GARMIN) $(JEEPS) $(SHAPE) @ZLIB@ $(FMTS) $(FILTERS) --OBJS = main.o globals.o $(LIBOBJS) @FILEINFO@ -+OBJS = main.o globals.o $(MINIZIP) $(LIBOBJS) @FILEINFO@ - - DEPFILES = $(OBJS:.o=.d) -
\ No newline at end of file diff --git a/gnu/packages/patches/gpsbabel-qstring.patch b/gnu/packages/patches/gpsbabel-qstring.patch deleted file mode 100644 index 8ba1a7213b..0000000000 --- a/gnu/packages/patches/gpsbabel-qstring.patch +++ /dev/null @@ -1,69 +0,0 @@ -Extracted from following patch of gpsbabel: -https://github.com/gpsbabel/gpsbabel/commit/604178aa8ad4d3c3ad218df24c1e9a6a1f683bb3 - -From 604178aa8ad4d3c3ad218df24c1e9a6a1f683bb3 Mon Sep 17 00:00:00 2001 -From: Harel Mazor <harel.mazor@gmail.com> -Date: Tue, 24 Jan 2017 00:35:04 +0200 -Subject: [PATCH] Added geojson read capablity, moved magic strings to - constants, fixed windows compilation issues. - ---- a/tef_xml.cc -+++ b/tef_xml.cc -@@ -72,11 +72,11 @@ tef_start(xg_string args, const QXmlStreamAttributes* attrv) - bool valid = false; - - foreach(QXmlStreamAttribute attr, *attrv) { -- if (attr.name().compare("Comment", Qt::CaseInsensitive) == 0) { -- if (attr.value().compare("TourExchangeFormat", Qt::CaseInsensitive) == 0) { -+ if (attr.name().compare(QString("Comment"), Qt::CaseInsensitive) == 0) { -+ if (attr.value().compare(QString("TourExchangeFormat"), Qt::CaseInsensitive) == 0) { - valid = true; - } -- } else if (attr.name().compare("Version", Qt::CaseInsensitive) == 0) { -+ } else if (attr.name().compare(QString("Version"), Qt::CaseInsensitive) == 0) { - version = attr.value().toString().toDouble(); - } - } -@@ -95,9 +95,9 @@ tef_header(xg_string args, const QXmlStreamAttributes* attrv) - { - route = route_head_alloc(); - foreach(QXmlStreamAttribute attr, *attrv) { -- if (attr.name().compare("Name", Qt::CaseInsensitive) == 0) { -+ if (attr.name().compare(QString("Name"), Qt::CaseInsensitive) == 0) { - route->rte_name = attr.value().toString().trimmed(); -- } else if (attr.name().compare("Software", Qt::CaseInsensitive) == 0) { -+ } else if (attr.name().compare(QString("Software"), Qt::CaseInsensitive) == 0) { - route->rte_desc = attr.value().toString().trimmed(); - } - } -@@ -248,20 +248,20 @@ tef_item_start(xg_string args, const QXmlStreamAttributes* attrv) - QString attrstr = attr.value().toString(); - QByteArray attrtext = attrstr.toUtf8(); - -- if (attr.name().compare("SegDescription", Qt::CaseInsensitive) == 0) { -+ if (attr.name().compare(QString("SegDescription"), Qt::CaseInsensitive) == 0) { - wpt_tmp->shortname = attrstr.trimmed(); -- } else if (attr.name().compare("PointDescription", Qt::CaseInsensitive) == 0) { -+ } else if (attr.name().compare(QString("PointDescription"), Qt::CaseInsensitive) == 0) { - wpt_tmp->description = attrstr.trimmed(); -- } else if (attr.name().compare("ViaStation", Qt::CaseInsensitive) == 0 && -- attr.value().compare("true", Qt::CaseInsensitive) == 0) { -+ } else if (attr.name().compare(QString("ViaStation"), Qt::CaseInsensitive) == 0 && -+ attr.value().compare(QString("true"), Qt::CaseInsensitive) == 0) { - wpt_tmp->wpt_flags.fmt_use = 1; /* only a flag */ - - /* new in TEF V2 */ -- } else if (attr.name().compare("Instruction", Qt::CaseInsensitive) == 0) { -+ } else if (attr.name().compare(QString("Instruction"), Qt::CaseInsensitive) == 0) { - wpt_tmp->description = attrstr.trimmed(); -- } else if (attr.name().compare("Altitude", Qt::CaseInsensitive) == 0) { -+ } else if (attr.name().compare(QString("Altitude"), Qt::CaseInsensitive) == 0) { - wpt_tmp->altitude = attrstr.toDouble(); -- } else if (attr.name().compare("TimeStamp", Qt::CaseInsensitive) == 0) { -+ } else if (attr.name().compare(QString("TimeStamp"), Qt::CaseInsensitive) == 0) { - /* nothing for the moment */ - } - } --- -2.16.1 - diff --git a/gnu/packages/patches/gst-plugins-good-fix-test.patch b/gnu/packages/patches/gst-plugins-good-fix-test.patch new file mode 100644 index 0000000000..38ec0ba802 --- /dev/null +++ b/gnu/packages/patches/gst-plugins-good-fix-test.patch @@ -0,0 +1,94 @@ +Fix a broken test: + +https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/803 + +Patches copied from upstream source repository: + +https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/commit/2ce5909f3a0b0da3abb7b794215d6b8b72a3b7fa +https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/commit/f5310ce346180a717f091f2f09bcbb3ddfb15436 + +From 2ce5909f3a0b0da3abb7b794215d6b8b72a3b7fa Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <tim@centricular.com> +Date: Thu, 12 Nov 2020 23:38:21 +0000 +Subject: [PATCH 1/2] tests: qtdemux: fix crash on 32-bit architectures + +Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/803 + +Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/815> +--- + tests/check/elements/qtdemux.c | 14 ++++++++------ + 1 file changed, 8 insertions(+), 6 deletions(-) + +diff --git a/tests/check/elements/qtdemux.c b/tests/check/elements/qtdemux.c +index 5271c6576..0c748278b 100644 +--- a/tests/check/elements/qtdemux.c ++++ b/tests/check/elements/qtdemux.c +@@ -797,9 +797,10 @@ GST_START_TEST (test_qtdemux_pad_names) + "protection-system", G_TYPE_STRING, + "9a04f079-9840-4286-ab92-e65be0885f95", NULL); + caps = +- gst_caps_new_simple ("video/quicktime", "variant", G_TYPE_STRING, +- "mss-fragmented", "timesacle", G_TYPE_UINT64, 10000000, "media-caps", +- GST_TYPE_CAPS, mediacaps, NULL); ++ gst_caps_new_simple ("video/quicktime", ++ "variant", G_TYPE_STRING, "mss-fragmented", ++ "timesacle", G_TYPE_UINT64, G_GUINT64_CONSTANT (10000000), ++ "media-caps", GST_TYPE_CAPS, mediacaps, NULL); + + /* Send segment event* */ + event = gst_event_new_caps (caps); +@@ -852,9 +853,10 @@ GST_START_TEST (test_qtdemux_pad_names) + "protection-system", G_TYPE_STRING, + "9a04f079-9840-4286-ab92-e65be0885f95", NULL); + caps = +- gst_caps_new_simple ("video/quicktime", "variant", G_TYPE_STRING, +- "mss-fragmented", "timesacle", G_TYPE_UINT64, 10000000, "media-caps", +- GST_TYPE_CAPS, mediacaps, NULL); ++ gst_caps_new_simple ("video/quicktime", ++ "variant", G_TYPE_STRING, "mss-fragmented", ++ "timesacle", G_TYPE_UINT64, G_GUINT64_CONSTANT (10000000), ++ "media-caps", GST_TYPE_CAPS, mediacaps, NULL); + + /* Send segment event* */ + event = gst_event_new_caps (caps); +-- +2.30.0 + + +From f5310ce346180a717f091f2f09bcbb3ddfb15436 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <tim@centricular.com> +Date: Thu, 12 Nov 2020 23:39:21 +0000 +Subject: [PATCH 2/2] tests: qtdemux: fix typo in caps field + +timesacle -> timescale + +Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/815> +--- + tests/check/elements/qtdemux.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tests/check/elements/qtdemux.c b/tests/check/elements/qtdemux.c +index 0c748278b..4a14c45c0 100644 +--- a/tests/check/elements/qtdemux.c ++++ b/tests/check/elements/qtdemux.c +@@ -799,7 +799,7 @@ GST_START_TEST (test_qtdemux_pad_names) + caps = + gst_caps_new_simple ("video/quicktime", + "variant", G_TYPE_STRING, "mss-fragmented", +- "timesacle", G_TYPE_UINT64, G_GUINT64_CONSTANT (10000000), ++ "timescale", G_TYPE_UINT64, G_GUINT64_CONSTANT (10000000), + "media-caps", GST_TYPE_CAPS, mediacaps, NULL); + + /* Send segment event* */ +@@ -855,7 +855,7 @@ GST_START_TEST (test_qtdemux_pad_names) + caps = + gst_caps_new_simple ("video/quicktime", + "variant", G_TYPE_STRING, "mss-fragmented", +- "timesacle", G_TYPE_UINT64, G_GUINT64_CONSTANT (10000000), ++ "timescale", G_TYPE_UINT64, G_GUINT64_CONSTANT (10000000), + "media-caps", GST_TYPE_CAPS, mediacaps, NULL); + + /* Send segment event* */ +-- +2.30.0 + diff --git a/gnu/packages/patches/guile-2.2-skip-so-test.patch b/gnu/packages/patches/guile-2.2-skip-so-test.patch new file mode 100644 index 0000000000..e7c2594e91 --- /dev/null +++ b/gnu/packages/patches/guile-2.2-skip-so-test.patch @@ -0,0 +1,23 @@ +Skip 'test-stack-overflow' that crashes when using QEMU transparent emulation. + +--- a/test-suite/standalone/Makefile.in 1970-01-01 01:00:01.000000000 +0100 ++++ b/test-suite/standalone/Makefile.in 2021-01-11 10:59:31.606269449 +0100 +@@ -102,8 +102,7 @@ + test-scm-to-latin1-string$(EXEEXT) test-scm-values$(EXEEXT) \ + test-scm-c-bind-keyword-arguments$(EXEEXT) \ + test-srfi-4$(EXEEXT) $(am__append_6) $(am__EXEEXT_1) \ +- test-smob-mark$(EXEEXT) test-smob-mark-race$(EXEEXT) \ +- test-stack-overflow ++ test-smob-mark$(EXEEXT) test-smob-mark-race$(EXEEXT) + check_PROGRAMS = test-num2integral$(EXEEXT) test-round$(EXEEXT) \ + test-foreign-object-c$(EXEEXT) test-list$(EXEEXT) \ + test-unwind$(EXEEXT) test-conversion$(EXEEXT) \ +@@ -1938,7 +1937,7 @@ + test-command-line-encoding test-command-line-encoding2 \ + test-language test-guild-compile $(am__append_3) \ + test-foreign-object-scm test-fast-slot-ref test-mb-regexp \ +- test-use-srfi $(am__append_5) test-stack-overflow ++ test-use-srfi $(am__append_5) + BUILT_SOURCES = $(am__append_2) + EXTRA_DIST = test-import-order-a.scm test-import-order-b.scm \ + test-import-order-c.scm test-import-order-d.scm \ diff --git a/gnu/packages/patches/hdf5-1.8-mpi-deprecations.patch b/gnu/packages/patches/hdf5-1.8-mpi-deprecations.patch deleted file mode 100644 index 29242dc4e8..0000000000 --- a/gnu/packages/patches/hdf5-1.8-mpi-deprecations.patch +++ /dev/null @@ -1,169 +0,0 @@ ---- a/src/H5.c -+++ b/src/H5.c -@@ -138,7 +138,7 @@ - if (mpi_initialized && !mpi_finalized) { - int key_val; - -- if(MPI_SUCCESS != (mpi_code = MPI_Comm_create_keyval(MPI_NULL_COPY_FN, -+ if(MPI_SUCCESS != (mpi_code = MPI_Comm_create_keyval(MPI_COMM_NULL_COPY_FN, - (MPI_Comm_delete_attr_function *)H5_mpi_delete_cb, - &key_val, NULL))) - HMPI_GOTO_ERROR(FAIL, "MPI_Comm_create_keyval failed", mpi_code) ---- hdf5-1.8.19/testpar/t_cache.c -+++ hdf5-1.8.19/testpar/t_cache.c -@@ -1187,20 +1187,20 @@ - struct mssg_t sample; /* used to compute displacements */ - - /* setup the displacements array */ -- if ( ( MPI_SUCCESS != MPI_Address(&sample.req, &displs[0]) ) || -- ( MPI_SUCCESS != MPI_Address(&sample.src, &displs[1]) ) || -- ( MPI_SUCCESS != MPI_Address(&sample.dest, &displs[2]) ) || -- ( MPI_SUCCESS != MPI_Address(&sample.mssg_num, &displs[3]) ) || -- ( MPI_SUCCESS != MPI_Address(&sample.base_addr, &displs[4]) ) || -- ( MPI_SUCCESS != MPI_Address(&sample.len, &displs[5]) ) || -- ( MPI_SUCCESS != MPI_Address(&sample.ver, &displs[6]) ) || -- ( MPI_SUCCESS != MPI_Address(&sample.count, &displs[7]) ) || -- ( MPI_SUCCESS != MPI_Address(&sample.magic, &displs[8]) ) ) { -+ if ( ( MPI_SUCCESS != MPI_Get_address(&sample.req, &displs[0]) ) || -+ ( MPI_SUCCESS != MPI_Get_address(&sample.src, &displs[1]) ) || -+ ( MPI_SUCCESS != MPI_Get_address(&sample.dest, &displs[2]) ) || -+ ( MPI_SUCCESS != MPI_Get_address(&sample.mssg_num, &displs[3]) ) || -+ ( MPI_SUCCESS != MPI_Get_address(&sample.base_addr, &displs[4]) ) || -+ ( MPI_SUCCESS != MPI_Get_address(&sample.len, &displs[5]) ) || -+ ( MPI_SUCCESS != MPI_Get_address(&sample.ver, &displs[6]) ) || -+ ( MPI_SUCCESS != MPI_Get_address(&sample.count, &displs[7]) ) || -+ ( MPI_SUCCESS != MPI_Get_address(&sample.magic, &displs[8]) ) ) { - - nerrors++; - success = FALSE; - if ( verbose ) { -- HDfprintf(stdout, "%d:%s: MPI_Address() call failed.\n", -+ HDfprintf(stdout, "%d:%s: MPI_Get_address() call failed.\n", - world_mpi_rank, fcn_name); - } - -@@ -1215,14 +1215,14 @@ - - if ( success ) { - -- result = MPI_Type_struct(9, block_len, displs, mpi_types, &mpi_mssg_t); -+ result = MPI_Type_create_struct(9, block_len, displs, mpi_types, &mpi_mssg_t); - - if ( result != MPI_SUCCESS ) { - - nerrors++; - success = FALSE; - if ( verbose ) { -- HDfprintf(stdout, "%d:%s: MPI_Type_struct() call failed.\n", -+ HDfprintf(stdout, "%d:%s: MPI_Type_create_struct() call failed.\n", - world_mpi_rank, fcn_name); - } - } ---- hdf5-1.8.19/testpar/t_mpi.c -+++ hdf5-1.8.19/testpar/t_mpi.c -@@ -279,7 +279,7 @@ - printf("Skipped GB file range test " - "because MPI_Offset cannot support it\n"); - }else{ -- buf = HDmalloc(MB); -+ buf = (char *)HDmalloc(MB); - VRFY((buf!=NULL), "malloc succeed"); - - /* open a new file. Remove it first in case it exists. */ -@@ -624,7 +624,7 @@ - and this platform. - - 1. Details for the test: --1) Create two derived datatypes with MPI_Type_hindexed: -+1) Create two derived datatypes with MPI_Type_create_hindexed: - datatype1: - count = 1, blocklens = 1, offsets = 0, - base type = MPI_BYTE(essentially a char) -@@ -633,7 +633,7 @@ - base type = MPI_BYTE - - 2) Using these two derived datatypes, -- Build another derived datatype with MPI_Type_struct: -+ Build another derived datatype with MPI_Type_create_struct: - advtype: derived from datatype1 and datatype2 - advtype: - count = 2, blocklens[0] = 1, blocklens[1]=1, -@@ -676,10 +676,9 @@ - int mpi_err_strlen; - int mpi_err; - int i; -- int nerrors = 0; /* number of errors */ - MPI_Datatype etype,filetype; - MPI_Datatype adv_filetype,bas_filetype[2]; -- MPI_Datatype etypenew, filetypenew; -+ MPI_Datatype filetypenew; - MPI_Offset disp; - MPI_Status Status; - MPI_Aint adv_disp[2]; -@@ -715,7 +714,7 @@ - blocklens[0] = 1; - offsets[0] = 0; - -- if((mpi_err= MPI_Type_hindexed(count,blocklens,offsets,MPI_BYTE,&filetype)) -+ if((mpi_err= MPI_Type_create_hindexed(count,blocklens,offsets,MPI_BYTE,&filetype)) - != MPI_SUCCESS){ - MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen); - printf("MPI_Type_contiguous failed (%s)\n", mpi_err_str); -@@ -731,7 +730,7 @@ - count = 1; - blocklens[0]=1; - offsets[0] = 1; -- if((mpi_err= MPI_Type_hindexed(count,blocklens,offsets,MPI_BYTE,&filetypenew)) -+ if((mpi_err= MPI_Type_create_hindexed(count,blocklens,offsets,MPI_BYTE,&filetypenew)) - != MPI_SUCCESS){ - MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen); - printf("MPI_Type_contiguous failed (%s)\n", mpi_err_str); -@@ -752,10 +751,10 @@ - bas_filetype[0] = filetype; - bas_filetype[1] = filetypenew; - -- if((mpi_err= MPI_Type_struct(outcount,adv_blocklens,adv_disp,bas_filetype,&adv_filetype)) -+ if((mpi_err= MPI_Type_create_struct(outcount,adv_blocklens,adv_disp,bas_filetype,&adv_filetype)) - != MPI_SUCCESS){ - MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen); -- printf("MPI_Type_struct failed (%s)\n", mpi_err_str); -+ printf("MPI_Type_create_struct failed (%s)\n", mpi_err_str); - return 1; - } - if((mpi_err=MPI_Type_commit(&adv_filetype))!=MPI_SUCCESS){ -@@ -842,7 +841,7 @@ - processes are needed. - - 1. Details for the test: --1) Create one derived datatype with MPI_Type_hindexed: -+1) Create one derived datatype with MPI_Type_create_hindexed: - - 2) Choosing at least two processes to contribute none for IO with - the buf size inside MPI_Write_at_all to 0. -@@ -898,7 +897,7 @@ - offsets[1] = (mpi_size+mpi_rank)*count; - - if(count !=0) { -- if((mpi_err = MPI_Type_hindexed(2, -+ if((mpi_err = MPI_Type_create_hindexed(2, - blocklens, - offsets, - etype, -@@ -914,7 +913,7 @@ - return 1; - } /* end if */ - -- if((mpi_err = MPI_Type_hindexed(2, -+ if((mpi_err = MPI_Type_create_hindexed(2, - blocklens, - offsets, - etype, -@@ -1098,7 +1097,7 @@ - * calls. By then, MPI calls may not work. - */ - if (H5dont_atexit() < 0){ -- printf("Failed to turn off atexit processing. Continue.\n", mpi_rank); -+ printf("Failed to turn off atexit processing. Continue.\n"); - }; - H5open(); - if (parse_options(argc, argv) != 0){ diff --git a/gnu/packages/patches/icecat-makeicecat.patch b/gnu/packages/patches/icecat-makeicecat.patch index 73e87b9612..edd1ced257 100644 --- a/gnu/packages/patches/icecat-makeicecat.patch +++ b/gnu/packages/patches/icecat-makeicecat.patch @@ -25,7 +25,7 @@ index 8be2362..48716f2 100755 -wget -N https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${FFVERSION}esr/source/firefox-${FFVERSION}esr.source.tar.xz.asc -gpg --recv-keys --keyserver keyserver.ubuntu.com 14F26682D0916CDD81E37B6D61B7B526D98F0353 -gpg --verify firefox-${FFVERSION}esr.source.tar.xz.asc --echo -n 5e69f9bfd1a35decdae8d4b28da8100820e58b429f539fa9884802347631cf53 firefox-${FFVERSION}esr.source.tar.xz |sha256sum -c - +-echo -n 1aa041db28cd742e93d663a9da8defd33040b38d8b9470350538473251621643 firefox-${FFVERSION}esr.source.tar.xz |sha256sum -c - - -echo Extracting Firefox tarball -tar -xf firefox-${FFVERSION}esr.source.tar.xz @@ -37,7 +37,7 @@ index 8be2362..48716f2 100755 +# wget -N https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${FFVERSION}esr/source/firefox-${FFVERSION}esr.source.tar.xz.asc +# gpg --recv-keys --keyserver keyserver.ubuntu.com 14F26682D0916CDD81E37B6D61B7B526D98F0353 +# gpg --verify firefox-${FFVERSION}esr.source.tar.xz.asc -+# echo -n 5e69f9bfd1a35decdae8d4b28da8100820e58b429f539fa9884802347631cf53 firefox-${FFVERSION}esr.source.tar.xz |sha256sum -c - ++# echo -n 1aa041db28cd742e93d663a9da8defd33040b38d8b9470350538473251621643 firefox-${FFVERSION}esr.source.tar.xz |sha256sum -c - +# +# echo Extracting Firefox tarball +# tar -xf firefox-${FFVERSION}esr.source.tar.xz diff --git a/gnu/packages/patches/idris-disable-test.patch b/gnu/packages/patches/idris-disable-test.patch new file mode 100644 index 0000000000..ec8c7c8451 --- /dev/null +++ b/gnu/packages/patches/idris-disable-test.patch @@ -0,0 +1,19 @@ +The "pkg010" test output depends on the version of optparse-applicative being +used. The expected output requires optparse-applicative >= 0.15.1.0. Skip +the test for now. + +--- idris-1.3.3/test/TestData.hs 2021-01-19 23:05:24.238958262 -0600 ++++ idris-1.3.3/test/TestData.hs 2021-01-19 23:10:33.314390997 -0600 +@@ -212,8 +212,10 @@ + ( 5, ANY ), + ( 6, ANY ), + ( 7, ANY ), +- ( 8, ANY ), +- ( 10, ANY )]), ++ ( 8, ANY )]), ++-- FIXME: Expected output depends on optparse-applicative version. ++-- See https://github.com/idris-lang/Idris-dev/issues/4896 ++-- ( 10, ANY )]), + ("prelude", "Prelude", + [ ( 1, ANY )]), + ("primitives", "Primitive types", diff --git a/gnu/packages/patches/ipxe-reproducible-geniso.patch b/gnu/packages/patches/ipxe-reproducible-geniso.patch new file mode 100644 index 0000000000..ff6aa1da94 --- /dev/null +++ b/gnu/packages/patches/ipxe-reproducible-geniso.patch @@ -0,0 +1,77 @@ +From 052d24d8217c51c572c2f6cbb4a687be2e8ba52d Mon Sep 17 00:00:00 2001 +From: Brice Waegeneire <brice@waegenei.re> +Date: Fri, 5 Jun 2020 14:38:43 +0200 +Subject: [PATCH] [geniso] Make it reproducible + +Some timestamps get embedded in the generated ISO, making it +unreproducible so we overwrite those timestamps to be at the UNIX epoch. +--- + src/util/geniso | 24 +++++++++++++++++++++--- + 1 file changed, 21 insertions(+), 3 deletions(-) + +diff --git a/src/util/geniso b/src/util/geniso +index ff090d4a..e032ffb0 100755 +--- a/src/util/geniso ++++ b/src/util/geniso +@@ -11,6 +11,13 @@ function help() { + echo " -o FILE save iso image to file" + } + ++function reset_timestamp() { ++ for f in "$1"/*; do ++ touch -t 197001010100 "$f" ++ done ++ touch -t 197001010100 "$1" ++} ++ + LEGACY=0 + FIRST="" + +@@ -37,8 +44,9 @@ if [ -z "${OUT}" ]; then + exit 1 + fi + +-# There should either be mkisofs or the compatible genisoimage program +-for command in genisoimage mkisofs; do ++# There should either be mkisofs, xorriso or the compatible genisoimage ++# program ++for command in xorriso genisoimage mkisofs; do + if ${command} --version >/dev/null 2>/dev/null; then + mkisofs=(${command}) + break +@@ -46,8 +54,10 @@ for command in genisoimage mkisofs; do + done + + if [ -z "${mkisofs}" ]; then +- echo "${0}: mkisofs or genisoimage not found, please install or set PATH" >&2 ++ echo "${0}: mkisofs, xorriso or genisoimage not found, please install or set PATH" >&2 + exit 1 ++elif [ "$mkisofs" = "xorriso" ]; then ++ mkisofs+=(-as mkisofs) + fi + + dir=$(mktemp -d bin/iso.dir.XXXXXX) +@@ -115,6 +125,8 @@ case "${LEGACY}" in + exit 1 + fi + ++ reset_timestamp "$dir" ++ + # generate the iso image + "${mkisofs[@]}" -b boot.img -output ${OUT} ${dir} + ;; +@@ -127,6 +139,12 @@ case "${LEGACY}" in + cp ${LDLINUX_C32} ${dir} + fi + ++ reset_timestamp "$dir" ++ ++ if [ "${mkisofs[0]}" = "xorriso" ]; then ++ mkisofs+=(-isohybrid-mbr "$SYSLINUX_MBR_DISK_PATH") ++ fi ++ + # generate the iso image + "${mkisofs[@]}" -b isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -output ${OUT} ${dir} + +-- +2.26.2 diff --git a/gnu/packages/patches/mesa-skip-disk-cache-test.patch b/gnu/packages/patches/mesa-skip-disk-cache-test.patch deleted file mode 100644 index 190f6b6ee1..0000000000 --- a/gnu/packages/patches/mesa-skip-disk-cache-test.patch +++ /dev/null @@ -1,19 +0,0 @@ -disk_cache_create() here looks up the users home directory from <pwd.h> -which resolves to "/" in the build environment. I could not find an easy -way to set the home directory to something else, so we disable this test -for now. - ---- a/src/compiler/glsl/tests/cache_test.c -+++ b/src/compiler/glsl/tests/cache_test.c -@@ -170,11 +170,6 @@ - unsetenv("MESA_GLSL_CACHE_DIR"); - unsetenv("XDG_CACHE_HOME"); - -- cache = disk_cache_create("test", "make_check", 0); -- expect_non_null(cache, "disk_cache_create with no environment variables"); -- -- disk_cache_destroy(cache); -- - /* Test with XDG_CACHE_HOME set */ - setenv("XDG_CACHE_HOME", CACHE_TEST_TMP "/xdg-cache-home", 1); - cache = disk_cache_create("test", "make_check", 0); diff --git a/gnu/packages/patches/mesa-skip-tests.patch b/gnu/packages/patches/mesa-skip-tests.patch new file mode 100644 index 0000000000..2622d5d312 --- /dev/null +++ b/gnu/packages/patches/mesa-skip-tests.patch @@ -0,0 +1,49 @@ +disk_cache_create() here looks up the users home directory from <pwd.h> +which resolves to "/" in the build environment. I could not find an easy +way to set the home directory to something else, so we disable this test +for now. + +--- a/src/compiler/glsl/tests/cache_test.c ++++ b/src/compiler/glsl/tests/cache_test.c +@@ -170,11 +170,6 @@ + unsetenv("MESA_GLSL_CACHE_DIR"); + unsetenv("XDG_CACHE_HOME"); + +- cache = disk_cache_create("test", "make_check", 0); +- expect_non_null(cache, "disk_cache_create with no environment variables"); +- +- disk_cache_destroy(cache); +- + /* Test with XDG_CACHE_HOME set */ + setenv("XDG_CACHE_HOME", CACHE_TEST_TMP "/xdg-cache-home", 1); + cache = disk_cache_create("test", "make_check", 0); + +This test fails on i686-linux. I couldn't come up with a regex that +could be used to disable it just on i686-linux, so we disable it +completely with this patch: + +https://gitlab.freedesktop.org/mesa/mesa/-/issues/4091 + +diff --git a/src/util/meson.build b/src/util/meson.build +index 0893f64..909b3e0 100644 +--- a/src/util/meson.build ++++ b/src/util/meson.build +@@ -289,18 +289,6 @@ if with_tests + suite : ['util'], + ) + +- test( +- 'u_debug_stack', +- executable( +- 'u_debug_stack_test', +- files('u_debug_stack_test.cpp'), +- include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux], +- dependencies : [idep_mesautil, idep_gtest], +- c_args : [c_msvc_compat_args], +- ), +- suite : ['util'], +- ) +- + process_test_exe = executable( + 'process_test', + files('process_test.c'), diff --git a/gnu/packages/patches/obs-modules-location.patch b/gnu/packages/patches/obs-modules-location.patch new file mode 100644 index 0000000000..18b286d006 --- /dev/null +++ b/gnu/packages/patches/obs-modules-location.patch @@ -0,0 +1,33 @@ +From d250434e6c8eb4f8c8cb47ef3cc6e6de8fa8f828 Mon Sep 17 00:00:00 2001 +From: Alexey Abramov <levenson@mmer.org> +Date: Fri, 15 Jan 2021 17:07:17 +0100 +Subject: [PATCH] Use environment variable for a default module location + +diff --git a/libobs/obs-nix.c b/libobs/obs-nix.c +index 382fa0546..481ea0f14 100644 +*** a/libobs/obs-nix.c +--- b/libobs/obs-nix.c +@@ -66,8 +66,19 @@ + + void add_default_module_paths(void) + { +- for (int i = 0; i < module_patterns_size; i++) +- obs_add_module_path(module_bin[i], module_data[i]); ++ char *bin_directory = getenv("OBS_PLUGINS_DIRECTORY"); ++ char *data_directory = getenv("OBS_PLUGINS_DATA_DIRECTORY"); ++ if (bin_directory && data_directory) { ++ struct dstr dstr_data_directory; ++ dstr_init_copy(&dstr_data_directory, data_directory); ++ dstr_cat(&dstr_data_directory, "/%module%"); ++ obs_add_module_path(bin_directory, dstr_data_directory.array); ++ dstr_free(&dstr_data_directory); ++ ++ } else { ++ for (int i = 0; i < module_patterns_size; i++) ++ obs_add_module_path(module_bin[i], module_data[i]); ++ } + } + + /* +-- +2.29.2
\ No newline at end of file diff --git a/gnu/packages/patches/owncloud-disable-updatecheck.patch b/gnu/packages/patches/owncloud-disable-updatecheck.patch index 3469398eb4..d495a9dec2 100644 --- a/gnu/packages/patches/owncloud-disable-updatecheck.patch +++ b/gnu/packages/patches/owncloud-disable-updatecheck.patch @@ -14,11 +14,11 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ if (connection.isEmpty()) con = defaultConnection(); -- QVariant fallback = getValue(QLatin1String(skipUpdateCheckC), con, false); -+ QVariant fallback = getValue(QLatin1String(skipUpdateCheckC), con, true); - fallback = getValue(QLatin1String(skipUpdateCheckC), QString(), fallback); +- QVariant fallback = getValue(skipUpdateCheckC(), con, false); ++ QVariant fallback = getValue(skipUpdateCheckC(), con, true); + fallback = getValue(skipUpdateCheckC(), QString(), fallback); - QVariant value = getPolicySetting(QLatin1String(skipUpdateCheckC), fallback); + QVariant value = getPolicySetting(skipUpdateCheckC(), fallback); - return value.toBool(); + if ( !value.toBool() ) + qDebug() << "Guix has disabled the UpdateCheck mechanism."; diff --git a/gnu/packages/patches/pidgin-libnm.patch b/gnu/packages/patches/pidgin-libnm.patch deleted file mode 100644 index d34af749af..0000000000 --- a/gnu/packages/patches/pidgin-libnm.patch +++ /dev/null @@ -1,60 +0,0 @@ -From: Tobias Geerinckx-Rice <me@tobias.gr> -Date: Sun, 24 May 2020 16:11:01 +0200 -Subject: [PATCH] gnu: pidgin: Find libnm. - -Copied verbatim from[0]. - -[0]: https://git.archlinux.org/svntogit/packages.git/plain/trunk/pidgin-nm-1.0.patch?h=packages/pidgin - -diff --git a/configure.ac b/configure.ac -index 04836fa..0a2d451 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1423,18 +1423,24 @@ fi - dnl Check for NetworkManager.h; if we don't have it, oh well - if test "x$enable_dbus" = "xyes" ; then - if test "x$enable_nm" = "xyes" ; then -- PKG_CHECK_MODULES(NETWORKMANAGER, [NetworkManager >= 0.5.0], [ -+ PKG_CHECK_MODULES(NETWORKMANAGER, [libnm], [ - AC_SUBST(NETWORKMANAGER_CFLAGS) - AC_SUBST(NETWORKMANAGER_LIBS) - AC_DEFINE(HAVE_NETWORKMANAGER, 1, [Define if we have NetworkManager.]) - ], [ -- enable_nm=no -- if test "x$force_deps" = "xyes" ; then -- AC_MSG_ERROR([ -+ PKG_CHECK_MODULES(NETWORKMANAGER, [NetworkManager >= 0.5.0], [ -+ AC_SUBST(NETWORKMANAGER_CFLAGS) -+ AC_SUBST(NETWORKMANAGER_LIBS) -+ AC_DEFINE(HAVE_NETWORKMANAGER, 1, [Define if we have NetworkManager.]) -+ ], [ -+ enable_nm=no -+ if test "x$force_deps" = "xyes" ; then -+ AC_MSG_ERROR([ - NetworkManager development headers not found. - Use --disable-nm if you do not need NetworkManager support. - ]) -- fi]) -+ fi]) -+ ]) - fi - else - enable_nm=no -diff --git a/libpurple/network.c b/libpurple/network.c -index c43e3c7..b17e439 100644 ---- a/libpurple/network.c -+++ b/libpurple/network.c -@@ -939,8 +939,13 @@ nm_update_state(NMState state) - #if NM_CHECK_VERSION(0,8,992) - case NM_STATE_DISCONNECTING: - #endif -+#if NM_CHECK_VERSION(1,0,0) -+ if (prev != NM_STATE_CONNECTED_GLOBAL && prev != NM_STATE_UNKNOWN) -+ break; -+#else - if (prev != NM_STATE_CONNECTED && prev != NM_STATE_UNKNOWN) - break; -+#endif - if (ui_ops != NULL && ui_ops->network_disconnected != NULL) - ui_ops->network_disconnected(); - break; diff --git a/gnu/packages/patches/pidgin-vv-gst.patch b/gnu/packages/patches/pidgin-vv-gst.patch new file mode 100644 index 0000000000..e0553dd119 --- /dev/null +++ b/gnu/packages/patches/pidgin-vv-gst.patch @@ -0,0 +1,48 @@ +Name: Gary Kramlich +Date: 2020-07-12 +Source: https://keep.imfreedom.org/pidgin/pidgin/rev/39ac50435cfb + +diff --git a/libpurple/mediamanager.c b/libpurple/mediamanager.c +--- a/libpurple/mediamanager.c ++++ b/libpurple/mediamanager.c +@@ -2231,6 +2231,7 @@ + purple_media_manager_unregister_gst_device(PurpleMediaManager *manager, + GstDevice *device) + { ++#ifdef USE_VV + GList *i; + gchar *name; + gchar *device_class; +@@ -2277,6 +2278,7 @@ + + g_free(name); + g_free(device_class); ++#endif /* USE_VV */ + } + + static gboolean +@@ -2304,7 +2306,7 @@ + static void + purple_media_manager_init_device_monitor(PurpleMediaManager *manager) + { +-#if GST_CHECK_VERSION(1, 4, 0) ++#if GST_CHECK_VERSION(1, 4, 0) && defined(USE_VV) + GstBus *bus; + GList *i; + +@@ -2334,6 +2336,7 @@ + PurpleMediaElementType type) + { + GList *result = NULL; ++#ifdef USE_VV + GList *i; + + for (i = manager->priv->elements; i; i = i->next) { +@@ -2347,6 +2350,7 @@ + result = g_list_prepend(result, info); + } + } ++#endif /* USE_VV */ + + return result; + } diff --git a/gnu/packages/patches/pinentry-efl.patch b/gnu/packages/patches/pinentry-efl.patch deleted file mode 100644 index 5ba79e28df..0000000000 --- a/gnu/packages/patches/pinentry-efl.patch +++ /dev/null @@ -1,798 +0,0 @@ -https://git.gnupg.org/cgi-bin/gitweb.cgi?p=pinentry.git;a=commit;h=948105b7a34ec9a9e5479d376b7c86bafee50a01 -This patch can be removed with the next release of pinentry. - -From 948105b7a34ec9a9e5479d376b7c86bafee50a01 Mon Sep 17 00:00:00 2001 -From: "William L. Thomson Jr" <wlt@o-sinc.com> -Date: Tue, 29 May 2018 22:50:47 +0100 -Subject: [PATCH] efl: Add an EFL-based pinentry. - -* NEWS: Update. -* Makefile.am: Add new efl subdirectory. -* configure.ac: Add --enable-pinentry-efl option. -* efl/Makefile.am: New file. -* efl/pinentry-efl.c: New file. - -Signed-off-by: Damien Goutte-Gattat <dgouttegattat@incenp.org> ---- - Makefile.am | 8 +- - configure.ac | 44 +++- - efl/Makefile.am | 38 ++++ - efl/pinentry-efl.c | 623 +++++++++++++++++++++++++++++++++++++++++++++++++++++ - 6 files changed, 716 insertions(+), 2 deletions(-) - create mode 100644 efl/Makefile.am - create mode 100644 efl/pinentry-efl.c - -diff --git a/Makefile.am b/Makefile.am -index 8c8b8e5..b8fd0e1 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -82,10 +82,16 @@ else - pinentry_fltk = - endif - -+if BUILD_PINENTRY_EFL -+pinentry_efl = efl -+else -+pinentry_efl = -+endif -+ - SUBDIRS = m4 secmem pinentry ${pinentry_curses} ${pinentry_tty} \ - ${pinentry_emacs} ${pinentry_gtk_2} ${pinentry_gnome_3} \ - ${pinentry_qt} ${pinentry_tqt} ${pinentry_w32} \ -- ${pinentry_fltk} doc -+ ${pinentry_fltk} ${pinentry_efl} doc - - - install-exec-local: -diff --git a/configure.ac b/configure.ac -index ff6c2e0..e305e44 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -419,6 +419,42 @@ fi - - - dnl -+dnl Check for EFL pinentry programs. -+dnl -+AC_ARG_ENABLE(pinentry-efl, -+ AC_HELP_STRING([--enable-pinentry-efl], [build EFL pinentry]), -+ pinentry_efl=$enableval, pinentry_efl=maybe) -+ -+dnl check for pkg-config -+if test "$pinentry_efl" != "no"; then -+ AC_PATH_PROG(PKG_CONFIG, pkg-config, no) -+ if test x"${PKG_CONFIG}" = xno ; then -+ pinentry_efl=no -+ fi -+fi -+ -+if test "$pinentry_efl" != "no"; then -+ AC_MSG_CHECKING([for efl]) -+ "${PKG_CONFIG}" --exists 'elementary >= 1.18' -+ if test $? -ne 0 ; then -+ AC_MSG_RESULT([no]) -+ AC_MSG_WARN([efl >= 1.18 is required for efl pinentry]) -+ pinentry_efl=no -+ else -+ AC_MSG_RESULT([yes]) -+ EFL_CFLAGS=`"${PKG_CONFIG}" --cflags ecore-x elementary` -+ EFL_LIBS=`"${PKG_CONFIG}" --libs ecore-x elementary` -+ AC_SUBST(EFL_CFLAGS) -+ AC_SUBST(EFL_LIBS) -+ if test "$pinentry_efl" != "no" -+ then -+ pinentry_efl=yes -+ fi -+ fi -+fi -+AM_CONDITIONAL(BUILD_PINENTRY_EFL, test "$pinentry_efl" = "yes") -+ -+dnl - dnl Check for GTK+-2 / GNOME3 pinentry programs. - dnl - AC_ARG_ENABLE(pinentry-gtk2, -@@ -645,7 +681,11 @@ else - if test "$pinentry_tqt" = "yes"; then - PINENTRY_DEFAULT=pinentry-tqt - else -- AC_MSG_ERROR([[No pinentry enabled.]]) -+ if test "$pinentry_efl" = "yes"; then -+ PINENTRY_DEFAULT=pinentry-efl -+ else -+ AC_MSG_ERROR([[No pinentry enabled.]]) -+ fi - fi - fi - fi -@@ -721,6 +761,7 @@ secmem/Makefile - pinentry/Makefile - curses/Makefile - tty/Makefile -+efl/Makefile - emacs/Makefile - gtk+-2/Makefile - gnome3/Makefile -@@ -744,6 +785,7 @@ AC_MSG_NOTICE([ - Curses Pinentry ..: $pinentry_curses - TTY Pinentry .....: $pinentry_tty - Emacs Pinentry ...: $pinentry_emacs -+ EFL Pinentry .....: $pinentry_efl - GTK+-2 Pinentry ..: $pinentry_gtk_2 - GNOME 3 Pinentry .: $pinentry_gnome_3 - Qt Pinentry ......: $pinentry_qt $pinentry_qt_lib_version -diff --git a/efl/Makefile.am b/efl/Makefile.am -new file mode 100644 -index 0000000..b986a04 ---- /dev/null -+++ b/efl/Makefile.am -@@ -0,0 +1,38 @@ -+# Makefile.am - PIN entry EFL frontend. -+# Copyright (C) 2017 Obsidian-Studios, Inc. -+# Author William L. Thomson Jr. <wlt@o-sinc.com> -+# -+# This file is part of PINENTRY. -+# -+# PINENTRY is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# PINENTRY is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA -+ -+## Process this file with automake to produce Makefile.in -+ -+bin_PROGRAMS = pinentry-efl -+ -+if FALLBACK_CURSES -+ncurses_include = $(NCURSES_INCLUDE) -+libcurses = ../pinentry/libpinentry-curses.a $(LIBCURSES) $(LIBICONV) -+else -+ncurses_include = -+libcurses = -+endif -+ -+AM_CPPFLAGS = $(COMMON_CFLAGS) $(EFL_CFLAGS) $(ncurses_include) \ -+ -I$(top_srcdir)/secmem -I$(top_srcdir)/pinentry -+LDADD = ../pinentry/libpinentry.a ../secmem/libsecmem.a \ -+ $(COMMON_LIBS) $(LIBCAP) $(EFL_LIBS) $(libcurses) -+ -+pinentry_efl_SOURCES = pinentry-efl.c -diff --git a/efl/pinentry-efl.c b/efl/pinentry-efl.c -new file mode 100644 -index 0000000..ca99693 ---- /dev/null -+++ b/efl/pinentry-efl.c -@@ -0,0 +1,623 @@ -+/* pinentry-efl.c -+ Copyright (C) 2017 Obsidian-Studios, Inc. -+ Author William L. Thomson Jr. <wlt@o-sinc.com> -+ -+ Based on pinentry-gtk2.c -+ Copyright (C) 1999 Robert Bihlmeyer <robbe@orcus.priv.at> -+ Copyright (C) 2001, 2002, 2007, 2015 g10 Code GmbH -+ Copyright (C) 2004 by Albrecht Dreà <albrecht.dress@arcor.de> -+ -+ pinentry-efl is a pinentry application for the EFL widget set. -+ It tries to follow the Gnome Human Interface Guide as close as -+ possible. -+ -+ This program is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2 of the License, or -+ (at your option) any later version. -+ -+ This program is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with this program; if not, write to the Free Software -+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ */ -+ -+#ifdef HAVE_CONFIG_H -+#include "config.h" -+#endif -+#include <Elementary.h> -+#include <Ecore_X.h> -+#include <gpg-error.h> -+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7) -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wstrict-prototypes" -+#endif -+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7) -+#pragma GCC diagnostic pop -+#endif -+ -+#ifdef HAVE_GETOPT_H -+#include <getopt.h> -+#else -+#include "getopt.h" -+#endif /* HAVE_GETOPT_H */ -+ -+#include "pinentry.h" -+ -+#ifdef FALLBACK_CURSES -+#include "pinentry-curses.h" -+#endif -+ -+#define PGMNAME "pinentry-efl" -+ -+#ifndef VERSION -+#define VERSION -+#endif -+ -+#define ENTRY_HIDE "Hide entry" -+#define ENTRY_SHOW "Show entry" -+ -+typedef enum { CONFIRM_CANCEL, CONFIRM_OK, CONFIRM_NOTOK } confirm_value_t; -+ -+static const int WIDTH = 480; -+static const int BUTTON_HEIGHT = 27; -+static const int BUTTON_WIDTH = 70; -+static const int BUTTON_ICON_SIZE = 13; -+static const int PADDING = 5; -+ -+static Eina_Bool got_input; -+static Ecore_Timer *timer; -+static Evas_Object *check_label; -+static Evas_Object *error_label; -+static Evas_Object *entry; -+static Evas_Object *repeat_entry; -+static Evas_Object *qualitybar; -+static Evas_Object *win; -+static char **pargv; -+static int grab_failed; -+static int passphrase_ok; -+static int confirm_mode; -+static int pargc; -+static confirm_value_t confirm_value; -+static pinentry_t pinentry; -+ -+pinentry_cmd_handler_t pinentry_cmd_handler; -+ -+static void -+quit (void) -+{ -+ evas_object_del(win); -+ elm_exit(); -+ ecore_main_loop_quit (); -+} -+ -+static void -+delete_event (void *data EINA_UNUSED, -+ Evas_Object *obj EINA_UNUSED, -+ void *event EINA_UNUSED) -+{ -+ pinentry->close_button = 1; -+ quit (); -+} -+ -+static void -+changed_text_handler (void *data EINA_UNUSED, -+ Evas_Object *obj, -+ void *event EINA_UNUSED) -+{ -+ const char *s; -+ int length; -+ int percent; -+ -+ got_input = EINA_TRUE; -+ -+ if (pinentry->repeat_passphrase && repeat_entry) -+ { -+ elm_object_text_set (repeat_entry, ""); -+ elm_object_text_set (error_label, ""); -+ } -+ -+ if (!qualitybar || !pinentry->quality_bar) -+ return; -+ -+ s = elm_object_text_get (obj); -+ if (!s) -+ s = ""; -+ length = strlen (s); -+ percent = length? pinentry_inq_quality (pinentry, s, length) : 0; -+ evas_object_color_set(qualitybar, -+ 255 - ( 2.55 * percent ), -+ 2.55 * percent, 0, 255); -+ elm_progressbar_value_set (qualitybar, (double) percent / 100.0); -+} -+ -+static void -+on_check (void *data EINA_UNUSED, Evas_Object *obj, void *event EINA_UNUSED) -+{ -+ if(elm_check_state_get(obj)) -+ { -+ elm_entry_password_set(entry, EINA_FALSE); -+ elm_object_text_set(check_label,ENTRY_HIDE); -+ } -+ else -+ { -+ elm_entry_password_set(entry, EINA_TRUE); -+ elm_object_text_set(check_label,ENTRY_SHOW); -+ } -+ evas_object_size_hint_min_set(check_label, -+ ELM_SCALE_SIZE(BUTTON_WIDTH), -+ ELM_SCALE_SIZE(BUTTON_HEIGHT)); -+ evas_object_size_hint_align_set(check_label, 0, 1); -+} -+ -+static void -+on_click (void *data, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED) -+{ -+ if (confirm_mode) -+ { -+ confirm_value = (confirm_value_t) data; -+ quit (); -+ return; -+ } -+ -+ if (data) -+ { -+ const char *s; -+ const char *s2; -+ -+ s = elm_entry_entry_get (entry); -+ if (!s) -+ s = ""; -+ -+ if (pinentry->repeat_passphrase && repeat_entry) -+ { -+ s2 = elm_entry_entry_get (repeat_entry); -+ if (!s2) -+ s2 = ""; -+ if (strcmp (s, s2)) -+ { -+ elm_object_text_set(error_label, -+ pinentry->repeat_error_string? -+ pinentry->repeat_error_string: -+ "not correctly repeated"); -+ elm_object_focus_set(entry,EINA_TRUE); -+ return; -+ } -+ pinentry->repeat_okay = 1; -+ } -+ -+ passphrase_ok = 1; -+ pinentry_setbufferlen (pinentry, strlen (s) + 1); -+ if (pinentry->pin) -+ strncpy (pinentry->pin, s, strlen(s) + 1); -+ } -+ quit (); -+} -+ -+static void -+enter_callback (void *data, Evas_Object * obj, void *event_info EINA_UNUSED) -+{ -+ if (data) -+ elm_object_focus_set (data, 1); -+ else -+ on_click ((void *) CONFIRM_OK, obj, NULL); -+} -+ -+static Eina_Bool -+timeout_cb (const void * data) -+{ -+ pinentry_t pe = (pinentry_t)data; -+ if (!got_input) -+ { -+ ecore_main_loop_quit(); -+ if (pe) -+ pe->specific_err = gpg_error (GPG_ERR_TIMEOUT); -+ } -+ -+ timer = NULL; -+ return ECORE_CALLBACK_DONE; -+} -+ -+static void -+create_window (void) -+{ -+ char *txt; -+ Evas_Object *icon; -+ Evas_Object *obj; -+ Evas_Object *table; -+ int btn_txt_len = 0; -+ int row = 0; -+ int ok_len = 0; -+ -+ win = elm_win_util_dialog_add(NULL,"pinentry","enter pin"); -+ elm_win_autodel_set(win, EINA_TRUE); -+ elm_win_center(win,EINA_TRUE,EINA_TRUE); -+ evas_object_smart_callback_add(win, "delete,request", delete_event, NULL); -+ -+ table = elm_table_add(win); -+ elm_table_padding_set(table,ELM_SCALE_SIZE(PADDING),0); -+ evas_object_size_hint_padding_set (table, -+ ELM_SCALE_SIZE(PADDING), -+ ELM_SCALE_SIZE(PADDING), -+ ELM_SCALE_SIZE(PADDING), -+ ELM_SCALE_SIZE(PADDING)); -+ evas_object_show(table); -+ -+ if (pinentry->title) -+ { -+ txt = pinentry_utf8_to_local (pinentry->lc_ctype, -+ pinentry->title); -+ elm_win_title_set ( win, txt ); -+ free (txt); -+ } -+ -+ /* Description Label */ -+ if (pinentry->description) -+ { -+ char* aligned; -+ int len; -+ -+ obj = elm_label_add(table); -+ elm_label_line_wrap_set (obj, ELM_WRAP_WORD); -+ txt = pinentry_utf8_to_local (pinentry->lc_ctype, pinentry->description); -+ len = strlen(txt)+20; // 20 chars for align tag -+ aligned = calloc(len+1,sizeof(char)); -+ if(aligned) -+ { -+ snprintf(aligned,len, "<align=left>%s</align>",txt); -+ elm_object_text_set(obj,aligned); -+ free (aligned); -+ } else -+ elm_object_text_set(obj,txt); -+ free (txt); -+ evas_object_size_hint_weight_set(obj, EVAS_HINT_EXPAND, 0); -+ evas_object_size_hint_align_set(obj, EVAS_HINT_FILL, 0); -+ elm_table_pack(table, obj, 1, row, 5, 1); -+ evas_object_show(obj); -+ row++; -+ } -+ if (!confirm_mode && (pinentry->error || pinentry->repeat_passphrase)) -+ { -+ /* Error Label */ -+ if (pinentry->error) -+ txt = pinentry_utf8_to_local (pinentry->lc_ctype, pinentry->error); -+ else -+ txt = ""; -+ obj = elm_label_add(table); -+ evas_object_color_set(obj, 255, 0, 0, 255); -+ elm_object_text_set(obj,txt); -+ elm_object_style_set(obj,"slide_bounce"); -+ elm_label_slide_duration_set(obj, 10); -+ elm_label_slide_mode_set(obj, ELM_LABEL_SLIDE_MODE_ALWAYS); -+ elm_label_slide_go(obj); -+ evas_object_size_hint_weight_set(obj, EVAS_HINT_EXPAND, 0); -+ evas_object_size_hint_align_set(obj, EVAS_HINT_FILL, 0); -+ elm_table_pack(table, obj, 1, row, 5, 1); -+ evas_object_show(obj); -+ if (pinentry->error) -+ free (txt); -+ row++; -+ } -+ -+ qualitybar = NULL; -+ -+ if (!confirm_mode) -+ { -+ -+ if (pinentry->prompt) -+ { -+ /* Entry/Prompt Label */ -+ obj = elm_label_add(table); -+ txt = pinentry_utf8_to_local (pinentry->lc_ctype, pinentry->prompt); -+ elm_object_text_set(obj,txt); -+ free (txt); -+ evas_object_size_hint_weight_set(obj, 0, EVAS_HINT_EXPAND); -+ evas_object_size_hint_align_set(obj, 1, EVAS_HINT_FILL); -+ elm_table_pack(table, obj, 1, row, 1, 1); -+ evas_object_show(obj); -+ } -+ -+ entry = elm_entry_add(table); -+ elm_entry_scrollable_set(entry, EINA_TRUE); -+ elm_scroller_policy_set(entry, -+ ELM_SCROLLER_POLICY_OFF, -+ ELM_SCROLLER_POLICY_OFF); -+ elm_entry_password_set(entry, EINA_TRUE); -+ elm_entry_single_line_set(entry, EINA_TRUE); -+ evas_object_size_hint_weight_set(entry, 0, 0); -+ evas_object_size_hint_align_set(entry, EVAS_HINT_FILL, 0); -+ elm_table_pack(table, entry, 2, row, 4, 1); -+ evas_object_smart_callback_add(entry, -+ "changed", -+ changed_text_handler, -+ NULL); -+ evas_object_show(entry); -+ row++; -+ -+ /* Check box */ -+ obj = elm_check_add(table); -+ evas_object_size_hint_align_set(obj, 1, EVAS_HINT_FILL); -+ elm_table_pack(table, obj, 1, row, 1, 1); -+ evas_object_smart_callback_add(obj, "changed", on_check, NULL); -+ evas_object_show(obj); -+ -+ /* Check Label */ -+ check_label = elm_label_add(table); -+ on_check((void *)NULL, obj, (void *)NULL); -+ elm_table_pack(table, check_label, 2, row, 4, 1); -+ evas_object_show(check_label); -+ row++; -+ -+ if (pinentry->quality_bar) -+ { -+ /* Quality Bar Label */ -+ obj = elm_label_add(table); -+ txt = pinentry_utf8_to_local (pinentry->lc_ctype, -+ pinentry->quality_bar); -+ elm_object_text_set(obj,txt); -+ free (txt); -+ evas_object_size_hint_weight_set(obj, 0, EVAS_HINT_EXPAND); -+ evas_object_size_hint_align_set(obj, 1, EVAS_HINT_FILL); -+ elm_table_pack(table, obj, 1, row, 1, 1); -+ evas_object_show(obj); -+ -+ qualitybar = elm_progressbar_add(table); -+ evas_object_color_set(qualitybar, 255, 0, 0, 255); -+ evas_object_show(qualitybar); -+ if (pinentry->quality_bar_tt) -+ elm_object_tooltip_text_set (qualitybar, -+ pinentry->quality_bar_tt); -+ evas_object_size_hint_weight_set(qualitybar, EVAS_HINT_EXPAND, 0); -+ evas_object_size_hint_align_set(qualitybar, EVAS_HINT_FILL, 0); -+ elm_table_pack(table, qualitybar, 2, row, 4, 1); -+ row++; -+ } -+ -+ if (pinentry->repeat_passphrase) -+ { -+ /* Repeat Label */ -+ obj = elm_label_add(table); -+ txt = pinentry_utf8_to_local (pinentry->lc_ctype, -+ pinentry->repeat_passphrase); -+ elm_object_text_set(obj,txt); -+ free (txt); -+ evas_object_size_hint_weight_set(obj, 0, EVAS_HINT_EXPAND); -+ evas_object_size_hint_align_set(obj, 1, EVAS_HINT_FILL); -+ elm_table_pack(table, obj, 1, row, 1, 1); -+ evas_object_show(obj); -+ -+ repeat_entry = elm_entry_add(table); -+ elm_entry_scrollable_set(repeat_entry, EINA_TRUE); -+ elm_scroller_policy_set(repeat_entry, -+ ELM_SCROLLER_POLICY_OFF, -+ ELM_SCROLLER_POLICY_OFF); -+ elm_entry_password_set(repeat_entry, EINA_TRUE); -+ elm_entry_single_line_set(repeat_entry, EINA_TRUE); -+ evas_object_size_hint_weight_set(repeat_entry, 0, 0); -+ evas_object_size_hint_align_set(repeat_entry, EVAS_HINT_FILL, 0); -+ elm_table_pack(table, repeat_entry, 2, row, 4, 1); -+ evas_object_smart_callback_add (repeat_entry, "activated", -+ enter_callback, NULL); -+ evas_object_show(repeat_entry); -+ evas_object_smart_callback_add (entry, -+ "activated", -+ enter_callback, -+ repeat_entry); -+ evas_object_smart_callback_add(repeat_entry, -+ "activated", -+ on_click, -+ (void *) CONFIRM_OK); -+ row++; -+ } -+ else -+ evas_object_smart_callback_add(entry, -+ "activated", -+ on_click, -+ (void *) CONFIRM_OK); -+ } -+ -+ /* Cancel Button */ -+ if (!pinentry->one_button) -+ { -+ obj = elm_button_add(table); -+ icon = elm_icon_add (table); -+ evas_object_size_hint_aspect_set (icon, EVAS_ASPECT_CONTROL_BOTH, 1, 1); -+ if (elm_icon_standard_set (icon, "dialog-cancel") || -+ elm_icon_standard_set (icon, "window-close")) -+ { -+ evas_object_size_hint_min_set(icon, -+ ELM_SCALE_SIZE(BUTTON_ICON_SIZE), -+ ELM_SCALE_SIZE(BUTTON_ICON_SIZE)); -+ elm_object_part_content_set(obj, "icon", icon); -+ evas_object_show (icon); -+ } -+ else -+ evas_object_del(icon); -+ if (pinentry->cancel || pinentry->default_cancel) -+ { -+ if(pinentry->cancel) -+ txt = pinentry_utf8_to_local (pinentry->lc_ctype, pinentry->cancel); -+ else -+ txt = pinentry_utf8_to_local (pinentry->lc_ctype, -+ pinentry->default_cancel); -+ if(txt[0]=='_') -+ elm_object_text_set(obj,txt+1); -+ else -+ elm_object_text_set(obj,txt); -+ btn_txt_len = ELM_SCALE_SIZE(strlen(txt) * (PADDING * 1.5)); -+ free (txt); -+ } -+ else -+ elm_object_text_set(obj, "Cancel"); //STOCK_CANCEL -+ evas_object_size_hint_align_set(obj, 0, 0); -+ if(btn_txt_len>ELM_SCALE_SIZE(BUTTON_WIDTH)) -+ evas_object_size_hint_min_set(obj, -+ btn_txt_len, -+ ELM_SCALE_SIZE(BUTTON_HEIGHT)); -+ else -+ evas_object_size_hint_min_set(obj, -+ ELM_SCALE_SIZE(BUTTON_WIDTH), -+ ELM_SCALE_SIZE(BUTTON_HEIGHT)); -+ elm_table_pack(table, obj, 4, row, 1, 1); -+ evas_object_smart_callback_add(obj, -+ "clicked", -+ on_click, -+ (void *) CONFIRM_CANCEL); -+ evas_object_show(obj); -+ } -+ -+ /* OK Button */ -+ obj = elm_button_add(table); -+ icon = elm_icon_add (table); -+ evas_object_size_hint_aspect_set (icon, EVAS_ASPECT_CONTROL_BOTH, 1, 1); -+ if (elm_icon_standard_set (icon, "dialog-ok") || -+ elm_icon_standard_set (icon, "list-add")) -+ { -+ evas_object_size_hint_min_set(icon, -+ ELM_SCALE_SIZE(BUTTON_ICON_SIZE), -+ ELM_SCALE_SIZE(BUTTON_ICON_SIZE)); -+ elm_object_part_content_set(obj, "icon", icon); -+ evas_object_show (icon); -+ } -+ else -+ evas_object_del(icon); -+ if (pinentry->ok || pinentry->default_ok) -+ { -+ if(pinentry->ok) -+ txt = pinentry_utf8_to_local (pinentry->lc_ctype, pinentry->ok); -+ else -+ txt = pinentry_utf8_to_local (pinentry->lc_ctype, pinentry->default_ok); -+ if(txt[0]=='_') -+ elm_object_text_set(obj,txt+1); -+ else -+ elm_object_text_set(obj,txt); -+ ok_len = ELM_SCALE_SIZE(strlen(txt) * (PADDING * 1.5)); -+ if(ok_len>btn_txt_len) -+ btn_txt_len = ok_len; -+ free (txt); -+ } -+ else -+ elm_object_text_set(obj,"OK"); //STOCK_OK -+ evas_object_size_hint_align_set(obj, 0, 0); -+ if(btn_txt_len>ELM_SCALE_SIZE(BUTTON_WIDTH)) -+ evas_object_size_hint_min_set(obj, -+ btn_txt_len, -+ ELM_SCALE_SIZE(BUTTON_HEIGHT)); -+ else -+ evas_object_size_hint_min_set(obj, -+ ELM_SCALE_SIZE(BUTTON_WIDTH), -+ ELM_SCALE_SIZE(BUTTON_HEIGHT)); -+ elm_table_pack(table, obj, 5, row, 1, 1); -+ evas_object_smart_callback_add(obj, "clicked", on_click, (void *) CONFIRM_OK); -+ evas_object_show(obj); -+ -+ /* Key/Lock Icon */ -+ obj = elm_icon_add (win); -+ evas_object_size_hint_aspect_set (obj, EVAS_ASPECT_CONTROL_BOTH, 1, 1); -+ if (elm_icon_standard_set (obj, "dialog-password")) -+ { -+ double ic_size = WIDTH/5; -+ if(row==0) -+ ic_size = ic_size/3.5; -+ else if(row<4) -+ ic_size = ic_size - ic_size/row; -+ evas_object_size_hint_min_set(obj, -+ ELM_SCALE_SIZE(ic_size), -+ ELM_SCALE_SIZE(ic_size)); -+ evas_object_size_hint_weight_set(obj, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); -+ evas_object_size_hint_align_set(obj, EVAS_HINT_FILL, 0.5); -+ elm_table_pack(table, obj, 0, 0, 1, row? row:1); -+ evas_object_show (obj); -+ } -+ else -+ evas_object_del(obj); -+ -+ /* Box for padding */ -+ obj = elm_box_add (win); -+ elm_box_pack_end (obj, table); -+ evas_object_show (obj); -+ -+ elm_win_resize_object_add(win,obj); -+ evas_object_show(win); -+ -+ if(entry) -+ elm_object_focus_set (entry, EINA_TRUE); -+ -+ if (pinentry->timeout > 0) -+ timer = ecore_timer_add (pinentry->timeout, -+ (Ecore_Task_Cb)timeout_cb, -+ pinentry); -+} -+ -+static int -+efl_cmd_handler (pinentry_t pe) -+{ -+ int want_pass = !!pe->pin; -+ -+ got_input = EINA_FALSE; -+ pinentry = pe; -+ confirm_value = CONFIRM_CANCEL; -+ passphrase_ok = 0; -+ confirm_mode = want_pass ? 0 : 1; -+ /* init ecore-x explicitly using DISPLAY since this can launch -+ * from console -+ */ -+ if (pe->display) -+ ecore_x_init (pe->display); -+ elm_init (pargc, pargv); -+ create_window (); -+ ecore_main_loop_begin (); -+ -+ if (timer) -+ { -+ ecore_timer_del (timer); -+ timer = NULL; -+ } -+ -+ if (confirm_value == CONFIRM_CANCEL || grab_failed) -+ pe->canceled = 1; -+ -+ pinentry = NULL; -+ if (want_pass) -+ { -+ if (passphrase_ok && pe->pin) -+ return strlen (pe->pin); -+ else -+ return -1; -+ } -+ else -+ return (confirm_value == CONFIRM_OK) ? 1 : 0; -+} -+ -+int -+main (int argc, char *argv[]) -+{ -+ pinentry_init (PGMNAME); -+ -+#ifdef FALLBACK_CURSES -+ if (pinentry_have_display (argc, argv)) -+ { -+#endif -+ -+ pinentry_cmd_handler = efl_cmd_handler; -+ pargc = argc; -+ pargv = argv; -+ -+#ifdef FALLBACK_CURSES -+ } -+ else -+ { -+ pinentry_cmd_handler = curses_cmd_handler; -+ } -+#endif -+ -+ pinentry_parse_opts (argc, argv); -+ if (pinentry_loop ()) -+ return 1; -+ -+ return 0; -+} --- -2.8.0.rc3 - diff --git a/gnu/packages/patches/podofo-cmake-3.12.patch b/gnu/packages/patches/podofo-cmake-3.12.patch deleted file mode 100644 index 0a3c19b21a..0000000000 --- a/gnu/packages/patches/podofo-cmake-3.12.patch +++ /dev/null @@ -1,19 +0,0 @@ -The build fails with cmake 3.12.0. This patch will be obsolete with the next -release. - -https://sourceforge.net/p/podofo/tickets/24/attachment/podofo-cmake-3.12.patch - - ---- a/test/TokenizerTest/CMakeLists.txt 2018-07-20 18:26:02.921494293 +0200 -+++ b/test/TokenizerTest/CMakeLists.txt 2018-07-20 18:34:53.727136443 +0200 -@@ -2,10 +2,3 @@ - TARGET_LINK_LIBRARIES(TokenizerTest ${PODOFO_LIB} ${PODOFO_LIB_DEPENDS}) - SET_TARGET_PROPERTIES(TokenizerTest PROPERTIES COMPILE_FLAGS "${PODOFO_CFLAGS}") - ADD_DEPENDENCIES(TokenizerTest ${PODOFO_DEPEND_TARGET}) -- --# Copy the test samples over to the build tree --ADD_CUSTOM_COMMAND( -- TARGET TokenizerTest -- POST_BUILD -- COMMAND "${CMAKE_COMMAND}" -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/objects" "${CMAKE_CURRENT_BINARY_DIR}/objects" -- ) diff --git a/gnu/packages/patches/pulseview-qt515-compat.patch b/gnu/packages/patches/pulseview-qt515-compat.patch new file mode 100644 index 0000000000..a7156b2018 --- /dev/null +++ b/gnu/packages/patches/pulseview-qt515-compat.patch @@ -0,0 +1,145 @@ +https://sigrok.org/gitweb/?p=pulseview.git;a=patch;h=ae726b70a7ada9a4be5808e00f0c951318479684 + +From ae726b70a7ada9a4be5808e00f0c951318479684 Mon Sep 17 00:00:00 2001 +From: Valentin Ochs <a@0au.de> +Date: Sat, 20 Jun 2020 16:01:27 +0200 +Subject: [PATCH] Replace obsolete/deprecated Qt methods + +--- + pv/subwindows/decoder_selector/subwindow.cpp | 2 +- + pv/util.cpp | 21 ++++++++++++++++++-- + pv/util.hpp | 10 ++++++++++ + pv/views/trace/decodetrace.cpp | 3 ++- + pv/views/trace/ruler.cpp | 2 +- + pv/widgets/timestampspinbox.cpp | 2 +- + 6 files changed, 34 insertions(+), 6 deletions(-) + +diff --git a/pv/subwindows/decoder_selector/subwindow.cpp b/pv/subwindows/decoder_selector/subwindow.cpp +index 94ed6f4b..2c65dcf2 100644 +--- a/pv/subwindows/decoder_selector/subwindow.cpp ++++ b/pv/subwindows/decoder_selector/subwindow.cpp +@@ -185,7 +185,7 @@ QToolBar* SubWindow::create_toolbar(QWidget *parent) const + int SubWindow::minimum_width() const + { + QFontMetrics m(info_label_body_->font()); +- const int label_width = m.width(QString(tr(initial_notice))); ++ const int label_width = util::text_width(m, tr(initial_notice)); + + return label_width + min_width_margin; + } +diff --git a/pv/util.cpp b/pv/util.cpp +index 897254e1..dfb8c72b 100644 +--- a/pv/util.cpp ++++ b/pv/util.cpp +@@ -143,7 +143,7 @@ QString format_time_si(const Timestamp& v, SIPrefix prefix, + QString s; + QTextStream ts(&s); + if (sign && !v.is_zero()) +- ts << forcesign; ++ ts.setNumberFlags(ts.numberFlags() | QTextStream::ForceSign); + ts << qSetRealNumberPrecision(precision) << (v * multiplier); + ts << ' ' << prefix << unit; + +@@ -169,7 +169,7 @@ QString format_value_si(double v, SIPrefix prefix, unsigned precision, + QString s; + QTextStream ts(&s); + if (sign && (v != 0)) +- ts << forcesign; ++ ts.setNumberFlags(ts.numberFlags() | QTextStream::ForceSign); + ts.setRealNumberNotation(QTextStream::FixedNotation); + ts.setRealNumberPrecision(precision); + ts << (v * multiplier) << ' ' << prefix << unit; +@@ -279,5 +279,22 @@ vector<string> split_string(string text, string separator) + return result; + } + ++/** ++ * Return the width of a string in a given font. ++ * ++ * @param[in] metric metrics of the font ++ * @param[in] string the string whose width should be determined ++ * ++ * @return width of the string in pixels ++ */ ++std::streamsize text_width(const QFontMetrics &metric, const QString &string) ++{ ++#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) ++ return metric.horizontalAdvance(string); ++#else ++ return metric.width(string); ++#endif ++} ++ + } // namespace util + } // namespace pv +diff --git a/pv/util.hpp b/pv/util.hpp +index fab29a14..49ae04b2 100644 +--- a/pv/util.hpp ++++ b/pv/util.hpp +@@ -30,6 +30,7 @@ + + #include <QMetaType> + #include <QString> ++#include <QFontMetrics> + + using std::string; + using std::vector; +@@ -143,6 +144,15 @@ QString format_time_minutes(const Timestamp& t, signed precision = 0, + + vector<string> split_string(string text, string separator); + ++/** ++ * Return the width of a string in a given font. ++ * @param[in] metric metrics of the font ++ * @param[in] string the string whose width should be determined ++ * ++ * @return width of the string in pixels ++ */ ++std::streamsize text_width(const QFontMetrics &metric, const QString &string); ++ + } // namespace util + } // namespace pv + +diff --git a/pv/views/trace/decodetrace.cpp b/pv/views/trace/decodetrace.cpp +index 67c9b1c4..93c7c5a9 100644 +--- a/pv/views/trace/decodetrace.cpp ++++ b/pv/views/trace/decodetrace.cpp +@@ -161,7 +161,8 @@ DecodeTrace::DecodeTrace(pv::Session &session, + + // Determine shortest string we want to see displayed in full + QFontMetrics m(QApplication::font()); +- min_useful_label_width_ = m.width("XX"); // e.g. two hex characters ++ // e.g. two hex characters ++ min_useful_label_width_ = util::text_width(m, "XX"); + + default_row_height_ = (ViewItemPaintParams::text_height() * 6) / 4; + annotation_height_ = (ViewItemPaintParams::text_height() * 5) / 4; +diff --git a/pv/views/trace/ruler.cpp b/pv/views/trace/ruler.cpp +index 555794fc..83ffed28 100644 +--- a/pv/views/trace/ruler.cpp ++++ b/pv/views/trace/ruler.cpp +@@ -283,7 +283,7 @@ void Ruler::paintEvent(QPaintEvent*) + const int rightedge = width(); + const int x_tick = tick.first; + if ((x_tick > leftedge) && (x_tick < rightedge)) { +- const int x_left_bound = QFontMetrics(font()).width(tick.second) / 2; ++ const int x_left_bound = util::text_width(QFontMetrics(font()), tick.second) / 2; + const int x_right_bound = rightedge - x_left_bound; + const int x_legend = min(max(x_tick, x_left_bound), x_right_bound); + p.drawText(x_legend, ValueMargin, 0, text_height, +diff --git a/pv/widgets/timestampspinbox.cpp b/pv/widgets/timestampspinbox.cpp +index fea8175e..01424a5b 100644 +--- a/pv/widgets/timestampspinbox.cpp ++++ b/pv/widgets/timestampspinbox.cpp +@@ -76,7 +76,7 @@ QSize TimestampSpinBox::minimumSizeHint() const + { + const QFontMetrics fm(fontMetrics()); + const int l = round(value_).str().size() + precision_ + 10; +- const int w = fm.width(QString(l, '0')); ++ const int w = util::text_width(fm, QString(l, '0')); + const int h = lineEdit()->minimumSizeHint().height(); + return QSize(w, h); + } +-- +2.24.0.rc2 + diff --git a/gnu/packages/patches/python-mediafile-wavpack.patch b/gnu/packages/patches/python-mediafile-wavpack.patch new file mode 100644 index 0000000000..9839fe87b5 --- /dev/null +++ b/gnu/packages/patches/python-mediafile-wavpack.patch @@ -0,0 +1,57 @@ +This patch has already been applied upstream, but is not included in the +current release 0.6.0. + +From d2fc3b59f77c515b02dfe7ad936f89264375d2b4 Mon Sep 17 00:00:00 2001 +From: Adrian Sampson <adrian@radbox.org> +Date: Wed, 29 Jul 2020 19:42:57 -0400 +Subject: [PATCH] Fix test for WavPack bitrate + +Fixes #34. +--- + docs/index.rst | 5 +++++ + mediafile.py | 2 +- + test/test_mediafile.py | 2 +- + 3 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/docs/index.rst b/docs/index.rst +index 7b622df..1465405 100644 +--- a/docs/index.rst ++++ b/docs/index.rst +@@ -100,6 +100,11 @@ Internals + Changelog + --------- + ++v0.7.0 ++'''''' ++ ++- Mutagen 1.45.0 or later is now required. ++ + v0.6.0 + '''''' + +diff --git a/mediafile.py b/mediafile.py +index 23fadaf..9e9d063 100644 +--- a/mediafile.py ++++ b/mediafile.py +@@ -56,7 +56,7 @@ + import six + + +-__version__ = '0.6.0' ++__version__ = '0.7.0' + __all__ = ['UnreadableFileError', 'FileTypeError', 'MediaFile'] + + log = logging.getLogger(__name__) +diff --git a/test/test_mediafile.py b/test/test_mediafile.py +index e9e1850..7f17f44 100644 +--- a/test/test_mediafile.py ++++ b/test/test_mediafile.py +@@ -907,7 +907,7 @@ class WavpackTest(ReadWriteTestBase, unittest.TestCase): + 'bitrate': 109312, + 'format': u'WavPack', + 'samplerate': 44100, +- 'bitdepth': 0, ++ 'bitdepth': 16, + 'channels': 1, + } + diff --git a/gnu/packages/patches/qpdfview-qt515-compat.patch b/gnu/packages/patches/qpdfview-qt515-compat.patch new file mode 100644 index 0000000000..1fbf5ec3f1 --- /dev/null +++ b/gnu/packages/patches/qpdfview-qt515-compat.patch @@ -0,0 +1,17 @@ +Fix compatibility with Qt 5.15. + +Patch copied from upstream source repository: + +https://bazaar.launchpad.net/~adamreichold/qpdfview/trunk/revision/2104 + +--- a/sources/model.h 2017-04-19 21:01:25 +0000 ++++ b/sources/model.h 2020-06-09 06:24:11 +0000 +@@ -24,6 +24,7 @@ + #define DOCUMENTMODEL_H + + #include <QList> ++#include <QPainterPath> + #include <QtPlugin> + #include <QWidget> + #include <QVector> + diff --git a/gnu/packages/patches/r-httpuv-1.5.4-unvendor-libuv.patch b/gnu/packages/patches/r-httpuv-1.5.5-unvendor-libuv.patch index 0947718059..0947718059 100644 --- a/gnu/packages/patches/r-httpuv-1.5.4-unvendor-libuv.patch +++ b/gnu/packages/patches/r-httpuv-1.5.5-unvendor-libuv.patch diff --git a/gnu/packages/patches/renpy-use-system-fribidi.patch b/gnu/packages/patches/renpy-use-system-fribidi.patch index 1437274bcc..913415e317 100644 --- a/gnu/packages/patches/renpy-use-system-fribidi.patch +++ b/gnu/packages/patches/renpy-use-system-fribidi.patch @@ -2,22 +2,27 @@ See also [Arch] and [Gentoo] for similar patches in other distros. [Arch] https://github.com/archlinux/svntogit-community/blob/packages/renpy/trunk/renpy-system-fribidi.patch [Gentoo] https://gitweb.gentoo.org/repo/gentoo.git/tree/games-engines/renpy/files/renpy-7.3.5-use-system-fribidi.patch -Index: renpy-7.3.5-source/module/renpybidicore.c +Index: renpy-7.4.0-source/module/renpybidicore.c =================================================================== ---- renpy-7.3.5-source.orig/module/renpybidicore.c -+++ renpy-7.3.5-source/module/renpybidicore.c -@@ -1,5 +1,5 @@ +--- renpy-7.4.0-source.orig/module/renpybidicore.c ++++ renpy-7.4.0-source/module/renpybidicore.c +@@ -1,9 +1,3 @@ #include <Python.h> +- +-#ifdef RENPY_BUILD + #include <fribidi.h> +-#else -#include <fribidi-src/lib/fribidi.h> -+#include <fribidi.h> +-#endif +- #include <stdlib.h> #ifndef alloca -Index: renpy-7.3.5-source/module/setup.py +Index: renpy-7.4.0-source/module/setup.py =================================================================== ---- renpy-7.3.5-source.orig/module/setup.py -+++ renpy-7.3.5-source/module/setup.py -@@ -119,30 +119,13 @@ cython( +--- renpy-7.4.0-source.orig/module/setup.py ++++ renpy-7.4.0-source/module/setup.py +@@ -125,30 +125,13 @@ cython( sdl + [ png, 'z', 'm' ]) FRIBIDI_SOURCES = """ diff --git a/gnu/packages/patches/rust-1.48-linker-locale.patch b/gnu/packages/patches/rust-1.48-linker-locale.patch new file mode 100644 index 0000000000..d06dcbe682 --- /dev/null +++ b/gnu/packages/patches/rust-1.48-linker-locale.patch @@ -0,0 +1,14 @@ +https://github.com/rust-lang/rust/pull/74416 +diff --git a/compiler/rustc_codegen_ssa/src/back/linker.rs b/compiler/rustc_codegen_ssa/src/back/linker.rs +index 3df956c465e..f45fee45be4 100644 +--- a/compiler/rustc_codegen_ssa/src/back/linker.rs ++++ b/compiler/rustc_codegen_ssa/src/back/linker.rs +@@ -28,7 +28,7 @@ + pub fn disable_localization(linker: &mut Command) { + // No harm in setting both env vars simultaneously. + // Unix-style linkers. +- linker.env("LC_ALL", "C"); ++ linker.env("LC_ALL", "en_US.UTF-8"); + // MSVC's `link.exe`. + linker.env("VSLANG", "1033"); + } diff --git a/gnu/packages/patches/smalltalk-multiplication-overflow.patch b/gnu/packages/patches/smalltalk-multiplication-overflow.patch new file mode 100644 index 0000000000..7a0b4d02f7 --- /dev/null +++ b/gnu/packages/patches/smalltalk-multiplication-overflow.patch @@ -0,0 +1,121 @@ +Extracted from this commit without the ChangeLog to avoid conflicts: +http://git.savannah.gnu.org/cgit/smalltalk.git/commit/?id=72ada189aba0283c551ead16635c1983968080b8 + +The upstream commit message is +From 72ada189aba0283c551ead16635c1983968080b8 Mon Sep 17 00:00:00 2001 +From: Holger Hans Peter Freyther <holger@moiji-mobile.com> +Date: Sat, 7 Nov 2015 18:09:31 +0100 +Subject: libgst: Add alternative multiplication overflow check + +Apple clang on OSX and the version on FreeBSD optimize the +multiplication check away. Clang introduced a family of +builtins to do the multiplication and check for the overflow +and GCC made the API usable. For clang we would need to know +if intptr_t is of type int, long int, long long int and +then use the smul, smull smulll. +Luckily clang is adopting the better interface and this is +what we are starting to use now. This means the new code +will be used on GCC5 (and later) and some future versions of +clang. + +2015-11-07 Holger Hans Peter Freyther <holger@freyther.de> + + * build-aux/overflow-builtins.m4: Add new macro. + * configure.ac: Use GST_C_OVERFLOW_BUILTINS macro. + +2015-11-07 Holger Hans Peter Freyther <holger@freyther.de> + + * interp.inl: Add alternative mul_with_check implementation. +--- + ChangeLog | 5 +++++ + build-aux/overflow-builtins.m4 | 23 +++++++++++++++++++++++ + configure.ac | 1 + + libgst/ChangeLog | 4 ++++ + libgst/interp.inl | 22 ++++++++++++++++++++++ + 5 files changed, 55 insertions(+) + create mode 100644 build-aux/overflow-builtins.m4 + +diff --git a/build-aux/overflow-builtins.m4 b/build-aux/overflow-builtins.m4 +new file mode 100644 +index 00000000..9d050196 +--- /dev/null ++++ b/build-aux/overflow-builtins.m4 +@@ -0,0 +1,23 @@ ++dnl Check whether the host supports synchronization builtins. ++ ++AC_DEFUN([GST_C_OVERFLOW_BUILTINS], [ ++ AC_REQUIRE([AC_CANONICAL_HOST]) ++ AC_CACHE_CHECK([whether the host supports __builtin_mul_overflow], ++ gst_cv_have_builtin_mul_overflow, [ ++ save_CFLAGS="$CFLAGS" ++ case $host in ++ i?86-apple-darwin*) ;; ++ i?86-*-*) CFLAGS="$CFLAGS -march=i486" ;; ++ esac ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[int foovar = 0;]], [[ ++if (__builtin_mul_overflow(44444, 55555, &foovar)) ++ return 23;]])], ++ [gst_cv_have_builtin_mul_overflow=yes], ++ [gst_cv_have_builtin_mul_overflow=no]) ++ CFLAGS="$save_CFLAGS" ++ ]) ++ if test $gst_cv_have_builtin_mul_overflow = yes; then ++ AC_DEFINE(HAVE_OVERFLOW_BUILTINS, 1, ++ [Define to 1 if the host supports __builtin_*_overflow builtins]) ++ fi ++]) +diff --git a/configure.ac b/configure.ac +index e789be45..0bac23ef 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -243,6 +243,7 @@ GST_C_SYNC_BUILTINS + if test $gst_cv_have_sync_fetch_and_add = no; then + AC_MSG_ERROR([Synchronization primitives not found, please use a newer compiler.]) + fi ++GST_C_OVERFLOW_BUILTINS + + GST_LOCK + AC_SYS_LARGEFILE +diff --git a/libgst/interp.inl b/libgst/interp.inl +index e18e27c7..dbc631bc 100644 +--- a/libgst/interp.inl ++++ b/libgst/interp.inl +@@ -159,6 +159,27 @@ sub_with_check (OOP op1, OOP op2, mst_Boolean *overflow) + OOP + mul_with_check (OOP op1, OOP op2, mst_Boolean *overflow) + { ++#ifdef HAVE_OVERFLOW_BUILTINS ++ intptr_t a = TO_INT (op1); ++ intptr_t b = TO_INT (op2); ++ intptr_t result; ++ ++ if (__builtin_mul_overflow(a, b, &result)) ++ { ++ *overflow = true; ++ return FROM_INT(0); ++ } ++ ++ ++ if (result < MIN_ST_INT || result > MAX_ST_INT) ++ { ++ *overflow = true; ++ return FROM_INT(0); ++ } ++ ++ *overflow = false; ++ return FROM_INT(result); ++#else + intptr_t a = TO_INT (op1); + intptr_t b = TO_INT (op2); + intmax_t result = (intmax_t)a * b; +@@ -188,6 +209,7 @@ mul_with_check (OOP op1, OOP op2, mst_Boolean *overflow) + } + + return FROM_INT (0); ++#endif + } + + /* State of the random generator. +-- +2.29.2 + diff --git a/gnu/packages/patches/tipp10-disable-downloader.patch b/gnu/packages/patches/tipp10-disable-downloader.patch new file mode 100644 index 0000000000..4917a927f9 --- /dev/null +++ b/gnu/packages/patches/tipp10-disable-downloader.patch @@ -0,0 +1,165 @@ +https://salsa.debian.org/debian/tipp10/-/raw/debian/2.1.0-5/debian/patches/disable_downloaders.patch + +Author: Reiner Herrmann <reiner@reiner-h.de> +Description: Disable downloaders + This makes porting to Qt5 much easier, as QHttp is no longer available. + But the functionality was not enabled anyway or is no longer useful. + . + - checkversion.h/.cpp: + At startup (while loading settings), Tipp10 "phones home" to do an + update check (www.tipp10.com/update/version.tipp10v210). + For a packaged software and one that is no longer being developed, + this does not make much sense. + - updatedialog.h/.cpp: + Can download newer sqlite database (www.tipp10.com/update/sql.tipp10v210.utf), + but this file is no longer available on the server (404). + The update action has also not been enabled in the menu, so the update + functionality was currently not active: + widget/mainwindow.cpp:143: //fileMenu->addAction(updateAction); + - downloaddialog.h/.cpp: + Allows downloading lessons from user-specified location. + But the action (widget/startwidget.cpp -> lessonDownload) has not been part + of any menu, so it was also not in use. + +--- a/tipp10.pro ++++ b/tipp10.pro +@@ -15,7 +15,6 @@ + INCLUDEPATH += .
+ CONFIG += qt
+ QT += sql
+-QT += network
+ RC_FILE += tipp10.rc
+ RESOURCES += tipp10.qrc
+ HEADERS += def/defines.h \
+@@ -36,15 +35,12 @@ + widget/settingspages.h \
+ widget/lessondialog.h \
+ widget/regexpdialog.h \
+- widget/downloaddialog.h \
+ widget/lessonprintdialog.h \
+ widget/lessonresult.h \
+- widget/updatedialog.h \
+ widget/helpbrowser.h \
+ widget/companylogo.h \
+ widget/errormessage.h \
+ widget/txtmessagedialog.h \
+- widget/checkversion.h \
+ sql/connection.h \
+ sql/lessontablesql.h \
+ sql/chartablesql.h \
+@@ -70,15 +66,12 @@ + widget/settingspages.cpp \
+ widget/lessondialog.cpp \
+ widget/regexpdialog.cpp \
+- widget/downloaddialog.cpp \
+ widget/lessonprintdialog.cpp \
+ widget/lessonresult.cpp \
+- widget/updatedialog.cpp \
+ widget/helpbrowser.cpp \
+ widget/companylogo.cpp \
+ widget/errormessage.cpp \
+ widget/txtmessagedialog.cpp \
+- widget/checkversion.cpp \
+ sql/lessontablesql.cpp \
+ sql/chartablesql.cpp \
+ sql/trainingsql.cpp \
+--- a/widget/mainwindow.cpp ++++ b/widget/mainwindow.cpp +@@ -41,11 +41,9 @@ +
+ #include "mainwindow.h"
+ #include "settingsdialog.h"
+-#include "updatedialog.h"
+ #include "def/defines.h"
+ #include "def/errordefines.h"
+ #include "errormessage.h"
+-#include "checkversion.h"
+
+ MainWindow::MainWindow() {
+ trainingStarted = false;
+@@ -214,8 +212,8 @@ + }
+
+ void MainWindow::showUpdate() {
+- UpdateDialog updateDialog(this);
+- updateDialog.exec();
++ //UpdateDialog updateDialog(this);
++ //updateDialog.exec();
+ // Fill lesson list after online update
+ startWidget->fillLessonList(false);
+ }
+@@ -486,6 +484,7 @@ + settings.endGroup();
+
+ settings.beginGroup("general");
++#if 0
+ if (settings.value("check_new_version", true).toBool()) {
+
+ QDate lastVersionCheck = settings.value("last_version_check").toDate();
+@@ -499,6 +498,7 @@ + }
+ settings.setValue("last_version_check", today);
+ }
++#endif
+ settings.endGroup();
+ }
+
+--- a/widget/settingspages.cpp ++++ b/widget/settingspages.cpp +@@ -581,7 +581,7 @@ +
+ // Layout of group box vertical
+ QVBoxLayout *layout = new QVBoxLayout;
+- layout->addWidget(checkNewVersion);
++ //layout->addWidget(checkNewVersion);
+ layout->addSpacing(1);
+ layout->addWidget(checkNativeStyle);
+ layout->setMargin(16);
+@@ -610,7 +610,6 @@ + checkIntelligence->setChecked(settings.value("check_toggle_intelligence", true).toBool());
+ checkLimitLesson->setChecked(settings.value("check_limit_lesson", true).toBool());
+ checkLessonPublish->setChecked(settings.value("check_lesson_publish", true).toBool());
+- checkNewVersion->setChecked(settings.value("check_new_version", true).toBool());
+ checkNativeStyle->setChecked(settings.value("check_native_style", false).toBool());
+ settings.endGroup();
+ }
+@@ -636,7 +635,6 @@ + settings.setValue("check_limit_lesson", checkLimitLesson->isChecked());
+ settings.setValue("check_lesson_publish", checkLessonPublish->isChecked());
+ settings.setValue("check_native_style", checkNativeStyle->isChecked());
+- settings.setValue("check_new_version", checkNewVersion->isChecked());
+ settings.endGroup();
+
+ return requireRestart;
+--- a/widget/startwidget.cpp ++++ b/widget/startwidget.cpp +@@ -43,12 +43,10 @@ +
+ #include "startwidget.h"
+ #include "sql/startsql.h"
+-#include "updatedialog.h"
+ #include "def/defines.h"
+ #include "def/errordefines.h"
+ #include "errormessage.h"
+ #include "lessondialog.h"
+-#include "downloaddialog.h"
+ #include "illustrationdialog.h"
+ #include "txtmessagedialog.h"
+
+@@ -1048,7 +1046,7 @@ + }
+
+ void StartWidget::clickDownloadLesson() {
+-
++#if 0
+ QStringList lessonData;
+
+ DownloadDialog downloadDialog(&lessonData, this);
+@@ -1083,6 +1081,7 @@ + }
+ }
+ }
++#endif
+ }
+
+ void StartWidget::clickEditLesson() {
diff --git a/gnu/packages/patches/tipp10-qt5.patch b/gnu/packages/patches/tipp10-qt5.patch new file mode 100644 index 0000000000..34ad5cd708 --- /dev/null +++ b/gnu/packages/patches/tipp10-qt5.patch @@ -0,0 +1,69 @@ +https://salsa.debian.org/debian/tipp10/-/raw/debian/2.1.0-5/debian/patches/qt5.patch + +Author: Reiner Herrmann <reiner@reiner-h.de> +Description: Port to Qt5 +Bug-Debian: https://bugs.debian.org/875207 + +--- a/tipp10.pro ++++ b/tipp10.pro +@@ -14,6 +14,7 @@ + DEPENDPATH += .
+ INCLUDEPATH += .
+ CONFIG += qt
++QT += widgets multimedia printsupport
+ QT += sql
+ RC_FILE += tipp10.rc
+ RESOURCES += tipp10.qrc
+--- a/main.cpp ++++ b/main.cpp +@@ -24,7 +24,6 @@ + ****************************************************************/
+
+ #include <QApplication>
+-#include <QPlastiqueStyle>
+ #include <QString>
+ #include <QSettings>
+ #include <QCoreApplication>
+@@ -212,7 +211,7 @@ +
+ // Set windows style
+ if (!useNativeStyle) {
+- app.setStyle("plastique");
++ app.setStyle("fusion");
+ }
+
+ // Translation
+--- a/games/abcrainwidget.cpp ++++ b/games/abcrainwidget.cpp +@@ -235,8 +235,7 @@ + charballs.last()->wind = (qrand() % 8) + 2;
+ charballs.last()->rad = 0;
+
+- chartext.append(new QGraphicsTextItem(QString(characterTemp),
+- charballs.last(), scene));
++ chartext.append(new QGraphicsTextItem(QString(characterTemp), charballs.last()));
+ chartext.last()->setFont(QFont("Courier", 16, 100));
+ chartext.last()->setPos(-(chartext.last()->boundingRect().width() / 2), -(chartext.last()->boundingRect().height() / 2));
+
+--- a/sql/chartablesql.cpp ++++ b/sql/chartablesql.cpp +@@ -137,7 +137,7 @@ + sortColumn(4);
+
+ headerview->setStretchLastSection(true);
+- headerview->setResizeMode(QHeaderView::Interactive);
++ headerview->setSectionResizeMode(QHeaderView::Interactive);
+ headerview->setSortIndicatorShown(true);
+
+ // Resize the columns
+--- a/sql/lessontablesql.cpp ++++ b/sql/lessontablesql.cpp +@@ -202,7 +202,7 @@ + sortColumn(-1);
+
+ headerview->setStretchLastSection(true);
+- headerview->setResizeMode(QHeaderView::Interactive);
++ headerview->setSectionResizeMode(QHeaderView::Interactive);
+ headerview->setSortIndicatorShown(true);
+
+ // Resize the columns
diff --git a/gnu/packages/patches/vcflib-use-shared-libraries.patch b/gnu/packages/patches/vcflib-use-shared-libraries.patch deleted file mode 100644 index e198ec663c..0000000000 --- a/gnu/packages/patches/vcflib-use-shared-libraries.patch +++ /dev/null @@ -1,135 +0,0 @@ -This patch is a combination of many of the patches from Debian: -https://sources.debian.org/src/libvcflib/1.0.1+dfsg-3/debian/patches/ - ---- - Makefile | 63 +++++++++++--------------------------------------------- - 1 file changed, 12 insertions(+), 51 deletions(-) - -diff --git a/Makefile b/Makefile -index 6b13350..be85f22 100644 ---- a/Makefile -+++ b/Makefile -@@ -114,43 +114,25 @@ BIN_SOURCES = src/vcfecho.cpp \ - src/vcfnull2ref.cpp \ - src/vcfinfosummarize.cpp - --# when we can figure out how to build on mac --# src/vcfsom.cpp -- - #BINS = $(BIN_SOURCES:.cpp=) - BINS = $(addprefix $(BIN_DIR)/,$(notdir $(BIN_SOURCES:.cpp=))) - SHORTBINS = $(notdir $(BIN_SOURCES:.cpp=)) - --TABIX = tabixpp/tabix.o --FASTAHACK = fastahack/Fasta.o --SMITHWATERMAN = smithwaterman/SmithWatermanGotoh.o --REPEATS = smithwaterman/Repeats.o --INDELALLELE = smithwaterman/IndelAllele.o --DISORDER = smithwaterman/disorder.o --LEFTALIGN = smithwaterman/LeftAlign.o --FSOM = fsom/fsom.o - FILEVERCMP = filevercmp/filevercmp.o - --# Work out how to find htslib --# Use the one we ship in tabixpp unless told otherwise by the environment --HTS_LIB ?= $(VCF_LIB_LOCAL)/tabixpp/htslib/libhts.a --HTS_INCLUDES ?= -I$(VCF_LIB_LOCAL)/tabixpp/htslib --HTS_LDFLAGS ?= -L$(VCF_LIB_LOCAL)/tabixpp/htslib -lhts -lbz2 -lm -lz -llzma -pthread -- -- --INCLUDES = $(HTS_INCLUDES) -I$(INC_DIR) --LDFLAGS = -L$(LIB_DIR) -lvcflib $(HTS_LDFLAGS) -lpthread -lz -lm -llzma -lbz2 -+INCLUDES = -I$(INC_DIR) $(shell pkg-config --cflags htslib fastahack smithwaterman tabixpp) -+LDFLAGS = -L$(LIB_DIR) -lvcflib -lpthread -lz -lstdc++ -lm -llzma -lbz2 $(shell pkg-config --libs htslib fastahack smithwaterman tabixpp) - - - --all: $(OBJECTS) $(BINS) scriptToBin -+all: $(OBJECTS) $(BINS) scriptToBin libvcflib.a - - scriptToBin: $(BINS) - $(CP) scripts/* $(BIN_DIR) - - GIT_VERSION += $(shell git describe --abbrev=4 --dirty --always) - --CXXFLAGS = -Ofast -D_FILE_OFFSET_BITS=64 -std=c++0x -+CXXFLAGS = -Ofast -D_FILE_OFFSET_BITS=64 -std=c++0x -fPIC - #CXXFLAGS = -O2 - #CXXFLAGS = -pedantic -Wall -Wshadow -Wpointer-arith -Wcast-qual - -@@ -168,7 +150,7 @@ profiling: - gprof: - $(MAKE) CXXFLAGS="$(CXXFLAGS) -pg" all - --$(OBJECTS): $(SOURCES) $(HEADERS) $(TABIX) multichoose pre $(SMITHWATERMAN) $(FILEVERCMP) $(FASTAHACK) -+$(OBJECTS): $(SOURCES) $(HEADERS) multichoose pre $(FILEVERCMP) - $(CXX) -c -o $@ src/$(*F).cpp $(INCLUDES) $(LDFLAGS) $(CXXFLAGS) && $(CP) src/*.h* $(VCF_LIB_LOCAL)/$(INC_DIR)/ - - multichoose: pre -@@ -177,39 +159,22 @@ multichoose: pre - intervaltree: pre - cd intervaltree && $(MAKE) && $(CP) *.h* $(VCF_LIB_LOCAL)/$(INC_DIR)/ - --$(TABIX): pre -- cd tabixpp && INCLUDES="$(HTS_INCLUDES)" LIBPATH="-L. $(HTS_LDFLAGS)" HTSLIB="$(HTS_LIB)" $(MAKE) && $(CP) *.h* $(VCF_LIB_LOCAL)/$(INC_DIR)/ -- --$(SMITHWATERMAN): pre -- cd smithwaterman && $(MAKE) && $(CP) *.h* $(VCF_LIB_LOCAL)/$(INC_DIR)/ && $(CP) *.o $(VCF_LIB_LOCAL)/$(OBJ_DIR)/ -- --$(DISORDER): $(SMITHWATERMAN) -- --$(REPEATS): $(SMITHWATERMAN) -- --$(LEFTALIGN): $(SMITHWATERMAN) -- --$(INDELALLELE): $(SMITHWATERMAN) -- --$(FASTAHACK): pre -- cd fastahack && $(MAKE) && $(CP) *.h* $(VCF_LIB_LOCAL)/$(INC_DIR)/ && $(CP) Fasta.o $(VCF_LIB_LOCAL)/$(OBJ_DIR)/ -- --#$(FSOM): --# cd fsom && $(CXX) $(CXXFLAGS) -c fsom.c -lm -- - $(FILEVERCMP): pre - cd filevercmp && make && $(CP) *.h* $(VCF_LIB_LOCAL)/$(INC_DIR)/ && $(CP) *.o $(VCF_LIB_LOCAL)/$(INC_DIR)/ - - $(SHORTBINS): pre - $(MAKE) $(BIN_DIR)/$@ - --$(BINS): $(BIN_SOURCES) libvcflib.a $(OBJECTS) $(SMITHWATERMAN) $(FASTAHACK) $(DISORDER) $(LEFTALIGN) $(INDELALLELE) $(SSW) $(FILEVERCMP) pre intervaltree -+$(BINS): $(BIN_SOURCES) libvcflib.so $(OBJECTS) $(SSW) $(FILEVERCMP) pre intervaltree - $(CXX) src/$(notdir $@).cpp -o $@ $(INCLUDES) $(LDFLAGS) $(CXXFLAGS) -DVERSION=\"$(GIT_VERSION)\" - --libvcflib.a: $(OBJECTS) $(SMITHWATERMAN) $(REPEATS) $(FASTAHACK) $(DISORDER) $(LEFTALIGN) $(INDELALLELE) $(SSW) $(FILEVERCMP) $(TABIX) pre -- ar rs libvcflib.a $(OBJECTS) smithwaterman/sw.o $(FASTAHACK) $(SSW) $(FILEVERCMP) $(TABIX) -+libvcflib.a: $(OBJECTS) $(SSW) $(FILEVERCMP) pre -+ ar rs libvcflib.a $(OBJECTS) $(SSW) $(FILEVERCMP) - $(CP) libvcflib.a $(LIB_DIR) - -+libvcflib.so: $(OBJECTS) $(SSW) $(FILEVERCMP) pre -+ $(CXX) -shared -o libvcflib.so $(OBJECTS) $(SSW) $(FILEVERCMP) -+ $(CP) libvcflib.so $(LIB_DIR) - - test: $(BINS) - @prove -Itests/lib -w tests/*.t -@@ -230,16 +195,12 @@ clean: - $(RM) $(BINS) $(OBJECTS) - $(RM) ssw_cpp.o ssw.o - $(RM) libvcflib.a -+ $(RM) libvcflib.so - $(RM) -r $(BIN_DIR) - $(RM) -r $(LIB_DIR) - $(RM) -r $(INC_DIR) - $(RM) -r $(OBJ_DIR) -- $(MAKE) clean -C tabixpp -- $(MAKE) clean -C smithwaterman -- $(MAKE) clean -C fastahack - $(MAKE) clean -C multichoose -- $(MAKE) clean -C fsom -- $(MAKE) clean -C libVCFH - $(MAKE) clean -C test - $(MAKE) clean -C filevercmp - $(MAKE) clean -C intervaltree --- -2.28.0 - diff --git a/gnu/packages/patches/vlc-qt-5.15.patch b/gnu/packages/patches/vlc-qt-5.15.patch deleted file mode 100644 index e986a99861..0000000000 --- a/gnu/packages/patches/vlc-qt-5.15.patch +++ /dev/null @@ -1,56 +0,0 @@ -Fix build of VLC with Qt 5.15. Otherwise it fails like this: - ------- -In file included from gui/qt/util/timetooltip.moc.cpp:10:0: -gui/qt/util/timetooltip.hpp:49:18: error: field ‘mPainterPath’ has incomplete type ‘QPainterPath’ - QPainterPath mPainterPath; - ^~~~~~~~~~~~ -In file included from /gnu/store/jsxxnsdvij5mrrv6c0kj0261k0f44xlz-qtbase-5.15.2/include/qt5/QtGui/qbrush.h:49:0, - from /gnu/store/jsxxnsdvij5mrrv6c0kj0261k0f44xlz-qtbase-5.15.2/include/qt5/QtGui/qpalette.h:46, - from /gnu/store/jsxxnsdvij5mrrv6c0kj0261k0f44xlz-qtbase-5.15.2/include/qt5/QtWidgets/qwidget.h:48, - from /gnu/store/jsxxnsdvij5mrrv6c0kj0261k0f44xlz-qtbase-5.15.2/include/qt5/QtWidgets/QWidget:1, - from gui/qt/util/timetooltip.hpp:27, - from gui/qt/util/timetooltip.moc.cpp:10: -/gnu/store/jsxxnsdvij5mrrv6c0kj0261k0f44xlz-qtbase-5.15.2/include/qt5/QtGui/qmatrix.h:54:7: note: forward declaration of ‘class QPainterPath’ - class QPainterPath; - ^~~~~~~~~~~~ -make[4]: *** [Makefile:25852: gui/qt/util/libqt_plugin_la-timetooltip.moc.lo] Error 1 ------- - -diff --git a/modules/gui/qt/components/playlist/views.cpp b/modules/gui/qt/components/playlist/views.cpp -index 24db9d9..73c1779 100644 ---- a/modules/gui/qt/components/playlist/views.cpp -+++ b/modules/gui/qt/components/playlist/views.cpp -@@ -27,6 +27,7 @@ - #include "input_manager.hpp" /* THEMIM */ - - #include <QPainter> -+#include <QPainterPath> - #include <QRect> - #include <QStyleOptionViewItem> - #include <QFontMetrics> -diff --git a/modules/gui/qt/dialogs/plugins.cpp b/modules/gui/qt/dialogs/plugins.cpp -index d233382..69728eb 100644 ---- a/modules/gui/qt/dialogs/plugins.cpp -+++ b/modules/gui/qt/dialogs/plugins.cpp -@@ -53,6 +53,7 @@ - #include <QListView> - #include <QListWidget> - #include <QPainter> -+#include <QPainterPath> - #include <QStyleOptionViewItem> - #include <QKeyEvent> - #include <QPushButton> -diff --git a/modules/gui/qt/util/timetooltip.hpp b/modules/gui/qt/util/timetooltip.hpp -index 6a1329e..9f50b18 100644 ---- a/modules/gui/qt/util/timetooltip.hpp -+++ b/modules/gui/qt/util/timetooltip.hpp -@@ -25,6 +25,7 @@ - #include "qt.hpp" - - #include <QWidget> -+#include <QPainterPath> - - class TimeTooltip : public QWidget - { - diff --git a/gnu/packages/patches/vorbis-tools-CVE-2014-9638+CVE-2014-9639.patch b/gnu/packages/patches/vorbis-tools-CVE-2014-9638+CVE-2014-9639.patch deleted file mode 100644 index 6e389dd59e..0000000000 --- a/gnu/packages/patches/vorbis-tools-CVE-2014-9638+CVE-2014-9639.patch +++ /dev/null @@ -1,83 +0,0 @@ -From: Petter Reinholdtsen <pere@debian.org> -Date: Tue, 22 Sep 2015 15:14:06 +0200 -Subject: oggenc: validate count of channels in the header (CVE-2014-9638 & - CVE-2014-9639) - -Author: Kamil Dudka <kdudka@redhat.com> -Origin: http://lists.xiph.org/pipermail/vorbis-dev/2015-February/020423.html -Bug: https://trac.xiph.org/ticket/2136 -Bug: https://trac.xiph.org/ticket/2137 -Bug-Debian: https://bugs.debian.org/776086 -Forwarded: not-needed -Reviewed-By: Petter Reinholdtsen <pere@hungry.com> -Last-Update: 2015-09-22 ---- - oggenc/audio.c | 18 ++++++++++++++++-- - 1 file changed, 16 insertions(+), 2 deletions(-) - -diff --git a/oggenc/audio.c b/oggenc/audio.c -index 05e42b3..1b3f179 100644 ---- a/oggenc/audio.c -+++ b/oggenc/audio.c -@@ -13,6 +13,7 @@ - #include <config.h> - #endif - -+#include <limits.h> - #include <stdlib.h> - #include <stdio.h> - #include <string.h> -@@ -251,6 +252,7 @@ int aiff_open(FILE *in, oe_enc_opt *opt, unsigned char *buf, int buflen) - aiff_fmt format; - aifffile *aiff = malloc(sizeof(aifffile)); - int i; -+ long channels; - - if(buf[11]=='C') - aifc=1; -@@ -277,11 +279,16 @@ int aiff_open(FILE *in, oe_enc_opt *opt, unsigned char *buf, int buflen) - return 0; - } - -- format.channels = READ_U16_BE(buffer); -+ format.channels = channels = READ_U16_BE(buffer); - format.totalframes = READ_U32_BE(buffer+2); - format.samplesize = READ_U16_BE(buffer+6); - format.rate = (int)read_IEEE80(buffer+8); - -+ if(channels <= 0L || SHRT_MAX < channels) -+ { -+ fprintf(stderr, _("Warning: Unsupported count of channels in AIFF header\n")); -+ return 0; -+ } - aiff->bigendian = 1; - - if(aifc) -@@ -412,6 +419,7 @@ int wav_open(FILE *in, oe_enc_opt *opt, unsigned char *oldbuf, int buflen) - wav_fmt format; - wavfile *wav = malloc(sizeof(wavfile)); - int i; -+ long channels; - - /* Ok. At this point, we know we have a WAV file. Now we have to detect - * whether we support the subtype, and we have to find the actual data -@@ -449,12 +457,18 @@ int wav_open(FILE *in, oe_enc_opt *opt, unsigned char *oldbuf, int buflen) - } - - format.format = READ_U16_LE(buf); -- format.channels = READ_U16_LE(buf+2); -+ format.channels = channels = READ_U16_LE(buf+2); - format.samplerate = READ_U32_LE(buf+4); - format.bytespersec = READ_U32_LE(buf+8); - format.align = READ_U16_LE(buf+12); - format.samplesize = READ_U16_LE(buf+14); - -+ if(channels <= 0L || SHRT_MAX < channels) -+ { -+ fprintf(stderr, _("Warning: Unsupported count of channels in WAV header\n")); -+ return 0; -+ } -+ - if(format.format == -2) /* WAVE_FORMAT_EXTENSIBLE */ - { - if(len<40) diff --git a/gnu/packages/patches/vorbis-tools-CVE-2014-9640.patch b/gnu/packages/patches/vorbis-tools-CVE-2014-9640.patch deleted file mode 100644 index 97d18e0db7..0000000000 --- a/gnu/packages/patches/vorbis-tools-CVE-2014-9640.patch +++ /dev/null @@ -1,29 +0,0 @@ -Index: vorbis-tools/oggenc/oggenc.c
-===================================================================
---- vorbis-tools/oggenc/oggenc.c (revision 19116)
-+++ vorbis-tools/oggenc/oggenc.c (revision 19117)
-@@ -98,4 +98,6 @@
- 0,0,0.f,
- 0, 0, 0, 0, 0};
-+ input_format raw_format = {NULL, 0, raw_open, wav_close, "raw",
-+ N_("RAW file reader")};
-
- int i;
-@@ -240,6 +242,4 @@
- if(opt.rawmode)
- {
-- input_format raw_format = {NULL, 0, raw_open, wav_close, "raw",
-- N_("RAW file reader")};
-
- enc_opts.rate=opt.raw_samplerate;
-Index: vorbis-tools/oggenc/skeleton.h
-===================================================================
---- vorbis-tools/oggenc/skeleton.h (revision 19116)
-+++ vorbis-tools/oggenc/skeleton.h (revision 19117)
-@@ -42,5 +42,5 @@
- ogg_int64_t start_granule; /* start granule value */
- ogg_uint32_t preroll; /* preroll */
-- unsigned char granule_shift; // a 8-bit field /* 1 byte value holding the granule shift */
-+ unsigned char granule_shift; /* 1 byte value holding the granule shift */
- char *message_header_fields; /* holds all the message header fields */
- /* current total size of the message header fields, for realloc purpose, initially zero */
diff --git a/gnu/packages/patches/vorbis-tools-CVE-2015-6749.patch b/gnu/packages/patches/vorbis-tools-CVE-2015-6749.patch deleted file mode 100644 index bcddcbfd70..0000000000 --- a/gnu/packages/patches/vorbis-tools-CVE-2015-6749.patch +++ /dev/null @@ -1,44 +0,0 @@ -Upstream fix for CVE-2015-6749. -https://trac.xiph.org/ticket/2212 - -From 04815d3e1bfae3a6cdfb2c25358a5a72b61299f7 Mon Sep 17 00:00:00 2001 -From: Mark Harris <mark.hsj@gmail.com> -Date: Sun, 30 Aug 2015 05:54:46 -0700 -Subject: [PATCH] oggenc: Fix large alloca on bad AIFF input - -Fixes #2212 ---- - oggenc/audio.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/oggenc/audio.c b/oggenc/audio.c -index 477da8c..4921fb9 100644 ---- a/oggenc/audio.c -+++ b/oggenc/audio.c -@@ -245,8 +245,8 @@ static int aiff_permute_matrix[6][6] = - int aiff_open(FILE *in, oe_enc_opt *opt, unsigned char *buf, int buflen) - { - int aifc; /* AIFC or AIFF? */ -- unsigned int len; -- unsigned char *buffer; -+ unsigned int len, readlen; -+ unsigned char buffer[22]; - unsigned char buf2[8]; - aiff_fmt format; - aifffile *aiff = malloc(sizeof(aifffile)); -@@ -269,9 +269,9 @@ int aiff_open(FILE *in, oe_enc_opt *opt, unsigned char *buf, int buflen) - return 0; /* Weird common chunk */ - } - -- buffer = alloca(len); -- -- if(fread(buffer,1,len,in) < len) -+ readlen = len < sizeof(buffer) ? len : sizeof(buffer); -+ if(fread(buffer,1,readlen,in) < readlen || -+ (len > readlen && !seek_forward(in, len-readlen))) - { - fprintf(stderr, _("Warning: Unexpected EOF in reading AIFF header\n")); - return 0; --- -2.5.0 - |