From 2c9f1c438993999b24a156a26571dd7c56efa4e1 Mon Sep 17 00:00:00 2001 From: Guillaume Le Vaillant Date: Fri, 11 Feb 2022 22:29:44 +0100 Subject: gnu: freecad: Update to 0.19.3-0.09a05a9. * gnu/packages/engineering.scm (freecad): Update to 0.19.3-0.09a05a9. [source]: Remove patches. [arguments]: Remove unneeded variables for pyside2 and shiboken2 from 'configure-flags'. * gnu/packages/patches/freecad-boost-serialization.patch: Remove file. * gnu/packages/patches/freecad-vtk9.patch: Remove file. * gnu/locak.mk (dist_patch_DATA): Remove "freecad-boost-serialization.patch" and "freecad-vtk9.patch". --- .../patches/freecad-boost-serialization.patch | 27 - gnu/packages/patches/freecad-vtk9.patch | 827 --------------------- 2 files changed, 854 deletions(-) delete mode 100644 gnu/packages/patches/freecad-boost-serialization.patch delete mode 100644 gnu/packages/patches/freecad-vtk9.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/freecad-boost-serialization.patch b/gnu/packages/patches/freecad-boost-serialization.patch deleted file mode 100644 index 374eabc966..0000000000 --- a/gnu/packages/patches/freecad-boost-serialization.patch +++ /dev/null @@ -1,27 +0,0 @@ -Taken from: https://github.com/archlinux/svntogit-community/blob/packages/freecad/trunk/freecad-boost.patch. - -Index: FreeCAD-0.19.2/CMakeLists.txt -=================================================================== ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -46,6 +46,7 @@ if(NOT FREECAD_LIBPACK_USE OR FREECAD_LI - SetupPCL() - SetupPybind11() - SetupBoost() -+ set(Boost_LIBRARIES_App ${Boost_LIBRARIES}) - SetupXercesC() - find_package(ZLIB REQUIRED) - find_package(PyCXX REQUIRED) -Index: FreeCAD-0.19.2/src/App/CMakeLists.txt -=================================================================== ---- a/src/App/CMakeLists.txt -+++ b/src/App/CMakeLists.txt -@@ -59,7 +59,7 @@ include_directories( - - set(FreeCADApp_LIBS - FreeCADBase -- ${Boost_LIBRARIES} -+ ${Boost_LIBRARIES_App} - ) - - if (BUILD_QT5) diff --git a/gnu/packages/patches/freecad-vtk9.patch b/gnu/packages/patches/freecad-vtk9.patch deleted file mode 100644 index 74568f4318..0000000000 --- a/gnu/packages/patches/freecad-vtk9.patch +++ /dev/null @@ -1,827 +0,0 @@ -From bb9bcbd51df7c3cb76c5823038e4ea0f7e25a9ff Mon Sep 17 00:00:00 2001 -From: wmayer -Date: Mon, 12 Oct 2020 17:56:03 +0200 -Subject: [PATCH] Make smesh compile with vtk9 - ---- - .../salomesmesh/inc/SMDS_MeshElement.hxx | 9 +++- - .../salomesmesh/inc/SMDS_UnstructuredGrid.hxx | 4 ++ - .../salomesmesh/src/SMDS/SMDS_BallElement.cpp | 9 +++- - .../salomesmesh/src/SMDS/SMDS_Downward.cpp | 44 +++++++++---------- - .../salomesmesh/src/SMDS/SMDS_Mesh.cpp | 6 ++- - .../src/SMDS/SMDS_Mesh0DElement.cpp | 12 +++++ - .../salomesmesh/src/SMDS/SMDS_MeshNode.cpp | 10 ++--- - .../src/SMDS/SMDS_UnstructuredGrid.cpp | 35 +++++++++++++-- - .../src/SMDS/SMDS_VtkCellIterator.cpp | 7 +-- - .../salomesmesh/src/SMDS/SMDS_VtkEdge.cpp | 19 +++++++- - .../salomesmesh/src/SMDS/SMDS_VtkFace.cpp | 29 ++++++++++-- - .../salomesmesh/src/SMDS/SMDS_VtkVolume.cpp | 38 +++++++++++----- - .../src/SMESH/SMESH_MeshEditor.cpp | 8 ++-- - src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp | 7 ++- - 14 files changed, 179 insertions(+), 58 deletions(-) - -Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/inc/SMDS_MeshElement.hxx -=================================================================== ---- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/inc/SMDS_MeshElement.hxx -+++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/inc/SMDS_MeshElement.hxx -@@ -40,11 +40,16 @@ - - #include - #include -+#include - - //typedef unsigned short UShortType; - typedef short ShortType; - typedef int LongType; -- -+#ifdef VTK_CELL_ARRAY_V2 -+typedef const vtkIdType* vtkIdTypePtr; -+#else -+typedef vtkIdType* vtkIdTypePtr; -+#endif - class SMDS_MeshNode; - class SMDS_MeshEdge; - class SMDS_MeshFace; -@@ -192,7 +197,7 @@ protected: - //! Element index in vector SMDS_Mesh::myNodes or SMDS_Mesh::myCells - int myID; - //! index in vtkUnstructuredGrid -- int myVtkID; -+ vtkIdType myVtkID; - //! SMDS_Mesh identification in SMESH - ShortType myMeshId; - //! SubShape and SubMesh identification in SMESHDS -Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/inc/SMDS_UnstructuredGrid.hxx -=================================================================== ---- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/inc/SMDS_UnstructuredGrid.hxx -+++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/inc/SMDS_UnstructuredGrid.hxx -@@ -95,7 +95,11 @@ public: - std::map >& nodeQuadDomains); - vtkCellLinks* GetLinks() - { -+#ifdef VTK_CELL_ARRAY_V2 -+ return static_cast(GetCellLinks()); -+#else - return Links; -+#endif - } - SMDS_Downward* getDownArray(unsigned char vtkType) - { -Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_BallElement.cpp -=================================================================== ---- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/src/SMDS/SMDS_BallElement.cpp -+++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_BallElement.cpp -@@ -67,10 +67,16 @@ void SMDS_BallElement::SetDiameter(doubl - bool SMDS_BallElement::ChangeNode (const SMDS_MeshNode * node) - { - vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid(); -+#ifdef VTK_CELL_ARRAY_V2 -+ vtkNew cellPoints; -+ grid->GetCellPoints(myVtkID, cellPoints.GetPointer()); -+ cellPoints->SetId(0, node->getVtkId()); -+#else - vtkIdType npts = 0; - vtkIdType* pts = 0; - grid->GetCellPoints(myVtkID, npts, pts); - pts[0] = node->getVtkId(); -+#endif - SMDS_Mesh::_meshList[myMeshId]->setMyModified(); - return true; - } -@@ -83,7 +89,8 @@ void SMDS_BallElement::Print (std::ostre - const SMDS_MeshNode* SMDS_BallElement::GetNode (const int ind) const - { - vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid(); -- vtkIdType npts, *pts; -+ vtkIdType npts; -+ vtkIdTypePtr pts; - grid->GetCellPoints( myVtkID, npts, pts ); - return SMDS_Mesh::_meshList[myMeshId]->FindNodeVtk( pts[ 0 ]); - } -Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_Downward.cpp -=================================================================== ---- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/src/SMDS/SMDS_Downward.cpp -+++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_Downward.cpp -@@ -303,7 +303,7 @@ int SMDS_Down1D::getNodeSet(int cellId, - void SMDS_Down1D::setNodes(int cellId, int vtkId) - { - vtkIdType npts = 0; -- vtkIdType *pts; // will refer to the point id's of the face -+ vtkIdTypePtr pts; // will refer to the point id's of the face - _grid->GetCellPoints(vtkId, npts, pts); - // MESSAGE(vtkId << " " << npts << " " << _nbDownCells); - //ASSERT(npts == _nbDownCells); -@@ -357,7 +357,7 @@ int SMDS_Down1D::computeVtkCells(int *pt - { - vtkIdType point = pts[i]; - int numCells = _grid->GetLinks()->GetNcells(point); -- vtkIdType *cells = _grid->GetLinks()->GetCells(point); -+ vtkIdTypePtr cells = _grid->GetLinks()->GetCells(point); - for (int j = 0; j < numCells; j++) - { - int vtkCellId = cells[j]; -@@ -532,7 +532,7 @@ int SMDS_Down2D::computeVolumeIds(int ce - // --- find point id's of the face - - vtkIdType npts = 0; -- vtkIdType *pts; // will refer to the point id's of the face -+ vtkIdTypePtr pts; // will refer to the point id's of the face - _grid->GetCellPoints(cellId, npts, pts); - vector nodes; - for (int i = 0; i < npts; i++) -@@ -577,7 +577,7 @@ int SMDS_Down2D::computeVolumeIdsFromNod - vtkIdType point = pts[i]; - int numCells = _grid->GetLinks()->GetNcells(point); - //MESSAGE("cells pour " << i << " " << numCells); -- vtkIdType *cells = _grid->GetLinks()->GetCells(point); -+ vtkIdTypePtr cells = _grid->GetLinks()->GetCells(point); - for (int j = 0; j < numCells; j++) - { - int vtkCellId = cells[j]; -@@ -627,7 +627,7 @@ int SMDS_Down2D::computeVolumeIdsFromNod - void SMDS_Down2D::setTempNodes(int cellId, int vtkId) - { - vtkIdType npts = 0; -- vtkIdType *pts; // will refer to the point id's of the face -+ vtkIdTypePtr pts; // will refer to the point id's of the face - _grid->GetCellPoints(vtkId, npts, pts); - // MESSAGE(vtkId << " " << npts << " " << _nbNodes); - //ASSERT(npts == _nbNodes); -@@ -795,7 +795,7 @@ void SMDS_Down3D::getNodeIds(int cellId, - { - int vtkId = this->_vtkCellIds[cellId]; - vtkIdType npts = 0; -- vtkIdType *nodes; // will refer to the point id's of the volume -+ vtkIdTypePtr nodes; // will refer to the point id's of the volume - _grid->GetCellPoints(vtkId, npts, nodes); - for (int i = 0; i < npts; i++) - nodeSet.insert(nodes[i]); -@@ -1126,7 +1126,7 @@ void SMDS_DownTetra::getOrderedNodesOfFa - //MESSAGE("cellId = " << cellId); - - vtkIdType npts = 0; -- vtkIdType *nodes; // will refer to the point id's of the volume -+ vtkIdTypePtr nodes; // will refer to the point id's of the volume - _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes); - - set tofind; -@@ -1178,7 +1178,7 @@ void SMDS_DownTetra::computeFacesWithNod - // --- find point id's of the volume - - vtkIdType npts = 0; -- vtkIdType *nodes; // will refer to the point id's of the volume -+ vtkIdTypePtr nodes; // will refer to the point id's of the volume - _grid->GetCellPoints(cellId, npts, nodes); - - // --- create all the ordered list of node id's for each face -@@ -1234,7 +1234,7 @@ void SMDS_DownQuadTetra::getOrderedNodes - //MESSAGE("cellId = " << cellId); - - vtkIdType npts = 0; -- vtkIdType *nodes; // will refer to the point id's of the volume -+ vtkIdTypePtr nodes; // will refer to the point id's of the volume - _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes); - - set tofind; -@@ -1288,7 +1288,7 @@ void SMDS_DownQuadTetra::computeFacesWit - // --- find point id's of the volume - - vtkIdType npts = 0; -- vtkIdType *nodes; // will refer to the point id's of the volume -+ vtkIdTypePtr nodes; // will refer to the point id's of the volume - _grid->GetCellPoints(cellId, npts, nodes); - - // --- create all the ordered list of node id's for each face -@@ -1357,7 +1357,7 @@ void SMDS_DownPyramid::getOrderedNodesOf - //MESSAGE("cellId = " << cellId); - - vtkIdType npts = 0; -- vtkIdType *nodes; // will refer to the point id's of the volume -+ vtkIdTypePtr nodes; // will refer to the point id's of the volume - _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes); - - set tofind; -@@ -1435,7 +1435,7 @@ void SMDS_DownPyramid::computeFacesWithN - // --- find point id's of the volume - - vtkIdType npts = 0; -- vtkIdType *nodes; // will refer to the point id's of the volume -+ vtkIdTypePtr nodes; // will refer to the point id's of the volume - _grid->GetCellPoints(cellId, npts, nodes); - - // --- create all the ordered list of node id's for each face -@@ -1500,7 +1500,7 @@ void SMDS_DownQuadPyramid::getOrderedNod - //MESSAGE("cellId = " << cellId); - - vtkIdType npts = 0; -- vtkIdType *nodes; // will refer to the point id's of the volume -+ vtkIdTypePtr nodes; // will refer to the point id's of the volume - _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes); - - set tofind; -@@ -1580,7 +1580,7 @@ void SMDS_DownQuadPyramid::computeFacesW - // --- find point id's of the volume - - vtkIdType npts = 0; -- vtkIdType *nodes; // will refer to the point id's of the volume -+ vtkIdTypePtr nodes; // will refer to the point id's of the volume - _grid->GetCellPoints(cellId, npts, nodes); - - // --- create all the ordered list of node id's for each face -@@ -1660,7 +1660,7 @@ void SMDS_DownPenta::getOrderedNodesOfFa - //MESSAGE("cellId = " << cellId); - - vtkIdType npts = 0; -- vtkIdType *nodes; // will refer to the point id's of the volume -+ vtkIdTypePtr nodes; // will refer to the point id's of the volume - _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes); - - set tofind; -@@ -1744,7 +1744,7 @@ void SMDS_DownPenta::computeFacesWithNod - // --- find point id's of the volume - - vtkIdType npts = 0; -- vtkIdType *nodes; // will refer to the point id's of the volume -+ vtkIdTypePtr nodes; // will refer to the point id's of the volume - _grid->GetCellPoints(cellId, npts, nodes); - - // --- create all the ordered list of node id's for each face -@@ -1810,7 +1810,7 @@ void SMDS_DownQuadPenta::getOrderedNodes - //MESSAGE("cellId = " << cellId); - - vtkIdType npts = 0; -- vtkIdType *nodes; // will refer to the point id's of the volume -+ vtkIdTypePtr nodes; // will refer to the point id's of the volume - _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes); - - set tofind; -@@ -1896,7 +1896,7 @@ void SMDS_DownQuadPenta::computeFacesWit - // --- find point id's of the volume - - vtkIdType npts = 0; -- vtkIdType *nodes; // will refer to the point id's of the volume -+ vtkIdTypePtr nodes; // will refer to the point id's of the volume - _grid->GetCellPoints(cellId, npts, nodes); - - // --- create all the ordered list of node id's for each face -@@ -1981,7 +1981,7 @@ void SMDS_DownHexa::getOrderedNodesOfFac - //MESSAGE("cellId = " << cellId); - - vtkIdType npts = 0; -- vtkIdType *nodes; // will refer to the point id's of the volume -+ vtkIdTypePtr nodes; // will refer to the point id's of the volume - _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes); - - set tofind; -@@ -2036,7 +2036,7 @@ void SMDS_DownHexa::computeFacesWithNode - // --- find point id's of the volume - - vtkIdType npts = 0; -- vtkIdType *nodes; // will refer to the point id's of the volume -+ vtkIdTypePtr nodes; // will refer to the point id's of the volume - _grid->GetCellPoints(cellId, npts, nodes); - - // --- create all the ordered list of node id's for each face -@@ -2112,7 +2112,7 @@ void SMDS_DownQuadHexa::getOrderedNodesO - //MESSAGE("cellId = " << cellId); - - vtkIdType npts = 0; -- vtkIdType *nodes; // will refer to the point id's of the volume -+ vtkIdTypePtr nodes; // will refer to the point id's of the volume - _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes); - - set tofind; -@@ -2167,7 +2167,7 @@ void SMDS_DownQuadHexa::computeFacesWith - // --- find point id's of the volume - - vtkIdType npts = 0; -- vtkIdType *nodes; // will refer to the point id's of the volume -+ vtkIdTypePtr nodes; // will refer to the point id's of the volume - _grid->GetCellPoints(cellId, npts, nodes); - - // --- create all the ordered list of node id's for each face -Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cpp -=================================================================== ---- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cpp -+++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cpp -@@ -4768,7 +4768,11 @@ void SMDS_Mesh::dumpGrid(string ficdump) - ficcon << endl; - } - ficcon << "-------------------------------- connectivity " << nbPoints << endl; -- vtkCellLinks *links = myGrid->GetCellLinks(); -+#ifdef VTK_CELL_ARRAY_V2 -+ vtkCellLinks *links = static_cast(myGrid->GetCellLinks()); -+#else -+ vtkCellLinks *links = myGrid->GetCellLinks(); -+#endif - for (int i=0; iGetNcells(i); -Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh0DElement.cpp -=================================================================== ---- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh0DElement.cpp -+++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh0DElement.cpp -@@ -146,6 +146,17 @@ bool SMDS_Mesh0DElement::ChangeNodes(con - if ( nbNodes == 1 ) - { - vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid(); -+#ifdef VTK_CELL_ARRAY_V2 -+ vtkNew cellPoints; -+ grid->GetCellPoints(myVtkID, cellPoints.GetPointer()); -+ if (nbNodes != cellPoints->GetNumberOfIds()) -+ { -+ MESSAGE("ChangeNodes problem: not the same number of nodes " << cellPoints->GetNumberOfIds() << " -> " << nbNodes); -+ return false; -+ } -+ myNode = nodes[0]; -+ cellPoints->SetId(0, myNode->getVtkId()); -+#else - vtkIdType npts = 0; - vtkIdType* pts = 0; - grid->GetCellPoints(myVtkID, npts, pts); -@@ -156,6 +167,7 @@ bool SMDS_Mesh0DElement::ChangeNodes(con - } - myNode = nodes[0]; - pts[0] = myNode->getVtkId(); -+#endif - - SMDS_Mesh::_meshList[myMeshId]->setMyModified(); - return true; -Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_MeshNode.cpp -=================================================================== ---- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/src/SMDS/SMDS_MeshNode.cpp -+++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_MeshNode.cpp -@@ -191,7 +191,7 @@ public: - SMDS_ElemIteratorPtr SMDS_MeshNode:: - GetInverseElementIterator(SMDSAbs_ElementType type) const - { -- vtkCellLinks::Link l = SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks()->GetLink(myVtkID); -+ vtkCellLinks::Link l = static_cast(SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks())->GetLink(myVtkID); - //MESSAGE("myID " << myID << " ncells " << l.ncells); - return SMDS_ElemIteratorPtr(new SMDS_MeshNode_MyInvIterator(SMDS_Mesh::_meshList[myMeshId], l.cells, l.ncells, type)); - } -@@ -251,7 +251,7 @@ elementsIterator(SMDSAbs_ElementType typ - return SMDS_MeshElement::elementsIterator(SMDSAbs_Node); - else - { -- vtkCellLinks::Link l = SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks()->GetLink(myVtkID); -+ vtkCellLinks::Link l = static_cast(SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks())->GetLink(myVtkID); - return SMDS_ElemIteratorPtr(new SMDS_MeshNode_MyIterator(SMDS_Mesh::_meshList[myMeshId], l.cells, l.ncells, type)); - } - } -@@ -350,7 +350,7 @@ void SMDS_MeshNode::AddInverseElement(co - const SMDS_MeshCell *cell = dynamic_cast (ME); - assert(cell); - SMDS_UnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid(); -- vtkCellLinks *Links = grid->GetCellLinks(); -+ vtkCellLinks *Links = static_cast(grid->GetCellLinks()); - Links->ResizeCellList(myVtkID, 1); - Links->AddCellReference(cell->getVtkId(), myVtkID); - } -@@ -366,7 +366,7 @@ void SMDS_MeshNode::ClearInverseElements - - bool SMDS_MeshNode::emptyInverseElements() - { -- vtkCellLinks::Link l = SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks()->GetLink(myVtkID); -+ vtkCellLinks::Link l = static_cast(SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks())->GetLink(myVtkID); - return (l.ncells == 0); - } - -@@ -378,7 +378,7 @@ bool SMDS_MeshNode::emptyInverseElements - - int SMDS_MeshNode::NbInverseElements(SMDSAbs_ElementType type) const - { -- vtkCellLinks::Link l = SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks()->GetLink(myVtkID); -+ vtkCellLinks::Link l = static_cast(SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks())->GetLink(myVtkID); - - if ( type == SMDSAbs_All ) - return l.ncells; -Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp -=================================================================== ---- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp -+++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp -@@ -139,8 +139,8 @@ int SMDS_UnstructuredGrid::InsertNextLin - for (; it != setOfNodes.end(); ++it) - { - //MESSAGE("reverse link for node " << *it << " cell " << cellid); -- this->Links->ResizeCellList(*it, 1); -- this->Links->AddCellReference(cellid, *it); -+ this->GetLinks()->ResizeCellList(*it, 1); -+ this->GetLinks()->AddCellReference(cellid, *it); - } - - return cellid; -@@ -332,9 +332,13 @@ void SMDS_UnstructuredGrid::copyBloc(vtk - { - newTypes->SetValue(alreadyCopied, this->Types->GetValue(j)); - idCellsOldToNew[j] = alreadyCopied; // old vtkId --> new vtkId -+#ifdef VTK_CELL_ARRAY_V2 -+ vtkIdType oldLoc = this->GetCellLocationsArray()->GetValue(j); -+#else - vtkIdType oldLoc = this->Locations->GetValue(j); -+#endif - vtkIdType nbpts; -- vtkIdType *oldPtsCell = 0; -+ vtkIdTypePtr oldPtsCell = 0; - this->Connectivity->GetCell(oldLoc, nbpts, oldPtsCell); - assert(nbpts < NBMAXNODESINCELL); - //MESSAGE(j << " " << alreadyCopied << " " << (int)this->Types->GetValue(j) << " " << oldLoc << " " << nbpts ); -@@ -952,6 +956,21 @@ void SMDS_UnstructuredGrid::GetNodeIds(s - */ - void SMDS_UnstructuredGrid::ModifyCellNodes(int vtkVolId, std::map localClonedNodeIds) - { -+#ifdef VTK_CELL_ARRAY_V2 -+ vtkNew cellPoints; -+ this->GetCellPoints(vtkVolId, cellPoints.GetPointer()); -+ for (vtkIdType i = 0; i < cellPoints->GetNumberOfIds(); i++) -+ { -+ if (localClonedNodeIds.count(cellPoints->GetId(i))) -+ { -+ vtkIdType oldpt = cellPoints->GetId(i); -+ cellPoints->SetId(i, localClonedNodeIds[oldpt]); -+ //MESSAGE(oldpt << " --> " << pts[i]); -+ //this->RemoveReferenceToCell(oldpt, vtkVolId); -+ //this->AddReferenceToCell(pts[i], vtkVolId); -+ } -+ } -+#else - vtkIdType npts = 0; - vtkIdType *pts; // will refer to the point id's of the face - this->GetCellPoints(vtkVolId, npts, pts); -@@ -966,6 +985,7 @@ void SMDS_UnstructuredGrid::ModifyCellNo - //this->AddReferenceToCell(pts[i], vtkVolId); - } - } -+#endif - } - - /*! reorder the nodes of a face -@@ -995,11 +1015,20 @@ void SMDS_UnstructuredGrid::BuildLinks() - this->Links->UnRegister(this); - } - -+#ifdef VTK_CELL_ARRAY_V2 -+ this->Links = SMDS_CellLinks::New(); -+ GetLinks()->Allocate(this->GetNumberOfPoints()); -+ GetLinks()->Register(this); -+//FIXME: vtk9 -+ GetLinks()->BuildLinks(this); -+ GetLinks()->Delete(); -+#else - this->Links = SMDS_CellLinks::New(); - this->Links->Allocate(this->GetNumberOfPoints()); - this->Links->Register(this); - this->Links->BuildLinks(this, this->Connectivity); - this->Links->Delete(); -+#endif - } - - /*! Create a volume (prism or hexahedron) by duplication of a face. -Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkCellIterator.cpp -=================================================================== ---- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkCellIterator.cpp -+++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkCellIterator.cpp -@@ -33,7 +33,8 @@ SMDS_VtkCellIterator::SMDS_VtkCellIterat - } - else - { -- vtkIdType npts, *pts; -+ vtkIdType npts; -+ vtkIdTypePtr pts; - grid->GetCellPoints( _cellId, npts, pts ); - _vtkIdList->SetNumberOfIds( _nbNodes = npts ); - for (int i = 0; i < _nbNodes; i++) -@@ -67,7 +68,7 @@ SMDS_VtkCellIteratorToUNV::SMDS_VtkCellI - //MESSAGE("SMDS_VtkCellInterlacedIterator (UNV)" << _type); - - _vtkIdList = vtkIdList::New(); -- vtkIdType* pts; -+ vtkIdTypePtr pts; - vtkIdType npts; - vtkUnstructuredGrid* grid = _mesh->getGrid(); - grid->GetCellPoints((vtkIdType)_cellId, npts, pts); -@@ -182,7 +183,7 @@ SMDS_VtkCellIteratorPolyH::SMDS_VtkCellI - { - //MESSAGE("SMDS_VtkCellIterator Polyhedra"); - vtkIdType nFaces = 0; -- vtkIdType* ptIds = 0; -+ vtkIdTypePtr ptIds = 0; - grid->GetFaceStream(_cellId, nFaces, ptIds); - int id = 0; - _nbNodesInFaces = 0; -Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkEdge.cpp -=================================================================== ---- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkEdge.cpp -+++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkEdge.cpp -@@ -67,6 +67,19 @@ bool SMDS_VtkEdge::ChangeNodes(const SMD - bool SMDS_VtkEdge::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes) - { - vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid(); -+#ifdef VTK_CELL_ARRAY_V2 -+ vtkNew cellPoints; -+ grid->GetCellPoints(myVtkID, cellPoints.GetPointer()); -+ if (nbNodes != cellPoints->GetNumberOfIds()) -+ { -+ MESSAGE("ChangeNodes problem: not the same number of nodes " << cellPoints->GetNumberOfIds() << " -> " << nbNodes); -+ return false; -+ } -+ for (int i = 0; i < nbNodes; i++) -+ { -+ cellPoints->SetId(i, nodes[i]->getVtkId()); -+ } -+#else - vtkIdType npts = 0; - vtkIdType* pts = 0; - grid->GetCellPoints(myVtkID, npts, pts); -@@ -79,6 +92,7 @@ bool SMDS_VtkEdge::ChangeNodes(const SMD - { - pts[i] = nodes[i]->getVtkId(); - } -+#endif - SMDS_Mesh::_meshList[myMeshId]->setMyModified(); - return true; - } -@@ -87,7 +101,7 @@ bool SMDS_VtkEdge::IsMediumNode(const SM - { - vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid(); - vtkIdType npts = 0; -- vtkIdType* pts = 0; -+ vtkIdTypePtr pts = 0; - grid->GetCellPoints(myVtkID, npts, pts); - //MESSAGE("IsMediumNode " << npts << " " << (node->getVtkId() == pts[npts-1])); - return ((npts == 3) && (node->getVtkId() == pts[2])); -@@ -137,7 +151,8 @@ const SMDS_MeshNode* - SMDS_VtkEdge::GetNode(const int ind) const - { - vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid(); -- vtkIdType npts, *pts; -+ vtkIdType npts; -+ vtkIdTypePtr pts; - grid->GetCellPoints( this->myVtkID, npts, pts ); - return SMDS_Mesh::_meshList[myMeshId]->FindNodeVtk( pts[ ind ]); - } -Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkFace.cpp -=================================================================== ---- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkFace.cpp -+++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkFace.cpp -@@ -101,6 +101,19 @@ void SMDS_VtkFace::initQuadPoly(const st - bool SMDS_VtkFace::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes) - { - vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid(); -+#ifdef VTK_CELL_ARRAY_V2 -+ vtkNew cellPoints; -+ grid->GetCellPoints(myVtkID, cellPoints.GetPointer()); -+ if (nbNodes != cellPoints->GetNumberOfIds()) -+ { -+ MESSAGE("ChangeNodes problem: not the same number of nodes " << cellPoints->GetNumberOfIds() << " -> " << nbNodes); -+ return false; -+ } -+ for (int i = 0; i < nbNodes; i++) -+ { -+ cellPoints->SetId(i, nodes[i]->getVtkId()); -+ } -+#else - vtkIdType npts = 0; - vtkIdType* pts = 0; - grid->GetCellPoints(myVtkID, npts, pts); -@@ -113,6 +126,7 @@ bool SMDS_VtkFace::ChangeNodes(const SMD - { - pts[i] = nodes[i]->getVtkId(); - } -+#endif - SMDS_Mesh::_meshList[myMeshId]->setMyModified(); - return true; - } -@@ -173,7 +187,8 @@ const SMDS_MeshNode* - SMDS_VtkFace::GetNode(const int ind) const - { - vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid(); -- vtkIdType npts, *pts; -+ vtkIdType npts; -+ vtkIdTypePtr pts; - grid->GetCellPoints( this->myVtkID, npts, pts ); - return SMDS_Mesh::_meshList[myMeshId]->FindNodeVtk( pts[ ind ]); - } -@@ -186,7 +201,8 @@ SMDS_VtkFace::GetNode(const int ind) con - int SMDS_VtkFace::GetNodeIndex( const SMDS_MeshNode* node ) const - { - vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid(); -- vtkIdType npts, *pts; -+ vtkIdType npts; -+ vtkIdTypePtr pts; - grid->GetCellPoints( this->myVtkID, npts, pts ); - for ( vtkIdType i = 0; i < npts; ++i ) - if ( pts[i] == node->getVtkId() ) -@@ -251,7 +267,7 @@ bool SMDS_VtkFace::IsMediumNode(const SM - return false; - } - vtkIdType npts = 0; -- vtkIdType* pts = 0; -+ vtkIdTypePtr pts = 0; - grid->GetCellPoints(myVtkID, npts, pts); - vtkIdType nodeId = node->getVtkId(); - for (int rank = 0; rank < npts; rank++) -@@ -356,11 +372,18 @@ SMDS_NodeIteratorPtr SMDS_VtkFace::inter - void SMDS_VtkFace::ChangeApex(SMDS_MeshNode* node) - { - vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid(); -+#ifdef VTK_CELL_ARRAY_V2 -+ vtkNew cellPoints; -+ grid->GetCellPoints(myVtkID, cellPoints.GetPointer()); -+ grid->RemoveReferenceToCell(cellPoints->GetId(0), myVtkID); -+ cellPoints->SetId(0, node->getVtkId()); -+#else - vtkIdType npts = 0; - vtkIdType* pts = 0; - grid->GetCellPoints(myVtkID, npts, pts); - grid->RemoveReferenceToCell(pts[0], myVtkID); - pts[0] = node->getVtkId(); -+#endif - node->AddInverseElement(this), - SMDS_Mesh::_meshList[myMeshId]->setMyModified(); - } -Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkVolume.cpp -=================================================================== ---- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkVolume.cpp -+++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkVolume.cpp -@@ -133,6 +133,19 @@ void SMDS_VtkVolume::initPoly(const std: - bool SMDS_VtkVolume::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes) - { - vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid(); -+#ifdef VTK_CELL_ARRAY_V2 -+ vtkNew cellPoints; -+ grid->GetCellPoints(myVtkID, cellPoints.GetPointer()); -+ if (nbNodes != cellPoints->GetNumberOfIds()) -+ { -+ MESSAGE("ChangeNodes problem: not the same number of nodes " << cellPoints->GetNumberOfIds() << " -> " << nbNodes); -+ return false; -+ } -+ for (int i = 0; i < nbNodes; i++) -+ { -+ cellPoints->SetId(i, nodes[i]->getVtkId()); -+ } -+#else - vtkIdType npts = 0; - vtkIdType* pts = 0; - grid->GetCellPoints(myVtkID, npts, pts); -@@ -145,6 +158,7 @@ bool SMDS_VtkVolume::ChangeNodes(const S - { - pts[i] = nodes[i]->getVtkId(); - } -+#endif - SMDS_Mesh::_meshList[myMeshId]->setMyModified(); - return true; - } -@@ -207,7 +221,7 @@ int SMDS_VtkVolume::NbFaces() const - case VTK_POLYHEDRON: - { - vtkIdType nFaces = 0; -- vtkIdType* ptIds = 0; -+ vtkIdTypePtr ptIds = 0; - grid->GetFaceStream(this->myVtkID, nFaces, ptIds); - nbFaces = nFaces; - break; -@@ -236,7 +250,7 @@ int SMDS_VtkVolume::NbNodes() const - else - { - vtkIdType nFaces = 0; -- vtkIdType* ptIds = 0; -+ vtkIdTypePtr ptIds = 0; - grid->GetFaceStream(this->myVtkID, nFaces, ptIds); - int id = 0; - for (int i = 0; i < nFaces; i++) -@@ -276,7 +290,7 @@ int SMDS_VtkVolume::NbEdges() const - case VTK_POLYHEDRON: - { - vtkIdType nFaces = 0; -- vtkIdType* ptIds = 0; -+ vtkIdTypePtr ptIds = 0; - grid->GetFaceStream(this->myVtkID, nFaces, ptIds); - nbEdges = 0; - int id = 0; -@@ -312,7 +326,7 @@ int SMDS_VtkVolume::NbFaceNodes(const in - if (aVtkType == VTK_POLYHEDRON) - { - vtkIdType nFaces = 0; -- vtkIdType* ptIds = 0; -+ vtkIdTypePtr ptIds = 0; - grid->GetFaceStream(this->myVtkID, nFaces, ptIds); - int id = 0; - for (int i = 0; i < nFaces; i++) -@@ -342,7 +356,7 @@ const SMDS_MeshNode* SMDS_VtkVolume::Get - if (aVtkType == VTK_POLYHEDRON) - { - vtkIdType nFaces = 0; -- vtkIdType* ptIds = 0; -+ vtkIdTypePtr ptIds = 0; - grid->GetFaceStream(this->myVtkID, nFaces, ptIds); - int id = 0; - for (int i = 0; i < nFaces; i++) -@@ -372,7 +386,7 @@ std::vector SMDS_VtkVolume::GetQuan - if (aVtkType == VTK_POLYHEDRON) - { - vtkIdType nFaces = 0; -- vtkIdType* ptIds = 0; -+ vtkIdTypePtr ptIds = 0; - grid->GetFaceStream(this->myVtkID, nFaces, ptIds); - int id = 0; - for (int i = 0; i < nFaces; i++) -@@ -430,7 +444,7 @@ const SMDS_MeshNode* SMDS_VtkVolume::Get - if ( aVtkType == VTK_POLYHEDRON) - { - vtkIdType nFaces = 0; -- vtkIdType* ptIds = 0; -+ vtkIdTypePtr ptIds = 0; - grid->GetFaceStream(this->myVtkID, nFaces, ptIds); - int id = 0, nbPoints = 0; - for (int i = 0; i < nFaces; i++) -@@ -443,7 +457,8 @@ const SMDS_MeshNode* SMDS_VtkVolume::Get - } - return 0; - } -- vtkIdType npts, *pts; -+ vtkIdType npts; -+ vtkIdTypePtr pts; - grid->GetCellPoints( this->myVtkID, npts, pts ); - const std::vector& interlace = SMDS_MeshCell::fromVtkOrder( VTKCellType( aVtkType )); - return SMDS_Mesh::_meshList[myMeshId]->FindNodeVtk( pts[ interlace.empty() ? ind : interlace[ind]] ); -@@ -460,7 +475,7 @@ int SMDS_VtkVolume::GetNodeIndex( const - if ( aVtkType == VTK_POLYHEDRON) - { - vtkIdType nFaces = 0; -- vtkIdType* ptIds = 0; -+ vtkIdTypePtr ptIds = 0; - grid->GetFaceStream(this->myVtkID, nFaces, ptIds); - int id = 0; - for (int iF = 0; iF < nFaces; iF++) -@@ -473,7 +488,8 @@ int SMDS_VtkVolume::GetNodeIndex( const - } - return -1; - } -- vtkIdType npts, *pts; -+ vtkIdType npts; -+ vtkIdTypePtr pts; - grid->GetCellPoints( this->myVtkID, npts, pts ); - for ( vtkIdType i = 0; i < npts; ++i ) - if ( pts[i] == node->getVtkId() ) -@@ -534,7 +550,7 @@ bool SMDS_VtkVolume::IsMediumNode(const - return false; - } - vtkIdType npts = 0; -- vtkIdType* pts = 0; -+ vtkIdTypePtr pts = 0; - grid->GetCellPoints(myVtkID, npts, pts); - vtkIdType nodeId = node->getVtkId(); - for (int rank = 0; rank < npts; rank++) -Index: FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp -=================================================================== ---- FreeCAD-0.19.2.orig/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp -+++ FreeCAD-0.19.2/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp -@@ -11348,7 +11348,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGrou - { - int oldId = *itn; - //MESSAGE(" node " << oldId); -- vtkCellLinks::Link l = grid->GetCellLinks()->GetLink(oldId); -+ vtkCellLinks::Link l = static_cast(grid->GetCellLinks())->GetLink(oldId); - for (int i=0; iGetID()); - double values[3]; - vtkIdType npts = 0; -- vtkIdType* pts = 0; -+ vtkIdTypePtr pts = 0; - grid->GetCellPoints(vtkVolIds[ivol], npts, pts); - SMDS_VtkVolume::gravityCenter(grid, pts, npts, values); - if (id ==0) -@@ -11708,7 +11708,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGrou - { - int oldId = itnod->first; - //MESSAGE(" node " << oldId); -- vtkCellLinks::Link l = grid->GetCellLinks()->GetLink(oldId); -+ vtkCellLinks::Link l = static_cast(grid->GetCellLinks())->GetLink(oldId); - for (int i = 0; i < l.ncells; i++) - { - int vtkId = l.cells[i]; -@@ -12165,7 +12165,7 @@ void SMESH_MeshEditor::CreateHoleSkin(do - MESSAGE("volume to check, vtkId " << vtkId << " smdsId " << meshDS->fromVtkToSmds(vtkId)); - bool volInside = false; - vtkIdType npts = 0; -- vtkIdType* pts = 0; -+ vtkIdTypePtr pts = 0; - grid->GetCellPoints(vtkId, npts, pts); - for (int i=0; i Date: Sat, 12 Feb 2022 16:40:05 +0100 Subject: gnu: nhc98: Build with the current tool chain. * gnu/packages/patches/nhc98-c-update.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/haskell.scm (nhc98)[source]: Use it. [arguments]: Remove #:implicit-inputs?. [native-inputs]: Remove. --- gnu/local.mk | 1 + gnu/packages/haskell.scm | 34 ++----------------------- gnu/packages/patches/nhc98-c-update.patch | 42 +++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 32 deletions(-) create mode 100644 gnu/packages/patches/nhc98-c-update.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 27ee3403da..c213311f44 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1544,6 +1544,7 @@ dist_patch_DATA = \ %D%/packages/patches/nettle-3.5-check-_pkcs1_sec_decrypt-msg-len.patch \ %D%/packages/patches/nettle-3.5-CVE-2021-3580-pt1.patch \ %D%/packages/patches/nettle-3.5-CVE-2021-3580-pt2.patch \ + %D%/packages/patches/nhc98-c-update.patch \ %D%/packages/patches/nix-dont-build-html-doc.diff \ %D%/packages/patches/nfs4-acl-tools-0.3.7-fixpaths.patch \ %D%/packages/patches/ngircd-handle-zombies.patch \ diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm index 647b078dfd..c3706fca6c 100644 --- a/gnu/packages/haskell.scm +++ b/gnu/packages/haskell.scm @@ -123,14 +123,14 @@ top of CLISP.") version ".tar.gz")) (sha256 (base32 - "0fkgxgsd2iqxvwcgnad1702kradwlbcal6rxdrgb22vd6dnc3i8l")))) + "0fkgxgsd2iqxvwcgnad1702kradwlbcal6rxdrgb22vd6dnc3i8l")) + (patches (search-patches "nhc98-c-update.patch")))) (build-system gnu-build-system) (supported-systems '("i686-linux" "x86_64-linux")) (arguments (list #:tests? #false ;there is no test target #:system "i686-linux" - #:implicit-inputs? #false #:parallel-build? #false ;not supported #:strip-binaries? #false ;doesn't work #:make-flags '(list "all-gcc") @@ -170,36 +170,6 @@ top of CLISP.") "--ccoption=" "--ldoption=" "--install")))))) - (native-inputs - `(("findutils" ,findutils) - ("tar" ,tar) - ("bzip2" ,bzip2) - ("gzip" ,gzip) - ("xz" ,xz) - ("diffutils" ,diffutils) - ("file" ,file) - ("gawk" ,gawk) - - ("make" ,gnu-make) - ("sed" ,sed) - ("grep" ,grep) - ("coreutils" ,coreutils) - ("bash" ,bash-minimal) - - ("libc" ,glibc-2.2.5) - ("gcc-wrapper" - ,(module-ref (resolve-interface - '(gnu packages commencement)) - 'gcc-2.95-wrapper)) - ("gcc" - ,(module-ref (resolve-interface - '(gnu packages commencement)) - 'gcc-mesboot0)) - ("binutils" - ,(module-ref (resolve-interface - '(gnu packages commencement)) - 'binutils-mesboot)) - ("kernel-headers" ,linux-libre-headers))) (home-page "https://www.haskell.org/nhc98") (synopsis "Nearly a Haskell Compiler") (description diff --git a/gnu/packages/patches/nhc98-c-update.patch b/gnu/packages/patches/nhc98-c-update.patch new file mode 100644 index 0000000000..06e6928d14 --- /dev/null +++ b/gnu/packages/patches/nhc98-c-update.patch @@ -0,0 +1,42 @@ +This patch provides an update so that nhc98 can be built and works with +a modern C compiler (GCC 11) and libc (glibc 2.33). + +diff --git a/Makefile.inc b/Makefile.inc +index 4fbd47a..5bce5c9 100644 +--- a/Makefile.inc ++++ b/Makefile.inc +@@ -1,6 +1,10 @@ + ### Configurable variables: + +-OPT = -O3 ++# We want C89 semantics plus C++-style comments and things like the ++# 'setjmp_buf' and 'u_short' types. More importantly, build with '-O1' ++# only to avoid modern optimizations that break the code. ++OPT = -O1 -std=gnu89 -D_GNU_SOURCE=1 ++ + #ARCH = -m32 + ARCH = + +diff --git a/script/nhc98heap.c b/script/nhc98heap.c +index 534010e..a30d5cd 100644 +--- a/script/nhc98heap.c ++++ b/script/nhc98heap.c +@@ -1,5 +1,6 @@ + #include + #include ++#include + main(int argc, char **argv) + { + int prefix = 1; +diff --git a/src/runtime/Kernel/collector.c b/src/runtime/Kernel/collector.c +index b95a273..1f879c5 100644 +--- a/src/runtime/Kernel/collector.c ++++ b/src/runtime/Kernel/collector.c +@@ -2,6 +2,7 @@ + #include + #include + #include ++#include + #include "node.h" + /*#include "newmacros.h" -- already included in node.h */ + /*#include "runtime.h" -- already included in node.h */ -- cgit v1.2.3 From d2bb4847b96e51b71126778bb16daa7674a6690c Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Sun, 6 Feb 2022 23:18:52 -0500 Subject: gnu: Remove leftover patch files. These patches aren't used anywhere in Guix and we forgot to remove them. * gnu/packages/patches/bash-reproducible-linux-pgrp-pipe.patch, gnu/packages/patches/ghc-monad-par-fix-tests.patch, gnu/packages/patches/glibc-CVE-2018-11236.patch, gnu/packages/patches/glibc-CVE-2018-11237.patch, gnu/packages/patches/glibc-hurd-magic-pid.patch, gnu/packages/patches/grocsvs-dont-use-admiral.patch, gnu/packages/patches/hydra-disable-darcs-test.patch, gnu/packages/patches/inkscape-poppler-0.76.patch, gnu/packages/patches/libvirt-create-machine-cgroup.patch, gnu/packages/patches/linux-libre-arm64-generic-pinebook-lcd.patch, gnu/packages/patches/marble-qt-add-qt-headers.patch, gnu/packages/patches/maven-enforcer-api-fix-old-dependencies.patch, gnu/packages/patches/mescc-tools-boot.patch, gnu/packages/patches/nettle-3.5-CVE-2021-3580-pt1.patch, gnu/packages/patches/nettle-3.5-CVE-2021-3580-pt2.patch, gnu/packages/patches/nettle-3.5-check-_pkcs1_sec_decrypt-msg-len.patch, gnu/packages/patches/ocaml-Add-a-.file-directive.patch, gnu/packages/patches/ocaml-CVE-2015-8869.patch, gnu/packages/patches/ocaml-bitstring-fix-configure.patch, gnu/packages/patches/ocaml-enable-ocamldoc-reproducibility.patch, gnu/packages/patches/openbabel-fix-crash-on-nwchem-output.patch, gnu/packages/patches/openjdk-14-builtins.patch, gnu/packages/patches/openssl-c-rehash-in.patch, gnu/packages/patches/openssl-runpath.patch, gnu/packages/patches/passwordsafe-meson-remove-extra-argument.patch, gnu/packages/patches/patchutils-test-perms.patch, gnu/packages/patches/python-CVE-2018-14647.patch, gnu/packages/patches/python-CVE-2020-26116.patch, gnu/packages/patches/python-axolotl-AES-fix.patch, gnu/packages/patches/python-babel-fix-parse-future-test.patch, gnu/packages/patches/python-matplotlib-run-under-wayland-gtk3.patch, gnu/packages/patches/python-pytest-asyncio-python-3.8.patch, gnu/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch, gnu/packages/patches/qt4-ldflags.patch, gnu/packages/patches/rust-coresimd-doctest.patch, gnu/packages/patches/streamlink-update-test.patch, gnu/packages/patches/tcc-boot-0.9.27.patch, gnu/packages/patches/vtk-8-fix-freetypetools-build-failure.patch: Delete files. * gnu/local.mk (dist_patch_DATA): Remove them. --- gnu/local.mk | 38 --- .../bash-reproducible-linux-pgrp-pipe.patch | 34 --- gnu/packages/patches/ghc-monad-par-fix-tests.patch | 45 ---- gnu/packages/patches/glibc-CVE-2018-11236.patch | 149 ----------- gnu/packages/patches/glibc-CVE-2018-11237.patch | 55 ---- gnu/packages/patches/glibc-hurd-magic-pid.patch | 190 -------------- .../patches/grocsvs-dont-use-admiral.patch | 69 ------ .../patches/hydra-disable-darcs-test.patch | 25 -- gnu/packages/patches/inkscape-poppler-0.76.patch | 36 --- .../patches/libvirt-create-machine-cgroup.patch | 48 ---- .../linux-libre-arm64-generic-pinebook-lcd.patch | 40 --- .../patches/marble-qt-add-qt-headers.patch | 189 -------------- .../maven-enforcer-api-fix-old-dependencies.patch | 177 ------------- gnu/packages/patches/mescc-tools-boot.patch | 222 ----------------- .../patches/nettle-3.5-CVE-2021-3580-pt1.patch | 276 --------------------- .../patches/nettle-3.5-CVE-2021-3580-pt2.patch | 163 ------------ ...ttle-3.5-check-_pkcs1_sec_decrypt-msg-len.patch | 78 ------ .../patches/ocaml-Add-a-.file-directive.patch | 96 ------- gnu/packages/patches/ocaml-CVE-2015-8869.patch | 72 ------ .../patches/ocaml-bitstring-fix-configure.patch | 53 ---- .../ocaml-enable-ocamldoc-reproducibility.patch | 149 ----------- .../openbabel-fix-crash-on-nwchem-output.patch | 34 --- gnu/packages/patches/openjdk-14-builtins.patch | 11 - gnu/packages/patches/openssl-c-rehash-in.patch | 17 -- gnu/packages/patches/openssl-runpath.patch | 15 -- .../passwordsafe-meson-remove-extra-argument.patch | 20 -- gnu/packages/patches/patchutils-test-perms.patch | 14 -- gnu/packages/patches/python-CVE-2018-14647.patch | 61 ----- gnu/packages/patches/python-CVE-2020-26116.patch | 47 ---- gnu/packages/patches/python-axolotl-AES-fix.patch | 24 -- .../python-babel-fix-parse-future-test.patch | 68 ----- .../python-matplotlib-run-under-wayland-gtk3.patch | 31 --- .../patches/python-pytest-asyncio-python-3.8.patch | 238 ------------------ ...ython2-larch-coverage-4.0a6-compatibility.patch | 29 --- gnu/packages/patches/qt4-ldflags.patch | 18 -- gnu/packages/patches/rust-coresimd-doctest.patch | 21 -- gnu/packages/patches/streamlink-update-test.patch | 70 ------ gnu/packages/patches/tcc-boot-0.9.27.patch | 26 -- .../vtk-8-fix-freetypetools-build-failure.patch | 36 --- 39 files changed, 2984 deletions(-) delete mode 100644 gnu/packages/patches/bash-reproducible-linux-pgrp-pipe.patch delete mode 100644 gnu/packages/patches/ghc-monad-par-fix-tests.patch delete mode 100644 gnu/packages/patches/glibc-CVE-2018-11236.patch delete mode 100644 gnu/packages/patches/glibc-CVE-2018-11237.patch delete mode 100644 gnu/packages/patches/glibc-hurd-magic-pid.patch delete mode 100644 gnu/packages/patches/grocsvs-dont-use-admiral.patch delete mode 100644 gnu/packages/patches/hydra-disable-darcs-test.patch delete mode 100644 gnu/packages/patches/inkscape-poppler-0.76.patch delete mode 100644 gnu/packages/patches/libvirt-create-machine-cgroup.patch delete mode 100644 gnu/packages/patches/linux-libre-arm64-generic-pinebook-lcd.patch delete mode 100644 gnu/packages/patches/marble-qt-add-qt-headers.patch delete mode 100644 gnu/packages/patches/maven-enforcer-api-fix-old-dependencies.patch delete mode 100644 gnu/packages/patches/mescc-tools-boot.patch delete mode 100644 gnu/packages/patches/nettle-3.5-CVE-2021-3580-pt1.patch delete mode 100644 gnu/packages/patches/nettle-3.5-CVE-2021-3580-pt2.patch delete mode 100644 gnu/packages/patches/nettle-3.5-check-_pkcs1_sec_decrypt-msg-len.patch delete mode 100644 gnu/packages/patches/ocaml-Add-a-.file-directive.patch delete mode 100644 gnu/packages/patches/ocaml-CVE-2015-8869.patch delete mode 100644 gnu/packages/patches/ocaml-bitstring-fix-configure.patch delete mode 100644 gnu/packages/patches/ocaml-enable-ocamldoc-reproducibility.patch delete mode 100644 gnu/packages/patches/openbabel-fix-crash-on-nwchem-output.patch delete mode 100644 gnu/packages/patches/openjdk-14-builtins.patch delete mode 100644 gnu/packages/patches/openssl-c-rehash-in.patch delete mode 100644 gnu/packages/patches/openssl-runpath.patch delete mode 100644 gnu/packages/patches/passwordsafe-meson-remove-extra-argument.patch delete mode 100644 gnu/packages/patches/patchutils-test-perms.patch delete mode 100644 gnu/packages/patches/python-CVE-2018-14647.patch delete mode 100644 gnu/packages/patches/python-CVE-2020-26116.patch delete mode 100644 gnu/packages/patches/python-axolotl-AES-fix.patch delete mode 100644 gnu/packages/patches/python-babel-fix-parse-future-test.patch delete mode 100644 gnu/packages/patches/python-matplotlib-run-under-wayland-gtk3.patch delete mode 100644 gnu/packages/patches/python-pytest-asyncio-python-3.8.patch delete mode 100644 gnu/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch delete mode 100644 gnu/packages/patches/qt4-ldflags.patch delete mode 100644 gnu/packages/patches/rust-coresimd-doctest.patch delete mode 100644 gnu/packages/patches/streamlink-update-test.patch delete mode 100644 gnu/packages/patches/tcc-boot-0.9.27.patch delete mode 100644 gnu/packages/patches/vtk-8-fix-freetypetools-build-failure.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index c213311f44..1252643dc0 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -884,7 +884,6 @@ dist_patch_DATA = \ %D%/packages/patches/awesome-4.3-fno-common.patch \ %D%/packages/patches/aws-c-auth-install-private-headers.patch \ %D%/packages/patches/azr3.patch \ - %D%/packages/patches/bash-reproducible-linux-pgrp-pipe.patch \ %D%/packages/patches/bash-completion-directories.patch \ %D%/packages/patches/bash-linux-pgrp-pipe.patch \ %D%/packages/patches/bastet-change-source-of-unordered_set.patch \ @@ -1145,7 +1144,6 @@ dist_patch_DATA = \ %D%/packages/patches/ghc-8.0-fall-back-to-madv_dontneed.patch \ %D%/packages/patches/ghc-testsuite-dlopen-pie.patch \ %D%/packages/patches/ghc-language-haskell-extract-ghc-8.10.patch \ - %D%/packages/patches/ghc-monad-par-fix-tests.patch \ %D%/packages/patches/ghostscript-no-header-id.patch \ %D%/packages/patches/ghostscript-no-header-uuid.patch \ %D%/packages/patches/ghostscript-no-header-creationdate.patch \ @@ -1156,8 +1154,6 @@ dist_patch_DATA = \ %D%/packages/patches/glib-networking-gnutls-binding.patch \ %D%/packages/patches/glib-networking-32-bit-time.patch \ %D%/packages/patches/glib-skip-failing-test.patch \ - %D%/packages/patches/glibc-CVE-2018-11236.patch \ - %D%/packages/patches/glibc-CVE-2018-11237.patch \ %D%/packages/patches/glibc-CVE-2019-7309.patch \ %D%/packages/patches/glibc-CVE-2019-9169.patch \ %D%/packages/patches/glibc-CVE-2019-19126.patch \ @@ -1176,7 +1172,6 @@ dist_patch_DATA = \ %D%/packages/patches/glibc-hurd-clock_t_centiseconds.patch \ %D%/packages/patches/glibc-hurd-gettyent.patch \ %D%/packages/patches/glibc-hurd-mach-print.patch \ - %D%/packages/patches/glibc-hurd-magic-pid.patch \ %D%/packages/patches/glibc-hurd-signal-sa-siginfo.patch \ %D%/packages/patches/glibc-ldd-powerpc.patch \ %D%/packages/patches/glibc-ldd-x86_64.patch \ @@ -1221,7 +1216,6 @@ dist_patch_DATA = \ %D%/packages/patches/grantlee-merge-theme-dirs.patch \ %D%/packages/patches/grep-timing-sensitive-test.patch \ %D%/packages/patches/grfcodec-gcc-compat.patch \ - %D%/packages/patches/grocsvs-dont-use-admiral.patch \ %D%/packages/patches/gromacs-tinyxml2.patch \ %D%/packages/patches/groovy-add-exceptionutilsgenerator.patch \ %D%/packages/patches/grub-efi-fat-serial-number.patch \ @@ -1280,7 +1274,6 @@ dist_patch_DATA = \ %D%/packages/patches/hueplusplus-mbedtls.patch \ %D%/packages/patches/hurd-cross.patch \ %D%/packages/patches/hurd-xattr.patch \ - %D%/packages/patches/hydra-disable-darcs-test.patch \ %D%/packages/patches/i7z-gcc-10.patch \ %D%/packages/patches/icecat-makeicecat.patch \ %D%/packages/patches/icecat-avoid-bundled-libraries.patch \ @@ -1298,7 +1291,6 @@ dist_patch_DATA = \ %D%/packages/patches/imagemagick-ReadDCMImage-fix.patch \ %D%/packages/patches/imagemagick-ReadDCMPixels-fix.patch \ %D%/packages/patches/imagemagick-WriteTHUMBNAILImage-fix.patch \ - %D%/packages/patches/inkscape-poppler-0.76.patch \ %D%/packages/patches/instead-use-games-path.patch \ %D%/packages/patches/intel-xed-fix-nondeterminism.patch \ %D%/packages/patches/intltool-perl-compatibility.patch \ @@ -1343,7 +1335,6 @@ dist_patch_DATA = \ %D%/packages/patches/libffi-float128-powerpc64le.patch \ %D%/packages/patches/librime-fix-build-with-gcc10.patch \ %D%/packages/patches/libvirt-add-install-prefix.patch \ - %D%/packages/patches/libvirt-create-machine-cgroup.patch \ %D%/packages/patches/libziparchive-add-includes.patch \ %D%/packages/patches/localed-xorg-keyboard.patch \ %D%/packages/patches/kdiagram-Fix-missing-link-libraries.patch \ @@ -1447,7 +1438,6 @@ dist_patch_DATA = \ %D%/packages/patches/linbox-fix-pkgconfig.patch \ %D%/packages/patches/linphone-desktop-without-sdk.patch \ %D%/packages/patches/linux-libre-support-for-Pinebook-Pro.patch \ - %D%/packages/patches/linux-libre-arm64-generic-pinebook-lcd.patch \ %D%/packages/patches/linux-pam-no-setfsuid.patch \ %D%/packages/patches/linuxdcpp-openssl-1.1.patch \ %D%/packages/patches/lirc-localstatedir.patch \ @@ -1477,13 +1467,11 @@ dist_patch_DATA = \ %D%/packages/patches/lvm2-static-link.patch \ %D%/packages/patches/mailutils-variable-lookup.patch \ %D%/packages/patches/make-impure-dirs.patch \ - %D%/packages/patches/marble-qt-add-qt-headers.patch \ %D%/packages/patches/mars-install.patch \ %D%/packages/patches/mars-sfml-2.3.patch \ %D%/packages/patches/mathjax-disable-webpack.patch \ %D%/packages/patches/mathjax-no-a11y.patch \ %D%/packages/patches/maxima-defsystem-mkdir.patch \ - %D%/packages/patches/maven-enforcer-api-fix-old-dependencies.patch \ %D%/packages/patches/maven-generate-component-xml.patch \ %D%/packages/patches/maven-generate-javax-inject-named.patch \ %D%/packages/patches/mcrypt-CVE-2012-4409.patch \ @@ -1495,7 +1483,6 @@ dist_patch_DATA = \ %D%/packages/patches/mercurial-hg-extension-path.patch \ %D%/packages/patches/mesa-opencl-all-targets.patch \ %D%/packages/patches/mesa-skip-tests.patch \ - %D%/packages/patches/mescc-tools-boot.patch \ %D%/packages/patches/meson-allow-dirs-outside-of-prefix.patch \ %D%/packages/patches/mhash-keygen-test-segfault.patch \ %D%/packages/patches/minetest-add-MINETEST_MOD_PATH.patch \ @@ -1541,9 +1528,6 @@ dist_patch_DATA = \ %D%/packages/patches/netsurf-system-utf8proc.patch \ %D%/packages/patches/netsurf-y2038-tests.patch \ %D%/packages/patches/netsurf-longer-test-timeout.patch \ - %D%/packages/patches/nettle-3.5-check-_pkcs1_sec_decrypt-msg-len.patch \ - %D%/packages/patches/nettle-3.5-CVE-2021-3580-pt1.patch \ - %D%/packages/patches/nettle-3.5-CVE-2021-3580-pt2.patch \ %D%/packages/patches/nhc98-c-update.patch \ %D%/packages/patches/nix-dont-build-html-doc.diff \ %D%/packages/patches/nfs4-acl-tools-0.3.7-fixpaths.patch \ @@ -1563,10 +1547,6 @@ dist_patch_DATA = \ %D%/packages/patches/nvi-db4.patch \ %D%/packages/patches/nyacc-binary-literals.patch \ %D%/packages/patches/obs-modules-location.patch \ - %D%/packages/patches/ocaml-bitstring-fix-configure.patch \ - %D%/packages/patches/ocaml-CVE-2015-8869.patch \ - %D%/packages/patches/ocaml-Add-a-.file-directive.patch \ - %D%/packages/patches/ocaml-enable-ocamldoc-reproducibility.patch \ %D%/packages/patches/ocaml-dose3-add-unix-dependency.patch \ %D%/packages/patches/ocaml-dose3-Fix-for-ocaml-4.06.patch \ %D%/packages/patches/ocaml-dose3-dont-make-printconf.patch \ @@ -1579,21 +1559,17 @@ dist_patch_DATA = \ %D%/packages/patches/onnx-use-system-googletest.patch \ %D%/packages/patches/onnx-shared-libraries.patch \ %D%/packages/patches/onnx-skip-model-downloads.patch \ - %D%/packages/patches/openbabel-fix-crash-on-nwchem-output.patch \ %D%/packages/patches/openboardview-use-system-utf8.patch \ %D%/packages/patches/opencascade-oce-glibc-2.26.patch \ %D%/packages/patches/openfoam-4.1-cleanup.patch \ %D%/packages/patches/openjdk-10-idlj-reproducibility.patch \ - %D%/packages/patches/openjdk-14-builtins.patch \ %D%/packages/patches/openmpi-mtl-priorities.patch \ %D%/packages/patches/openssh-hurd.patch \ %D%/packages/patches/openresolv-restartcmd-guix.patch \ %D%/packages/patches/openrgb-unbundle-hueplusplus.patch \ %D%/packages/patches/opensles-add-license-file.patch \ - %D%/packages/patches/openssl-runpath.patch \ %D%/packages/patches/openssl-1.1-c-rehash-in.patch \ %D%/packages/patches/openssl-3.0-c-rehash-in.patch \ - %D%/packages/patches/openssl-c-rehash-in.patch \ %D%/packages/patches/open-zwave-hidapi.patch \ %D%/packages/patches/orpheus-cast-errors-and-includes.patch \ %D%/packages/patches/osip-CVE-2017-7853.patch \ @@ -1604,7 +1580,6 @@ dist_patch_DATA = \ %D%/packages/patches/p7zip-remove-unused-code.patch \ %D%/packages/patches/pam-krb5-CVE-2020-10595.patch \ %D%/packages/patches/pango-skip-libthai-test.patch \ - %D%/packages/patches/passwordsafe-meson-remove-extra-argument.patch \ %D%/packages/patches/password-store-tree-compat.patch \ %D%/packages/patches/pciutils-hurd-configure.patch \ %D%/packages/patches/pciutils-hurd-fix.patch \ @@ -1630,7 +1605,6 @@ dist_patch_DATA = \ %D%/packages/patches/strace-readlink-tests.patch \ %D%/packages/patches/sunxi-tools-remove-sys-io.patch \ %D%/packages/patches/p11-kit-hurd.patch \ - %D%/packages/patches/patchutils-test-perms.patch \ %D%/packages/patches/patch-hurd-path-max.patch \ %D%/packages/patches/perl-5.14-autosplit-default-time.patch \ %D%/packages/patches/perl-5.14-module-pluggable-search.patch \ @@ -1700,14 +1674,9 @@ dist_patch_DATA = \ %D%/packages/patches/python-3-fix-tests.patch \ %D%/packages/patches/python-3-hurd-configure.patch \ %D%/packages/patches/python-3-no-static-lib.patch \ - %D%/packages/patches/python-CVE-2018-14647.patch \ - %D%/packages/patches/python-CVE-2020-26116.patch \ %D%/packages/patches/python-aionotify-0.2.0-py3.8.patch \ %D%/packages/patches/python-argcomplete-1.11.1-fish31.patch \ - %D%/packages/patches/python-axolotl-AES-fix.patch \ - %D%/packages/patches/python-babel-fix-parse-future-test.patch \ %D%/packages/patches/python-cross-compile.patch \ - %D%/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch \ %D%/packages/patches/python-configobj-setuptools.patch \ %D%/packages/patches/python-docopt-pytest6-compat.patch \ %D%/packages/patches/python-execnet-read-only-fix.patch \ @@ -1723,7 +1692,6 @@ dist_patch_DATA = \ %D%/packages/patches/python-flint-includes.patch \ %D%/packages/patches/python-libxml2-utf8.patch \ %D%/packages/patches/python-magic-python-bytecode.patch \ - %D%/packages/patches/python-matplotlib-run-under-wayland-gtk3.patch \ %D%/packages/patches/python-memcached-syntax-warnings.patch \ %D%/packages/patches/python-mox3-python3.6-compat.patch \ %D%/packages/patches/python-typing-inspect-fix.patch \ @@ -1736,7 +1704,6 @@ dist_patch_DATA = \ %D%/packages/patches/python-pyan3-fix-positional-arguments.patch \ %D%/packages/patches/python2-pygobject-2-deprecation.patch \ %D%/packages/patches/python-pygpgme-fix-pinentry-tests.patch \ - %D%/packages/patches/python-pytest-asyncio-python-3.8.patch \ %D%/packages/patches/python-pytorch-runpath.patch \ %D%/packages/patches/python-pytorch-system-libraries.patch \ %D%/packages/patches/python-pytorch-1.9.0-system-libraries.patch \ @@ -1755,7 +1722,6 @@ dist_patch_DATA = \ %D%/packages/patches/qemu-fix-agent-paths.patch \ %D%/packages/patches/qpdfview-qt515-compat.patch \ %D%/packages/patches/qrcodegen-cpp-make-install.patch \ - %D%/packages/patches/qt4-ldflags.patch \ %D%/packages/patches/qtbase-absolute-runpath.patch \ %D%/packages/patches/qtbase-moc-ignore-gcc-macro.patch \ %D%/packages/patches/qtbase-use-TZDIR.patch \ @@ -1801,7 +1767,6 @@ dist_patch_DATA = \ %D%/packages/patches/ruby-sanitize-system-libxml.patch \ %D%/packages/patches/rustc-1.39.0-src.patch \ %D%/packages/patches/rust-adblock-ignore-live-tests.patch \ - %D%/packages/patches/rust-coresimd-doctest.patch \ %D%/packages/patches/i3status-rust-enable-unstable-features.patch \ %D%/packages/patches/rust-ndarray-remove-blas-src-dep.patch \ %D%/packages/patches/rust-ndarray-0.13-remove-blas-src.patch \ @@ -1847,7 +1812,6 @@ dist_patch_DATA = \ %D%/packages/patches/spice-vdagent-glib-2.68.patch \ %D%/packages/patches/sssd-fix-samba.patch \ %D%/packages/patches/sssd-system-directories.patch \ - %D%/packages/patches/streamlink-update-test.patch \ %D%/packages/patches/steghide-fixes.patch \ %D%/packages/patches/suitesparse-mongoose-cmake.patch \ %D%/packages/patches/superlu-dist-awpm-grid.patch \ @@ -1868,7 +1832,6 @@ dist_patch_DATA = \ %D%/packages/patches/tar-remove-wholesparse-check.patch \ %D%/packages/patches/tar-skip-unreliable-tests.patch \ %D%/packages/patches/tbb-fix-test-on-aarch64.patch \ - %D%/packages/patches/tcc-boot-0.9.27.patch \ %D%/packages/patches/tclxml-3.2-install.patch \ %D%/packages/patches/tcsh-fix-autotest.patch \ %D%/packages/patches/teensy-loader-cli-help.patch \ @@ -1963,7 +1926,6 @@ dist_patch_DATA = \ %D%/packages/patches/vte-CVE-2012-2738-pt1.patch \ %D%/packages/patches/vte-CVE-2012-2738-pt2.patch \ %D%/packages/patches/vtk-fix-freetypetools-build-failure.patch \ - %D%/packages/patches/vtk-8-fix-freetypetools-build-failure.patch \ %D%/packages/patches/warsow-qfusion-fix-bool-return-type.patch \ %D%/packages/patches/webkitgtk-share-store.patch \ %D%/packages/patches/webkitgtk-bind-all-fonts.patch \ diff --git a/gnu/packages/patches/bash-reproducible-linux-pgrp-pipe.patch b/gnu/packages/patches/bash-reproducible-linux-pgrp-pipe.patch deleted file mode 100644 index 8a03c4d982..0000000000 --- a/gnu/packages/patches/bash-reproducible-linux-pgrp-pipe.patch +++ /dev/null @@ -1,34 +0,0 @@ -Unconditionally enable PGRP_PIPE on Linux (the kernel), regardless of -the kernel version in use on the build machine. - -diff -purN bash-5.0-orig/configure bash-5.0/configure ---- configure 1970-01-01 01:00:00.000000000 +0100 -+++ configure 2019-09-29 11:51:42.664518665 +0200 -@@ -16312,11 +16312,7 @@ solaris2.10*) LOCAL_CFLAGS=-DSOLARIS ;; - solaris2*) LOCAL_CFLAGS=-DSOLARIS ;; - lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;; - linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading -- case "`uname -r`" in -- 1.*|2.[0123]*) : ;; -- *) $as_echo "#define PGRP_PIPE 1" >>confdefs.h -- ;; -- esac ;; -+ $as_echo "#define PGRP_PIPE 1" >>confdefs.h ;; - netbsd*|openbsd*) LOCAL_CFLAGS="-DDEV_FD_STAT_BROKEN" ;; - *qnx[67]*) LOCAL_LIBS="-lncurses" ;; - *qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;; -diff -purN bash-5.0-orig/configure.ac bash-5.0/configure.ac ---- configure.ac 1970-01-01 01:00:00.000000000 +0100 -+++ configure.ac 2019-09-29 11:51:10.692026225 +0200 -@@ -1108,10 +1108,7 @@ solaris2.10*) LOCAL_CFLAGS=-DSOLARIS ;; - solaris2*) LOCAL_CFLAGS=-DSOLARIS ;; - lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;; - linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading -- case "`uname -r`" in -- 1.*|2.[[0123]]*) : ;; -- *) AC_DEFINE(PGRP_PIPE) ;; -- esac ;; -+ AC_DEFINE(PGRP_PIPE) ;; - netbsd*|openbsd*) LOCAL_CFLAGS="-DDEV_FD_STAT_BROKEN" ;; - *qnx[[67]]*) LOCAL_LIBS="-lncurses" ;; - *qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;; diff --git a/gnu/packages/patches/ghc-monad-par-fix-tests.patch b/gnu/packages/patches/ghc-monad-par-fix-tests.patch deleted file mode 100644 index d21a1e485c..0000000000 --- a/gnu/packages/patches/ghc-monad-par-fix-tests.patch +++ /dev/null @@ -1,45 +0,0 @@ -This patch is taken from upstream. It fixes a test to work with GHC 8.6. -The paths have been slightly altered to work with the release tarball. - -See . - -From e20f81c8060208e4fb038e8f0e0668b41d72a6fb Mon Sep 17 00:00:00 2001 -From: Clint Adams -Date: Sat, 31 Aug 2019 14:12:34 -0400 -Subject: [PATCH] Use a case statement instead of pattern-matching in - case_test_diamond - -This avoids the need for a MonadFail instance. Closes #66 ---- - monad-par/tests/ParTests_shared.hs | 15 +++++++++------ - 1 file changed, 9 insertions(+), 6 deletions(-) - -diff --git a/tests/ParTests_shared.hs b/tests/ParTests_shared.hs -index 31f438d..b2de50c 100644 ---- a/tests/ParTests_shared.hs -+++ b/tests/ParTests_shared.hs -@@ -109,12 +109,15 @@ case_test_diamond :: Assertion - case_test_diamond = 9 @=? (m :: Int) - where - m = runPar $ do -- [a,b,c,d] <- sequence [new,new,new,new] -- fork $ do x <- get a; put b (x+1) -- fork $ do x <- get a; put c (x+2) -- fork $ do x <- get b; y <- get c; put d (x+y) -- fork $ do put a 3 -- get d -+ abcd <- sequence [new,new,new,new] -+ case abcd of -+ [a,b,c,d] -> do -+ fork $ do x <- get a; put b (x+1) -+ fork $ do x <- get a; put c (x+2) -+ fork $ do x <- get b; y <- get c; put d (x+y) -+ fork $ do put a 3 -+ get d -+ _ -> error "Oops" - - -- | Violate IVar single-assignment: - -- --- -2.23.0 - diff --git a/gnu/packages/patches/glibc-CVE-2018-11236.patch b/gnu/packages/patches/glibc-CVE-2018-11236.patch deleted file mode 100644 index 4f8a72943c..0000000000 --- a/gnu/packages/patches/glibc-CVE-2018-11236.patch +++ /dev/null @@ -1,149 +0,0 @@ -https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=patch;h=5460617d1567657621107d895ee2dd83bc1f88f2 -with ChangeLog removed - -From 5460617d1567657621107d895ee2dd83bc1f88f2 Mon Sep 17 00:00:00 2001 -From: Paul Pluzhnikov -Date: Tue, 8 May 2018 18:12:41 -0700 -Subject: [PATCH] Fix BZ 22786: integer addition overflow may cause stack - buffer overflow when realpath() input length is close to SSIZE_MAX. - -2018-05-09 Paul Pluzhnikov - - [BZ #22786] - * stdlib/canonicalize.c (__realpath): Fix overflow in path length - computation. - * stdlib/Makefile (test-bz22786): New test. - * stdlib/test-bz22786.c: New test. ---- - ChangeLog | 8 +++++ - stdlib/Makefile | 2 +- - stdlib/canonicalize.c | 2 +- - stdlib/test-bz22786.c | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++ - 4 files changed, 100 insertions(+), 2 deletions(-) - create mode 100644 stdlib/test-bz22786.c - -diff --git a/stdlib/Makefile b/stdlib/Makefile -index af1643c..1ddb1f9 100644 ---- a/stdlib/Makefile -+++ b/stdlib/Makefile -@@ -84,7 +84,7 @@ tests := tst-strtol tst-strtod testmb testrand testsort testdiv \ - tst-cxa_atexit tst-on_exit test-atexit-race \ - test-at_quick_exit-race test-cxa_atexit-race \ - test-on_exit-race test-dlclose-exit-race \ -- tst-makecontext-align -+ tst-makecontext-align test-bz22786 - - tests-internal := tst-strtod1i tst-strtod3 tst-strtod4 tst-strtod5i \ - tst-tls-atexit tst-tls-atexit-nodelete -diff --git a/stdlib/canonicalize.c b/stdlib/canonicalize.c -index 4135f3f..390fb43 100644 ---- a/stdlib/canonicalize.c -+++ b/stdlib/canonicalize.c -@@ -181,7 +181,7 @@ __realpath (const char *name, char *resolved) - extra_buf = __alloca (path_max); - - len = strlen (end); -- if ((long int) (n + len) >= path_max) -+ if (path_max - n <= len) - { - __set_errno (ENAMETOOLONG); - goto error; -diff --git a/stdlib/test-bz22786.c b/stdlib/test-bz22786.c -new file mode 100644 -index 0000000..e7837f9 ---- /dev/null -+++ b/stdlib/test-bz22786.c -@@ -0,0 +1,90 @@ -+/* Bug 22786: test for buffer overflow in realpath. -+ Copyright (C) 2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library 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 -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, see -+ . */ -+ -+/* This file must be run from within a directory called "stdlib". */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+static int -+do_test (void) -+{ -+ const char dir[] = "bz22786"; -+ const char lnk[] = "bz22786/symlink"; -+ -+ rmdir (dir); -+ if (mkdir (dir, 0755) != 0 && errno != EEXIST) -+ { -+ printf ("mkdir %s: %m\n", dir); -+ return EXIT_FAILURE; -+ } -+ if (symlink (".", lnk) != 0 && errno != EEXIST) -+ { -+ printf ("symlink (%s, %s): %m\n", dir, lnk); -+ return EXIT_FAILURE; -+ } -+ -+ const size_t path_len = (size_t) INT_MAX + 1; -+ -+ DIAG_PUSH_NEEDS_COMMENT; -+#if __GNUC_PREREQ (7, 0) -+ /* GCC 7 warns about too-large allocations; here we need such -+ allocation to succeed for the test to work. */ -+ DIAG_IGNORE_NEEDS_COMMENT (7, "-Walloc-size-larger-than="); -+#endif -+ char *path = malloc (path_len); -+ DIAG_POP_NEEDS_COMMENT; -+ -+ if (path == NULL) -+ { -+ printf ("malloc (%zu): %m\n", path_len); -+ return EXIT_UNSUPPORTED; -+ } -+ -+ /* Construct very long path = "bz22786/symlink/aaaa....." */ -+ char *p = mempcpy (path, lnk, sizeof (lnk) - 1); -+ *(p++) = '/'; -+ memset (p, 'a', path_len - (path - p) - 2); -+ p[path_len - (path - p) - 1] = '\0'; -+ -+ /* This call crashes before the fix for bz22786 on 32-bit platforms. */ -+ p = realpath (path, NULL); -+ -+ if (p != NULL || errno != ENAMETOOLONG) -+ { -+ printf ("realpath: %s (%m)", p); -+ return EXIT_FAILURE; -+ } -+ -+ /* Cleanup. */ -+ unlink (lnk); -+ rmdir (dir); -+ -+ return 0; -+} -+ -+#define TEST_FUNCTION do_test -+#include --- -2.9.3 - diff --git a/gnu/packages/patches/glibc-CVE-2018-11237.patch b/gnu/packages/patches/glibc-CVE-2018-11237.patch deleted file mode 100644 index 8a7c604ecd..0000000000 --- a/gnu/packages/patches/glibc-CVE-2018-11237.patch +++ /dev/null @@ -1,55 +0,0 @@ -https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=patch;h=9aaaab7c6e4176e61c59b0a63c6ba906d875dc0e -with the ChangeLog removed - -From 9aaaab7c6e4176e61c59b0a63c6ba906d875dc0e Mon Sep 17 00:00:00 2001 -From: Andreas Schwab -Date: Tue, 22 May 2018 10:37:59 +0200 -Subject: [PATCH] Don't write beyond destination in - __mempcpy_avx512_no_vzeroupper (bug 23196) - -When compiled as mempcpy, the return value is the end of the destination -buffer, thus it cannot be used to refer to the start of it. ---- - ChangeLog | 9 +++++++++ - string/test-mempcpy.c | 1 + - sysdeps/x86_64/multiarch/memmove-avx512-no-vzeroupper.S | 5 +++-- - 3 files changed, 13 insertions(+), 2 deletions(-) - -diff --git a/string/test-mempcpy.c b/string/test-mempcpy.c -index c08fba8..d98ecdd 100644 ---- a/string/test-mempcpy.c -+++ b/string/test-mempcpy.c -@@ -18,6 +18,7 @@ - . */ - - #define MEMCPY_RESULT(dst, len) (dst) + (len) -+#define MIN_PAGE_SIZE 131072 - #define TEST_MAIN - #define TEST_NAME "mempcpy" - #include "test-string.h" -diff --git a/sysdeps/x86_64/multiarch/memmove-avx512-no-vzeroupper.S b/sysdeps/x86_64/multiarch/memmove-avx512-no-vzeroupper.S -index 23c0f7a..effc3ac 100644 ---- a/sysdeps/x86_64/multiarch/memmove-avx512-no-vzeroupper.S -+++ b/sysdeps/x86_64/multiarch/memmove-avx512-no-vzeroupper.S -@@ -336,6 +336,7 @@ L(preloop_large): - vmovups (%rsi), %zmm4 - vmovups 0x40(%rsi), %zmm5 - -+ mov %rdi, %r11 - /* Align destination for access with non-temporal stores in the loop. */ - mov %rdi, %r8 - and $-0x80, %rdi -@@ -366,8 +367,8 @@ L(gobble_256bytes_nt_loop): - cmp $256, %rdx - ja L(gobble_256bytes_nt_loop) - sfence -- vmovups %zmm4, (%rax) -- vmovups %zmm5, 0x40(%rax) -+ vmovups %zmm4, (%r11) -+ vmovups %zmm5, 0x40(%r11) - jmp L(check) - - L(preloop_large_bkw): --- -2.9.3 - diff --git a/gnu/packages/patches/glibc-hurd-magic-pid.patch b/gnu/packages/patches/glibc-hurd-magic-pid.patch deleted file mode 100644 index a6849f7d35..0000000000 --- a/gnu/packages/patches/glibc-hurd-magic-pid.patch +++ /dev/null @@ -1,190 +0,0 @@ -This patch implements "magic" lookup for "pid/…", as used when looking up -/proc/self. - -The patch comes from the 't/magic-pid' branch -at . It squashes -commit 392e52286a302ca6157fbd221295e64ab6b6d8ba (by Justus Winter) -and commit 392e52286a302ca6157fbd221295e64ab6b6d8ba (a subsequent fix by -Samuel Thibault). - -From: Justus Winter <4winter@informatik.uni-hamburg.de> -Subject: [PATCH] hurd: Handle `pid' magical lookup retry - - * hurd/lookup-retry.c: Handle `pid' magical lookup - retry. - -diff --git a/hurd/lookup-retry.c b/hurd/lookup-retry.c -index aee2ba8f93..6ed8de1653 100644 ---- a/hurd/lookup-retry.c -+++ b/hurd/lookup-retry.c -@@ -25,6 +25,7 @@ - #include - #include <_itoa.h> - #include -+#include - - /* Translate the error from dir_lookup into the error the user sees. */ - static inline error_t -@@ -59,6 +60,7 @@ __hurd_file_name_lookup_retry (error_t (*use_init_port) - error_t err; - char *file_name; - int nloops; -+ file_t lastdir = MACH_PORT_NULL; - - error_t lookup_op (file_t startdir) - { -@@ -107,14 +109,15 @@ __hurd_file_name_lookup_retry (error_t (*use_init_port) - { - case FS_RETRY_REAUTH: - if (err = reauthenticate (*result)) -- return err; -+ goto out; - /* Fall through. */ - - case FS_RETRY_NORMAL: - if (nloops++ >= __eloop_threshold ()) - { - __mach_port_deallocate (__mach_task_self (), *result); -- return ELOOP; -+ err = ELOOP; -+ goto out; - } - - /* An empty RETRYNAME indicates we have the final port. */ -@@ -174,7 +177,7 @@ __hurd_file_name_lookup_retry (error_t (*use_init_port) - - if (err) - __mach_port_deallocate (__mach_task_self (), *result); -- return err; -+ goto out; - } - - startdir = *result; -@@ -189,7 +192,10 @@ __hurd_file_name_lookup_retry (error_t (*use_init_port) - if (*result != MACH_PORT_NULL) - __mach_port_deallocate (__mach_task_self (), *result); - if (nloops++ >= __eloop_threshold ()) -- return ELOOP; -+ { -+ err = ELOOP; -+ goto out; -+ } - file_name = &retryname[1]; - break; - -@@ -208,7 +214,8 @@ __hurd_file_name_lookup_retry (error_t (*use_init_port) - (*end != '/' && *end != '\0')) - { - errno = save; -- return ENOENT; -+ err = ENOENT; -+ goto out; - } - if (! get_dtable_port) - err = EGRATUITOUS; -@@ -226,9 +233,12 @@ __hurd_file_name_lookup_retry (error_t (*use_init_port) - } - errno = save; - if (err) -- return err; -+ goto out; - if (*end == '\0') -- return 0; -+ { -+ err = 0; -+ goto out; -+ } - else - { - /* Do a normal retry on the remaining components. */ -@@ -255,9 +265,12 @@ __hurd_file_name_lookup_retry (error_t (*use_init_port) - if (err = __host_info (__mach_host_self (), HOST_BASIC_INFO, - (integer_t *) &hostinfo, - &hostinfocnt)) -- return err; -+ goto out; - if (hostinfocnt != HOST_BASIC_INFO_COUNT) -- return EGRATUITOUS; -+ { -+ err = EGRATUITOUS; -+ goto out; -+ } - p = _itoa (hostinfo.cpu_subtype, &retryname[8], 10, 0); - *--p = '/'; - p = _itoa (hostinfo.cpu_type, &retryname[8], 10, 0); -@@ -293,10 +306,11 @@ __hurd_file_name_lookup_retry (error_t (*use_init_port) - } - - case '\0': -- return opentty (result); -+ err = opentty (result); -+ goto out; - case '/': - if (err = opentty (&startdir)) -- return err; -+ goto out; - strcpy (retryname, &retryname[4]); - break; - default: -@@ -306,14 +320,48 @@ __hurd_file_name_lookup_retry (error_t (*use_init_port) - goto bad_magic; - break; - -+ case 'p': -+ if (retryname[1] == 'i' && retryname[2] == 'd' && -+ (retryname[3] == '/' || retryname[3] == 0)) -+ { -+ char *p, buf[1024]; /* XXX */ -+ size_t len; -+ p = _itoa (__getpid (), &buf[sizeof buf], 10, 0); -+ len = &buf[sizeof buf] - p; -+ memcpy (buf, p, len); -+ strcpy (buf + len, &retryname[3]); -+ strcpy (retryname, buf); -+ -+ /* Do a normal retry on the remaining components. */ -+ __mach_port_mod_refs (__mach_task_self (), lastdir, -+ MACH_PORT_RIGHT_SEND, 1); -+ startdir = lastdir; -+ file_name = retryname; -+ } -+ else -+ goto bad_magic; -+ break; -+ - default: - bad_magic: -- return EGRATUITOUS; -+ err = EGRATUITOUS; -+ goto out; - } - break; - - default: -- return EGRATUITOUS; -+ err = EGRATUITOUS; -+ goto out; -+ } -+ -+ if (MACH_PORT_VALID (*result) && *result != lastdir) -+ { -+ if (MACH_PORT_VALID (lastdir)) -+ __mach_port_deallocate (__mach_task_self (), lastdir); -+ -+ lastdir = *result; -+ __mach_port_mod_refs (__mach_task_self (), lastdir, -+ MACH_PORT_RIGHT_SEND, 1); - } - - if (startdir != MACH_PORT_NULL) -@@ -326,6 +374,10 @@ __hurd_file_name_lookup_retry (error_t (*use_init_port) - err = (*use_init_port) (dirport, &lookup_op); - } while (! err); - -+out: -+ if (MACH_PORT_VALID (lastdir)) -+ __mach_port_deallocate (__mach_task_self (), lastdir); -+ - return err; - } - weak_alias (__hurd_file_name_lookup_retry, hurd_file_name_lookup_retry) diff --git a/gnu/packages/patches/grocsvs-dont-use-admiral.patch b/gnu/packages/patches/grocsvs-dont-use-admiral.patch deleted file mode 100644 index cb976e19b0..0000000000 --- a/gnu/packages/patches/grocsvs-dont-use-admiral.patch +++ /dev/null @@ -1,69 +0,0 @@ -python-admiral doesn't have a license -https://github.com/nspies/admiral/issues/3 - -diff --git a/setup.py b/setup.py -index 692b6a0..568f381 100755 ---- a/setup.py -+++ b/setup.py -@@ -20,7 +20,7 @@ setup( - 'console_scripts' : ["grocsvs = grocsvs.main:main"] - }, - -- install_requires = ["admiral", "h5py", "networkx>=2.0", "pandas", "pybedtools", -+ install_requires = ["h5py", "networkx>=2.0", "pandas", "pybedtools", - "pyfaidx", "pysam>=0.10.0", "scipy", "ipython-cluster-helper", - "pygraphviz", "psutil"], - -diff --git a/src/grocsvs/jobmanagers.py b/src/grocsvs/jobmanagers.py -index 6da0b58..112d7ff 100755 ---- a/src/grocsvs/jobmanagers.py -+++ b/src/grocsvs/jobmanagers.py -@@ -41,34 +41,3 @@ class MultiprocessingCluster(Cluster): - pool = multiprocessing.Pool(processes=self.processes) - return pool.map_async(fn, args).get(999999) - -- --class AdmiralCluster(Cluster): -- def map(self, fn, args): -- from admiral import jobmanagers, remote -- -- cluster_options = self.cluster_settings.cluster_options.copy() -- -- scheduler = cluster_options.pop("scheduler") -- -- jobmanager_class = jobmanagers.get_jobmanager(scheduler) -- jobmanager = jobmanager_class( -- batch_dir=self.batch_dir, log_dir=self.batch_dir) -- -- -- if not "mem" in cluster_options: -- cluster_options["mem"] = "16g" -- if not "time" in cluster_options: -- cluster_options["time"] = "12h" -- -- jobs = [] -- #for i, arg in enumerate(args): -- -- job_name = args[0].__class__.__name__ -- args = [[arg] for arg in args] -- job = remote.run_remote(fn, jobmanager, job_name, args=args, -- array=True, overwrite=True, **cluster_options) -- -- result = jobmanagers.wait_for_jobs([job], wait=5, progress=True) -- -- if not result: -- raise Exception("Some chunks failed to complete") -diff --git a/src/grocsvs/pipeline.py b/src/grocsvs/pipeline.py -index ab1bb2d..350976f 100755 ---- a/src/grocsvs/pipeline.py -+++ b/src/grocsvs/pipeline.py -@@ -8,8 +8,7 @@ from grocsvs import utilities - def make_jobmanager(jobmanager_settings, processes, batch_dir): - jobmanager_classes = {"IPCluster":jobmanagers.IPCluster, - "local": jobmanagers.LocalCluster, -- "multiprocessing": jobmanagers.MultiprocessingCluster, -- "admiral": jobmanagers.AdmiralCluster} -+ "multiprocessing": jobmanagers.MultiprocessingCluster} - - cls = jobmanager_classes[jobmanager_settings.cluster_type] - return cls(processes, jobmanager_settings, batch_dir) diff --git a/gnu/packages/patches/hydra-disable-darcs-test.patch b/gnu/packages/patches/hydra-disable-darcs-test.patch deleted file mode 100644 index 5d8e015b08..0000000000 --- a/gnu/packages/patches/hydra-disable-darcs-test.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- hydra-20150407.4c0e3e4/tests/evaluation-tests.pl 2015-04-15 12:00:19.000000000 -0500 -+++ hydra-20150407.4c0e3e4/tests/evaluation-tests.pl 2015-04-17 08:53:04.940301471 -0500 -@@ -7,7 +7,7 @@ - - my $db = Hydra::Model::DB->new; - --use Test::Simple tests => 72; -+use Test::Simple tests => 68; - - hydra_setup($db); - -@@ -103,13 +103,6 @@ - uri => "$jobsBaseUri/hg-repo", - update => getcwd . "/jobs/hg-update.sh" - }, -- { -- name => "darcs", -- nixexpr => "darcs-input.nix", -- type => "darcs", -- uri => "$jobsBaseUri/darcs-repo", -- update => getcwd . "/jobs/darcs-update.sh" -- } - ); - - foreach my $scm ( @scminputs ) { diff --git a/gnu/packages/patches/inkscape-poppler-0.76.patch b/gnu/packages/patches/inkscape-poppler-0.76.patch deleted file mode 100644 index 08e8303892..0000000000 --- a/gnu/packages/patches/inkscape-poppler-0.76.patch +++ /dev/null @@ -1,36 +0,0 @@ -This patch adds support for Poppler 0.76 and later. - -Taken from upstream: - - -diff --git a/src/extension/internal/pdfinput/pdf-parser.cpp b/src/extension/internal/pdfinput/pdf-parser.cpp -index 8484984bdf..4f798e35bf 100644 ---- a/src/extension/internal/pdfinput/pdf-parser.cpp -+++ b/src/extension/internal/pdfinput/pdf-parser.cpp -@@ -421,7 +421,7 @@ void PdfParser::parse(Object *obj, GBool topLevel) { - error(errInternal, -1, "Weird page contents"); - return; - } -- parser = new Parser(xref, new Lexer(xref, obj), gFalse); -+ parser = new _POPPLER_NEW_PARSER(xref, obj); - go(topLevel); - delete parser; - parser = nullptr; -diff --git a/src/extension/internal/pdfinput/poppler-transition-api.h b/src/extension/internal/pdfinput/poppler-transition-api.h -index 61a15083a0..5e8bc4ae90 100644 ---- a/src/extension/internal/pdfinput/poppler-transition-api.h -+++ b/src/extension/internal/pdfinput/poppler-transition-api.h -@@ -14,6 +14,13 @@ - - #include - -+#if POPPLER_CHECK_VERSION(0, 76, 0) -+#define _POPPLER_NEW_PARSER(xref, obj) Parser(xref, obj, gFalse) -+#else -+#define _POPPLER_NEW_PARSER(xref, obj) Parser(xref, new Lexer(xref, obj), gFalse) -+#endif -+ -+ - #if POPPLER_CHECK_VERSION(0, 72, 0) - #define getCString c_str - #endif diff --git a/gnu/packages/patches/libvirt-create-machine-cgroup.patch b/gnu/packages/patches/libvirt-create-machine-cgroup.patch deleted file mode 100644 index 585ac237e1..0000000000 --- a/gnu/packages/patches/libvirt-create-machine-cgroup.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 9ca0b2955edea162b255b428e493cd8ffac52167 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Miguel=20=C3=81ngel=20Arruga=20Vivas?= - -Date: Fri, 1 Nov 2019 17:29:00 +0100 -Subject: [PATCH] vircgroup: Ensure /machine group is associated with its - parent. - -Call first virCgroupNew on the parent group virCgroupNewPartition if -it is available on before the creation of the child group. This -ensures that the creation of a first level group on the unified -architecture, as the check at virCgroupV2ParseControllersFile as the -parent file is there. - -Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1760233 ---- - src/util/vircgroup.c | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c -index b46f20abfd..33c61f2d45 100644 ---- a/src/util/vircgroup.c -+++ b/src/util/vircgroup.c -@@ -855,9 +855,6 @@ virCgroupNewPartition(const char *path, - if (virCgroupSetPartitionSuffix(path, &newPath) < 0) - goto cleanup; - -- if (virCgroupNew(-1, newPath, NULL, controllers, group) < 0) -- goto cleanup; -- - if (STRNEQ(newPath, "/")) { - char *tmp; - parentPath = g_strdup(newPath); -@@ -868,7 +865,12 @@ virCgroupNewPartition(const char *path, - - if (virCgroupNew(-1, parentPath, NULL, controllers, &parent) < 0) - goto cleanup; -+ } - -+ if (virCgroupNew(-1, newPath, parent, controllers, group) < 0) -+ goto cleanup; -+ -+ if (parent) { - if (virCgroupMakeGroup(parent, *group, create, VIR_CGROUP_NONE) < 0) - goto cleanup; - } --- -2.23.0 - diff --git a/gnu/packages/patches/linux-libre-arm64-generic-pinebook-lcd.patch b/gnu/packages/patches/linux-libre-arm64-generic-pinebook-lcd.patch deleted file mode 100644 index 51ab544d5e..0000000000 --- a/gnu/packages/patches/linux-libre-arm64-generic-pinebook-lcd.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 3a75704e99a118f2d8a4d70f07781558bde85770 Mon Sep 17 00:00:00 2001 -From: Jian-Hong Pan -Date: Thu, 24 Sep 2020 14:30:43 +0800 -Subject: [PATCH] arm64: dts: rockchip: disable USB type-c DisplayPort - -The cdn-dp sub driver probes the device failed on PINEBOOK Pro. - -kernel: cdn-dp fec00000.dp: [drm:cdn_dp_probe [rockchipdrm]] *ERROR* missing extcon or phy -kernel: cdn-dp: probe of fec00000.dp failed with error -22 - -Then, the device halts all of the DRM related device jobs. For example, -the operations: vop_component_ops, vop_component_ops and -rockchip_dp_component_ops cannot be bound to corresponding devices. So, -Xorg cannot find the correct DRM device. - -The USB type-C DisplayPort does not work for now. So, disable the -DisplayPort node until the type-C phy work has been done. - -Link: https://patchwork.kernel.org/patch/11794141/#23639877 -Signed-off-by: Jian-Hong Pan ---- - arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts b/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts -index 219b7507a10f..45769764425d 100644 ---- a/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts -+++ b/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts -@@ -380,7 +380,7 @@ - }; - - &cdn_dp { -- status = "okay"; -+ status = "disabled"; - }; - - &cpu_b0 { --- -2.30.2 - diff --git a/gnu/packages/patches/marble-qt-add-qt-headers.patch b/gnu/packages/patches/marble-qt-add-qt-headers.patch deleted file mode 100644 index 77c58317ad..0000000000 --- a/gnu/packages/patches/marble-qt-add-qt-headers.patch +++ /dev/null @@ -1,189 +0,0 @@ -Adapted from Debian: https://salsa.debian.org/qt-kde-team/kde/marble/-/blob/debian/4%2517.08.3-3.1/debian/patches/qt5.11.patch -Upstream status: Probably irrelevant, as this is an old version of this software. - -diff --git a/src/lib/marble/MergedLayerDecorator.cpp b/src/lib/marble/MergedLayerDecorator.cpp -index 40f3ddb..bafff50 100644 ---- a/src/lib/marble/MergedLayerDecorator.cpp -+++ b/src/lib/marble/MergedLayerDecorator.cpp -@@ -36,6 +36,7 @@ - - #include - #include -+#include - - using namespace Marble; - -diff --git a/src/lib/marble/VisiblePlacemark.cpp b/src/lib/marble/VisiblePlacemark.cpp -index cfe08af..1a84006 100644 ---- a/src/lib/marble/VisiblePlacemark.cpp -+++ b/src/lib/marble/VisiblePlacemark.cpp -@@ -22,6 +22,7 @@ - - #include - #include -+#include - #include - #include - -diff --git a/src/lib/marble/graphicsview/FrameGraphicsItem.cpp b/src/lib/marble/graphicsview/FrameGraphicsItem.cpp -index 8a90526..065f245 100644 ---- a/src/lib/marble/graphicsview/FrameGraphicsItem.cpp -+++ b/src/lib/marble/graphicsview/FrameGraphicsItem.cpp -@@ -18,6 +18,7 @@ - // Qt - #include - #include -+#include - #include - #include - #include -diff --git a/src/lib/marble/layers/GroundLayer.cpp b/src/lib/marble/layers/GroundLayer.cpp -index 58d409f..df6d226 100644 ---- a/src/lib/marble/layers/GroundLayer.cpp -+++ b/src/lib/marble/layers/GroundLayer.cpp -@@ -14,6 +14,9 @@ - #include "ViewportParams.h" - #include "RenderState.h" - -+#include -+#include -+ - namespace Marble - { - -diff --git a/src/plugins/render/compass/CompassFloatItem.cpp b/src/plugins/render/compass/CompassFloatItem.cpp -index d8dc021..66095cc 100644 ---- a/src/plugins/render/compass/CompassFloatItem.cpp -+++ b/src/plugins/render/compass/CompassFloatItem.cpp -@@ -19,6 +19,7 @@ - #include - #include - #include -+#include - #include - #include - -diff --git a/src/plugins/render/elevationprofilefloatitem/ElevationProfileFloatItem.cpp b/src/plugins/render/elevationprofilefloatitem/ElevationProfileFloatItem.cpp -index a790c16..96f5bed 100644 ---- a/src/plugins/render/elevationprofilefloatitem/ElevationProfileFloatItem.cpp -+++ b/src/plugins/render/elevationprofilefloatitem/ElevationProfileFloatItem.cpp -@@ -31,6 +31,7 @@ - #include - #include - #include -+#include - #include - #include - #include -diff --git a/src/plugins/render/foursquare/FoursquareItem.cpp b/src/plugins/render/foursquare/FoursquareItem.cpp -index d9e1f57..ef80472 100644 ---- a/src/plugins/render/foursquare/FoursquareItem.cpp -+++ b/src/plugins/render/foursquare/FoursquareItem.cpp -@@ -13,6 +13,8 @@ - #include "ViewportParams.h" - - #include -+#include -+#include - - namespace Marble - { -diff --git a/src/plugins/render/gpsinfo/GpsInfo.cpp b/src/plugins/render/gpsinfo/GpsInfo.cpp -index 522e907..20fd75a 100644 ---- a/src/plugins/render/gpsinfo/GpsInfo.cpp -+++ b/src/plugins/render/gpsinfo/GpsInfo.cpp -@@ -21,6 +21,8 @@ - #include "ViewportParams.h" - #include "GeoDataAccuracy.h" - -+#include -+ - namespace Marble - { - -diff --git a/src/plugins/render/license/License.cpp b/src/plugins/render/license/License.cpp -index 511dfc0..9436083 100644 ---- a/src/plugins/render/license/License.cpp -+++ b/src/plugins/render/license/License.cpp -@@ -23,6 +23,7 @@ - #include - #include - #include -+#include - #include - #include - #include -diff --git a/src/plugins/render/notes/NotesItem.cpp b/src/plugins/render/notes/NotesItem.cpp -index 9d0961f..0c9fe99 100644 ---- a/src/plugins/render/notes/NotesItem.cpp -+++ b/src/plugins/render/notes/NotesItem.cpp -@@ -9,6 +9,7 @@ - #include "MarbleDirs.h" - - #include -+#include - #include - - using namespace Marble; -diff --git a/src/plugins/render/postalcode/PostalCodeItem.cpp b/src/plugins/render/postalcode/PostalCodeItem.cpp -index 772c0b2..0ff7957 100644 ---- a/src/plugins/render/postalcode/PostalCodeItem.cpp -+++ b/src/plugins/render/postalcode/PostalCodeItem.cpp -@@ -17,6 +17,7 @@ - // Qt - #include - #include -+#include - - using namespace Marble; - -diff --git a/src/plugins/render/progress/ProgressFloatItem.cpp b/src/plugins/render/progress/ProgressFloatItem.cpp -index a465857..6e2452c 100644 ---- a/src/plugins/render/progress/ProgressFloatItem.cpp -+++ b/src/plugins/render/progress/ProgressFloatItem.cpp -@@ -22,6 +22,7 @@ - #include - #include - #include -+#include - - namespace Marble - { -diff --git a/src/plugins/render/satellites/SatellitesPlugin.cpp b/src/plugins/render/satellites/SatellitesPlugin.cpp -index 04d8321..0a43d24 100644 ---- a/src/plugins/render/satellites/SatellitesPlugin.cpp -+++ b/src/plugins/render/satellites/SatellitesPlugin.cpp -@@ -25,6 +25,7 @@ - - #include "ui_SatellitesConfigDialog.h" - -+#include - #include - #include - -diff --git a/src/plugins/render/speedometer/Speedometer.cpp b/src/plugins/render/speedometer/Speedometer.cpp -index 6e9c532..f40a174 100644 ---- a/src/plugins/render/speedometer/Speedometer.cpp -+++ b/src/plugins/render/speedometer/Speedometer.cpp -@@ -19,6 +19,8 @@ - #include "MarbleGraphicsGridLayout.h" - #include "ViewportParams.h" - -+#include -+ - namespace Marble - { - -diff --git a/src/plugins/render/stars/StarsPlugin.cpp b/src/plugins/render/stars/StarsPlugin.cpp -index 6599545..482680f 100644 ---- a/src/plugins/render/stars/StarsPlugin.cpp -+++ b/src/plugins/render/stars/StarsPlugin.cpp -@@ -19,6 +19,8 @@ - #include - #include - #include -+#include -+#include - #include - - #include "MarbleClock.h" diff --git a/gnu/packages/patches/maven-enforcer-api-fix-old-dependencies.patch b/gnu/packages/patches/maven-enforcer-api-fix-old-dependencies.patch deleted file mode 100644 index 98a0c8a395..0000000000 --- a/gnu/packages/patches/maven-enforcer-api-fix-old-dependencies.patch +++ /dev/null @@ -1,177 +0,0 @@ -From eccc46eaf7903a8e837813795498b12c078faaea Mon Sep 17 00:00:00 2001 -From: Julien Lepiller -Date: Wed, 11 Mar 2020 21:53:32 +0100 -Subject: [PATCH] Fix old dependencies - ---- - .../enforcer/AbstractBanDependencies.java | 2 +- - .../enforcer/BanTransitiveDependencies.java | 2 +- - .../enforcer/DependencyConvergence.java | 17 ++++++++--------- - .../enforcer/RequireUpperBoundDeps.java | 19 +++++++++---------- - .../enforcer/utils/DependencyVersionMap.java | 6 +++--- - 5 files changed, 22 insertions(+), 24 deletions(-) - -diff --git a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractBanDependencies.java b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractBanDependencies.java -index 2888a61..2b944b7 100644 ---- a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractBanDependencies.java -+++ b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AbstractBanDependencies.java -@@ -119,7 +119,7 @@ public abstract class AbstractBanDependencies - Set dependencies = null; - try - { -- DependencyNode node = graphBuilder.buildDependencyGraph( project, null ); -+ DependencyNode node = graphBuilder.buildDependencyGraph( project.getProjectBuildingRequest(), null ); - if ( searchTransitive ) - { - dependencies = ArtifactUtils.getAllDescendants( node ); -diff --git a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/BanTransitiveDependencies.java b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/BanTransitiveDependencies.java -index 6e1dcd4..1b964ba 100644 ---- a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/BanTransitiveDependencies.java -+++ b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/BanTransitiveDependencies.java -@@ -158,7 +158,7 @@ public class BanTransitiveDependencies - try - { - MavenProject project = (MavenProject) helper.evaluate( "${project}" ); -- rootNode = createDependencyGraphBuilder().buildDependencyGraph( project, null ); -+ rootNode = createDependencyGraphBuilder().buildDependencyGraph( project.getProjectBuildingRequest(), null ); - } - catch ( Exception e ) - { -diff --git a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/DependencyConvergence.java b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/DependencyConvergence.java -index 684f984..ca7ad3a 100644 ---- a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/DependencyConvergence.java -+++ b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/DependencyConvergence.java -@@ -35,9 +35,9 @@ import org.apache.maven.enforcer.rule.api.EnforcerRuleHelper; - import org.apache.maven.plugin.logging.Log; - import org.apache.maven.plugins.enforcer.utils.DependencyVersionMap; - import org.apache.maven.project.MavenProject; --import org.apache.maven.shared.dependency.tree.DependencyNode; --import org.apache.maven.shared.dependency.tree.DependencyTreeBuilder; --import org.apache.maven.shared.dependency.tree.DependencyTreeBuilderException; -+import org.apache.maven.shared.dependency.graph.DependencyNode; -+import org.apache.maven.shared.dependency.graph.DependencyGraphBuilder; -+import org.apache.maven.shared.dependency.graph.DependencyGraphBuilderException; - import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluationException; - import org.codehaus.plexus.component.repository.exception.ComponentLookupException; - -@@ -60,7 +60,7 @@ public class DependencyConvergence - // CHECKSTYLE_OFF: LineLength - /** - * Uses the {@link EnforcerRuleHelper} to populate the values of the -- * {@link DependencyTreeBuilder#buildDependencyTree(MavenProject, ArtifactRepository, ArtifactFactory, ArtifactMetadataSource, ArtifactFilter, ArtifactCollector)} -+ * {@link DependencyGraphBuilder#buildDependencyTree(MavenProject, ArtifactRepository, ArtifactFactory, ArtifactMetadataSource, ArtifactFilter, ArtifactCollector)} - * factory method.
- * This method simply exists to hide all the ugly lookup that the {@link EnforcerRuleHelper} has to do. - * -@@ -75,16 +75,15 @@ public class DependencyConvergence - try - { - MavenProject project = (MavenProject) helper.evaluate( "${project}" ); -- DependencyTreeBuilder dependencyTreeBuilder = -- (DependencyTreeBuilder) helper.getComponent( DependencyTreeBuilder.class ); -+ DependencyGraphBuilder dependencyTreeBuilder = -+ (DependencyGraphBuilder) helper.getComponent( DependencyGraphBuilder.class ); - ArtifactRepository repository = (ArtifactRepository) helper.evaluate( "${localRepository}" ); - ArtifactFactory factory = (ArtifactFactory) helper.getComponent( ArtifactFactory.class ); - ArtifactMetadataSource metadataSource = - (ArtifactMetadataSource) helper.getComponent( ArtifactMetadataSource.class ); - ArtifactCollector collector = (ArtifactCollector) helper.getComponent( ArtifactCollector.class ); - ArtifactFilter filter = null; // we need to evaluate all scopes -- DependencyNode node = dependencyTreeBuilder.buildDependencyTree( project, repository, factory, -- metadataSource, filter, collector ); -+ DependencyNode node = dependencyTreeBuilder.buildDependencyGraph( project.getProjectBuildingRequest(), filter); - return node; - } - catch ( ExpressionEvaluationException e ) -@@ -95,7 +94,7 @@ public class DependencyConvergence - { - throw new EnforcerRuleException( "Unable to lookup a component " + e.getLocalizedMessage(), e ); - } -- catch ( DependencyTreeBuilderException e ) -+ catch ( DependencyGraphBuilderException e ) - { - throw new EnforcerRuleException( "Could not build dependency tree " + e.getLocalizedMessage(), e ); - } -diff --git a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireUpperBoundDeps.java b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireUpperBoundDeps.java -index 458554a..2de9870 100644 ---- a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireUpperBoundDeps.java -+++ b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireUpperBoundDeps.java -@@ -38,10 +38,10 @@ import org.apache.maven.enforcer.rule.api.EnforcerRuleException; - import org.apache.maven.enforcer.rule.api.EnforcerRuleHelper; - import org.apache.maven.plugin.logging.Log; - import org.apache.maven.project.MavenProject; --import org.apache.maven.shared.dependency.tree.DependencyNode; --import org.apache.maven.shared.dependency.tree.DependencyTreeBuilder; --import org.apache.maven.shared.dependency.tree.DependencyTreeBuilderException; --import org.apache.maven.shared.dependency.tree.traversal.DependencyNodeVisitor; -+import org.apache.maven.shared.dependency.graph.DependencyNode; -+import org.apache.maven.shared.dependency.graph.DependencyGraphBuilder; -+import org.apache.maven.shared.dependency.graph.DependencyGraphBuilderException; -+import org.apache.maven.shared.dependency.graph.traversal.DependencyNodeVisitor; - import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluationException; - import org.codehaus.plexus.component.repository.exception.ComponentLookupException; - -@@ -91,7 +91,7 @@ public class RequireUpperBoundDeps - // CHECKSTYLE_OFF: LineLength - /** - * Uses the {@link EnforcerRuleHelper} to populate the values of the -- * {@link DependencyTreeBuilder#buildDependencyTree(MavenProject, ArtifactRepository, ArtifactFactory, ArtifactMetadataSource, ArtifactFilter, ArtifactCollector)} -+ * {@link DependencyGraphBuilder#buildDependencyTree(MavenProject, ArtifactRepository, ArtifactFactory, ArtifactMetadataSource, ArtifactFilter, ArtifactCollector)} - * factory method.
- * This method simply exists to hide all the ugly lookup that the {@link EnforcerRuleHelper} has to do. - * -@@ -106,8 +106,8 @@ public class RequireUpperBoundDeps - try - { - MavenProject project = (MavenProject) helper.evaluate( "${project}" ); -- DependencyTreeBuilder dependencyTreeBuilder = -- (DependencyTreeBuilder) helper.getComponent( DependencyTreeBuilder.class ); -+ DependencyGraphBuilder dependencyTreeBuilder = -+ (DependencyGraphBuilder) helper.getComponent( DependencyGraphBuilder.class ); - ArtifactRepository repository = (ArtifactRepository) helper.evaluate( "${localRepository}" ); - ArtifactFactory factory = (ArtifactFactory) helper.getComponent( ArtifactFactory.class ); - ArtifactMetadataSource metadataSource = -@@ -115,8 +115,7 @@ public class RequireUpperBoundDeps - ArtifactCollector collector = (ArtifactCollector) helper.getComponent( ArtifactCollector.class ); - ArtifactFilter filter = null; // we need to evaluate all scopes - DependencyNode node = -- dependencyTreeBuilder.buildDependencyTree( project, repository, factory, metadataSource, filter, -- collector ); -+ dependencyTreeBuilder.buildDependencyGraph( project.getProjectBuildingRequest(), filter); - return node; - } - catch ( ExpressionEvaluationException e ) -@@ -127,7 +126,7 @@ public class RequireUpperBoundDeps - { - throw new EnforcerRuleException( "Unable to lookup a component " + e.getLocalizedMessage(), e ); - } -- catch ( DependencyTreeBuilderException e ) -+ catch ( DependencyGraphBuilderException e ) - { - throw new EnforcerRuleException( "Could not build dependency tree " + e.getLocalizedMessage(), e ); - } -diff --git a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/utils/DependencyVersionMap.java b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/utils/DependencyVersionMap.java -index b6213fa..2c2a645 100644 ---- a/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/utils/DependencyVersionMap.java -+++ b/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/utils/DependencyVersionMap.java -@@ -26,8 +26,8 @@ import java.util.Map; - - import org.apache.maven.artifact.Artifact; - import org.apache.maven.plugin.logging.Log; --import org.apache.maven.shared.dependency.tree.DependencyNode; --import org.apache.maven.shared.dependency.tree.traversal.DependencyNodeVisitor; -+import org.apache.maven.shared.dependency.graph.DependencyNode; -+import org.apache.maven.shared.dependency.graph.traversal.DependencyNodeVisitor; - - /** - * @author Brian Fox -@@ -132,4 +132,4 @@ public class DependencyVersionMap - } - return output; - } --} -\ No newline at end of file -+} --- -2.24.1 - diff --git a/gnu/packages/patches/mescc-tools-boot.patch b/gnu/packages/patches/mescc-tools-boot.patch deleted file mode 100644 index 2bce8a49c2..0000000000 --- a/gnu/packages/patches/mescc-tools-boot.patch +++ /dev/null @@ -1,222 +0,0 @@ -From c184e95096881a13f29ebd7fc507fe305d3d8de5 Mon Sep 17 00:00:00 2001 -From: Jan Nieuwenhuizen -Date: Thu, 4 Oct 2018 22:03:31 +0200 -Subject: [PATCH] build.sh: Update for mes 0.18. - ---- - build.sh | 92 +++++++++++++++++++++++++++++++++++++----------------- - install.sh | 6 ++-- - 2 files changed, 66 insertions(+), 32 deletions(-) - -diff --git a/build.sh b/build.sh -index 335a7bb..19a0029 100755 ---- a/build.sh -+++ b/build.sh -@@ -18,7 +18,8 @@ - # along with mescc-tools. If not, see . - - set -eux --MES_SEED=${MES_SEED-../mescc-tools-seed/libs} -+MES_PREFIX=${MES_PREFIX-../mes} -+MES_SEED=${MES_SEED-../mes-seed} - MESCC_TOOLS_SEED=${MESCC_TOOLS_SEED-../mescc-tools-seed} - - ######################################### -@@ -32,15 +33,23 @@ MESCC_TOOLS_SEED=${MESCC_TOOLS_SEED-../mescc-tools-seed} - # blood-elf - # Create proper debug segment - $MESCC_TOOLS_SEED/blood-elf\ -+ -f $MESCC_TOOLS_SEED/file_print.M1\ -+ -f $MESCC_TOOLS_SEED/match.M1\ -+ -f $MESCC_TOOLS_SEED/numerate_number.M1\ -+ -f $MESCC_TOOLS_SEED/string.M1\ - -f $MESCC_TOOLS_SEED/blood-elf.M1\ - -o blood-elf-blood-elf-footer.M1 - - # Build - # M1-macro phase - $MESCC_TOOLS_SEED/M1 --LittleEndian --Architecture 1\ -- -f $MES_SEED/x86.M1\ -- -f $MES_SEED/crt1.M1\ -- -f $MES_SEED/libc+tcc-mes.M1\ -+ -f $MES_PREFIX/lib/x86-mes/x86.M1\ -+ -f $MES_SEED/x86-mes/crt1.S\ -+ -f $MES_SEED/x86-mes/libc+tcc.S\ -+ -f $MESCC_TOOLS_SEED/file_print.M1\ -+ -f $MESCC_TOOLS_SEED/match.M1\ -+ -f $MESCC_TOOLS_SEED/numerate_number.M1\ -+ -f $MESCC_TOOLS_SEED/string.M1\ - -f $MESCC_TOOLS_SEED/blood-elf.M1\ - -f blood-elf-blood-elf-footer.M1\ - -o blood-elf.hex2 -@@ -49,7 +58,7 @@ $MESCC_TOOLS_SEED/hex2\ - --LittleEndian\ - --Architecture 1\ - --BaseAddress 0x1000000\ -- -f $MES_SEED/elf32-header.hex2\ -+ -f $MES_PREFIX/lib/x86-mes/elf32-header.hex2\ - -f blood-elf.hex2\ - --exec_enable\ - -o bin/blood-elf -@@ -65,9 +74,13 @@ $MESCC_TOOLS_SEED/hex2\ - $MESCC_TOOLS_SEED/M1 \ - --LittleEndian\ - --Architecture 1\ -- -f $MES_SEED/x86.M1\ -- -f $MES_SEED/crt1.M1\ -- -f $MES_SEED/libc+tcc-mes.M1\ -+ -f $MES_PREFIX/lib/x86-mes/x86.M1\ -+ -f $MES_SEED/x86-mes/crt1.S\ -+ -f $MES_SEED/x86-mes/libc+tcc.S\ -+ -f $MESCC_TOOLS_SEED/file_print.M1\ -+ -f $MESCC_TOOLS_SEED/match.M1\ -+ -f $MESCC_TOOLS_SEED/numerate_number.M1\ -+ -f $MESCC_TOOLS_SEED/string.M1\ - -f $MESCC_TOOLS_SEED/M1.M1\ - -f M1-footer.M1\ - -o M1.hex2 -@@ -76,7 +89,7 @@ $MESCC_TOOLS_SEED/hex2 \ - --LittleEndian\ - --Architecture 1\ - --BaseAddress 0x1000000\ -- -f $MES_SEED/elf32-header.hex2\ -+ -f $MES_PREFIX/lib/x86-mes/elf32-header.hex2\ - -f M1.hex2\ - --exec_enable\ - -o bin/M1 -@@ -92,9 +105,13 @@ $MESCC_TOOLS_SEED/hex2 \ - ./bin/M1 \ - --LittleEndian\ - --Architecture 1\ -- -f $MES_SEED/x86.M1\ -- -f $MES_SEED/crt1.M1\ -- -f $MES_SEED/libc+tcc-mes.M1\ -+ -f $MES_PREFIX/lib/x86-mes/x86.M1\ -+ -f $MES_SEED/x86-mes/crt1.S\ -+ -f $MES_SEED/x86-mes/libc+tcc.S\ -+ -f $MESCC_TOOLS_SEED/file_print.M1\ -+ -f $MESCC_TOOLS_SEED/match.M1\ -+ -f $MESCC_TOOLS_SEED/numerate_number.M1\ -+ -f $MESCC_TOOLS_SEED/string.M1\ - -f $MESCC_TOOLS_SEED/hex2.M1\ - -f hex2-footer.M1\ - -o hex2.hex2 -@@ -103,10 +120,10 @@ $MESCC_TOOLS_SEED/hex2 \ - --LittleEndian\ - --Architecture 1\ - --BaseAddress 0x1000000\ -- -f $MES_SEED/elf32-header.hex2\ -+ -f $MES_PREFIX/lib/x86-mes/elf32-header.hex2\ - -f hex2.hex2\ - --exec_enable\ -- -o bin/hex2 -+ -o bin/hex2-0 - - ######################### - # Phase-1 Self-host # -@@ -123,18 +140,22 @@ $MESCC_TOOLS_SEED/hex2 \ - ./bin/M1 \ - --LittleEndian\ - --Architecture 1\ -- -f $MES_SEED/x86.M1\ -- -f $MES_SEED/crt1.M1\ -- -f $MES_SEED/libc+tcc-mes.M1\ -+ -f $MES_PREFIX/lib/x86-mes/x86.M1\ -+ -f $MES_SEED/x86-mes/crt1.S\ -+ -f $MES_SEED/x86-mes/libc+tcc.S\ -+ -f $MESCC_TOOLS_SEED/file_print.M1\ -+ -f $MESCC_TOOLS_SEED/match.M1\ -+ -f $MESCC_TOOLS_SEED/numerate_number.M1\ -+ -f $MESCC_TOOLS_SEED/string.M1\ - -f $MESCC_TOOLS_SEED/blood-elf.M1\ - -f blood-elf-blood-elf-footer.M1\ - -o blood-elf.hex2 - # Hex2-linker phase --./bin/hex2 \ -+./bin/hex2-0 \ - --LittleEndian\ - --Architecture 1\ - --BaseAddress 0x1000000\ -- -f $MES_SEED/elf32-header.hex2\ -+ -f $MES_PREFIX/lib/x86-mes/elf32-header.hex2\ - -f blood-elf.hex2\ - --exec_enable\ - -o blood-elf -@@ -150,18 +171,22 @@ $MESCC_TOOLS_SEED/hex2 \ - ./bin/M1 \ - --LittleEndian\ - --Architecture 1\ -- -f $MES_SEED/x86.M1\ -- -f $MES_SEED/crt1.M1\ -- -f $MES_SEED/libc+tcc-mes.M1\ -+ -f $MES_PREFIX/lib/x86-mes/x86.M1\ -+ -f $MES_SEED/x86-mes/crt1.S\ -+ -f $MES_SEED/x86-mes/libc+tcc.S\ -+ -f $MESCC_TOOLS_SEED/file_print.M1\ -+ -f $MESCC_TOOLS_SEED/match.M1\ -+ -f $MESCC_TOOLS_SEED/numerate_number.M1\ -+ -f $MESCC_TOOLS_SEED/string.M1\ - -f $MESCC_TOOLS_SEED/M1.M1\ - -f M1-footer.M1\ - -o M1.hex2 - # Hex2-linker phase --./bin/hex2 \ -+./bin/hex2-0 \ - --LittleEndian\ - --Architecture 1\ - --BaseAddress 0x1000000\ -- -f $MES_SEED/elf32-header.hex2\ -+ -f $MES_PREFIX/lib/x86-mes/elf32-header.hex2\ - -f M1.hex2\ - --exec_enable\ - -o bin/M1 -@@ -177,18 +202,27 @@ $MESCC_TOOLS_SEED/hex2 \ - ./bin/M1 \ - --LittleEndian\ - --Architecture 1\ -- -f $MES_SEED/x86.M1\ -- -f $MES_SEED/crt1.M1\ -- -f $MES_SEED/libc+tcc-mes.M1\ -+ -f $MES_PREFIX/lib/x86-mes/x86.M1\ -+ -f $MES_SEED/x86-mes/crt1.S\ -+ -f $MES_SEED/x86-mes/libc+tcc.S\ -+ -f $MESCC_TOOLS_SEED/file_print.M1\ -+ -f $MESCC_TOOLS_SEED/match.M1\ -+ -f $MESCC_TOOLS_SEED/numerate_number.M1\ -+ -f $MESCC_TOOLS_SEED/string.M1\ - -f $MESCC_TOOLS_SEED/hex2.M1\ - -f hex2-footer.M1\ - -o hex2.hex2 - # Hex2-linker phase --./bin/hex2 \ -+./bin/hex2-0 \ - --LittleEndian\ - --Architecture 1\ - --BaseAddress 0x1000000\ -- -f $MES_SEED/elf32-header.hex2\ -+ -f $MES_PREFIX/lib/x86-mes/elf32-header.hex2\ - -f hex2.hex2\ - --exec_enable\ - -o bin/hex2 -+ -+# TODO -+touch bin/exec_enable -+touch bin/get_machine -+touch bin/kaem -diff --git a/install.sh b/install.sh -index e4dccff..29e58d6 100644 ---- a/install.sh -+++ b/install.sh -@@ -18,6 +18,6 @@ - PREFIX=${PREFIX-usr} - - mkdir -p "$PREFIX/bin" --cp blood-elf "$PREFIX/bin/blood-elf" --cp hex2 "$PREFIX/bin/hex2" --cp M1 "$PREFIX/bin/M1" -+cp bin/blood-elf "$PREFIX/bin/blood-elf" -+cp bin/hex2 "$PREFIX/bin/hex2" -+cp bin/M1 "$PREFIX/bin/M1" --- -2.18.0 - diff --git a/gnu/packages/patches/nettle-3.5-CVE-2021-3580-pt1.patch b/gnu/packages/patches/nettle-3.5-CVE-2021-3580-pt1.patch deleted file mode 100644 index 4343c87795..0000000000 --- a/gnu/packages/patches/nettle-3.5-CVE-2021-3580-pt1.patch +++ /dev/null @@ -1,276 +0,0 @@ -Copied from upstream nettle git repository. -Removed changes to ChangeLog, to allow this patch to apply to nettle-3.5. - -From 485b5e2820a057e873b1ba812fdb39cae4adf98c Mon Sep 17 00:00:00 2001 -From: Niels Möller -Date: Mon, 17 May 2021 20:55:26 +0200 -Subject: [PATCH 1/2] Change _rsa_sec_compute_root_tr to take a fix input size. - -Improves consistency with _rsa_sec_compute_root, and fixes zero-input bug. ---- - ChangeLog | 15 +++++++++ - rsa-decrypt-tr.c | 7 ++--- - rsa-internal.h | 4 +-- - rsa-sec-decrypt.c | 9 ++++-- - rsa-sign-tr.c | 61 +++++++++++++++++------------------- - testsuite/rsa-encrypt-test.c | 14 ++++++++- - 6 files changed, 68 insertions(+), 42 deletions(-) - -diff --git a/rsa-decrypt-tr.c b/rsa-decrypt-tr.c -index 0224c0b7..927a8915 100644 ---- a/rsa-decrypt-tr.c -+++ b/rsa-decrypt-tr.c -@@ -52,14 +52,13 @@ rsa_decrypt_tr(const struct rsa_public_key *pub, - mp_size_t key_limb_size; - int res; - -- key_limb_size = NETTLE_OCTET_SIZE_TO_LIMB_SIZE(key->size); -+ key_limb_size = mpz_size(pub->n); - - TMP_GMP_ALLOC (m, key_limb_size); - TMP_GMP_ALLOC (em, key->size); -+ mpz_limbs_copy(m, gibberish, key_limb_size); - -- res = _rsa_sec_compute_root_tr (pub, key, random_ctx, random, m, -- mpz_limbs_read(gibberish), -- mpz_size(gibberish)); -+ res = _rsa_sec_compute_root_tr (pub, key, random_ctx, random, m, m); - - mpn_get_base256 (em, key->size, m, key_limb_size); - -diff --git a/rsa-internal.h b/rsa-internal.h -index b828e451..f66a7df0 100644 ---- a/rsa-internal.h -+++ b/rsa-internal.h -@@ -78,11 +78,11 @@ _rsa_sec_compute_root(const struct rsa_private_key *key, - mp_limb_t *scratch); - - /* Safe side-channel silent variant, using RSA blinding, and checking the -- * result after CRT. */ -+ * result after CRT. In-place calls, with x == m, is allowed. */ - int - _rsa_sec_compute_root_tr(const struct rsa_public_key *pub, - const struct rsa_private_key *key, - void *random_ctx, nettle_random_func *random, -- mp_limb_t *x, const mp_limb_t *m, size_t mn); -+ mp_limb_t *x, const mp_limb_t *m); - - #endif /* NETTLE_RSA_INTERNAL_H_INCLUDED */ -diff --git a/rsa-sec-decrypt.c b/rsa-sec-decrypt.c -index 6866e7c8..fc4757a0 100644 ---- a/rsa-sec-decrypt.c -+++ b/rsa-sec-decrypt.c -@@ -58,9 +58,12 @@ rsa_sec_decrypt(const struct rsa_public_key *pub, - TMP_GMP_ALLOC (m, mpz_size(pub->n)); - TMP_GMP_ALLOC (em, key->size); - -- res = _rsa_sec_compute_root_tr (pub, key, random_ctx, random, m, -- mpz_limbs_read(gibberish), -- mpz_size(gibberish)); -+ /* We need a copy because m can be shorter than key_size, -+ * but _rsa_sec_compute_root_tr expect all inputs to be -+ * normalized to a key_size long buffer length */ -+ mpz_limbs_copy(m, gibberish, mpz_size(pub->n)); -+ -+ res = _rsa_sec_compute_root_tr (pub, key, random_ctx, random, m, m); - - mpn_get_base256 (em, key->size, m, mpz_size(pub->n)); - -diff --git a/rsa-sign-tr.c b/rsa-sign-tr.c -index f824c4ca..9e137c7a 100644 ---- a/rsa-sign-tr.c -+++ b/rsa-sign-tr.c -@@ -131,35 +131,34 @@ int - _rsa_sec_compute_root_tr(const struct rsa_public_key *pub, - const struct rsa_private_key *key, - void *random_ctx, nettle_random_func *random, -- mp_limb_t *x, const mp_limb_t *m, size_t mn) -+ mp_limb_t *x, const mp_limb_t *m) - { -+ mp_size_t nn; - mpz_t mz; - mpz_t xz; - int res; - -- mpz_init(mz); - mpz_init(xz); - -- mpn_copyi(mpz_limbs_write(mz, mn), m, mn); -- mpz_limbs_finish(mz, mn); -+ nn = mpz_size (pub->n); - -- res = rsa_compute_root_tr(pub, key, random_ctx, random, xz, mz); -+ res = rsa_compute_root_tr(pub, key, random_ctx, random, xz, -+ mpz_roinit_n(mz, m, nn)); - - if (res) -- mpz_limbs_copy(x, xz, mpz_size(pub->n)); -+ mpz_limbs_copy(x, xz, nn); - -- mpz_clear(mz); - mpz_clear(xz); - return res; - } - #else - /* Blinds m, by computing c = m r^e (mod n), for a random r. Also -- returns the inverse (ri), for use by rsa_unblind. */ -+ returns the inverse (ri), for use by rsa_unblind. Must have c != m, -+ no in-place operation.*/ - static void - rsa_sec_blind (const struct rsa_public_key *pub, - void *random_ctx, nettle_random_func *random, -- mp_limb_t *c, mp_limb_t *ri, const mp_limb_t *m, -- mp_size_t mn) -+ mp_limb_t *c, mp_limb_t *ri, const mp_limb_t *m) - { - const mp_limb_t *ep = mpz_limbs_read (pub->e); - const mp_limb_t *np = mpz_limbs_read (pub->n); -@@ -177,15 +176,15 @@ rsa_sec_blind (const struct rsa_public_key *pub, - - /* c = m*(r^e) mod n */ - itch = mpn_sec_powm_itch(nn, ebn, nn); -- i2 = mpn_sec_mul_itch(nn, mn); -+ i2 = mpn_sec_mul_itch(nn, nn); - itch = MAX(itch, i2); -- i2 = mpn_sec_div_r_itch(nn + mn, nn); -+ i2 = mpn_sec_div_r_itch(2*nn, nn); - itch = MAX(itch, i2); - i2 = mpn_sec_invert_itch(nn); - itch = MAX(itch, i2); - -- TMP_GMP_ALLOC (tp, nn + mn + itch); -- scratch = tp + nn + mn; -+ TMP_GMP_ALLOC (tp, 2*nn + itch); -+ scratch = tp + 2*nn; - - /* ri = r^(-1) */ - do -@@ -198,9 +197,8 @@ rsa_sec_blind (const struct rsa_public_key *pub, - while (!mpn_sec_invert (ri, tp, np, nn, 2 * nn * GMP_NUMB_BITS, scratch)); - - mpn_sec_powm (c, rp, nn, ep, ebn, np, nn, scratch); -- /* normally mn == nn, but m can be smaller in some cases */ -- mpn_sec_mul (tp, c, nn, m, mn, scratch); -- mpn_sec_div_r (tp, nn + mn, np, nn, scratch); -+ mpn_sec_mul (tp, c, nn, m, nn, scratch); -+ mpn_sec_div_r (tp, 2*nn, np, nn, scratch); - mpn_copyi(c, tp, nn); - - TMP_GMP_FREE (r); -@@ -208,7 +206,7 @@ rsa_sec_blind (const struct rsa_public_key *pub, - TMP_GMP_FREE (tp); - } - --/* m = c ri mod n */ -+/* m = c ri mod n. Allows x == c. */ - static void - rsa_sec_unblind (const struct rsa_public_key *pub, - mp_limb_t *x, mp_limb_t *ri, const mp_limb_t *c) -@@ -299,7 +297,7 @@ int - _rsa_sec_compute_root_tr(const struct rsa_public_key *pub, - const struct rsa_private_key *key, - void *random_ctx, nettle_random_func *random, -- mp_limb_t *x, const mp_limb_t *m, size_t mn) -+ mp_limb_t *x, const mp_limb_t *m) - { - TMP_GMP_DECL (c, mp_limb_t); - TMP_GMP_DECL (ri, mp_limb_t); -@@ -307,7 +305,7 @@ _rsa_sec_compute_root_tr(const struct rsa_public_key *pub, - size_t key_limb_size; - int ret; - -- key_limb_size = NETTLE_OCTET_SIZE_TO_LIMB_SIZE(key->size); -+ key_limb_size = mpz_size(pub->n); - - /* mpz_powm_sec handles only odd moduli. If p, q or n is even, the - key is invalid and rejected by rsa_private_key_prepare. However, -@@ -321,19 +319,18 @@ _rsa_sec_compute_root_tr(const struct rsa_public_key *pub, - } - - assert(mpz_size(pub->n) == key_limb_size); -- assert(mn <= key_limb_size); - - TMP_GMP_ALLOC (c, key_limb_size); - TMP_GMP_ALLOC (ri, key_limb_size); - TMP_GMP_ALLOC (scratch, _rsa_sec_compute_root_itch(key)); - -- rsa_sec_blind (pub, random_ctx, random, x, ri, m, mn); -+ rsa_sec_blind (pub, random_ctx, random, c, ri, m); - -- _rsa_sec_compute_root(key, c, x, scratch); -+ _rsa_sec_compute_root(key, x, c, scratch); - -- ret = rsa_sec_check_root(pub, c, x); -+ ret = rsa_sec_check_root(pub, x, c); - -- rsa_sec_unblind(pub, x, ri, c); -+ rsa_sec_unblind(pub, x, ri, x); - - cnd_mpn_zero(1 - ret, x, key_limb_size); - -@@ -357,17 +354,17 @@ rsa_compute_root_tr(const struct rsa_public_key *pub, - mpz_t x, const mpz_t m) - { - TMP_GMP_DECL (l, mp_limb_t); -+ mp_size_t nn = mpz_size(pub->n); - int res; - -- mp_size_t l_size = NETTLE_OCTET_SIZE_TO_LIMB_SIZE(key->size); -- TMP_GMP_ALLOC (l, l_size); -+ TMP_GMP_ALLOC (l, nn); -+ mpz_limbs_copy(l, m, nn); - -- res = _rsa_sec_compute_root_tr (pub, key, random_ctx, random, l, -- mpz_limbs_read(m), mpz_size(m)); -+ res = _rsa_sec_compute_root_tr (pub, key, random_ctx, random, l, l); - if (res) { -- mp_limb_t *xp = mpz_limbs_write (x, l_size); -- mpn_copyi (xp, l, l_size); -- mpz_limbs_finish (x, l_size); -+ mp_limb_t *xp = mpz_limbs_write (x, nn); -+ mpn_copyi (xp, l, nn); -+ mpz_limbs_finish (x, nn); - } - - TMP_GMP_FREE (l); -diff --git a/testsuite/rsa-encrypt-test.c b/testsuite/rsa-encrypt-test.c -index 87525f78..d3bc374b 100644 ---- a/testsuite/rsa-encrypt-test.c -+++ b/testsuite/rsa-encrypt-test.c -@@ -19,6 +19,7 @@ test_main(void) - uint8_t after; - - mpz_t gibberish; -+ mpz_t zero; - - rsa_private_key_init(&key); - rsa_public_key_init(&pub); -@@ -101,6 +102,17 @@ test_main(void) - ASSERT(decrypted[decrypted_length] == after); - ASSERT(decrypted[0] == 'A'); - -+ /* Test zero input. */ -+ mpz_init_set_ui (zero, 0); -+ decrypted_length = msg_length; -+ ASSERT(!rsa_decrypt(&key, &decrypted_length, decrypted, zero)); -+ ASSERT(!rsa_decrypt_tr(&pub, &key, -+ &lfib, (nettle_random_func *) knuth_lfib_random, -+ &decrypted_length, decrypted, zero)); -+ ASSERT(!rsa_sec_decrypt(&pub, &key, -+ &lfib, (nettle_random_func *) knuth_lfib_random, -+ decrypted_length, decrypted, zero)); -+ ASSERT(decrypted_length == msg_length); - - /* Test invalid key. */ - mpz_add_ui (key.q, key.q, 2); -@@ -112,6 +124,6 @@ test_main(void) - rsa_private_key_clear(&key); - rsa_public_key_clear(&pub); - mpz_clear(gibberish); -+ mpz_clear(zero); - free(decrypted); - } -- --- -2.31.1 - diff --git a/gnu/packages/patches/nettle-3.5-CVE-2021-3580-pt2.patch b/gnu/packages/patches/nettle-3.5-CVE-2021-3580-pt2.patch deleted file mode 100644 index 5f19bd80d3..0000000000 --- a/gnu/packages/patches/nettle-3.5-CVE-2021-3580-pt2.patch +++ /dev/null @@ -1,163 +0,0 @@ -Copied from upstream nettle git repository. -Removed changes to ChangeLog, to allow this patch to apply to nettle-3.5. - -From 0ad0b5df315665250dfdaa4a1e087f4799edaefe Mon Sep 17 00:00:00 2001 -From: Niels Möller -Date: Mon, 17 May 2021 22:02:47 +0200 -Subject: [PATCH 2/2] Add input check to rsa_decrypt family of functions. - ---- - ChangeLog | 8 ++++++++ - rsa-decrypt-tr.c | 4 ++++ - rsa-decrypt.c | 10 ++++++++++ - rsa-sec-decrypt.c | 4 ++++ - rsa.h | 5 +++-- - testsuite/rsa-encrypt-test.c | 38 ++++++++++++++++++++++++++++++------ - 6 files changed, 61 insertions(+), 8 deletions(-) - -diff --git a/rsa-decrypt-tr.c b/rsa-decrypt-tr.c -index 927a8915..4a9e9d74 100644 ---- a/rsa-decrypt-tr.c -+++ b/rsa-decrypt-tr.c -@@ -52,6 +52,10 @@ rsa_decrypt_tr(const struct rsa_public_key *pub, - mp_size_t key_limb_size; - int res; - -+ /* First check that input is in range. */ -+ if (mpz_sgn (gibberish) < 0 || mpz_cmp (gibberish, pub->n) >= 0) -+ return 0; -+ - key_limb_size = mpz_size(pub->n); - - TMP_GMP_ALLOC (m, key_limb_size); -diff --git a/rsa-decrypt.c b/rsa-decrypt.c -index 7681439d..540d8baa 100644 ---- a/rsa-decrypt.c -+++ b/rsa-decrypt.c -@@ -48,6 +48,16 @@ rsa_decrypt(const struct rsa_private_key *key, - int res; - - mpz_init(m); -+ -+ /* First check that input is in range. Since we don't have the -+ public key available here, we need to reconstruct n. */ -+ mpz_mul (m, key->p, key->q); -+ if (mpz_sgn (gibberish) < 0 || mpz_cmp (gibberish, m) >= 0) -+ { -+ mpz_clear (m); -+ return 0; -+ } -+ - rsa_compute_root(key, m, gibberish); - - res = pkcs1_decrypt (key->size, m, length, message); -diff --git a/rsa-sec-decrypt.c b/rsa-sec-decrypt.c -index fc4757a0..4c98958d 100644 ---- a/rsa-sec-decrypt.c -+++ b/rsa-sec-decrypt.c -@@ -55,6 +55,10 @@ rsa_sec_decrypt(const struct rsa_public_key *pub, - TMP_GMP_DECL (em, uint8_t); - int res; - -+ /* First check that input is in range. */ -+ if (mpz_sgn (gibberish) < 0 || mpz_cmp (gibberish, pub->n) >= 0) -+ return 0; -+ - TMP_GMP_ALLOC (m, mpz_size(pub->n)); - TMP_GMP_ALLOC (em, key->size); - -diff --git a/rsa.h b/rsa.h -index 3b10155f..2dd35a2d 100644 ---- a/rsa.h -+++ b/rsa.h -@@ -428,13 +428,14 @@ rsa_sec_decrypt(const struct rsa_public_key *pub, - size_t length, uint8_t *message, - const mpz_t gibberish); - --/* Compute x, the e:th root of m. Calling it with x == m is allowed. */ -+/* Compute x, the e:th root of m. Calling it with x == m is allowed. -+ It is required that 0 <= m < n. */ - void - rsa_compute_root(const struct rsa_private_key *key, - mpz_t x, const mpz_t m); - - /* Safer variant, using RSA blinding, and checking the result after -- CRT. */ -+ CRT. It is required that 0 <= m < n. */ - int - rsa_compute_root_tr(const struct rsa_public_key *pub, - const struct rsa_private_key *key, -diff --git a/testsuite/rsa-encrypt-test.c b/testsuite/rsa-encrypt-test.c -index d3bc374b..d1a440f6 100644 ---- a/testsuite/rsa-encrypt-test.c -+++ b/testsuite/rsa-encrypt-test.c -@@ -19,11 +19,12 @@ test_main(void) - uint8_t after; - - mpz_t gibberish; -- mpz_t zero; -+ mpz_t bad_input; - - rsa_private_key_init(&key); - rsa_public_key_init(&pub); - mpz_init(gibberish); -+ mpz_init(bad_input); - - knuth_lfib_init(&lfib, 17); - -@@ -103,15 +104,40 @@ test_main(void) - ASSERT(decrypted[0] == 'A'); - - /* Test zero input. */ -- mpz_init_set_ui (zero, 0); -+ mpz_set_ui (bad_input, 0); - decrypted_length = msg_length; -- ASSERT(!rsa_decrypt(&key, &decrypted_length, decrypted, zero)); -+ ASSERT(!rsa_decrypt(&key, &decrypted_length, decrypted, bad_input)); - ASSERT(!rsa_decrypt_tr(&pub, &key, - &lfib, (nettle_random_func *) knuth_lfib_random, -- &decrypted_length, decrypted, zero)); -+ &decrypted_length, decrypted, bad_input)); - ASSERT(!rsa_sec_decrypt(&pub, &key, - &lfib, (nettle_random_func *) knuth_lfib_random, -- decrypted_length, decrypted, zero)); -+ decrypted_length, decrypted, bad_input)); -+ ASSERT(decrypted_length == msg_length); -+ -+ /* Test input that is slightly larger than n */ -+ mpz_add(bad_input, gibberish, pub.n); -+ decrypted_length = msg_length; -+ ASSERT(!rsa_decrypt(&key, &decrypted_length, decrypted, bad_input)); -+ ASSERT(!rsa_decrypt_tr(&pub, &key, -+ &lfib, (nettle_random_func *) knuth_lfib_random, -+ &decrypted_length, decrypted, bad_input)); -+ ASSERT(!rsa_sec_decrypt(&pub, &key, -+ &lfib, (nettle_random_func *) knuth_lfib_random, -+ decrypted_length, decrypted, bad_input)); -+ ASSERT(decrypted_length == msg_length); -+ -+ /* Test input that is considerably larger than n */ -+ mpz_mul_2exp (bad_input, pub.n, 100); -+ mpz_add (bad_input, bad_input, gibberish); -+ decrypted_length = msg_length; -+ ASSERT(!rsa_decrypt(&key, &decrypted_length, decrypted, bad_input)); -+ ASSERT(!rsa_decrypt_tr(&pub, &key, -+ &lfib, (nettle_random_func *) knuth_lfib_random, -+ &decrypted_length, decrypted, bad_input)); -+ ASSERT(!rsa_sec_decrypt(&pub, &key, -+ &lfib, (nettle_random_func *) knuth_lfib_random, -+ decrypted_length, decrypted, bad_input)); - ASSERT(decrypted_length == msg_length); - - /* Test invalid key. */ -@@ -124,6 +150,6 @@ test_main(void) - rsa_private_key_clear(&key); - rsa_public_key_clear(&pub); - mpz_clear(gibberish); -- mpz_clear(zero); -+ mpz_clear(bad_input); - free(decrypted); - } --- -2.31.1 - diff --git a/gnu/packages/patches/nettle-3.5-check-_pkcs1_sec_decrypt-msg-len.patch b/gnu/packages/patches/nettle-3.5-check-_pkcs1_sec_decrypt-msg-len.patch deleted file mode 100644 index 297816e698..0000000000 --- a/gnu/packages/patches/nettle-3.5-check-_pkcs1_sec_decrypt-msg-len.patch +++ /dev/null @@ -1,78 +0,0 @@ -Copied from upstream nettle git repository. -Removed changes to ChangeLog, to allow this patch to apply to nettle-3.5. - -From 7616541e6eff73353bf682c62e3a68e4fe696707 Mon Sep 17 00:00:00 2001 -From: Niels Möller -Date: Thu, 6 May 2021 21:29:56 +0200 -Subject: [PATCH] Add check that message length to _pkcs1_sec_decrypt is valid. - -* pkcs1-sec-decrypt.c (_pkcs1_sec_decrypt): Check that message -length is valid, for given key size. -* testsuite/rsa-sec-decrypt-test.c (test_main): Add test cases for -calls to rsa_sec_decrypt specifying a too large message length. ---- - ChangeLog | 7 +++++++ - pkcs1-sec-decrypt.c | 4 +++- - testsuite/rsa-sec-decrypt-test.c | 17 ++++++++++++++++- - 3 files changed, 26 insertions(+), 2 deletions(-) - -diff --git a/pkcs1-sec-decrypt.c b/pkcs1-sec-decrypt.c -index 4f13080e..16833691 100644 ---- a/pkcs1-sec-decrypt.c -+++ b/pkcs1-sec-decrypt.c -@@ -63,7 +63,9 @@ _pkcs1_sec_decrypt (size_t length, uint8_t *message, - volatile int ok; - size_t i, t; - -- assert (padded_message_length >= length); -+ /* Message independent branch */ -+ if (length + 11 > padded_message_length) -+ return 0; - - t = padded_message_length - length - 1; - -diff --git a/testsuite/rsa-sec-decrypt-test.c b/testsuite/rsa-sec-decrypt-test.c -index fb0ed3a1..3419322e 100644 ---- a/testsuite/rsa-sec-decrypt-test.c -+++ b/testsuite/rsa-sec-decrypt-test.c -@@ -55,6 +55,7 @@ rsa_decrypt_for_test(const struct rsa_public_key *pub, - #endif - - #define PAYLOAD_SIZE 50 -+#define DECRYPTED_SIZE 256 - void - test_main(void) - { -@@ -63,7 +64,7 @@ test_main(void) - struct knuth_lfib_ctx random_ctx; - - uint8_t plaintext[PAYLOAD_SIZE]; -- uint8_t decrypted[PAYLOAD_SIZE]; -+ uint8_t decrypted[DECRYPTED_SIZE]; - uint8_t verifybad[PAYLOAD_SIZE]; - unsigned n_size = 1024; - mpz_t gibberish; -@@ -99,6 +100,20 @@ test_main(void) - PAYLOAD_SIZE, decrypted, gibberish) == 1); - ASSERT (MEMEQ (PAYLOAD_SIZE, plaintext, decrypted)); - -+ ASSERT (pub.size > 10); -+ ASSERT (pub.size <= DECRYPTED_SIZE); -+ -+ /* Check that too large message length is rejected, largest -+ valid size is pub.size - 11. */ -+ ASSERT (!rsa_decrypt_for_test (&pub, &key, &random_ctx, -+ (nettle_random_func *) knuth_lfib_random, -+ pub.size - 10, decrypted, gibberish)); -+ -+ /* This case used to result in arithmetic underflow and a crash. */ -+ ASSERT (!rsa_decrypt_for_test (&pub, &key, &random_ctx, -+ (nettle_random_func *) knuth_lfib_random, -+ pub.size, decrypted, gibberish)); -+ - /* bad one */ - memcpy(decrypted, verifybad, PAYLOAD_SIZE); - nettle_mpz_random_size(garbage, &random_ctx, --- -2.31.1 - diff --git a/gnu/packages/patches/ocaml-Add-a-.file-directive.patch b/gnu/packages/patches/ocaml-Add-a-.file-directive.patch deleted file mode 100644 index 07842e9c32..0000000000 --- a/gnu/packages/patches/ocaml-Add-a-.file-directive.patch +++ /dev/null @@ -1,96 +0,0 @@ -From: Stephane Glondu -Date: Sun, 16 Aug 2015 20:59:14 +0200 -Subject: Add a .file directive to generated .s files - -When no .file directive is given, the toolchain records the filename -of the .o file, which is sometimes random, making generated objects -non-deterministic. - -We use Location.input_name for adding .file directives to assembly -files. Note: when the file is preprocessed, this reference holds the -name of the temporary file. Hence, files compiled with -pp are still -not deterministic. - -Bug-Debian: https://bugs.debian.org/795784 -Bug-Debian: https://bugs.debian.org/796336 ---- - asmcomp/amd64/emit.mlp | 1 + - asmcomp/arm/emit.mlp | 1 + - asmcomp/arm64/emit.mlp | 1 + - asmcomp/i386/emit.mlp | 1 + - asmcomp/power/emit.mlp | 1 + - asmcomp/sparc/emit.mlp | 1 + - 6 files changed, 6 insertions(+) - -diff --git a/asmcomp/amd64/emit.mlp b/asmcomp/amd64/emit.mlp -index d56d0f5..4d7aa30 100644 ---- a/asmcomp/amd64/emit.mlp -+++ b/asmcomp/amd64/emit.mlp -@@ -794,6 +794,7 @@ let data l = - let begin_assembly() = - reset_debug_info(); (* PR#5603 *) - float_constants := []; -+ ` .file \"{emit_string (String.escaped !Location.input_name)}\"\n`; - if !Clflags.dlcode then begin - (* from amd64.S; could emit these constants on demand *) - if macosx then -diff --git a/asmcomp/arm/emit.mlp b/asmcomp/arm/emit.mlp -index 4948fb2..6f30fba 100644 ---- a/asmcomp/arm/emit.mlp -+++ b/asmcomp/arm/emit.mlp -@@ -892,6 +892,7 @@ let data l = - - let begin_assembly() = - reset_debug_info(); -+ ` .file \"{emit_string (String.escaped !Location.input_name)}\"\n`; - ` .syntax unified\n`; - begin match !arch with - | ARMv4 -> ` .arch armv4t\n` -diff --git a/asmcomp/arm64/emit.mlp b/asmcomp/arm64/emit.mlp -index 750c2b2..5afbb8a 100644 ---- a/asmcomp/arm64/emit.mlp -+++ b/asmcomp/arm64/emit.mlp -@@ -942,6 +942,7 @@ let data l = - - let begin_assembly() = - reset_debug_info(); -+ ` .file \"{emit_string (String.escaped !Location.input_name)}\"\n`; - let lbl_begin = Compilenv.make_symbol (Some "data_begin") in - ` .data\n`; - ` .globl {emit_symbol lbl_begin}\n`; -diff --git a/asmcomp/i386/emit.mlp b/asmcomp/i386/emit.mlp -index 98df5f9..531150f 100644 ---- a/asmcomp/i386/emit.mlp -+++ b/asmcomp/i386/emit.mlp -@@ -986,6 +986,7 @@ let data l = - let begin_assembly() = - reset_debug_info(); (* PR#5603 *) - float_constants := []; -+ ` .file \"{emit_string (String.escaped !Location.input_name)}\"\n`; - let lbl_begin = Compilenv.make_symbol (Some "data_begin") in - ` .data\n`; - ` .globl {emit_symbol lbl_begin}\n`; -diff --git a/asmcomp/power/emit.mlp b/asmcomp/power/emit.mlp -index 4344085..343132b 100644 ---- a/asmcomp/power/emit.mlp -+++ b/asmcomp/power/emit.mlp -@@ -887,6 +887,7 @@ let data l = - let begin_assembly() = - defined_functions := StringSet.empty; - external_functions := StringSet.empty; -+ ` .file \"{emit_string (String.escaped !Location.input_name)}\"\n`; - (* Emit the beginning of the segments *) - let lbl_begin = Compilenv.make_symbol (Some "data_begin") in - emit_string data_space; -diff --git a/asmcomp/sparc/emit.mlp b/asmcomp/sparc/emit.mlp -index 877a3d5..7b041e9 100644 ---- a/asmcomp/sparc/emit.mlp -+++ b/asmcomp/sparc/emit.mlp -@@ -727,6 +727,7 @@ let data l = - (* Beginning / end of an assembly file *) - - let begin_assembly() = -+ ` .file \"{emit_string (String.escaped !Location.input_name)}\"\n`; - let lbl_begin = Compilenv.make_symbol (Some "data_begin") in - ` .data\n`; - ` .global {emit_symbol lbl_begin}\n`; diff --git a/gnu/packages/patches/ocaml-CVE-2015-8869.patch b/gnu/packages/patches/ocaml-CVE-2015-8869.patch deleted file mode 100644 index 0a4cb34d25..0000000000 --- a/gnu/packages/patches/ocaml-CVE-2015-8869.patch +++ /dev/null @@ -1,72 +0,0 @@ -Adapted from upstream commit 659615c7b100a89eafe6253e7a5b9d84d0e8df74, -this patch omits the upstream changes to 'Changes' and 'VERSION'. - -http://seclists.org/oss-sec/2016/q2/170 -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-8869 -https://github.com/ocaml/ocaml/commit/659615c7b100a89eafe6253e7a5b9d84d0e8df74 ---- - byterun/alloc.c | 4 ++-- - byterun/intern.c | 2 +- - byterun/str.c | 4 ++-- - 3 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/byterun/alloc.c b/byterun/alloc.c -index 96a21bf..0db9947 100644 ---- a/byterun/alloc.c -+++ b/byterun/alloc.c -@@ -153,7 +153,7 @@ CAMLexport int caml_convert_flag_list(value list, int *flags) - /* [size] is a [value] representing number of words (fields) */ - CAMLprim value caml_alloc_dummy(value size) - { -- mlsize_t wosize = Int_val(size); -+ mlsize_t wosize = Long_val(size); - - if (wosize == 0) return Atom(0); - return caml_alloc (wosize, 0); -@@ -169,7 +169,7 @@ CAMLprim value caml_alloc_dummy_function(value size,value arity) - /* [size] is a [value] representing number of floats. */ - CAMLprim value caml_alloc_dummy_float (value size) - { -- mlsize_t wosize = Int_val(size) * Double_wosize; -+ mlsize_t wosize = Long_val(size) * Double_wosize; - - if (wosize == 0) return Atom(0); - return caml_alloc (wosize, 0); -diff --git a/byterun/intern.c b/byterun/intern.c -index 89d13d1..7b8d049 100644 ---- a/byterun/intern.c -+++ b/byterun/intern.c -@@ -291,7 +291,7 @@ static void intern_rec(value *dest) - case OFreshOID: - /* Refresh the object ID */ - /* but do not do it for predefined exception slots */ -- if (Int_val(Field((value)dest, 1)) >= 0) -+ if (Long_val(Field((value)dest, 1)) >= 0) - caml_set_oo_id((value)dest); - /* Pop item and iterate */ - sp--; -diff --git a/byterun/str.c b/byterun/str.c -index 5ad4e29..885772f 100644 ---- a/byterun/str.c -+++ b/byterun/str.c -@@ -266,7 +266,7 @@ CAMLprim value caml_string_greaterequal(value s1, value s2) - CAMLprim value caml_blit_string(value s1, value ofs1, value s2, value ofs2, - value n) - { -- memmove(&Byte(s2, Long_val(ofs2)), &Byte(s1, Long_val(ofs1)), Int_val(n)); -+ memmove(&Byte(s2, Long_val(ofs2)), &Byte(s1, Long_val(ofs1)), Long_val(n)); - return Val_unit; - } - -@@ -278,7 +278,7 @@ CAMLprim value caml_fill_string(value s, value offset, value len, value init) - - CAMLprim value caml_bitvect_test(value bv, value n) - { -- int pos = Int_val(n); -+ intnat pos = Long_val(n); - return Val_int(Byte_u(bv, pos >> 3) & (1 << (pos & 7))); - } - --- -2.7.4 - diff --git a/gnu/packages/patches/ocaml-bitstring-fix-configure.patch b/gnu/packages/patches/ocaml-bitstring-fix-configure.patch deleted file mode 100644 index c358bf3d6b..0000000000 --- a/gnu/packages/patches/ocaml-bitstring-fix-configure.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 0aaddfceeea3e89df196ab1846da54d09713a512 Mon Sep 17 00:00:00 2001 -From: Julien Lepiller -Date: Thu, 15 Dec 2016 21:17:31 +0100 -Subject: [PATCH] fix configure - ---- - Makefile.in | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git a/Makefile.in b/Makefile.in -index d040f4c..85e0b38 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -32,6 +32,7 @@ BISECT_REPORT = @BISECT_REPORT@ - BYTESWAP_H = @BYTESWAP_H@ - - OCAMLLIB = @OCAMLLIB@ -+BISECTLIB = $(shell if test -z $${BISECTLIB}; then echo $(OCAMLLIB); else echo $${BISECTLIB}; fi) - top_srcdir = @top_srcdir@ - - pkg_cil = @OCAML_PKG_cil@ -@@ -47,9 +48,9 @@ OCAMLOPTPACKAGES = $(OCAMLCPACKAGES) - OCAMLOPTLIBS = -linkpkg - - ifneq ($(enable_coverage),no) --OCAMLCFLAGS += -I +bisect -pp 'camlp4o $(OCAMLLIB)/bisect/instrument.cma' -+OCAMLCFLAGS += -I +bisect -pp 'camlp4o $(BISECTLIB)/bisect/instrument.cma' - OCAMLCLIBS += -I +bisect bisect.cma --OCAMLOPTFLAGS += -I +bisect -pp 'camlp4o $(OCAMLLIB)/bisect/instrument.cma' -+OCAMLOPTFLAGS += -I +bisect -pp 'camlp4o $(BISECTLIB)/bisect/instrument.cma' - OCAMLOPTLIBS += -I +bisect bisect.cmxa - endif - -@@ -110,7 +111,7 @@ bitstring_persistent.cmi: bitstring_persistent.mli - -I +camlp4 -pp camlp4of -c $< - - pa_bitstring.cmo: pa_bitstring.ml bitstring.cma bitstring_persistent.cma -- $(OCAMLFIND) ocamlc bitstring.cma -I +camlp4 dynlink.cma camlp4lib.cma \ -+ $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) bitstring.cma -I +camlp4 dynlink.cma camlp4lib.cma \ - -pp camlp4of -c $< -o $@ - - bitstring-objinfo: bitstring_objinfo.cmo bitstring.cma bitstring_persistent.cma -@@ -133,7 +134,7 @@ byteswap.h: byteswap.in.h - ifeq ($(enable_coverage),no) - PP = -pp 'camlp4o bitstring.cma bitstring_persistent.cma pa_bitstring.cmo' - else --PP = -pp 'camlp4o $(OCAMLLIB)/bisect/bisect.cma bitstring.cma bitstring_persistent.cma pa_bitstring.cmo' -+PP = -pp 'camlp4o $(BISECTLIB)/bisect/bisect.cma bitstring.cma bitstring_persistent.cma pa_bitstring.cmo' - endif - - check: test --- -2.11.0 diff --git a/gnu/packages/patches/ocaml-enable-ocamldoc-reproducibility.patch b/gnu/packages/patches/ocaml-enable-ocamldoc-reproducibility.patch deleted file mode 100644 index 39fb7aa226..0000000000 --- a/gnu/packages/patches/ocaml-enable-ocamldoc-reproducibility.patch +++ /dev/null @@ -1,149 +0,0 @@ -From a87c3f20e846c00e53d695497dba7038edbd12f0 Mon Sep 17 00:00:00 2001 -From: Valentin Lorentz -Date: Thu, 13 Aug 2015 11:59:04 +0200 -Subject: [PATCH] Enable ocamldoc to build reproducible manpages - -Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=794586 -Signed-off-by: Stephane Glondu ---- - ocamldoc/odoc_man.ml | 15 +++++---------- - ocamldoc/odoc_misc.ml | 12 ++++++++++-- - ocamldoc/odoc_misc.mli | 7 ++++++- - 3 files changed, 21 insertions(+), 13 deletions(-) - -diff --git a/ocamldoc/odoc_man.ml b/ocamldoc/odoc_man.ml -index 615c5e172..3c85aa32a 100644 ---- a/ocamldoc/odoc_man.ml -+++ b/ocamldoc/odoc_man.ml -@@ -864,14 +864,13 @@ class man = - (** Generate the man page for the given class.*) - method generate_for_class cl = - Odoc_info.reset_type_names () ; -- let date = Unix.time () in - let file = self#file_name cl.cl_name in - try - let chanout = self#open_out file in - let b = new_buf () in - bs b (".TH \""^cl.cl_name^"\" "); - bs b !man_section ; -- bs b (" "^(Odoc_misc.string_of_date ~hour: false date)^" "); -+ bs b (" source: "^Odoc_misc.current_date^" "); - bs b "OCamldoc "; - bs b ("\""^(match !Global.title with Some t -> t | None -> "")^"\"\n"); - -@@ -923,14 +922,13 @@ class man = - (** Generate the man page for the given class type.*) - method generate_for_class_type ct = - Odoc_info.reset_type_names () ; -- let date = Unix.time () in - let file = self#file_name ct.clt_name in - try - let chanout = self#open_out file in - let b = new_buf () in - bs b (".TH \""^ct.clt_name^"\" "); - bs b !man_section ; -- bs b (" "^(Odoc_misc.string_of_date ~hour: false date)^" "); -+ bs b (" source: "^Odoc_misc.current_date^" "); - bs b "OCamldoc "; - bs b ("\""^(match !Global.title with Some t -> t | None -> "")^"\"\n"); - -@@ -1016,14 +1014,13 @@ class man = - (** Generate the man file for the given module type. - @raise Failure if an error occurs.*) - method generate_for_module_type mt = -- let date = Unix.time () in - let file = self#file_name mt.mt_name in - try - let chanout = self#open_out file in - let b = new_buf () in - bs b (".TH \""^mt.mt_name^"\" "); - bs b !man_section ; -- bs b (" "^(Odoc_misc.string_of_date ~hour: false date)^" "); -+ bs b (" source: "^Odoc_misc.current_date^" "); - bs b "OCamldoc "; - bs b ("\""^(match !Global.title with Some t -> t | None -> "")^"\"\n"); - -@@ -1099,14 +1096,13 @@ class man = - (** Generate the man file for the given module. - @raise Failure if an error occurs.*) - method generate_for_module m = -- let date = Unix.time () in - let file = self#file_name m.m_name in - try - let chanout = self#open_out file in - let b = new_buf () in - bs b (".TH \""^m.m_name^"\" "); - bs b !man_section ; -- bs b (" "^(Odoc_misc.string_of_date ~hour: false date)^" "); -+ bs b (" source: "^Odoc_misc.current_date^" "); - bs b "OCamldoc "; - bs b ("\""^(match !Global.title with Some t -> t | None -> "")^"\"\n"); - -@@ -1206,14 +1202,13 @@ class man = - | Res_const (_,f) -> f.vc_name - ) - in -- let date = Unix.time () in - let file = self#file_name name in - try - let chanout = self#open_out file in - let b = new_buf () in - bs b (".TH \""^name^"\" "); - bs b !man_section ; -- bs b (" "^(Odoc_misc.string_of_date ~hour: false date)^" "); -+ bs b (" source: "^Odoc_misc.current_date^" "); - bs b "OCamldoc "; - bs b ("\""^(match !Global.title with Some t -> t | None -> "")^"\"\n"); - bs b ".SH NAME\n"; -diff --git a/ocamldoc/odoc_misc.ml b/ocamldoc/odoc_misc.ml -index 4c74476da..456225f62 100644 ---- a/ocamldoc/odoc_misc.ml -+++ b/ocamldoc/odoc_misc.ml -@@ -223,9 +223,9 @@ let apply_opt f v_opt = - None -> None - | Some v -> Some (f v) - --let string_of_date ?(hour=true) d = -+let string_of_date ?(absolute=false) ?(hour=true) d = - let add_0 s = if String.length s < 2 then "0"^s else s in -- let t = Unix.localtime d in -+ let t = (if absolute then Unix.gmtime else Unix.localtime) d in - (string_of_int (t.Unix.tm_year + 1900))^"-"^ - (add_0 (string_of_int (t.Unix.tm_mon + 1)))^"-"^ - (add_0 (string_of_int t.Unix.tm_mday))^ -@@ -238,6 +238,14 @@ let string_of_date ?(hour=true) d = - "" - ) - -+let current_date = -+ let time = -+ try -+ float_of_string (Sys.getenv "SOURCE_DATE_EPOCH") -+ with -+ Not_found -> Unix.time () -+ in string_of_date ~absolute: true ~hour: false time -+ - - let rec text_list_concat sep l = - match l with -diff --git a/ocamldoc/odoc_misc.mli b/ocamldoc/odoc_misc.mli -index dd5a7fcb9..38ff0612b 100644 ---- a/ocamldoc/odoc_misc.mli -+++ b/ocamldoc/odoc_misc.mli -@@ -62,7 +62,12 @@ val apply_opt : ('a -> 'b) -> 'a option -> 'b option - - (** Return a string representing a date given as a number of seconds - since 1970. The hour is optionnaly displayed. *) --val string_of_date : ?hour:bool -> float -> string -+val string_of_date : ?absolute:bool -> ?hour:bool -> float -> string -+ -+(* Value returned by string_of_date for current time. -+ * Uses environment variable SOURCE_DATE_EPOCH if set; falls back to -+ * current timestamp otherwise. *) -+val current_date : string - - (** Return the first sentence (until the first dot) of a text. - Don't stop in the middle of [Code], [Verbatim], [List], [Lnum], --- -2.17.1 - diff --git a/gnu/packages/patches/openbabel-fix-crash-on-nwchem-output.patch b/gnu/packages/patches/openbabel-fix-crash-on-nwchem-output.patch deleted file mode 100644 index 879df026a1..0000000000 --- a/gnu/packages/patches/openbabel-fix-crash-on-nwchem-output.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 52cea818bf68f8a2d3c48d55d00c2f8b7da25e4c Mon Sep 17 00:00:00 2001 -From: Daniel Hogan -Date: Tue, 28 Mar 2017 22:21:18 -0600 -Subject: [PATCH] Remove delete statement. - -When from_scratch is true, coordinates is not allocated. A separate if -statement was added to handle the case when from_scratch is true that -does not try to free coordinates. ---- - src/formats/nwchemformat.cpp | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -diff --git a/src/formats/nwchemformat.cpp b/src/formats/nwchemformat.cpp -index 6f625ad5b..79298555f 100644 ---- a/src/formats/nwchemformat.cpp -+++ b/src/formats/nwchemformat.cpp -@@ -232,11 +232,14 @@ static const char* OPTIMIZATION_END_PATTERN = " Optimization converged"; - break; - tokenize(vs,buffer); - } -- if ((from_scratch)||(i != natoms)) -- { -+ if (from_scratch) -+ { -+ return; -+ } -+ if (i != natoms) { - delete[] coordinates; - return; -- } -+ } - molecule->AddConformer(coordinates); - } - diff --git a/gnu/packages/patches/openjdk-14-builtins.patch b/gnu/packages/patches/openjdk-14-builtins.patch deleted file mode 100644 index 0e7e3dcaa9..0000000000 --- a/gnu/packages/patches/openjdk-14-builtins.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- jdk14-bc54620a3848/make/autoconf/basics.m4 2020-02-07 04:40:54.000000000 +1030 -+++ jdk14-bc54620a3848-new/make/autoconf/basics.m4 2020-04-24 10:59:33.056098506 +0930 -@@ -583,7 +583,7 @@ - BASIC_SETUP_TOOL($1, [AC_PATH_PROGS($1, $2, , $3)]) - if test "x[$]$1" = x; then - AC_MSG_NOTICE([Required tool $2 not found in PATH, checking built-in]) -- if help $2 > /dev/null 2>&1; then -+ if command -v $2 > /dev/null 2>&1; then - AC_MSG_NOTICE([Found $2 as shell built-in. Using it]) - $1="$2" - else diff --git a/gnu/packages/patches/openssl-c-rehash-in.patch b/gnu/packages/patches/openssl-c-rehash-in.patch deleted file mode 100644 index bd3d3178f1..0000000000 --- a/gnu/packages/patches/openssl-c-rehash-in.patch +++ /dev/null @@ -1,17 +0,0 @@ -This patch removes the explicit reference to the 'perl' binary, -such that OpenSSL does not retain a reference to Perl. - -The 'c_rehash' program is seldom used, but it is used nonetheless -to create symbolic links to certificates, for instance in the 'nss-certs' -package. - ---- openssl-1.0.2g/tools/c_rehash.in 2015-09-09 18:36:07.313316482 +0200 -+++ openssl-1.0.2g/tools/c_rehash.in 2015-09-09 18:36:28.965458458 +0200 -@@ -1,4 +1,6 @@ --#!/usr/local/bin/perl -+eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}' -+ & eval 'exec perl -wS "$0" $argv:q' -+ if 0; - - # Perl c_rehash script, scan all files in a directory - # and add symbolic links to their hash values. diff --git a/gnu/packages/patches/openssl-runpath.patch b/gnu/packages/patches/openssl-runpath.patch deleted file mode 100644 index fa7c0b9962..0000000000 --- a/gnu/packages/patches/openssl-runpath.patch +++ /dev/null @@ -1,15 +0,0 @@ -This patch makes the build system pass -Wl,-rpath=$out/lib even for -libraries (it already does so for executables, thanks to 'DO_GNU_APP' -in 'Makefile.shared'.) - ---- openssl-1.0.2a/Makefile.shared 2015-04-05 01:07:35.357602454 +0200 -+++ openssl-1.0.2a/Makefile.shared 2015-04-05 01:09:50.474513303 +0200 -@@ -106,7 +106,7 @@ LINK_SO= \ - LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \ - LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \ - LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \ -- $${SHAREDCMD} $${SHAREDFLAGS} \ -+ $${SHAREDCMD} $${SHAREDFLAGS} -Wl,-rpath,$(LIBRPATH) \ - -o $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX \ - $$ALLSYMSFLAGS $$SHOBJECTS $$NOALLSYMSFLAGS $$LIBDEPS \ - ) && $(SYMLINK_SO) diff --git a/gnu/packages/patches/passwordsafe-meson-remove-extra-argument.patch b/gnu/packages/patches/passwordsafe-meson-remove-extra-argument.patch deleted file mode 100644 index 3cb61a364a..0000000000 --- a/gnu/packages/patches/passwordsafe-meson-remove-extra-argument.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/data/meson.build b/data/meson.build -index 46f6373..26a2c18 100644 ---- a/data/meson.build -+++ b/data/meson.build -@@ -35,7 +35,6 @@ if get_option('profile') == 'development' - endif - desktop_conf.set('ICON', application_id) - desktop = i18n.merge_file( -- 'desktop', - input: configure_file( - input: files('org.gnome.PasswordSafe.desktop.in.in'), - output: 'org.gnome.PasswordSafe.desktop.in', -@@ -65,7 +64,6 @@ if get_option('profile') == 'development' - endif - appdata_conf.set('APPID', application_id) - appdata = i18n.merge_file( -- 'appdata', - input: configure_file( - input: files('org.gnome.PasswordSafe.appdata.xml.in.in'), - output: 'org.gnome.PasswordSafe.appdata.xml.in', diff --git a/gnu/packages/patches/patchutils-test-perms.patch b/gnu/packages/patches/patchutils-test-perms.patch deleted file mode 100644 index c7652b9af2..0000000000 --- a/gnu/packages/patches/patchutils-test-perms.patch +++ /dev/null @@ -1,14 +0,0 @@ -Need to mark one of the tests as PHONY to get permissions set correctly on -built scripts. - ---- a/Makefile.in 2011-02-10 09:44:43.000000000 -0600 -+++ b/Makefile.in 2018-11-29 21:52:05.000000000 -0600 -@@ -1106,5 +1108,6 @@ - rm -f $(DESTDIR)$(bindir)/"`echo lsdiff|sed '$(transform)'`" - rm -f $(DESTDIR)$(bindir)/"`echo grepdiff|sed '$(transform)'`" - -+.PHONY: tests/newline1/run-test - tests/newline1/run-test: src/combinediff$(EXEEXT) src/flipdiff$(EXEEXT) \ - src/lsdiff$(EXEEXT) src/grepdiff$(EXEEXT) \ - scripts/splitdiff - diff --git a/gnu/packages/patches/python-CVE-2018-14647.patch b/gnu/packages/patches/python-CVE-2018-14647.patch deleted file mode 100644 index 24f8d21820..0000000000 --- a/gnu/packages/patches/python-CVE-2018-14647.patch +++ /dev/null @@ -1,61 +0,0 @@ -Fix CVE-2018-14647: -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-14647 -https://bugs.python.org/issue34623 - -Taken from upstream: -https://github.com/python/cpython/commit/f7666e828cc3d5873136473ea36ba2013d624fa1 - -diff --git Include/pyexpat.h Include/pyexpat.h -index 44259bf6d7..07020b5dc9 100644 ---- Include/pyexpat.h -+++ Include/pyexpat.h -@@ -3,7 +3,7 @@ - - /* note: you must import expat.h before importing this module! */ - --#define PyExpat_CAPI_MAGIC "pyexpat.expat_CAPI 1.0" -+#define PyExpat_CAPI_MAGIC "pyexpat.expat_CAPI 1.1" - #define PyExpat_CAPSULE_NAME "pyexpat.expat_CAPI" - - struct PyExpat_CAPI -@@ -48,6 +48,8 @@ struct PyExpat_CAPI - enum XML_Status (*SetEncoding)(XML_Parser parser, const XML_Char *encoding); - int (*DefaultUnknownEncodingHandler)( - void *encodingHandlerData, const XML_Char *name, XML_Encoding *info); -+ /* might be none for expat < 2.1.0 */ -+ int (*SetHashSalt)(XML_Parser parser, unsigned long hash_salt); - /* always add new stuff to the end! */ - }; - -diff --git Modules/_elementtree.c Modules/_elementtree.c -index 707ab2912b..53f05f937f 100644 ---- Modules/_elementtree.c -+++ Modules/_elementtree.c -@@ -3261,6 +3261,11 @@ _elementtree_XMLParser___init___impl(XMLParserObject *self, PyObject *html, - PyErr_NoMemory(); - return -1; - } -+ /* expat < 2.1.0 has no XML_SetHashSalt() */ -+ if (EXPAT(SetHashSalt) != NULL) { -+ EXPAT(SetHashSalt)(self->parser, -+ (unsigned long)_Py_HashSecret.expat.hashsalt); -+ } - - if (target) { - Py_INCREF(target); -diff --git Modules/pyexpat.c Modules/pyexpat.c -index 47c3e86c20..aa21d93c11 100644 ---- Modules/pyexpat.c -+++ Modules/pyexpat.c -@@ -1887,6 +1887,11 @@ MODULE_INITFUNC(void) - capi.SetStartDoctypeDeclHandler = XML_SetStartDoctypeDeclHandler; - capi.SetEncoding = XML_SetEncoding; - capi.DefaultUnknownEncodingHandler = PyUnknownEncodingHandler; -+#if XML_COMBINED_VERSION >= 20100 -+ capi.SetHashSalt = XML_SetHashSalt; -+#else -+ capi.SetHashSalt = NULL; -+#endif - - /* export using capsule */ - capi_object = PyCapsule_New(&capi, PyExpat_CAPSULE_NAME, NULL); diff --git a/gnu/packages/patches/python-CVE-2020-26116.patch b/gnu/packages/patches/python-CVE-2020-26116.patch deleted file mode 100644 index dc0571e964..0000000000 --- a/gnu/packages/patches/python-CVE-2020-26116.patch +++ /dev/null @@ -1,47 +0,0 @@ -Fix CVE-2020-26116: - -https://cve.circl.lu/cve/CVE-2020-26116 -https://bugs.python.org/issue39603 - -Taken from upstream (sans test and NEWS update): -https://github.com/python/cpython/commit/668d321476d974c4f51476b33aaca870272523bf - -diff --git a/Lib/http/client.py b/Lib/http/client.py ---- a/Lib/http/client.py -+++ b/Lib/http/client.py -@@ -147,6 +147,10 @@ - # _is_allowed_url_pchars_re = re.compile(r"^[/!$&'()*+,;=:@%a-zA-Z0-9._~-]+$") - # We are more lenient for assumed real world compatibility purposes. - -+# These characters are not allowed within HTTP method names -+# to prevent http header injection. -+_contains_disallowed_method_pchar_re = re.compile('[\x00-\x1f]') -+ - # We always set the Content-Length header for these methods because some - # servers will otherwise respond with a 411 - _METHODS_EXPECTING_BODY = {'PATCH', 'POST', 'PUT'} -@@ -1087,6 +1091,8 @@ def putrequest(self, method, url, skip_host=False, - else: - raise CannotSendRequest(self.__state) - -+ self._validate_method(method) -+ - # Save the method for use later in the response phase - self._method = method - -@@ -1177,6 +1183,15 @@ def _encode_request(self, request): - # ASCII also helps prevent CVE-2019-9740. - return request.encode('ascii') - -+ def _validate_method(self, method): -+ """Validate a method name for putrequest.""" -+ # prevent http header injection -+ match = _contains_disallowed_method_pchar_re.search(method) -+ if match: -+ raise ValueError( -+ f"method can't contain control characters. {method!r} " -+ f"(found at least {match.group()!r})") -+ - def _validate_path(self, url): - """Validate a url for putrequest.""" - # Prevent CVE-2019-9740. diff --git a/gnu/packages/patches/python-axolotl-AES-fix.patch b/gnu/packages/patches/python-axolotl-AES-fix.patch deleted file mode 100644 index d34f4855cb..0000000000 --- a/gnu/packages/patches/python-axolotl-AES-fix.patch +++ /dev/null @@ -1,24 +0,0 @@ -Patch taken from the Debian package for python-axolotl-0.1.39. -See . - -Description: Removes IV paramenter from AES constructor, since it is not necessary for ctr mode. -Author: Josue Ortega -Last-Update: 2017-04-13 - ---- a/axolotl/sessioncipher.py -+++ b/axolotl/sessioncipher.py -@@ -228,13 +228,7 @@ - # counterint = struct.unpack(">L", counterbytes)[0] - # counterint = int.from_bytes(counterbytes, byteorder='big') - ctr = Counter.new(128, initial_value=counter) -- -- # cipher = AES.new(key, AES.MODE_CTR, counter=ctr) -- ivBytes = bytearray(16) -- ByteUtil.intToByteArray(ivBytes, 0, counter) -- -- cipher = AES.new(key, AES.MODE_CTR, IV=bytes(ivBytes), counter=ctr) -- -+ cipher = AES.new(key, AES.MODE_CTR, counter=ctr) - return cipher - - diff --git a/gnu/packages/patches/python-babel-fix-parse-future-test.patch b/gnu/packages/patches/python-babel-fix-parse-future-test.patch deleted file mode 100644 index 8a90166ec5..0000000000 --- a/gnu/packages/patches/python-babel-fix-parse-future-test.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 7bdaa28a55e8d8228d5434effa4b1473ab7b3669 Mon Sep 17 00:00:00 2001 -From: Felix Schwarz -Date: Tue, 5 May 2020 08:05:56 +0000 -Subject: [PATCH] fix tests when using Python 3.9a6 - -In Python 3.9a6 integer values for future flags were changed to prevent -collision with compiler flags. We need to retrieve these at runtime so -the test suite works with Python <= 3.8 as well as Python 3.9. ---- - tests/test_util.py | 17 ++++++++++++----- - 1 file changed, 12 insertions(+), 5 deletions(-) - -diff --git a/tests/test_util.py b/tests/test_util.py -index a6a4450c..b9343aaa 100644 ---- a/tests/test_util.py -+++ b/tests/test_util.py -@@ -11,6 +11,7 @@ - # individuals. For the exact contribution history, see the revision - # history and logs, available at http://babel.edgewall.org/log/. - -+import __future__ - import unittest - - import pytest -@@ -20,6 +21,12 @@ - from babel.util import parse_future_flags - - -+class _FF: -+ division = __future__.division.compiler_flag -+ print_function = __future__.print_function.compiler_flag -+ with_statement = __future__.with_statement.compiler_flag -+ unicode_literals = __future__.unicode_literals.compiler_flag -+ - def test_distinct(): - assert list(util.distinct([1, 2, 1, 3, 4, 4])) == [1, 2, 3, 4] - assert list(util.distinct('foobar')) == ['f', 'o', 'b', 'a', 'r'] -@@ -70,25 +77,25 @@ def test_parse_encoding_non_ascii(): - from __future__ import print_function, - division, with_statement, - unicode_literals --''', 0x10000 | 0x2000 | 0x8000 | 0x20000), -+''', _FF.print_function | _FF.division | _FF.with_statement | _FF.unicode_literals), - (''' - from __future__ import print_function, division - print('hello') --''', 0x10000 | 0x2000), -+''', _FF.print_function | _FF.division), - (''' - from __future__ import print_function, division, unknown,,,,, - print 'hello' --''', 0x10000 | 0x2000), -+''', _FF.print_function | _FF.division), - (''' - from __future__ import ( - print_function, - division) --''', 0x10000 | 0x2000), -+''', _FF.print_function | _FF.division), - (''' - from __future__ import \\ - print_function, \\ - division --''', 0x10000 | 0x2000), -+''', _FF.print_function | _FF.division), - ]) - def test_parse_future(source, result): - fp = BytesIO(source.encode('latin-1')) diff --git a/gnu/packages/patches/python-matplotlib-run-under-wayland-gtk3.patch b/gnu/packages/patches/python-matplotlib-run-under-wayland-gtk3.patch deleted file mode 100644 index 6f067763b5..0000000000 --- a/gnu/packages/patches/python-matplotlib-run-under-wayland-gtk3.patch +++ /dev/null @@ -1,31 +0,0 @@ -From: Tobias Geerinckx-Rice -Date: Tue, 02 Mar 2021 18:04:33 +0100 -Subject: [PATCH] gnu: python-matplotlib: Run under Wayland with GTK3. - -Adopted from upstream's fix[0] for -. - -[0]: https://github.com/liuyun88/matplotlib/commit/3d5000463bd23cb046681220f5511f07743f7d82 - ---- -diff -Naur a/lib/matplotlib/backends/backend_gtk3.py b/lib/matplotlib/backends/backend_gtk3.py ---- a/lib/matplotlib/backends/backend_gtk3.py 2019-11-21 23:47:05.000000000 +0100 -+++ b/lib/matplotlib/backends/backend_gtk3.py 2021-03-02 18:00:57.479929766 +0100 -@@ -42,11 +42,12 @@ - - try: -+ _display = Gdk.Display.get_default() - cursord = { -- cursors.MOVE : Gdk.Cursor.new(Gdk.CursorType.FLEUR), -- cursors.HAND : Gdk.Cursor.new(Gdk.CursorType.HAND2), -- cursors.POINTER : Gdk.Cursor.new(Gdk.CursorType.LEFT_PTR), -- cursors.SELECT_REGION : Gdk.Cursor.new(Gdk.CursorType.TCROSS), -- cursors.WAIT : Gdk.Cursor.new(Gdk.CursorType.WATCH), -+ cursors.MOVE : Gdk.Cursor.new_from_name(_display, "move"), -+ cursors.HAND : Gdk.Cursor.new_from_name(_display, "pointer"), -+ cursors.POINTER : Gdk.Cursor.new_from_name(_display, "default"), -+ cursors.SELECT_REGION : Gdk.Cursor.new_from_name(_display, "crosshair"), -+ cursors.WAIT : Gdk.Cursor.new_from_name(_display, "wait"), - } - except TypeError as exc: - # Happens when running headless. Convert to ImportError to cooperate with diff --git a/gnu/packages/patches/python-pytest-asyncio-python-3.8.patch b/gnu/packages/patches/python-pytest-asyncio-python-3.8.patch deleted file mode 100644 index 519f92c047..0000000000 --- a/gnu/packages/patches/python-pytest-asyncio-python-3.8.patch +++ /dev/null @@ -1,238 +0,0 @@ -# Modified to apply on 0.10.0. - -From c7a111180b3f35f2fe5a07ead185e4e792f9dfa0 Mon Sep 17 00:00:00 2001 -From: Andrew Svetlov -Date: Thu, 9 Apr 2020 08:44:46 +0200 -Subject: [PATCH] Test on Python 3.8, drop 3.3 and 3.4 - ---- - .travis.yml | 7 +++--- - setup.py | 1 + - tests/conftest.py | 2 +- - tests/test_hypothesis_integration.py | 2 +- - tests/test_simple.py | 32 +++++++++++----------------- - tests/test_simple_35.py | 17 ++++++--------- - tests/test_subprocess.py | 6 ++---- - tox.ini | 5 +++-- - 8 files changed, 29 insertions(+), 43 deletions(-) - -diff --git a/.travis.yml b/.travis.yml -index fe90234..b93377a 100644 ---- a/.travis.yml -+++ b/.travis.yml -@@ -1,4 +1,5 @@ - language: python -+ - matrix: - include: - - python: 3.5 -@@ -7,10 +8,8 @@ matrix: - env: TOX_ENV=py36 - - python: 3.7 - env: TOX_ENV=py37 -- # TODO: the dist and sudo keys are currently needed to use Python 3.7. -- # They should be removed once Travis-CI supports 3.7 on the default image. -- dist: xenial -- sudo: true -+ - python: 3.8 -+ env: TOX_ENV=py38 - - install: pip install tox-travis coveralls - -diff --git a/setup.py b/setup.py -index 18566bf..6175711 100644 ---- a/setup.py -+++ b/setup.py -@@ -36,6 +36,7 @@ def find_version(): - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", -+ "Programming Language :: Python :: 3.8", - "Topic :: Software Development :: Testing", - "Framework :: Pytest", - ], -diff --git a/tests/conftest.py b/tests/conftest.py -index 6203cf8..cc2ec16 100644 ---- a/tests/conftest.py -+++ b/tests/conftest.py -@@ -17,7 +17,7 @@ def dependent_fixture(event_loop): - async def just_a_sleep(): - """Just sleep a little while.""" - nonlocal event_loop -- await asyncio.sleep(0.1, loop=event_loop) -+ await asyncio.sleep(0.1) - nonlocal counter - counter += 1 - -diff --git a/tests/test_simple.py b/tests/test_simple.py -index 1627139..00c07fc 100644 ---- a/tests/test_simple.py -+++ b/tests/test_simple.py -@@ -1,28 +1,26 @@ - """Quick'n'dirty unit tests for provided fixtures and markers.""" - import asyncio --import os - import pytest - - import pytest_asyncio.plugin - - --async def async_coro(loop=None): -- """A very simple coroutine.""" -- await asyncio.sleep(0, loop=loop) -+async def async_coro(): -+ await asyncio.sleep(0) - return 'ok' - - - def test_event_loop_fixture(event_loop): - """Test the injection of the event_loop fixture.""" - assert event_loop -- ret = event_loop.run_until_complete(async_coro(event_loop)) -+ ret = event_loop.run_until_complete(async_coro()) - assert ret == 'ok' - - - @pytest.mark.asyncio --def test_asyncio_marker(): -+async def test_asyncio_marker(): - """Test the asyncio pytest marker.""" -- yield # sleep(0) -+ await asyncio.sleep(0) - - - @pytest.mark.xfail(reason='need a failure', strict=True) -@@ -45,13 +43,11 @@ async def closer(_, writer): - writer.close() - - server1 = await asyncio.start_server(closer, host='localhost', -- port=unused_tcp_port, -- loop=event_loop) -+ port=unused_tcp_port) - - with pytest.raises(IOError): - await asyncio.start_server(closer, host='localhost', -- port=unused_tcp_port, -- loop=event_loop) -+ port=unused_tcp_port) - - server1.close() - await server1.wait_closed() -@@ -68,20 +64,16 @@ async def closer(_, writer): - unused_tcp_port_factory()) - - server1 = await asyncio.start_server(closer, host='localhost', -- port=port1, -- loop=event_loop) -+ port=port1) - server2 = await asyncio.start_server(closer, host='localhost', -- port=port2, -- loop=event_loop) -+ port=port2) - server3 = await asyncio.start_server(closer, host='localhost', -- port=port3, -- loop=event_loop) -+ port=port3) - - for port in port1, port2, port3: - with pytest.raises(IOError): - await asyncio.start_server(closer, host='localhost', -- port=port, -- loop=event_loop) -+ port=port) - - server1.close() - await server1.wait_closed() -@@ -117,7 +109,7 @@ class Test: - @pytest.mark.asyncio - async def test_asyncio_marker_method(self, event_loop): - """Test the asyncio pytest marker in a Test class.""" -- ret = await async_coro(event_loop) -+ ret = await async_coro() - assert ret == 'ok' - - -diff --git a/tests/test_simple_35.py b/tests/test_simple_35.py -index 1e4d697..4141fb0 100644 ---- a/tests/test_simple_35.py -+++ b/tests/test_simple_35.py -@@ -6,7 +6,7 @@ - - @pytest.mark.asyncio - async def async_coro(loop): -- await asyncio.sleep(0, loop=loop) -+ await asyncio.sleep(0) - return 'ok' - - -@@ -27,8 +27,7 @@ async def closer(_, writer): - writer.close() - - server1 = await asyncio.start_server(closer, host='localhost', -- port=unused_tcp_port, -- loop=event_loop) -+ port=unused_tcp_port) - - server1.close() - await server1.wait_closed() -@@ -45,20 +44,16 @@ async def closer(_, writer): - - async def run_test(): - server1 = await asyncio.start_server(closer, host='localhost', -- port=port1, -- loop=event_loop) -+ port=port1) - server2 = await asyncio.start_server(closer, host='localhost', -- port=port2, -- loop=event_loop) -+ port=port2) - server3 = await asyncio.start_server(closer, host='localhost', -- port=port3, -- loop=event_loop) -+ port=port3) - - for port in port1, port2, port3: - with pytest.raises(IOError): - await asyncio.start_server(closer, host='localhost', -- port=port, -- loop=event_loop) -+ port=port) - - server1.close() - await server1.wait_closed() -diff --git a/tests/test_subprocess.py b/tests/test_subprocess.py -index 83490e8..069c6c2 100644 ---- a/tests/test_subprocess.py -+++ b/tests/test_subprocess.py -@@ -21,8 +21,7 @@ def event_loop(): - async def test_subprocess(event_loop): - """Starting a subprocess should be possible.""" - proc = await asyncio.subprocess.create_subprocess_exec( -- sys.executable, '--version', stdout=asyncio.subprocess.PIPE, -- loop=event_loop) -+ sys.executable, '--version', stdout=asyncio.subprocess.PIPE) - await proc.communicate() - - -@@ -30,6 +29,5 @@ async def test_subprocess(event_loop): - async def test_subprocess_forbid(event_loop): - """Starting a subprocess should be possible.""" - proc = await asyncio.subprocess.create_subprocess_exec( -- sys.executable, '--version', stdout=asyncio.subprocess.PIPE, -- loop=event_loop) -+ sys.executable, '--version', stdout=asyncio.subprocess.PIPE) - await proc.communicate() -diff --git a/tox.ini b/tox.ini -index 13d5155..eed6fb6 100644 ---- a/tox.ini -+++ b/tox.ini -@@ -1,6 +1,7 @@ - [tox] --envlist = py35, py36, py37 --minversion = 2.5.0 -+minversion = 3.14.0 -+envlist = py35, py36, py37, py38 -+skip_missing_interpreters = true - - [testenv] - extras = testing diff --git a/gnu/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch b/gnu/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch deleted file mode 100644 index f1db5d7c3b..0000000000 --- a/gnu/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch +++ /dev/null @@ -1,29 +0,0 @@ -From ca548da9ba78ddee90779051210e3e89185e4f7d Mon Sep 17 00:00:00 2001 -From: Michel Alexandre Salim -Date: Mon, 15 Feb 2016 23:03:42 +0700 -Subject: coverage-4.0a6 compatibility - -coverage 4.0a6 no longer generates .coverage file, so use -f when -deleting .coverage to ensure deletion does not fail. ---- - Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -(limited to 'Makefile') - -diff --git a/Makefile b/Makefile -index 7818f57..362c07f 100644 ---- a/Makefile -+++ b/Makefile -@@ -23,7 +23,7 @@ fsck-larch.1: fsck-larch.1.in fsck-larch - - check: - python -m CoverageTestRunner --ignore-missing-from=without-tests -- rm .coverage -+ rm -f .coverage - ./insert-remove-test tempdir 100 - rm -r tempdir larch.log - cmdtest tests --- -cgit v1.1 - diff --git a/gnu/packages/patches/qt4-ldflags.patch b/gnu/packages/patches/qt4-ldflags.patch deleted file mode 100644 index 0d6398018a..0000000000 --- a/gnu/packages/patches/qt4-ldflags.patch +++ /dev/null @@ -1,18 +0,0 @@ -Explicitly link against libicui18n so that libQtCore.so always finds it. - ---- qt-everywhere-opensource-src-4.8.6/src/corelib/corelib.pro 2015-04-15 12:01:41.661862663 +0200 -+++ qt-everywhere-opensource-src-4.8.6/src/corelib/corelib.pro 2015-04-15 12:03:57.954586336 +0200 -@@ -19,6 +19,13 @@ include(codecs/codecs.pri) - include(statemachine/statemachine.pri) - include(xml/xml.pri) - -+# Explicitly link with icui18n, which is dlopened by libQtCore.so. -+# We cannot do this by setting LDFLAGS because that then overrides -+# other LDFLAGS: . -+# XXX: According to the Nixpkgs recipe, this may be necessary for -+# further libraries (cups, gtk-x11-2.0, libgdk-x11-2.0). -+LIBS_PRIVATE += -licui18n -+ - !qpa:mac|darwin:LIBS_PRIVATE += -framework ApplicationServices - qpa:mac { - !ios { diff --git a/gnu/packages/patches/rust-coresimd-doctest.patch b/gnu/packages/patches/rust-coresimd-doctest.patch deleted file mode 100644 index bfa0ab224b..0000000000 --- a/gnu/packages/patches/rust-coresimd-doctest.patch +++ /dev/null @@ -1,21 +0,0 @@ -Doctest coresimd::x86::__m256 failed on processors withouth "avx" feature. -Backported patch with changes from https://github.com/rust-lang-nursery/stdsimd/issues/481 - ---- rustc-1.26.2-src-orig/src/stdsimd/coresimd/x86/mod.rs 1970-01-01 05:00:00.000000000 +0500 -+++ rustc-1.26.2-src/src/stdsimd/coresimd/x86/mod.rs 2018-06-22 00:01:55.142026720 +0500 -@@ -293,13 +293,13 @@ - /// use std::arch::x86_64::*; - /// - /// # fn main() { -- /// # #[target_feature(enable = "sse")] -+ /// # #[target_feature(enable = "avx")] - /// # unsafe fn foo() { - /// let eight_zeros = _mm256_setzero_ps(); - /// let eight_ones = _mm256_set1_ps(1.0); - /// let eight_floats = _mm256_set_ps(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0); - /// # } -- /// # if is_x86_feature_detected!("sse") { unsafe { foo() } } -+ /// # if is_x86_feature_detected!("avx") { unsafe { foo() } } - /// # } - /// ``` - pub struct __m256(f32, f32, f32, f32, f32, f32, f32, f32); diff --git a/gnu/packages/patches/streamlink-update-test.patch b/gnu/packages/patches/streamlink-update-test.patch deleted file mode 100644 index 2d90009192..0000000000 --- a/gnu/packages/patches/streamlink-update-test.patch +++ /dev/null @@ -1,70 +0,0 @@ -https://github.com/streamlink/streamlink/commit/a3123346824ee7b9c461110f292ea6987ea9a78d.patch -This is taken from upstream, and can be removed at the next release - -From c6f3994e177a42792238f2edd07ba9053c10abc9 Mon Sep 17 00:00:00 2001 -From: back-to -Date: Sat, 21 Jul 2018 14:30:51 +0200 -Subject: [PATCH] tests.localization: use en_CA instead of en_US for - test_equivalent - -**python-iso3166** got an update which breaks the Streamlink tests. -https://pypi.org/project/iso3166/#history - -**python-iso3166** and **pycountry** have now a different `name` for _the United States of America_ - -> python-iso3166: United States of America -https://github.com/deactivated/python-iso3166/commit/e5f8b37f18b01fcb5fa0e8130d8296fc7a7b5a9f - -> pycountry: United States -https://bitbucket.org/flyingcircus/pycountry/src/5aa4bb47e33798cb631a81521b7b5b18f7d6c919/src/pycountry/databases/iso3166-1.json?at=default&fileviewer=file-view-default#iso3166-1.json-1572:1578 - -https://www.iso.org/obp/ui/#iso:code:3166:US - ---- - -use **en_CA** instead of **en_US** for backwards compatibility, -as changing the **US** name would fail with older versions of **python-iso3166** / **pycountry** ---- - tests/test_localization.py | 13 +++++++------ - 1 file changed, 7 insertions(+), 6 deletions(-) - -diff --git a/tests/test_localization.py b/tests/test_localization.py -index 0b81ae591..90bb3ac31 100644 ---- a/tests/test_localization.py -+++ b/tests/test_localization.py -@@ -32,11 +32,12 @@ def test_bad_language_code(self): - self.assertRaises(LookupError, l10n.Localization, "enUS") - - def test_equivalent(self): -- l = l10n.Localization("en_US") -+ l = l10n.Localization("en_CA") - self.assertTrue(l.equivalent(language="eng")) - self.assertTrue(l.equivalent(language="en")) -- self.assertTrue(l.equivalent(language="en", country="US")) -- self.assertTrue(l.equivalent(language="en", country="United States")) -+ self.assertTrue(l.equivalent(language="en", country="CA")) -+ self.assertTrue(l.equivalent(language="en", country="CAN")) -+ self.assertTrue(l.equivalent(language="en", country="Canada")) - - def test_equivalent_remap(self): - l = l10n.Localization("fr_FR") -@@ -48,7 +49,7 @@ def test_not_equivalent(self): - self.assertFalse(l.equivalent(language="eng")) - self.assertFalse(l.equivalent(language="en")) - self.assertFalse(l.equivalent(language="en", country="US")) -- self.assertFalse(l.equivalent(language="en", country="United States")) -+ self.assertFalse(l.equivalent(language="en", country="Canada")) - self.assertFalse(l.equivalent(language="en", country="ES")) - self.assertFalse(l.equivalent(language="en", country="Spain")) - -@@ -71,8 +72,8 @@ def test_get_country(self): - l10n.Localization.get_country("USA").alpha2) - self.assertEqual("GB", - l10n.Localization.get_country("GB").alpha2) -- self.assertEqual("United States", -- l10n.Localization.get_country("United States").name) -+ self.assertEqual("Canada", -+ l10n.Localization.get_country("Canada").name) - - def test_get_country_miss(self): - self.assertRaises(LookupError, l10n.Localization.get_country, "XE") diff --git a/gnu/packages/patches/tcc-boot-0.9.27.patch b/gnu/packages/patches/tcc-boot-0.9.27.patch deleted file mode 100644 index 6f9d365788..0000000000 --- a/gnu/packages/patches/tcc-boot-0.9.27.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 1431ba3a99582e4c3d2693ac37e57f361858affd Mon Sep 17 00:00:00 2001 -From: Jan Nieuwenhuizen -Date: Mon, 11 Jun 2018 18:39:44 +0200 -Subject: [PATCH] bootstrappable: Force static link. - ---- - libtcc.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/libtcc.c b/libtcc.c -index 3448f44..02ab850 100644 ---- a/libtcc.c -+++ b/libtcc.c -@@ -735,6 +735,9 @@ LIBTCCAPI TCCState *tcc_new(void) - tcc_state = s; - ++nb_states; - -+#if BOOTSTRAP -+ s->static_link = 1; -+#endif - s->alacarte_link = 1; - s->nocommon = 1; - s->warn_implicit_function_declaration = 1; --- -2.16.2 - diff --git a/gnu/packages/patches/vtk-8-fix-freetypetools-build-failure.patch b/gnu/packages/patches/vtk-8-fix-freetypetools-build-failure.patch deleted file mode 100644 index 6988e65872..0000000000 --- a/gnu/packages/patches/vtk-8-fix-freetypetools-build-failure.patch +++ /dev/null @@ -1,36 +0,0 @@ -This fixes a build failure in VTK when building against recent versions -of freetype. - - https://gitlab.kitware.com/vtk/vtk/-/merge_requests/7432 - -Patch by Ben Boeckel - -Subject: [PATCH] vtkFreeTypeTools: avoid using an internal macro - -This macro has been removed upstream as it was always intended to be -private. ---- - Rendering/FreeType/vtkFreeTypeTools.cxx | 7 ++----- - 1 file changed, 2 insertions(+), 5 deletions(-) - -diff --git a/Rendering/FreeType/vtkFreeTypeTools.cxx b/Rendering/FreeType/vtkFreeTypeTools.cxx -index c54289dc60..03b899c4da 100644 ---- a/Rendering/FreeType/vtkFreeTypeTools.cxx -+++ b/Rendering/FreeType/vtkFreeTypeTools.cxx -@@ -387,11 +387,8 @@ FTC_CMapCache* vtkFreeTypeTools::GetCMapCache() - } - - //---------------------------------------------------------------------------- --FT_CALLBACK_DEF(FT_Error) --vtkFreeTypeToolsFaceRequester(FTC_FaceID face_id, -- FT_Library lib, -- FT_Pointer request_data, -- FT_Face* face) -+static FT_Error vtkFreeTypeToolsFaceRequester( -+ FTC_FaceID face_id, FT_Library lib, FT_Pointer request_data, FT_Face* face) - { - #if VTK_FTFC_DEBUG_CD - printf("vtkFreeTypeToolsFaceRequester()\n"); --- -2.30.1 - -- cgit v1.2.3 From b3d7eae08ee71674ebcf6c6dc5ef575f35493240 Mon Sep 17 00:00:00 2001 From: Maxime Devos Date: Thu, 17 Feb 2022 14:51:13 +0000 Subject: gnu: upower: Update to 0.99.15. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Upstream has removed the Autotools build system and now only supports Meson, so the build system has been changed to 'meson-build-system'. The patch 'power-builddir.patch' has to be replaced to adjust to the switch to Meson. This has been done by adding an origin snippet. The origin snippet has been simplified, and for consistency, it has been made a gexp. Some dependencies were Autotools-only and could be removed. * gnu/packages/gnome.scm (upower): Update to 0.99.15. Signed-off-by: Ludovic Courtès --- gnu/local.mk | 1 - gnu/packages/gnome.scm | 67 +++++++++++++++--------------- gnu/packages/patches/upower-builddir.patch | 34 --------------- 3 files changed, 33 insertions(+), 69 deletions(-) delete mode 100644 gnu/packages/patches/upower-builddir.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 1252643dc0..433467ee39 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1914,7 +1914,6 @@ dist_patch_DATA = \ %D%/packages/patches/util-linux-tests.patch \ %D%/packages/patches/util-linux-CVE-2021-3995.patch \ %D%/packages/patches/util-linux-CVE-2021-3996.patch \ - %D%/packages/patches/upower-builddir.patch \ %D%/packages/patches/valgrind-enable-arm.patch \ %D%/packages/patches/vboot-utils-fix-format-load-address.patch \ %D%/packages/patches/vboot-utils-fix-tests-show-contents.patch \ diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 4e44145ed8..e7eac10a80 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -62,7 +62,7 @@ ;;; Copyright © 2021 Solene Rapenne ;;; Copyright © 2021, 2022 Guillaume Le Vaillant ;;; Copyright © 2021 Felix Gruber -;;; Copyright © 2021 Maxime Devos +;;; Copyright © 2021, 2022 Maxime Devos ;;; Copyright © 2021 Josselin Poiret ;;; Copyright © 2021 Mathieu Othacehe ;;; Copyright © 2022 Daniel Meißner @@ -5437,55 +5437,54 @@ faster results and to avoid unnecessary server load.") (define-public upower (package (name "upower") - (version "0.99.13") + (version "0.99.15") (source (origin (method git-fetch) (uri (git-reference (url "https://gitlab.freedesktop.org/upower/upower") - (commit (string-append "UPOWER_" - (string-map (match-lambda (#\. #\_) - (chr chr)) - version))))) + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0khwg6jpq81dcylkpi7cn75bjzif0q9qscwvirrk41krma23iddj")) - (patches (search-patches "upower-builddir.patch")) + (base32 "1zk7w7pw8dhlnxhxzcbk33gmxmg8f32mppd67556v9z2qgcg4lhs")) (modules '((guix build utils))) (snippet - '(begin - ;; Upstream commit - ;; - ;; moved 'dbus-1/system.d' from etc/ to share/. However, - ;; 'dbus-configuration-directory' in (gnu services dbus) - ;; expects it in etc/. Thus, move it back to its previous - ;; location. - (substitute* "src/Makefile.am" - (("^dbusconfdir =.*$") - "dbusconfdir = $(sysconfdir)/dbus-1/system.d\n")))))) - (build-system glib-or-gtk-build-system) + ;; Upstream commit + ;; + ;; moved 'dbus-1/system.d' from etc/ to share/. However, + ;; 'dbus-configuration-directory' in (gnu services dbus) + ;; expects it in etc/. Thus, move it back to its previous + ;; location. + #~(substitute* "src/meson.build" + (("dbusdir / 'system.d'") + "get_option('sysconfdir') / 'dbus-1/system.d'") + ;; Avoid writing to /var during the build, this is + ;; not possible in Guix! + (("^install_subdir\\('does-not-exist'.*$") ""))))) + (build-system meson-build-system) (arguments - '(#:phases - (modify-phases %standard-phases - (add-before 'check 'pre-check - (lambda* (#:key inputs #:allow-other-keys) - (let ((umockdev (string-append (assoc-ref inputs "umockdev") - "/lib"))) - (setenv "LD_LIBRARY_PATH" umockdev))))) - #:configure-flags (list "--localstatedir=/var" - (string-append "--with-udevrulesdir=" - (assoc-ref %outputs "out") - "/lib/udev/rules.d")))) + (list + #:glib-or-gtk? #t + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'pre-check + (lambda* (#:key inputs #:allow-other-keys) + (let ((umockdev (string-append (assoc-ref inputs "umockdev") + "/lib"))) + (setenv "LD_LIBRARY_PATH" umockdev))))) + #:configure-flags + #~(list "-Dsystemdsystemunitdir=no" + ;; If not specified, udev will try putting history information + ;; in /gnu/store. + "-Dhistorydir=/var/lib/upower" + (string-append "-Dudevrulesdir=" #$output "/bin/udev/rules.d")))) (native-inputs - (list autoconf - automake + (list `(,glib "bin") ; for gdbus-codegen gobject-introspection gtk-doc intltool - libtool pkg-config python - which ; for ./autogen.sh ;; For tests. python-dbus python-dbusmock diff --git a/gnu/packages/patches/upower-builddir.patch b/gnu/packages/patches/upower-builddir.patch deleted file mode 100644 index a61d387faf..0000000000 --- a/gnu/packages/patches/upower-builddir.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 27ae011b31d831752b97eb209bc2b2206fcf40f7 Mon Sep 17 00:00:00 2001 -From: Tobias Geerinckx-Rice -Date: Mon, 28 Jun 2021 11:58:47 +0200 -Subject: [PATCH] gnu: upower: Fix build directory. - -Remove explicit set of UPOWER_CONF_FILE_NAME in up-self-test.c; -instead the harness should set it. In Guix we set it explicitly; the -right thing is to use AM_TEST_ENVIRONMENT and regenerate the -makefiles, but we can't regenerate because current autotools carp on -some things, so we patch the Makefile.in instead. - -Also fix to not try to create /var/lib/upower if /var isn't writable. - -Based on a patch by Andy Wingo ---- - src/Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/Makefile.am b/src/Makefile.am -index 3400139..f51ee89 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -181,7 +181,7 @@ $(systemdservice_DATA): $(systemdservice_in_files) Makefile - endif - - install-data-hook: -- if test -w $(DESTDIR)$(prefix)/; then \ -+ if test -w $(DESTDIR)$(localstatedir)/; then \ - mkdir -p $(DESTDIR)$(historydir); \ - fi - --- -2.32.0 - -- cgit v1.2.3 From 21fe2ad405412ffed4d602c414aa1aeebbeb1a44 Mon Sep 17 00:00:00 2001 From: Brendan Tildesley Date: Sat, 19 Feb 2022 00:08:05 +0100 Subject: gnu: calibre: Update to 5.36.0. * gnu/packages/ebook.scm (calibre): Update to 5.36.0. Remove no longer needed zeroconf patch. [inputs]: Remove python-dbus, python-dukpy, python-pycryptodome. Add python-jeepney, libstemmer. * gnu/packages/patches/calibre-fix-zeroconf.patch: Delete patch. * gnu/local.mk: Remove reference to patch. Signed-off-by: Nicolas Goaziou --- gnu/local.mk | 1 - gnu/packages/ebook.scm | 13 ++++----- gnu/packages/patches/calibre-fix-zeroconf.patch | 38 ------------------------- 3 files changed, 6 insertions(+), 46 deletions(-) delete mode 100644 gnu/packages/patches/calibre-fix-zeroconf.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 433467ee39..7e781d8126 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -921,7 +921,6 @@ dist_patch_DATA = \ %D%/packages/patches/cabal-install-ghc8.10.patch \ %D%/packages/patches/cairo-CVE-2018-19876.patch \ %D%/packages/patches/cairo-CVE-2020-35492.patch \ - %D%/packages/patches/calibre-fix-zeroconf.patch \ %D%/packages/patches/calibre-no-updates-dialog.patch \ %D%/packages/patches/calibre-remove-test-sqlite.patch \ %D%/packages/patches/calibre-remove-test-unrar.patch \ diff --git a/gnu/packages/ebook.scm b/gnu/packages/ebook.scm index 24cce8525e..7c97245092 100644 --- a/gnu/packages/ebook.scm +++ b/gnu/packages/ebook.scm @@ -57,6 +57,7 @@ #:use-module (gnu packages icu4c) #:use-module (gnu packages image) #:use-module (gnu packages javascript) + #:use-module (gnu packages language) #:use-module (gnu packages libusb) #:use-module (gnu packages libreoffice) #:use-module (gnu packages music) @@ -121,7 +122,7 @@ with Microsoft Compiled HTML (CHM) files") (define-public calibre (package (name "calibre") - (version "5.21.0") + (version "5.36.0") (source (origin (method url-fetch) @@ -130,7 +131,7 @@ with Microsoft Compiled HTML (CHM) files") version ".tar.xz")) (sha256 (base32 - "0mq2w8blq6ykaml812axakwkqcw85qcpfwijdikn7kvbrhnnp2s5")) + "1c036qmn7lxq0899c2xzzs6whz7z0557frnfqisbvfxa13b2sadk")) (modules '((guix build utils))) (snippet '(begin @@ -146,8 +147,7 @@ with Microsoft Compiled HTML (CHM) files") (delete-file "resources/calibre-portable.bat") (delete-file "resources/calibre-portable.sh") #t)) - (patches (search-patches "calibre-fix-zeroconf.patch" - "calibre-no-updates-dialog.patch" + (patches (search-patches "calibre-no-updates-dialog.patch" "calibre-remove-test-sqlite.patch" ; TODO: fix test. "calibre-remove-test-unrar.patch")))) (build-system python-build-system) @@ -168,6 +168,7 @@ with Microsoft Compiled HTML (CHM) files") ("libpng" ,libpng) ("libjpeg" ,libjpeg-turbo) ("libjxr" ,libjxr) + ("libstemmer" ,libstemmer) ("libusb" ,libusb) ("openssl" ,openssl) ("optipng" ,optipng) @@ -179,13 +180,12 @@ with Microsoft Compiled HTML (CHM) files") ("python-css-parser" ,python-css-parser) ("python-cssselect" ,python-cssselect) ("python-dateutil" ,python-dateutil) - ("python-dbus" ,python-dbus) ("python-dnspython" ,python-dnspython-1.16) - ("python-dukpy" ,python-dukpy) ("python-feedparser" ,python-feedparser) ("python-html2text" ,python-html2text) ("python-html5-parser" ,python-html5-parser) ("python-html5lib" ,python-html5lib) + ("python-jeepney" ,python-jeepney) ("python-lxml" ,python-lxml) ("python-markdown" ,python-markdown) ("python-mechanize" ,python-mechanize) @@ -197,7 +197,6 @@ with Microsoft Compiled HTML (CHM) files") ("python-psutil" ,python-psutil) ("python-py7zr" ,python-py7zr) ("python-pychm" ,python-pychm) - ("python-pycryptodome" ,python-pycryptodome) ("python-pygments" ,python-pygments) ("python-pyqt-without-qtwebkit" ,python-pyqt-without-qtwebkit) ("python-pyqtwebengine" ,python-pyqtwebengine) diff --git a/gnu/packages/patches/calibre-fix-zeroconf.patch b/gnu/packages/patches/calibre-fix-zeroconf.patch deleted file mode 100644 index d7d0f18667..0000000000 --- a/gnu/packages/patches/calibre-fix-zeroconf.patch +++ /dev/null @@ -1,38 +0,0 @@ -Fix a build failure when upgrading zeroconf from 0.28.8 to 0.38.1: - -https://issues.guix.gnu.org/53247 - -Patch copied from Gentoo: - -https://bugs.gentoo.org/800233#c5 - -diff --color -Naru a/src/calibre/devices/smart_device_app/driver.py b/src/calibre/devices/smart_device_app/driver.py ---- a/src/calibre/devices/smart_device_app/driver.py 2021-08-08 08:32:03.104016444 +0200 -+++ b/src/calibre/devices/smart_device_app/driver.py 2021-08-08 08:33:30.699018403 +0200 -@@ -2040,13 +2040,6 @@ - # Function to monkeypatch zeroconf to remove the 15 character name length restriction. - # Copied from https://github.com/jstasiak/python-zeroconf version 0.28.1 - -- --from zeroconf import (BadTypeInNameException, _HAS_A_TO_Z, -- _HAS_ONLY_A_TO_Z_NUM_HYPHEN_UNDERSCORE, -- _HAS_ASCII_CONTROL_CHARS, -- _HAS_ONLY_A_TO_Z_NUM_HYPHEN) -- -- - def service_type_name(type_: str, *, allow_underscores: bool = False) -> str: - """ - Validate a fully qualified service name, instance or subtype. [rfc6763] -@@ -2087,6 +2080,12 @@ - :param type_: Type, SubType or service name to validate - :return: fully qualified service name (eg: _http._tcp.local.) - """ -+ -+ from zeroconf import (BadTypeInNameException, _HAS_A_TO_Z, -+ _HAS_ONLY_A_TO_Z_NUM_HYPHEN_UNDERSCORE, -+ _HAS_ASCII_CONTROL_CHARS, -+ _HAS_ONLY_A_TO_Z_NUM_HYPHEN) -+ - if not (type_.endswith('._tcp.local.') or type_.endswith('._udp.local.')): - raise BadTypeInNameException("Type '%s' must end with '._tcp.local.' or '._udp.local.'" % type_) - -- cgit v1.2.3 From 57bfc7233b3e28a48c5c61938a2f533d2dac5356 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 18 Feb 2022 14:59:08 +0100 Subject: gnu: efivar: Update to 38. * gnu/packages/linux.scm (efivar): Update to 38. [source](snippet, modules, patches): Remove. [native-inputs]: Add MANDOC. (efibootmgr)[source](modules, snippet): New fields. * gnu/packages/patches/efivar-gcc-compat.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. --- gnu/local.mk | 1 - gnu/packages/linux.scm | 28 ++--- gnu/packages/patches/efivar-gcc-compat.patch | 177 --------------------------- 3 files changed, 13 insertions(+), 193 deletions(-) delete mode 100644 gnu/packages/patches/efivar-gcc-compat.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 7e781d8126..75a60b0093 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1014,7 +1014,6 @@ dist_patch_DATA = \ %D%/packages/patches/ecl-16-ignore-stderr-write-error.patch \ %D%/packages/patches/ecl-16-libffi.patch \ %D%/packages/patches/efibootmgr-remove-extra-decl.patch \ - %D%/packages/patches/efivar-gcc-compat.patch \ %D%/packages/patches/eigen-remove-openmp-error-counting.patch \ %D%/packages/patches/eigen-stabilise-sparseqr-test.patch \ %D%/packages/patches/einstein-build.patch \ diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index a534622847..d4ae8c5c76 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -6708,25 +6708,15 @@ under OpenGL graphics workloads.") (define-public efivar (package (name "efivar") - (version "37") + (version "38") (source (origin (method url-fetch) (uri (string-append "https://github.com/rhboot/" name "/releases/download/" version "/" name "-" version ".tar.bz2")) - (patches (search-patches "efivar-gcc-compat.patch")) (sha256 (base32 - "17vvfivhsrszh7q39b6npjsrhrhsjf1cmmcpp3xrh6wh7ywzwrrw")) - (modules '((guix build utils))) - (snippet - '(begin - ;; Compile everything within a single LTO partition - ;; to work around ordering issues in the code. Try - ;; removing this for versions > 37. - (substitute* "Make.defaults" - (("-flto") - "-flto -flto-partition=one")))))) + "0jaka7b4lccswjqiv4liclkj6w78gildg7vd6dnw3wf595pfs67h")))) (build-system gnu-build-system) (arguments `(;; Tests require a UEFI system and is not detected in the chroot. @@ -6739,7 +6729,7 @@ under OpenGL graphics workloads.") (modify-phases %standard-phases (delete 'configure)))) (native-inputs - (list pkg-config)) + (list mandoc pkg-config)) (inputs (list popt)) (home-page "https://github.com/rhboot/efivar") @@ -6761,10 +6751,18 @@ interface to the variable facility of UEFI boot firmware.") (file-name (git-file-name name version)) (sha256 (base32 "1niicijxg59rsmiw3rsjwy4bvi1n42dynvm01lnp9haixdzdpq03")) - (patches (search-patches "efibootmgr-remove-extra-decl.patch")))) + (patches (search-patches "efibootmgr-remove-extra-decl.patch")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Cast the first argument to the correct type. Extracted + ;; from upstream commit e8ce9fecebd15adb4. + (substitute* '("src/efibootdump.c" "src/efibootmgr.c") + (("efidp_format_device_path\\(text_path,") + "efidp_format_device_path((unsigned char *)text_path,")))))) (build-system gnu-build-system) (arguments - `(#:tests? #f ;no tests + '(#:tests? #f ;no tests #:make-flags (list (string-append "prefix=" %output) (string-append "libdir=" %output "/lib") ;; EFIDIR denotes a subdirectory relative to the diff --git a/gnu/packages/patches/efivar-gcc-compat.patch b/gnu/packages/patches/efivar-gcc-compat.patch deleted file mode 100644 index fd1a3dc90a..0000000000 --- a/gnu/packages/patches/efivar-gcc-compat.patch +++ /dev/null @@ -1,177 +0,0 @@ -Fix build with -Werror=address-of-packed-member, which is default since -GCC 9. - -This is a combination of three upstream commits: - - https://github.com/rhboot/efivar/commit/b98ba8921010d03f46704a476c69861515deb1ca - https://github.com/rhboot/efivar/commit/c3c553db85ff10890209d0fe48fb4856ad68e4e0 - https://github.com/rhboot/efivar/commit/0dad6d78a7fb5f6c5fb4a1d646040539db6cf865 - -diff --git a/src/dp-media.c b/src/dp-media.c -index 96a576f..be691c4 100644 ---- a/src/dp-media.c -+++ b/src/dp-media.c -@@ -46,8 +46,7 @@ _format_media_dn(char *buf, size_t size, const_efidp dp) - break; - case EFIDP_HD_SIGNATURE_GUID: - format(buf, size, off, "HD", "GPT,"); -- format_guid(buf, size, off, "HD", -- (efi_guid_t *)dp->hd.signature); -+ format_guid(buf, size, off, "HD", dp->hd.signature); - format(buf, size, off, "HD", - ",0x%"PRIx64",0x%"PRIx64")", - dp->hd.start, dp->hd.size); -diff --git a/src/dp-message.c b/src/dp-message.c -index 3724e5f..6b8e907 100644 ---- a/src/dp-message.c -+++ b/src/dp-message.c -@@ -364,7 +364,7 @@ _format_message_dn(char *buf, size_t size, const_efidp dp) - dp->infiniband.port_gid[1], - dp->infiniband.port_gid[0]); - format_guid(buf, size, off, "Infiniband", -- (efi_guid_t *)&dp->infiniband.ioc_guid); -+ &dp->infiniband.ioc_guid); - format(buf, size, off, "Infiniband", - ",%"PRIu64",%"PRIu64")", - dp->infiniband.target_port_id, -@@ -620,11 +620,13 @@ _format_message_dn(char *buf, size_t size, const_efidp dp) - ) / sizeof(efi_ip_addr_t); - format(buf, size, off, "Dns", "Dns("); - for (int i=0; i < end; i++) { -- const efi_ip_addr_t *addr = &dp->dns.addrs[i]; -+ efi_ip_addr_t addr; -+ -+ memcpy(&addr, &dp->dns.addrs[i], sizeof(addr)); - if (i != 0) - format(buf, size, off, "Dns", ","); - format_ip_addr(buf, size, off, "Dns", -- dp->dns.is_ipv6, addr); -+ dp->dns.is_ipv6, &addr); - } - format(buf, size, off, "Dns", ")"); - break; -diff --git a/src/dp.h b/src/dp.h -index aa4e390..1f921d5 100644 ---- a/src/dp.h -+++ b/src/dp.h -@@ -70,8 +70,11 @@ - #define format_guid(buf, size, off, dp_type, guid) ({ \ - int _rc; \ - char *_guidstr = NULL; \ -+ efi_guid_t _guid; \ -+ const efi_guid_t * const _guid_p = &_guid; \ - \ -- _rc = efi_guid_to_str(guid, &_guidstr); \ -+ memmove(&_guid, guid, sizeof(_guid)); \ -+ _rc = efi_guid_to_str(_guid_p, &_guidstr); \ - if (_rc < 0) { \ - efi_error("could not build %s GUID DP string", \ - dp_type); \ -@@ -79,7 +82,7 @@ - _guidstr = onstack(_guidstr, \ - strlen(_guidstr)+1); \ - _rc = format(buf, size, off, dp_type, "%s", \ -- _guidstr); \ -+ _guidstr); \ - } \ - _rc; \ - }) -diff --git a/src/guid.c b/src/guid.c -index 306c9ff..3156b3b 100644 ---- a/src/guid.c -+++ b/src/guid.c -@@ -31,7 +31,7 @@ - extern const efi_guid_t efi_guid_zero; - - int NONNULL(1, 2) PUBLIC --efi_guid_cmp(const efi_guid_t *a, const efi_guid_t *b) -+efi_guid_cmp(const void * const a, const void * const b) - { - return memcmp(a, b, sizeof (efi_guid_t)); - } -diff --git a/src/include/efivar/efivar.h b/src/include/efivar/efivar.h -index 316891c..ad6449d 100644 ---- a/src/include/efivar/efivar.h -+++ b/src/include/efivar/efivar.h -@@ -128,7 +128,7 @@ extern int efi_symbol_to_guid(const char *symbol, efi_guid_t *guid) - - extern int efi_guid_is_zero(const efi_guid_t *guid); - extern int efi_guid_is_empty(const efi_guid_t *guid); --extern int efi_guid_cmp(const efi_guid_t *a, const efi_guid_t *b); -+extern int efi_guid_cmp(const void * const a, const void * const b); - - /* import / export functions */ - typedef struct efi_variable efi_variable_t; -diff --git a/src/ucs2.h b/src/ucs2.h -index dbb5900..edd8367 100644 ---- a/src/ucs2.h -+++ b/src/ucs2.h -@@ -23,16 +23,21 @@ - (((val) & ((mask) << (shift))) >> (shift)) - - static inline size_t UNUSED --ucs2len(const uint16_t * const s, ssize_t limit) -+ucs2len(const void *vs, ssize_t limit) - { - ssize_t i; -- for (i = 0; i < (limit >= 0 ? limit : i+1) && s[i] != (uint16_t)0; i++) -+ const uint16_t *s = vs; -+ const uint8_t *s8 = vs; -+ -+ for (i = 0; -+ i < (limit >= 0 ? limit : i+1) && s8[0] != 0 && s8[1] != 0; -+ i++, s8 += 2, s++) - ; - return i; - } - - static inline size_t UNUSED --ucs2size(const uint16_t * const s, ssize_t limit) -+ucs2size(const void *s, ssize_t limit) - { - size_t rc = ucs2len(s, limit); - rc *= sizeof (uint16_t); -@@ -69,10 +74,11 @@ utf8size(uint8_t *s, ssize_t limit) - } - - static inline unsigned char * UNUSED --ucs2_to_utf8(const uint16_t * const chars, ssize_t limit) -+ucs2_to_utf8(const void * const voidchars, ssize_t limit) - { - ssize_t i, j; - unsigned char *ret; -+ const uint16_t * const chars = voidchars; - - if (limit < 0) - limit = ucs2len(chars, -1); -@@ -124,10 +130,12 @@ ucs2_to_utf8(const uint16_t * const chars, ssize_t limit) - } - - static inline ssize_t UNUSED NONNULL(4) --utf8_to_ucs2(uint16_t *ucs2, ssize_t size, int terminate, uint8_t *utf8) -+utf8_to_ucs2(void *ucs2void, ssize_t size, int terminate, uint8_t *utf8) - { - ssize_t req; - ssize_t i, j; -+ uint16_t *ucs2 = ucs2void; -+ uint16_t val16; - - if (!ucs2 && size > 0) { - errno = EINVAL; -@@ -162,10 +170,13 @@ utf8_to_ucs2(uint16_t *ucs2, ssize_t size, int terminate, uint8_t *utf8) - val = utf8[i] & 0x7f; - i += 1; - } -- ucs2[j] = val; -+ val16 = val; -+ ucs2[j] = val16; -+ } -+ if (terminate) { -+ val16 = 0; -+ ucs2[j++] = val16; - } -- if (terminate) -- ucs2[j++] = (uint16_t)0; - return j; - }; - -- cgit v1.2.3 From 781dd2de230e37e1dc05c992936125655fdf842f Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sun, 20 Feb 2022 12:30:17 +0200 Subject: gnu: postgresql-13: Fix building on riscv64-linux. * gnu/packages/databases.scm (postgresql-13)[arguments]: Add phase when buidling for riscv64-linux to apply a patch. [native-inputs]: When building for riscv64-linux add patch and patch file. * gnu/packages/patches/postgresql-riscv-spinlocks.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. --- gnu/local.mk | 1 + gnu/packages/databases.scm | 24 ++++++++++++- .../patches/postgresql-riscv-spinlocks.patch | 41 ++++++++++++++++++++++ 3 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/postgresql-riscv-spinlocks.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 75a60b0093..dcee1611b2 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1644,6 +1644,7 @@ dist_patch_DATA = \ %D%/packages/patches/portaudio-audacity-compat.patch \ %D%/packages/patches/portmidi-modular-build.patch \ %D%/packages/patches/postgresql-disable-resolve_symlinks.patch \ + %D%/packages/patches/postgresql-riscv-spinlocks.patch \ %D%/packages/patches/procmail-ambiguous-getline-debian.patch \ %D%/packages/patches/procmail-CVE-2014-3618.patch \ %D%/packages/patches/procmail-CVE-2017-16844.patch \ diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index c71f208f2b..21f6e605a7 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -1278,7 +1278,29 @@ pictures, sounds, or video.") version "/postgresql-" version ".tar.bz2")) (sha256 (base32 - "1kf0gcsrl5n25rjlvkh87aywmn28kbwvakm5c7j1qpr4j01y34za")))))) + "1kf0gcsrl5n25rjlvkh87aywmn28kbwvakm5c7j1qpr4j01y34za")))) + (arguments + (if (target-riscv64?) + `(,@(substitute-keyword-arguments (package-arguments postgresql-14) + ((#:phases phases) + #~(modify-phases #$phases + (add-after 'unpack 'apply-riscv-spinlock-patch + ;; The patch is applied in this custom phase and not via the + ;; "origin" object above to avoid rebuilding a large number + ;; of packages on other platforms. + (lambda* (#:key inputs #:allow-other-keys) + (let ((patch-file + #$(local-file + (search-patch + "postgresql-riscv-spinlocks.patch")))) + (invoke "patch" "-p1" "-i" patch-file)))))))) + `(,@(package-arguments postgresql-14)))) + (native-inputs + (if (target-riscv64?) + (list + (local-file (search-patch "postgresql-riscv-spinlocks.patch")) + patch) + '())))) (define-public postgresql-11 (package diff --git a/gnu/packages/patches/postgresql-riscv-spinlocks.patch b/gnu/packages/patches/postgresql-riscv-spinlocks.patch new file mode 100644 index 0000000000..984a573642 --- /dev/null +++ b/gnu/packages/patches/postgresql-riscv-spinlocks.patch @@ -0,0 +1,41 @@ +https://www.postgresql.org/message-id/dea97b6d-f55f-1f6d-9109-504aa7dfa421@gentoo.org + +The attached patch adds native spinlock support to PostgreSQL on RISC-V +systems. As suspected by Richard W.M. Jones of Red Hat back in 2016, the +__sync_lock_test_and_set() approach applied on arm and arm64 works here +as well. + + +Tested against PostgreSQL 13.3 on a physical rv64gc system (BeagleV +Starlight beta board) - builds and installs fine, all tests pass. From +what I can see in gcc documentation this should in theory work on rv32 +(and possibly rv128) as well, therefore the patch as it stands covers +all RISC-V systems (i.e. doesn't check the value of __risc_xlen) - but I +haven't confirmed this experimentally. + +--- a/src/include/storage/s_lock.h ++++ b/src/include/storage/s_lock.h +@@ -315,12 +315,12 @@ + #endif /* __ia64__ || __ia64 */ + + /* +- * On ARM and ARM64, we use __sync_lock_test_and_set(int *, int) if available. ++ * On ARM, ARM64 and RISC-V, we use __sync_lock_test_and_set(int *, int) if available. + * + * We use the int-width variant of the builtin because it works on more chips + * than other widths. + */ +-#if defined(__arm__) || defined(__arm) || defined(__aarch64__) || defined(__aarch64) ++#if defined(__arm__) || defined(__arm) || defined(__aarch64__) || defined(__aarch64) || defined(__riscv) + #ifdef HAVE_GCC__SYNC_INT32_TAS + #define HAS_TEST_AND_SET + +@@ -337,7 +337,7 @@ + #define S_UNLOCK(lock) __sync_lock_release(lock) + + #endif /* HAVE_GCC__SYNC_INT32_TAS */ +-#endif /* __arm__ || __arm || __aarch64__ || __aarch64 */ ++#endif /* __arm__ || __arm || __aarch64__ || __aarch64 || __riscv */ + + + /* S/390 and S/390x Linux (32- and 64-bit zSeries) */ -- cgit v1.2.3 From b9a4705f80e89fff3b65288cbbe8df73a365aee3 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sun, 6 Feb 2022 23:26:24 -0500 Subject: gnu: webkitgtk: Adjust BubbleWrap wrapper. This revisits with a fix that doesn't require to have PULSE_CLIENTCONFIG point to an absolute store location, which will allow us to revert to have PULSE_CLIENTCONFIG point to a fixed location under /etc. This would alleviate the need to reboot to have changes to the PulseAudio configuration effected. * gnu/packages/patches/webkitgtk-share-store.patch: Delete file. * gnu/packages/patches/webkitgtk-bubblewrap-paths.patch: Add file. * gnu/packages/patches/webkitgtk-canonicalize-paths.patch: Likewise. * gnu/local.mk (dist_patch_DATA): Update patches list. * gnu/packages/webkit.scm (webkitgtk)[patches]: Adjust accordingly. --- gnu/local.mk | 3 +- .../webkitgtk-adjust-bubblewrap-paths.patch | 38 +++++++++++++ .../patches/webkitgtk-bind-all-fonts.patch | 17 +++--- .../patches/webkitgtk-canonicalize-paths.patch | 66 ++++++++++++++++++++++ gnu/packages/patches/webkitgtk-share-store.patch | 19 ------- gnu/packages/webkit.scm | 5 +- 6 files changed, 117 insertions(+), 31 deletions(-) create mode 100644 gnu/packages/patches/webkitgtk-adjust-bubblewrap-paths.patch create mode 100644 gnu/packages/patches/webkitgtk-canonicalize-paths.patch delete mode 100644 gnu/packages/patches/webkitgtk-share-store.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index dcee1611b2..c4869f538c 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1925,8 +1925,9 @@ dist_patch_DATA = \ %D%/packages/patches/vte-CVE-2012-2738-pt2.patch \ %D%/packages/patches/vtk-fix-freetypetools-build-failure.patch \ %D%/packages/patches/warsow-qfusion-fix-bool-return-type.patch \ - %D%/packages/patches/webkitgtk-share-store.patch \ %D%/packages/patches/webkitgtk-bind-all-fonts.patch \ + %D%/packages/patches/webkitgtk-adjust-bubblewrap-paths.patch \ + %D%/packages/patches/webkitgtk-canonicalize-paths.patch \ %D%/packages/patches/webrtc-audio-processing-big-endian.patch \ %D%/packages/patches/websocketpp-fix-for-cmake-3.15.patch \ %D%/packages/patches/wicd-bitrate-none-fix.patch \ diff --git a/gnu/packages/patches/webkitgtk-adjust-bubblewrap-paths.patch b/gnu/packages/patches/webkitgtk-adjust-bubblewrap-paths.patch new file mode 100644 index 0000000000..18ddb645ad --- /dev/null +++ b/gnu/packages/patches/webkitgtk-adjust-bubblewrap-paths.patch @@ -0,0 +1,38 @@ +Share /gnu/store in the BubbleWrap container and remove FHS mounts. + +This is a Guix-specific patch not meant to be upstreamed. +diff --git a/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp b/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp +index f0a5e4b05dff..88b11f806968 100644 +--- a/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp ++++ b/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp +@@ -854,27 +854,12 @@ GRefPtr bubblewrapSpawn(GSubprocessLauncher* launcher, const Proces + "--ro-bind", "/sys/dev", "/sys/dev", + "--ro-bind", "/sys/devices", "/sys/devices", + +- "--ro-bind-try", "/usr/share", "/usr/share", +- "--ro-bind-try", "/usr/local/share", "/usr/local/share", + "--ro-bind-try", DATADIR, DATADIR, +- +- // We only grant access to the libdirs webkit is built with and +- // guess system libdirs. This will always have some edge cases. +- "--ro-bind-try", "/lib", "/lib", +- "--ro-bind-try", "/usr/lib", "/usr/lib", +- "--ro-bind-try", "/usr/local/lib", "/usr/local/lib", + "--ro-bind-try", LIBDIR, LIBDIR, +-#if CPU(ADDRESS64) +- "--ro-bind-try", "/lib64", "/lib64", +- "--ro-bind-try", "/usr/lib64", "/usr/lib64", +- "--ro-bind-try", "/usr/local/lib64", "/usr/local/lib64", +-#else +- "--ro-bind-try", "/lib32", "/lib32", +- "--ro-bind-try", "/usr/lib32", "/usr/lib32", +- "--ro-bind-try", "/usr/local/lib32", "/usr/local/lib32", +-#endif +- + "--ro-bind-try", PKGLIBEXECDIR, PKGLIBEXECDIR, ++ ++ // Bind mount the store inside the WebKitGTK sandbox. ++ "--ro-bind", "@storedir@", "@storedir@", + }; + + if (launchOptions.processType == ProcessLauncher::ProcessType::DBusProxy) { diff --git a/gnu/packages/patches/webkitgtk-bind-all-fonts.patch b/gnu/packages/patches/webkitgtk-bind-all-fonts.patch index e7b06cc650..27013180c4 100644 --- a/gnu/packages/patches/webkitgtk-bind-all-fonts.patch +++ b/gnu/packages/patches/webkitgtk-bind-all-fonts.patch @@ -1,26 +1,25 @@ -Add fonts from all XDG_DATA_DIRS, not just XDG_DATA_HOME. +Upstream commit: https://github.com/WebKit/WebKit/commit/31ac354cbeecf866f9a38f7b2f8f59f7975d3f6a -See . -Author: Liliana Marie Prikler -Index: webkitgtk-2.28.2/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp -=================================================================== +diff --git a/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp b/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp +index ecc804663784..8de174be3c0e 100644 --- a/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp +++ b/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp -@@ -387,6 +387,7 @@ static void bindFonts(Vector& args) +@@ -288,6 +288,7 @@ static void bindFonts(Vector& args) const char* homeDir = g_get_home_dir(); const char* dataDir = g_get_user_data_dir(); const char* cacheDir = g_get_user_cache_dir(); + const char* const * dataDirs = g_get_system_data_dirs(); - + // Configs can include custom dirs but then we have to parse them... GUniquePtr fontConfig(g_build_filename(configDir, "fontconfig", nullptr)); -@@ -403,6 +404,10 @@ static void bindFonts(Vector& args) +@@ -304,6 +305,10 @@ static void bindFonts(Vector& args) bindIfExists(args, fontHomeConfigDir.get()); bindIfExists(args, fontData.get()); bindIfExists(args, fontHomeData.get()); -+ for (auto dataDir = dataDirs; dataDir != nullptr && *dataDir != nullptr; dataDir++) { ++ for (auto* dataDir = dataDirs; dataDir && *dataDir; dataDir++) { + GUniquePtr fontDataDir(g_build_filename(*dataDir, "fonts", nullptr)); + bindIfExists(args, fontDataDir.get()); + } bindIfExists(args, "/var/cache/fontconfig"); // Used by Debian. } + diff --git a/gnu/packages/patches/webkitgtk-canonicalize-paths.patch b/gnu/packages/patches/webkitgtk-canonicalize-paths.patch new file mode 100644 index 0000000000..741d534831 --- /dev/null +++ b/gnu/packages/patches/webkitgtk-canonicalize-paths.patch @@ -0,0 +1,66 @@ +Upstream commit: https://github.com/WebKit/WebKit/commit/6a87eb254ef57a986a1a6ce9a3a4b66928afeb65 + +diff --git a/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp b/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp +index ecc804663784..a2a1c9d7a4dd 100644 +--- a/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp ++++ b/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp +@@ -27,7 +27,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -165,6 +164,15 @@ enum class BindFlags { + Device, + }; + ++static void bindSymlinksRealPath(Vector& args, const char* path, const char* bindOption = "--ro-bind") ++{ ++ WTF::String realPath = FileSystem::realPath(path); ++ if (path != realPath) { ++ CString rpath = realPath.utf8(); ++ args.appendVector(Vector({ bindOption, rpath.data(), rpath.data() })); ++ } ++} ++ + static void bindIfExists(Vector& args, const char* path, BindFlags bindFlags = BindFlags::ReadOnly) + { + if (!path || path[0] == '\0') +@@ -177,7 +185,16 @@ static void bindIfExists(Vector& args, const char* path, BindFlags bind + bindType = "--ro-bind-try"; + else + bindType = "--bind-try"; +- args.appendVector(Vector({ bindType, path, path })); ++ ++ // Canonicalize the source path, otherwise a symbolic link could ++ // point to a location outside of the namespace. ++ bindSymlinksRealPath(args, path, bindType); ++ ++ // As /etc is exposed wholesale, do not layer extraneous bind ++ // directives on top, which could fail in the presence of symbolic ++ // links. ++ if (!g_str_has_prefix(path, "/etc/")) ++ args.appendVector(Vector({ bindType, path, path })); + } + + static void bindDBusSession(Vector& args, bool allowPortals) +@@ -410,17 +427,6 @@ static void bindV4l(Vector& args) + })); + } + +-static void bindSymlinksRealPath(Vector& args, const char* path) +-{ +- char realPath[PATH_MAX]; +- +- if (realpath(path, realPath) && strcmp(path, realPath)) { +- args.appendVector(Vector({ +- "--ro-bind", realPath, realPath, +- })); +- } +-} +- + // Translate a libseccomp error code into an error message. libseccomp + // mostly returns negative errno values such as -ENOMEM, but some + // standard errno values are used for non-standard purposes where their diff --git a/gnu/packages/patches/webkitgtk-share-store.patch b/gnu/packages/patches/webkitgtk-share-store.patch deleted file mode 100644 index 053d86fcf4..0000000000 --- a/gnu/packages/patches/webkitgtk-share-store.patch +++ /dev/null @@ -1,19 +0,0 @@ -Tell bubblewrap to share the store. Required for programs that use the -sandboxing features such as Epiphany. - -See . -Author: Jack Hill ---- -diff --git a/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp b/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp ---- a/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp -+++ b/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp -@@ -737,6 +737,9 @@ GRefPtr bubblewrapSpawn(GSubprocessLauncher* launcher, const Proces - "--ro-bind-try", "/usr/local/share", "/usr/local/share", - "--ro-bind-try", DATADIR, DATADIR, - -+ // Bind mount the store inside the WebKitGTK sandbox. -+ "--ro-bind", "@storedir@", "@storedir@", -+ - // We only grant access to the libdirs webkit is built with and - // guess system libdirs. This will always have some edge cases. - "--ro-bind-try", "/lib", "/lib", diff --git a/gnu/packages/webkit.scm b/gnu/packages/webkit.scm index 40537f5e0a..f79d6bd4f6 100644 --- a/gnu/packages/webkit.scm +++ b/gnu/packages/webkit.scm @@ -247,8 +247,9 @@ acceleration in mind, leveraging common 3D graphics APIs for best performance.") (sha256 (base32 "1xn1hhd0qaxmjf6vy6664i4mmmjsw9zgrr4w8ni3415d981zvj3b")) - (patches (search-patches "webkitgtk-share-store.patch" - "webkitgtk-bind-all-fonts.patch")))) + (patches (search-patches "webkitgtk-bind-all-fonts.patch" + "webkitgtk-adjust-bubblewrap-paths.patch" + "webkitgtk-canonicalize-paths.patch")))) (build-system cmake-build-system) (outputs '("out" "doc" "debug")) (arguments -- cgit v1.2.3 From e725b24d119b47fcfceb9e9ba79ee832318c289e Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Thu, 24 Feb 2022 22:52:51 -0600 Subject: gnu: evilwm: Update to 1.3.1. * gnu/packages/wm.scm (evilwm): Update to 1.3.1. [source]: Remove patch. * gnu/packages/patches/evilwm-lost-focus-bug.patch: Remove. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. --- gnu/local.mk | 1 - gnu/packages/patches/evilwm-lost-focus-bug.patch | 18 ------------------ gnu/packages/wm.scm | 9 ++++----- 3 files changed, 4 insertions(+), 24 deletions(-) delete mode 100644 gnu/packages/patches/evilwm-lost-focus-bug.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index c4869f538c..98f2d4ac30 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1040,7 +1040,6 @@ dist_patch_DATA = \ %D%/packages/patches/erlang-man-path.patch \ %D%/packages/patches/esmtp-add-lesmtp.patch \ %D%/packages/patches/eudev-rules-directory.patch \ - %D%/packages/patches/evilwm-lost-focus-bug.patch \ %D%/packages/patches/exercism-disable-self-update.patch \ %D%/packages/patches/extempore-unbundle-external-dependencies.patch \ %D%/packages/patches/extundelete-e2fsprogs-1.44.patch \ diff --git a/gnu/packages/patches/evilwm-lost-focus-bug.patch b/gnu/packages/patches/evilwm-lost-focus-bug.patch deleted file mode 100644 index af24af8fe9..0000000000 --- a/gnu/packages/patches/evilwm-lost-focus-bug.patch +++ /dev/null @@ -1,18 +0,0 @@ -evilwm may sometimes lose focus after closing a window. This means that -evilwm stops responding to keyboard shortcuts, and if no other window is open -which the mouse can be moved over to regain focus evilwm becomes unusable and -has to be restarted. - -Patch derived from discussion at -https://wiki.archlinux.org/index.php/Evilwm#Lost_focus_bug_fix - ---- evilwm-1.1.1/client.c -+++ evilwm-1.1.1/client.c -@@ -172,6 +172,7 @@ - * _NET_WM_STATE) */ - if (c->remove) { - LOG_DEBUG("setting WithdrawnState\n"); -+ XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime); - set_wm_state(c, WithdrawnState); - ewmh_withdraw_client(c); - } else { diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm index 15d3f66a19..a4fda11cfe 100644 --- a/gnu/packages/wm.scm +++ b/gnu/packages/wm.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 Eric Dvorsak ;;; Copyright © 2015 Siniša Biđin -;;; Copyright © 2015, 2016 Eric Bavier +;;; Copyright © 2015, 2016, 2022 Eric Bavier ;;; Copyright © 2015 xd1le ;;; Copyright © 2015 Paul van der Walt ;;; Copyright © 2016 Danny Milosavljevic @@ -937,16 +937,15 @@ tiling window manager for X.") (define-public evilwm (package (name "evilwm") - (version "1.1.1") + (version "1.3.1") (source (origin (method url-fetch) - (uri (string-append "http://www.6809.org.uk/evilwm/evilwm-" + (uri (string-append "http://www.6809.org.uk/evilwm/dl/evilwm-" version ".tar.gz")) (sha256 (base32 - "0ak0yajzk3v4dg5wmaghv6acf7v02a4iw8qxmq5yw5ard8lrqn3r")) - (patches (search-patches "evilwm-lost-focus-bug.patch")))) + "1jry36qkg2l02v37zvzszxvxm2d8c62z25gks5gdqqjl9ifbpv1j")))) (build-system gnu-build-system) (inputs (list libx11 libxext libxrandr)) -- cgit v1.2.3 From 0306cdd8f5bab73b7dfe50610a243d58f56be579 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sun, 27 Feb 2022 15:01:38 +0200 Subject: gnu: screen: Update to 4.9.0. * gnu/packages/screen.scm (screen): Update to 4.9.0. [source]: Remove one patch. [native-inputs]: Remove input labels. Add autoconf, automake. * gnu/packages/patches/screen-CVE-2021-26937.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/patches/screen-CVE-2021-26937.patch | 66 ------------------------ gnu/packages/screen.scm | 12 ++--- 3 files changed, 6 insertions(+), 73 deletions(-) delete mode 100644 gnu/packages/patches/screen-CVE-2021-26937.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 98f2d4ac30..bc214b3443 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1783,7 +1783,6 @@ dist_patch_DATA = \ %D%/packages/patches/scheme48-tests.patch \ %D%/packages/patches/scotch-build-parallelism.patch \ %D%/packages/patches/scotch-integer-declarations.patch \ - %D%/packages/patches/screen-CVE-2021-26937.patch \ %D%/packages/patches/screen-hurd-path-max.patch \ %D%/packages/patches/sdl-libx11-1.6.patch \ %D%/packages/patches/seed-webkit.patch \ diff --git a/gnu/packages/patches/screen-CVE-2021-26937.patch b/gnu/packages/patches/screen-CVE-2021-26937.patch deleted file mode 100644 index d87a54a83f..0000000000 --- a/gnu/packages/patches/screen-CVE-2021-26937.patch +++ /dev/null @@ -1,66 +0,0 @@ -https://salsa.debian.org/debian/screen/-/raw/debian/4.8.0-5/debian/patches/99_CVE-2021-26937.patch - -Description: [CVE-2021-26937] Fix out of bounds array access -Author: Michael Schröder -Bug-Debian: https://bugs.debian.org/982435 -Bug: https://savannah.gnu.org/bugs/?60030 -Bug: https://lists.gnu.org/archive/html/screen-devel/2021-02/msg00000.html -Bug-OSS-Security: https://www.openwall.com/lists/oss-security/2021/02/09/3 -Origin: https://lists.gnu.org/archive/html/screen-devel/2021-02/msg00010.html - ---- a/encoding.c -+++ b/encoding.c -@@ -43,7 +43,7 @@ - # ifdef UTF8 - static int recode_char __P((int, int, int)); - static int recode_char_to_encoding __P((int, int)); --static void comb_tofront __P((int, int)); -+static void comb_tofront __P((int)); - # ifdef DW_CHARS - static int recode_char_dw __P((int, int *, int, int)); - static int recode_char_dw_to_encoding __P((int, int *, int)); -@@ -1263,6 +1263,8 @@ - {0x30000, 0x3FFFD}, - }; - -+ if (c >= 0xdf00 && c <= 0xdfff) -+ return 1; /* dw combining sequence */ - return ((bisearch(c, wide, sizeof(wide) / sizeof(struct interval) - 1)) || - (cjkwidth && - bisearch(c, ambiguous, -@@ -1330,11 +1332,12 @@ - } - - static void --comb_tofront(root, i) --int root, i; -+comb_tofront(i) -+int i; - { - for (;;) - { -+ int root = i >= 0x700 ? 0x801 : 0x800; - debug1("bring to front: %x\n", i); - combchars[combchars[i]->prev]->next = combchars[i]->next; - combchars[combchars[i]->next]->prev = combchars[i]->prev; -@@ -1396,9 +1399,9 @@ - { - /* full, recycle old entry */ - if (c1 >= 0xd800 && c1 < 0xe000) -- comb_tofront(root, c1 - 0xd800); -+ comb_tofront(c1 - 0xd800); - i = combchars[root]->prev; -- if (c1 == i + 0xd800) -+ if (i == 0x800 || i == 0x801 || c1 == i + 0xd800) - { - /* completely full, can't recycle */ - debug("utf8_handle_comp: completely full!\n"); -@@ -1422,7 +1425,7 @@ - mc->font = (i >> 8) + 0xd8; - mc->fontx = 0; - debug3("combinig char %x %x -> %x\n", c1, c, i + 0xd800); -- comb_tofront(root, i); -+ comb_tofront(i); - } - - #else /* !UTF8 */ diff --git a/gnu/packages/screen.scm b/gnu/packages/screen.scm index d244ed1434..5e7708be6e 100644 --- a/gnu/packages/screen.scm +++ b/gnu/packages/screen.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2013 Cyril Roelandt ;;; Copyright © 2014 Mark H Weaver ;;; Copyright © 2015, 2017 Eric Bavier -;;; Copyright © 2016, 2017, 2019, 2020, 2021 Efraim Flashner +;;; Copyright © 2016, 2017, 2019, 2020, 2021, 2022 Efraim Flashner ;;; Copyright © 2016 Alex Griffin ;;; Copyright © 2017 Mathieu Othacehe ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice @@ -29,6 +29,7 @@ #:use-module (guix git-download) #:use-module (guix build-system gnu) #:use-module (gnu packages) + #:use-module (gnu packages autotools) #:use-module (gnu packages hurd) #:use-module (gnu packages ncurses) #:use-module (gnu packages perl) @@ -39,18 +40,17 @@ (define-public screen (package (name "screen") - (version "4.8.0") + (version "4.9.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/screen/screen-" version ".tar.gz")) - (patches (search-patches "screen-hurd-path-max.patch" - "screen-CVE-2021-26937.patch")) + (patches (search-patches "screen-hurd-path-max.patch")) (sha256 - (base32 "18ascpjzsy70h6hk7wpg8zmzjwgdyrdr7c6z4pg5z4l9hhyv24bf")))) + (base32 "1x1hqy4h47i7hk85f779lkwkm7gkq8h8mxwd0znkh5adpf0m4czr")))) (build-system gnu-build-system) (native-inputs - `(("makeinfo" ,texinfo))) + (list autoconf automake texinfo)) (inputs (list ncurses perl)) (arguments -- cgit v1.2.3 From e9b7adde0ddc8489e63d843a8bd8b76dc6bd6ead Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 1 Mar 2022 10:23:13 +0100 Subject: gnu: guile@3.0.8: Get correct type sizes when cross-compiling. This works around , whereby cross-compilation from (say) x86_64-linux to i586-pc-gnu would produce a broken Guile that crashes at startup. * gnu/packages/patches/guile-cross-compilation.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/guile.scm (guile-3.0-latest)[source]: Use it. --- gnu/local.mk | 1 + gnu/packages/guile.scm | 3 +- gnu/packages/patches/guile-cross-compilation.patch | 55 ++++++++++++++++++++++ 3 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/guile-cross-compilation.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index bc214b3443..cfcbb38b84 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1228,6 +1228,7 @@ dist_patch_DATA = \ %D%/packages/patches/guile-3.0-relocatable.patch \ %D%/packages/patches/guile-linux-syscalls.patch \ %D%/packages/patches/guile-3.0-linux-syscalls.patch \ + %D%/packages/patches/guile-cross-compilation.patch \ %D%/packages/patches/guile-fibers-destroy-peer-schedulers.patch \ %D%/packages/patches/guile-fibers-wait-for-io-readiness.patch \ %D%/packages/patches/guile-gdbm-ffi-support-gdbm-1.14.patch \ diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm index f74a389da5..fc969f3bb5 100644 --- a/gnu/packages/guile.scm +++ b/gnu/packages/guile.scm @@ -398,7 +398,8 @@ without requiring the source code to be rewritten.") version ".tar.xz")) (sha256 (base32 - "04wagg0zr0sib0w9ly5jm91jplgfigzfgmy8fjdlx07jaq50d9ys")))) + "04wagg0zr0sib0w9ly5jm91jplgfigzfgmy8fjdlx07jaq50d9ys")) + (patches (search-patches "guile-cross-compilation.patch")))) (arguments (substitute-keyword-arguments (package-arguments guile-3.0) ;; Guile 3.0.8 is bit-reproducible when built in parallel, thanks to diff --git a/gnu/packages/patches/guile-cross-compilation.patch b/gnu/packages/patches/guile-cross-compilation.patch new file mode 100644 index 0000000000..a594cb9421 --- /dev/null +++ b/gnu/packages/patches/guile-cross-compilation.patch @@ -0,0 +1,55 @@ +When cross-compiling, get type sizes of the host system, not the build system. + +This is Guile commit 24b30130ca75653bdbacea84ce0443608379d630, which +fixes , with one difference: it uses +8 instead of SIZEOF_INTMAX_T, such that we do not need to modify +'configure.ac' to check for the size of 'intmax_t' and to run 'autoreconf' +(libguile/numbers.c expects SCM_SIZEOF_INTMAX_T = 8). + +diff --git a/libguile/gen-scmconfig.c b/libguile/gen-scmconfig.c +index 01b14f14d..691ebd0af 100644 +--- a/libguile/gen-scmconfig.c ++++ b/libguile/gen-scmconfig.c +@@ -1,4 +1,4 @@ +-/* Copyright 2003-2013,2018,2020,2021 ++/* Copyright 2003-2013, 2018, 2020-2022 + Free Software Foundation, Inc. + + This file is part of Guile. +@@ -238,21 +238,21 @@ main (int argc, char *argv[]) + pf ("\n"); + pf ("/* Standard types. */\n"); + +- pf ("#define SCM_SIZEOF_CHAR %zu\n", sizeof (char)); +- pf ("#define SCM_SIZEOF_UNSIGNED_CHAR %zu\n", sizeof (unsigned char)); +- pf ("#define SCM_SIZEOF_SHORT %zu\n", sizeof (short)); +- pf ("#define SCM_SIZEOF_UNSIGNED_SHORT %zu\n", sizeof (unsigned short)); +- pf ("#define SCM_SIZEOF_LONG %zu\n", sizeof (long)); +- pf ("#define SCM_SIZEOF_UNSIGNED_LONG %zu\n", sizeof (unsigned long)); +- pf ("#define SCM_SIZEOF_INT %zu\n", sizeof (int)); +- pf ("#define SCM_SIZEOF_UNSIGNED_INT %zu\n", sizeof (unsigned int)); +- pf ("#define SCM_SIZEOF_SIZE_T %zu\n", sizeof (size_t)); +- pf ("#define SCM_SIZEOF_LONG_LONG %zu\n", sizeof (long long)); +- pf ("#define SCM_SIZEOF_UNSIGNED_LONG_LONG %zu\n", sizeof (unsigned long long)); +- pf ("#define SCM_SIZEOF_INTMAX %zu\n", sizeof (intmax_t)); +- pf ("#define SCM_SIZEOF_SCM_T_PTRDIFF %zu\n", sizeof (ptrdiff_t)); +- pf ("#define SCM_SIZEOF_INTPTR_T %zu\n", sizeof (intptr_t)); +- pf ("#define SCM_SIZEOF_UINTPTR_T %zu\n", sizeof (uintptr_t)); ++ pf ("#define SCM_SIZEOF_CHAR %d\n", SIZEOF_CHAR); ++ pf ("#define SCM_SIZEOF_UNSIGNED_CHAR %d\n", SIZEOF_UNSIGNED_CHAR); ++ pf ("#define SCM_SIZEOF_SHORT %d\n", SIZEOF_SHORT); ++ pf ("#define SCM_SIZEOF_UNSIGNED_SHORT %d\n", SIZEOF_UNSIGNED_SHORT); ++ pf ("#define SCM_SIZEOF_LONG %d\n", SIZEOF_LONG); ++ pf ("#define SCM_SIZEOF_UNSIGNED_LONG %d\n", SIZEOF_UNSIGNED_LONG); ++ pf ("#define SCM_SIZEOF_INT %d\n", SIZEOF_INT); ++ pf ("#define SCM_SIZEOF_UNSIGNED_INT %d\n", SIZEOF_UNSIGNED_INT); ++ pf ("#define SCM_SIZEOF_SIZE_T %d\n", SIZEOF_SIZE_T); ++ pf ("#define SCM_SIZEOF_LONG_LONG %d\n", SIZEOF_LONG_LONG); ++ pf ("#define SCM_SIZEOF_UNSIGNED_LONG_LONG %d\n", SIZEOF_UNSIGNED_LONG_LONG); ++ pf ("#define SCM_SIZEOF_INTMAX %d\n", 8); /* like SIZEOF_INTMAX_T */ ++ pf ("#define SCM_SIZEOF_SCM_T_PTRDIFF %d\n", SIZEOF_PTRDIFF_T); ++ pf ("#define SCM_SIZEOF_INTPTR_T %d\n", SIZEOF_INTPTR_T); ++ pf ("#define SCM_SIZEOF_UINTPTR_T %d\n", SIZEOF_UINTPTR_T); + + pf ("\n"); + pf ("/* same as POSIX \"struct timespec\" -- always defined */\n"); -- cgit v1.2.3 From eabc6af9b8b14bd629544e54bc9c9afa2d0dcd85 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 1 Mar 2022 12:21:54 +0100 Subject: gnu: guile-ssh: Update to 0.15.1. * gnu/packages/patches/guile-ssh-fix-test-suite.patch, gnu/packages/patches/guile-ssh-read-error.patch: Remove. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/ssh.scm (guile-ssh): Update to 0.15.1, and remove those patches. (guile2.2-ssh)[source]: Remove. (guile2.0-ssh): Remove. Co-authored-by: poptsov.artyom@gmail.com (Artyom V. Poptsov) --- gnu/local.mk | 2 - .../patches/guile-ssh-fix-test-suite.patch | 217 --------------------- gnu/packages/patches/guile-ssh-read-error.patch | 18 -- gnu/packages/ssh.scm | 24 +-- 4 files changed, 2 insertions(+), 259 deletions(-) delete mode 100644 gnu/packages/patches/guile-ssh-fix-test-suite.patch delete mode 100644 gnu/packages/patches/guile-ssh-read-error.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index cfcbb38b84..de9545a8c7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1237,8 +1237,6 @@ dist_patch_DATA = \ %D%/packages/patches/guile-rsvg-pkgconfig.patch \ %D%/packages/patches/guile-emacs-fix-configure.patch \ %D%/packages/patches/guile-email-fix-tests.patch \ - %D%/packages/patches/guile-ssh-fix-test-suite.patch \ - %D%/packages/patches/guile-ssh-read-error.patch \ %D%/packages/patches/gtk2-fix-builder-test.patch \ %D%/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch \ %D%/packages/patches/gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch \ diff --git a/gnu/packages/patches/guile-ssh-fix-test-suite.patch b/gnu/packages/patches/guile-ssh-fix-test-suite.patch deleted file mode 100644 index dc10e08b0f..0000000000 --- a/gnu/packages/patches/guile-ssh-fix-test-suite.patch +++ /dev/null @@ -1,217 +0,0 @@ -From f7942cded8b65341916a555186e2219efe174cd0 Mon Sep 17 00:00:00 2001 -From: Maxim Cournoyer -Date: Thu, 4 Feb 2021 14:38:25 -0500 -Subject: [PATCH] tests: Fix test suite for Guile 3.0.5. - -The test-runner object is now reset to #f when calling the 'test-end' -procedure. See the commit de5d1a7f99b8e952b115237ebc29633062f99bb9 in -Guile (srfi-64: Reset test-runner-current if done) which introduced this -change. - -* tests/client-server.scm (exit-status): New variable. Use it when calling -exit. -* tests/dist.scm: Likewise. -* tests/key.scm: Likewise. -* tests/log.scm: Likewise. -* tests/popen.scm: Likewise. -* tests/server-client.scm: Likewise. -* tests/server.scm: Likewise. -* tests/session.scm: Likewise. -* tests/shell.scm: Likewise. -* tests/sssh-ssshd.scm: Likewise. -* tests/tunnel.scm: Likewise. ---- - tests/client-server.scm | 4 +++- - tests/dist.scm | 4 +++- - tests/key.scm | 3 ++- - tests/log.scm | 5 ++++- - tests/popen.scm | 4 +++- - tests/server-client.scm | 4 +++- - tests/server.scm | 4 +++- - tests/session.scm | 4 +++- - tests/shell.scm | 3 ++- - tests/sssh-ssshd.scm | 4 +++- - tests/tunnel.scm | 4 +++- - 11 files changed, 32 insertions(+), 11 deletions(-) - -diff --git a/tests/client-server.scm b/tests/client-server.scm -index 432a48c..fc46140 100644 ---- a/tests/client-server.scm -+++ b/tests/client-server.scm -@@ -743,8 +743,10 @@ - - ;;; - -+(define exit-status (test-runner-fail-count (test-runner-current))) -+ - (test-end "client-server") - --(exit (= (test-runner-fail-count (test-runner-current)) 0)) -+(exit (= 0 exit-status)) - - ;;; client-server.scm ends here. -diff --git a/tests/dist.scm b/tests/dist.scm -index 2a3a75f..79f9e23 100644 ---- a/tests/dist.scm -+++ b/tests/dist.scm -@@ -269,8 +269,10 @@ $4 = #@#:22 (disconnected) 453fff>" - ;;; - - -+(define exit-status (test-runner-fail-count (test-runner-current))) -+ - (test-end "dist") - --(exit (= (test-runner-fail-count (test-runner-current)) 0)) -+(exit (= 0 exit-status)) - - ;;; dist.scm ends here. -diff --git a/tests/key.scm b/tests/key.scm -index be31378..e1678f4 100644 ---- a/tests/key.scm -+++ b/tests/key.scm -@@ -170,9 +170,10 @@ - (eq? (get-key-type key) 'ecdsa-p256))))))) - - ;;; -+(define exit-status (test-runner-fail-count (test-runner-current))) - - (test-end "key") - --(exit (= (test-runner-fail-count (test-runner-current)) 0)) -+(exit (= 0 exit-status)) - - ;;; key.scm ends here. -diff --git a/tests/log.scm b/tests/log.scm -index f547202..d528251 100644 ---- a/tests/log.scm -+++ b/tests/log.scm -@@ -64,8 +64,11 @@ - (get-log-verbosity)) - - -+(define exit-status (test-runner-fail-count (test-runner-current))) -+ - (test-end "log") - --(exit (= (test-runner-fail-count (test-runner-current)) 0)) -+(exit (= 0 exit-status)) -+ - - ;;; log.scm ends here -diff --git a/tests/popen.scm b/tests/popen.scm -index e063e0b..fe77108 100644 ---- a/tests/popen.scm -+++ b/tests/popen.scm -@@ -129,8 +129,10 @@ - (format-log/scm 'nolog "open-remote-output-pipe" "channel: ~A" channel) - (output-only? channel))))))) - -+(define exit-status (test-runner-fail-count (test-runner-current))) -+ - (test-end "popen") - --(exit (= (test-runner-fail-count (test-runner-current)) 0)) -+(exit (= 0 exit-status)) - - ;;; popen.scm ends here. -diff --git a/tests/server-client.scm b/tests/server-client.scm -index 920aa22..b6ed3eb 100644 ---- a/tests/server-client.scm -+++ b/tests/server-client.scm -@@ -148,8 +148,10 @@ - (equal? x session)))))) - - -+(define exit-status (test-runner-fail-count (test-runner-current))) -+ - (test-end "server-client") - --(exit (= (test-runner-fail-count (test-runner-current)) 0)) -+(exit (= 0 exit-status)) - - ;;; server-client.scm ends here. -diff --git a/tests/server.scm b/tests/server.scm -index c7f8b6c..1a6daea 100644 ---- a/tests/server.scm -+++ b/tests/server.scm -@@ -157,9 +157,11 @@ - (server-listen server) - #t)) - -+(define exit-status (test-runner-fail-count (test-runner-current))) -+ - (test-end "server") - --(exit (= (test-runner-fail-count (test-runner-current)) 0)) -+(exit (= 0 exit-status)) - - ;;; server.scm ends here. - -diff --git a/tests/session.scm b/tests/session.scm -index 8caa039..7310647 100644 ---- a/tests/session.scm -+++ b/tests/session.scm -@@ -210,8 +210,10 @@ - (let ((session (%make-session))) - (not (connected? session)))) - -+(define exit-status (test-runner-fail-count (test-runner-current))) -+ - (test-end "session") - --(exit (= (test-runner-fail-count (test-runner-current)) 0)) -+(exit (= 0 exit-status)) - - ;;; session.scm ends here. -diff --git a/tests/shell.scm b/tests/shell.scm -index 7d613fb..e36e661 100644 ---- a/tests/shell.scm -+++ b/tests/shell.scm -@@ -113,9 +113,10 @@ - - - ;;; -+(define exit-status (test-runner-fail-count (test-runner-current))) - - (test-end "shell") - --(exit (= (test-runner-fail-count (test-runner-current)) 0)) -+(exit (= 0 exit-status)) - - ;;; shell.scm ends here. -diff --git a/tests/sssh-ssshd.scm b/tests/sssh-ssshd.scm -index 2fe23db..edb53fc 100644 ---- a/tests/sssh-ssshd.scm -+++ b/tests/sssh-ssshd.scm -@@ -118,8 +118,10 @@ - result))) - - -+(define exit-status (test-runner-fail-count (test-runner-current))) -+ - (test-end "sssh-ssshd") - --(exit (= (test-runner-fail-count (test-runner-current)) 0)) -+(exit (= 0 exit-status)) - - ;;; sssh-ssshd.scm ends here. -diff --git a/tests/tunnel.scm b/tests/tunnel.scm -index ef5a568..d6453b7 100644 ---- a/tests/tunnel.scm -+++ b/tests/tunnel.scm -@@ -191,8 +191,10 @@ - (= pnum portnum))) - (eq? (channel-cancel-forward session "localhost" portnum) 'ok)))))))) - -+(define exit-status (test-runner-fail-count (test-runner-current))) -+ - (test-end "tunnel") - --(exit (= (test-runner-fail-count (test-runner-current)) 0)) -+(exit (= 0 exit-status)) - - ;;; tunnel.scm ends here. --- -2.30.0 - diff --git a/gnu/packages/patches/guile-ssh-read-error.patch b/gnu/packages/patches/guile-ssh-read-error.patch deleted file mode 100644 index 9cc6b048a0..0000000000 --- a/gnu/packages/patches/guile-ssh-read-error.patch +++ /dev/null @@ -1,18 +0,0 @@ -This patch adjusts to slightly different 'read-error' in Guile 3.0.6 -compared to earlier versions: - - https://github.com/artyom-poptsov/guile-ssh/issues/28 - ---- a/tests/dist.scm -+++ b/tests/dist.scm -@@ -183,8 +183,8 @@ Unbound variable: e" - rrepl-get-result)) - - (test-error-with-log/= "rrepl-get-result, unknown # object error" -- 'node-repl-error "Reader error: scm_lreadr: #:1:3: \ --Unknown # object: (#\\<): scheme@(guile-user)> \ -+ 'node-repl-error "Reader error: #f: #:1:3: \ -+Unknown # object: (\"#<\"): scheme@(guile-user)> \ - $4 = #@#:22 (disconnected) 453fff>" - (call-with-input-string - (string-append "scheme@(guile-user)> $4 = " diff --git a/gnu/packages/ssh.scm b/gnu/packages/ssh.scm index 7c8b09879f..9895cb24af 100644 --- a/gnu/packages/ssh.scm +++ b/gnu/packages/ssh.scm @@ -310,7 +310,7 @@ Additionally, various channel-specific options can be negotiated.") (define-public guile-ssh (package (name "guile-ssh") - (version "0.13.1") + (version "0.15.1") (home-page "https://github.com/artyom-poptsov/guile-ssh") (source (origin (method git-fetch) @@ -320,9 +320,7 @@ Additionally, various channel-specific options can be negotiated.") (file-name (git-file-name name version)) (sha256 (base32 - "1xpxkvgj7wgcl450djkcrmrf957mcy2f36hfs5g6kpla1gax2d1g")) - (patches (search-patches "guile-ssh-fix-test-suite.patch" - "guile-ssh-read-error.patch")))) + "0zzn5hsf97b35gixyg4z14sspl15qwnp52y4h89wra4y31l7467q")))) (build-system gnu-build-system) (outputs '("out" "debug")) (arguments @@ -382,28 +380,10 @@ programs written in GNU Guile interpreter. It is a wrapper to the underlying libssh library.") (license license:gpl3+))) -(define-public guile2.0-ssh - (package - (inherit guile-ssh) - (name "guile2.0-ssh") - (source (origin - (inherit (package-source guile-ssh)) - (patches (search-patches "guile-ssh-fix-test-suite.patch")))) - (native-inputs - (modify-inputs (package-native-inputs guile-ssh) - (delete "guile") - (prepend guile-2.0 ;needed when cross-compiling. - ))) - (inputs (modify-inputs (package-inputs guile-ssh) - (replace "guile" guile-2.0))))) - (define-public guile2.2-ssh (package (inherit guile-ssh) (name "guile2.2-ssh") - (source (origin - (inherit (package-source guile-ssh)) - (patches (search-patches "guile-ssh-fix-test-suite.patch")))) (native-inputs (modify-inputs (package-native-inputs guile-ssh) (delete "guile") -- cgit v1.2.3 From 6693ff05696d71a9ca556760a1597b48a95c5298 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Tue, 1 Mar 2022 23:24:00 +0100 Subject: gnu: tectonic: Update to 0.8.1. * gnu/packages/rust-apps.scm (tectonic): Update to 0.8.1. [inputs]: Add FREETYPE, GRAPHITE2, ICU4C, LIBPNG. * gnu/packages/crates-io.scm (rust-pinot-0.1)[origin]: Add patch necessary for Tectonic. (rust-tectonic-docmodel-0.1): Update to 0.1.2. (rust-tectonic-engine-spx2html-0.1): New variable. (rust-tectonic-engine-xetex-0.2): New variable. (rust-tectonic-engine-xetex-0.1): Remove variable. (rust-tectonic-io-base-0.4): New variable. (rust-tectonic-io-base-0.3): Inherit from above. (rust-tectonic-xdv-0.2): New variable. (rust-tectonic-xdv-0.1): Remove variable. * gnu/packages/patches/rust-pinot-0.1-implement-math-table.patch: New file. * gnu/local.mk (dist_patch_DATA): Register new file. --- gnu/local.mk | 1 + gnu/packages/crates-io.scm | 87 ++++++-- .../rust-pinot-0.1-implement-math-table.patch | 223 +++++++++++++++++++++ gnu/packages/rust-apps.scm | 23 ++- 4 files changed, 310 insertions(+), 24 deletions(-) create mode 100644 gnu/packages/patches/rust-pinot-0.1-implement-math-table.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index de9545a8c7..5edb31d3de 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1770,6 +1770,7 @@ dist_patch_DATA = \ %D%/packages/patches/rust-nettle-disable-vendor.patch \ %D%/packages/patches/rust-nettle-sys-disable-vendor.patch \ %D%/packages/patches/rust-openssl-sys-no-vendor.patch \ + %D%/packages/patches/rust-pinot-0.1-implement-math-table \ %D%/packages/patches/rust-shell2batch-lint-fix.patch \ %D%/packages/patches/rust-wl-clipboard-rs-newer-wl.patch \ %D%/packages/patches/sbc-fix-build-non-x86.patch \ diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index e5a48be473..37aeb9f82a 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -42442,7 +42442,9 @@ written with declarative macros.") (uri (crate-uri "pinot" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 - (base32 "153di76kx7xb4mp2i14zg1wkz3mclivv4c77mbhh7af553yqnsnh")))) + (base32 "153di76kx7xb4mp2i14zg1wkz3mclivv4c77mbhh7af553yqnsnh")) + ;; XXX: This patch is needed by Tectonic. + (patches (search-patches "rust-pinot-0.1-implement-math-table.patch")))) (build-system cargo-build-system) (arguments `(#:skip-build? #t)) (home-page "https://github.com/dfrg/pinot") @@ -60925,14 +60927,14 @@ process.") (define-public rust-tectonic-docmodel-0.1 (package (name "rust-tectonic-docmodel") - (version "0.1.0") + (version "0.1.2") (source (origin (method url-fetch) (uri (crate-uri "tectonic_docmodel" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 - (base32 "041hbp5rjrnnf6pbi7b9039jx5vn5f0d9fwhk0vshwjn69jmknkm")))) + (base32 "1b5vdqcnjbbda6am0mb7qyxyc6pn8v0pqz0w10xia87ycyyfflxw")))) (build-system cargo-build-system) (arguments `(#:skip-build? #t @@ -60974,25 +60976,55 @@ document model, including the @file{Tectonic.toml} file.") @code{bibtex} program as a reusable crate.") (license license:expat))) -(define-public rust-tectonic-engine-xetex-0.1 +(define-public rust-tectonic-engine-spx2html-0.1 + (package + (name "rust-tectonic-engine-spx2html") + (version "0.1.0") + (source + (origin + (method url-fetch) + (uri (crate-uri "tectonic_engine_spx2html" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "0ydn2j4359fzd9dik4lpw68jwngcbgvlpwig9np50cb40dssvy09")))) + (build-system cargo-build-system) + (arguments + `(#:skip-build? #t + #:cargo-inputs + (("rust-byteorder" ,rust-byteorder-1) + ("rust-percent-encoding" ,rust-percent-encoding-2) + ("rust-pinot" ,rust-pinot-0.1) + ("rust-tectonic-bridge-core" ,rust-tectonic-bridge-core-0.3) + ("rust-tectonic-errors" ,rust-tectonic-errors-0.2) + ("rust-tectonic-io-base" ,rust-tectonic-io-base-0.4) + ("rust-tectonic-status-base" ,rust-tectonic-status-base-0.2) + ("rust-tectonic-xdv" ,rust-tectonic-xdv-0.2) + ("rust-tempfile" ,rust-tempfile-3) + ("rust-tera" ,rust-tera-1)))) + (home-page "https://tectonic-typesetting.github.io/") + (synopsis "Tectonic engine that converts SPX output to HTML") + (description "This crate implements the Tectonic engine that converts SPX +output to HTML.") + (license license:expat))) + +(define-public rust-tectonic-engine-xetex-0.2 (package (name "rust-tectonic-engine-xetex") - (version "0.1.1") + (version "0.2.0") (source (origin (method url-fetch) (uri (crate-uri "tectonic_engine_xetex" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 - (base32 "0ki06fsqx7rb683gz4d5xz248gwvpzf137zqrg8whsrazaqgzmfq")))) + (base32 "1kn9gxkgf3jbwif14n1kmp869s4b69khhc7iwm78qqpmy79lrhkw")))) (build-system cargo-build-system) (arguments `(#:skip-build? #t #:cargo-inputs - (("rust-cbindgen" ,rust-cbindgen-0.16) - ("rust-cc" ,rust-cc-1) + (("rust-cc" ,rust-cc-1) ("rust-libc" ,rust-libc-0.2) - ("rust-tectonic-bridge-core" ,rust-tectonic-bridge-core-0.1) + ("rust-tectonic-bridge-core" ,rust-tectonic-bridge-core-0.3) ("rust-tectonic-bridge-flate" ,rust-tectonic-bridge-flate-0.1) ("rust-tectonic-bridge-graphite2" ,rust-tectonic-bridge-graphite2-0.2) ("rust-tectonic-bridge-harfbuzz" ,rust-tectonic-bridge-harfbuzz-0.2) @@ -61104,17 +61136,17 @@ error type and utilities.") interface for fetching URLs using one of several HTTP backends.") (license license:expat))) -(define-public rust-tectonic-io-base-0.3 +(define-public rust-tectonic-io-base-0.4 (package (name "rust-tectonic-io-base") - (version "0.3.0") + (version "0.4.0") (source (origin (method url-fetch) (uri (crate-uri "tectonic_io_base" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 - (base32 "0xpcavx3chld8d5qa24ikf5v4l5slzkakqr4ylibx0f91ssy3bsm")))) + (base32 "0x1r4m5bkqqvz24sql9q8ycnjczlqjlhzfyaylzhxi2xx4flqdfn")))) (build-system cargo-build-system) (arguments `(#:skip-build? #t @@ -61124,7 +61156,7 @@ interface for fetching URLs using one of several HTTP backends.") ("rust-libc" ,rust-libc-0.2) ("rust-sha2" ,rust-sha2-0.9) ("rust-tectonic-errors" ,rust-tectonic-errors-0.2) - ("rust-tectonic-status-base" ,rust-tectonic-status-base-0.1) + ("rust-tectonic-status-base" ,rust-tectonic-status-base-0.2) ("rust-thiserror" ,rust-thiserror-1)))) (home-page "https://tectonic-typesetting.github.io/") (synopsis "Basic types for Tectonic's pluggable I/O backend system") @@ -61135,6 +61167,29 @@ implementations for @code{std} I/O types as well as @code{flate2} gzip streams.") (license license:expat))) +(define-public rust-tectonic-io-base-0.3 + (package + (inherit rust-tectonic-io-base-0.4) + (name "rust-tectonic-io-base") + (version "0.3.0") + (source + (origin + (method url-fetch) + (uri (crate-uri "tectonic_io_base" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "0xpcavx3chld8d5qa24ikf5v4l5slzkakqr4ylibx0f91ssy3bsm")))) + (arguments + `(#:skip-build? #t + #:cargo-inputs + (("rust-app-dirs2" ,rust-app-dirs2-2) + ("rust-flate2" ,rust-flate2-1) + ("rust-libc" ,rust-libc-0.2) + ("rust-sha2" ,rust-sha2-0.9) + ("rust-tectonic-errors" ,rust-tectonic-errors-0.2) + ("rust-tectonic-status-base" ,rust-tectonic-status-base-0.1) + ("rust-thiserror" ,rust-thiserror-1)))))) + (define-public rust-tectonic-io-base-0.2 (package (inherit rust-tectonic-io-base-0.3) @@ -61229,17 +61284,17 @@ types for reporting status messages to a user.") #:cargo-inputs (("rust-tectonic-errors" ,rust-tectonic-errors-0.1)))))) -(define-public rust-tectonic-xdv-0.1 +(define-public rust-tectonic-xdv-0.2 (package (name "rust-tectonic-xdv") - (version "0.1.11") + (version "0.2.0") (source (origin (method url-fetch) (uri (crate-uri "tectonic_xdv" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 - (base32 "1ibxv32i7dla3iw6s01cagzgdgzhm1mmxwqjv841m6m4r7g57gxj")))) + (base32 "1fcys9v5zcdavfkq72h5ajkz2pxjpc6km6wqajk29qc65870xd5k")))) (build-system cargo-build-system) (arguments `(#:skip-build? #t diff --git a/gnu/packages/patches/rust-pinot-0.1-implement-math-table.patch b/gnu/packages/patches/rust-pinot-0.1-implement-math-table.patch new file mode 100644 index 0000000000..d9594f09c9 --- /dev/null +++ b/gnu/packages/patches/rust-pinot-0.1-implement-math-table.patch @@ -0,0 +1,223 @@ +From f93bac061c59a6efab309b43eb893bf041c93ee1 Mon Sep 17 00:00:00 2001 +From: Peter Williams +Date: Sun, 30 Jan 2022 11:12:58 -0500 +Subject: [PATCH] Start implementing the MATH table + +--- + src/font.rs | 6 ++ + src/lib.rs | 1 + + src/math.rs | 155 ++++++++++++++++++++++++++++++++++++++++++++++ + src/otl/shared.rs | 2 +- + 4 files changed, 163 insertions(+), 1 deletion(-) + create mode 100644 src/math.rs + +diff --git a/src/font.rs b/src/font.rs +index aeb17b5..762ff71 100644 +--- a/src/font.rs ++++ b/src/font.rs +@@ -13,6 +13,7 @@ use super::{ + hhea::*, + hmtx::*, + hvar::*, ++ math::*, + maxp::*, + name::*, + os2::*, +@@ -329,6 +330,11 @@ pub trait TableProvider<'a> { + fn gpos(&self) -> Option> { + Some(Gpos::new(self.table_data(GPOS)?, self.gdef())) + } ++ ++ /// Returns the mathemetical typesetting table. ++ fn math(&self) -> Option> { ++ Some(Math::new(self.table_data(MATH)?)) ++ } + } + + impl<'a> TableProvider<'a> for FontRef<'a> { +diff --git a/src/lib.rs b/src/lib.rs +index 8203630..d5e473d 100644 +--- a/src/lib.rs ++++ b/src/lib.rs +@@ -14,6 +14,7 @@ pub mod head; + pub mod hhea; + pub mod hmtx; + pub mod hvar; ++pub mod math; + pub mod maxp; + pub mod name; + pub mod os2; +diff --git a/src/math.rs b/src/math.rs +new file mode 100644 +index 0000000..10a5ec6 +--- /dev/null ++++ b/src/math.rs +@@ -0,0 +1,155 @@ ++//! Mathematical typesetting table. ++ ++use super::otl::Coverage; ++use super::parse_prelude::*; ++ ++/// Tag for the `math` table. ++pub const MATH: Tag = Tag::new(b"MATH"); ++ ++/// Mathematical typesetting table. ++/// ++/// ++/// ++/// The math constants and math glyph information subtables are not (yet) ++/// implemented. ++#[derive(Copy, Clone)] ++pub struct Math<'a>(Buffer<'a>); ++ ++impl<'a> Math<'a> { ++ /// Creates a new math table from a byte slice containing the table data. ++ pub fn new(data: &'a [u8]) -> Self { ++ Self(Buffer::new(data)) ++ } ++ ++ /// Returns the major version. ++ pub fn major_version(&self) -> u16 { ++ self.0.read(0).unwrap_or(0) ++ } ++ ++ /// Returns the minor version. ++ pub fn minor_version(&self) -> u16 { ++ self.0.read(2).unwrap_or(0) ++ } ++ ++ /// Returns the MathVariants subtable. ++ pub fn variants(&self) -> Option { ++ let offset = self.0.read_offset16(8, 0)?; ++ Some(MathVariants { math: self, offset }) ++ } ++} ++ ++/// Mathematical variants subtable. ++/// ++/// ++#[derive(Copy, Clone)] ++pub struct MathVariants<'a> { ++ math: &'a Math<'a>, ++ offset: u32, ++} ++ ++impl<'a> MathVariants<'a> { ++ /// Returns the minimum overlap of connecting glyphs during glyph ++ /// construction. ++ pub fn min_connector_overlap(&self) -> UfWord { ++ self.math.0.read(self.offset as usize).unwrap_or(0) ++ } ++ ++ /// Returns the number of glyphs for which information is provided for ++ /// vertically growing variants. ++ pub fn vert_glyph_count(&self) -> u16 { ++ self.math.0.read(self.offset as usize + 6).unwrap_or(0) ++ } ++ ++ /// Returns the number of glyphs for which information is provided for ++ /// horizontally growing variants. ++ pub fn horiz_glyph_count(&self) -> u16 { ++ self.math.0.read(self.offset as usize + 8).unwrap_or(0) ++ } ++ ++ /// Returns the coverage table associated with vertically growing glyphs. ++ pub fn vert_glyph_coverage(&self) -> Option { ++ let offset = self ++ .math ++ .0 ++ .read_offset16(self.offset as usize + 2, self.offset)?; ++ Some(Coverage::new(self.math.0, offset)) ++ } ++ ++ /// Returns the coverage table associated with horizontally growing glyphs. ++ pub fn horiz_glyph_coverage(&self) -> Option { ++ let offset = self ++ .math ++ .0 ++ .read_offset16(self.offset as usize + 4, self.offset)?; ++ Some(Coverage::new(self.math.0, offset)) ++ } ++ ++ /// Returns information about how to a construct vertically growing glyph, ++ /// based on its coverage index. ++ pub fn vert_glyph_construction(&self, coverage_index: u16) -> Option { ++ let offset = self.offset as usize + 10 + 2 * coverage_index as usize; ++ let offset = self.math.0.read_offset16(offset, self.offset)?; ++ Some(MathGlyphConstruction { ++ math: self.math, ++ offset: offset, ++ }) ++ } ++ ++ /// Returns information about how to a construct horizontally growing glyph, ++ /// based on its coverage index. ++ pub fn horiz_glyph_construction(&self, coverage_index: u16) -> Option { ++ let offset = self.offset as usize ++ + 10 ++ + 2 * self.vert_glyph_count() as usize ++ + 2 * coverage_index as usize; ++ let offset = self.math.0.read_offset16(offset, self.offset)?; ++ Some(MathGlyphConstruction { ++ math: self.math, ++ offset: offset, ++ }) ++ } ++} ++ ++/// Mathematical glyph construction subtable. ++/// ++/// ++/// ++/// The "glyph assembly" subtable is not (yet) implemented. ++#[derive(Copy, Clone)] ++pub struct MathGlyphConstruction<'a> { ++ math: &'a Math<'a>, ++ offset: u32, ++} ++ ++impl<'a> MathGlyphConstruction<'a> { ++ /// Returns the number of growing variants for this glyph. ++ pub fn variant_count(&self) -> u16 { ++ self.math.0.read(self.offset as usize + 2).unwrap_or(0) ++ } ++ ++ /// Return the growing variants associated with this glyph. ++ pub fn variants(&self) -> Option> { ++ self.math ++ .0 ++ .read_slice(self.offset as usize + 4, self.variant_count() as usize) ++ } ++} ++ ++/// Information about a math glyph variant. ++#[derive(Copy, Clone, Debug)] ++pub struct MathGlyphVariantRecord { ++ /// The variant glyph ++ pub variant_glyph: GlyphId, ++ /// The advance width/height of the variant, in the direction of this ++ /// record's associated table. ++ pub advance_measurement: UfWord, ++} ++ ++impl ReadData for MathGlyphVariantRecord { ++ unsafe fn read_data_unchecked(buf: &[u8], offset: usize) -> Self { ++ Self { ++ variant_glyph: GlyphId::read_data_unchecked(buf, offset), ++ advance_measurement: UfWord::read_data_unchecked(buf, offset + 2), ++ } ++ } ++} +diff --git a/src/otl/shared.rs b/src/otl/shared.rs +index 24f0f1d..f1a00fb 100644 +--- a/src/otl/shared.rs ++++ b/src/otl/shared.rs +@@ -13,7 +13,7 @@ pub struct Coverage<'a> { + } + + impl<'a> Coverage<'a> { +- pub(super) fn new(data: Buffer<'a>, offset: u32) -> Self { ++ pub(crate) fn new(data: Buffer<'a>, offset: u32) -> Self { + Self { data, offset } + } + diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm index a73a1e18ef..74d6b9fc85 100644 --- a/gnu/packages/rust-apps.scm +++ b/gnu/packages/rust-apps.scm @@ -53,6 +53,8 @@ #:use-module (gnu packages glib) #:use-module (gnu packages gtk) #:use-module (gnu packages ibus) + #:use-module (gnu packages icu4c) + #:use-module (gnu packages image) #:use-module (gnu packages jemalloc) #:use-module (gnu packages kde) #:use-module (gnu packages linux) @@ -1048,14 +1050,14 @@ of the project is to be runnable on untrusted networks without crashing.") (define-public tectonic (package (name "tectonic") - (version "0.8.0") + (version "0.8.1") (source (origin (method url-fetch) (uri (crate-uri "tectonic" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 - (base32 "0hzyqpjxya6g1ifb3hvjvj0zl2aigx898pz7h5pl46z50jp2pdc8")))) + (base32 "036cgbnw4mykhprfvfh97gcgrlkbjrgv58fwqy8l6s0vwam66sdh")))) (build-system cargo-build-system) (arguments `(#:cargo-build-flags '("--release" "--features" "external-harfbuzz") @@ -1078,13 +1080,14 @@ of the project is to be runnable on untrusted networks without crashing.") ("rust-tectonic-bundles" ,rust-tectonic-bundles-0.2) ("rust-tectonic-docmodel" ,rust-tectonic-docmodel-0.1) ("rust-tectonic-engine-bibtex" ,rust-tectonic-engine-bibtex-0.1) + ("rust-tectonic-engine-spx2html" ,rust-tectonic-engine-spx2html-0.1) ("rust-tectonic-engine-xdvipdfmx" ,rust-tectonic-engine-xdvipdfmx-0.1) - ("rust-tectonic-engine-xetex" ,rust-tectonic-engine-xetex-0.1) + ("rust-tectonic-engine-xetex" ,rust-tectonic-engine-xetex-0.2) ("rust-tectonic-errors" ,rust-tectonic-errors-0.2) ("rust-tectonic-geturl" ,rust-tectonic-geturl-0.3) ("rust-tectonic-io-base" ,rust-tectonic-io-base-0.3) ("rust-tectonic-status-base" ,rust-tectonic-status-base-0.2) - ("rust-tectonic-xdv" ,rust-tectonic-xdv-0.1) + ("rust-tectonic-xdv" ,rust-tectonic-xdv-0.2) ("rust-tectonic-xetex-layout" ,rust-tectonic-xetex-layout-0.1) ("rust-tempfile" ,rust-tempfile-3) ("rust-termcolor" ,rust-termcolor-1) @@ -1109,10 +1112,14 @@ of the project is to be runnable on untrusted networks without crashing.") (native-inputs (list pkg-config)) (inputs - `(("fontconfig" ,fontconfig) - ("harfbuzz" ,harfbuzz) - ("openssl" ,openssl) - ("zlib" ,zlib))) + (list fontconfig + freetype + graphite2 + harfbuzz + icu4c + libpng + openssl + zlib)) (home-page "https://tectonic-typesetting.github.io/") (synopsis "Complete, embeddable TeX/LaTeX engine") (description -- cgit v1.2.3 From ec7e516116a72884fde3c87ee5287bbbf3eeb6eb Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Wed, 2 Mar 2022 22:54:01 +0100 Subject: gnu: rust-pinot-0.1: Update to 0.1.4. * gnu/packages/crates-io.scm (rust-pinot-0.1): Update to 0.1.4. * gnu/packages/patches/rust-pinot-0.1-implement-math-table.patch: Remove file. * gnu/local.mk: Remove reference to the file above. --- gnu/local.mk | 1 - gnu/packages/crates-io.scm | 6 +- .../rust-pinot-0.1-implement-math-table.patch | 223 --------------------- 3 files changed, 2 insertions(+), 228 deletions(-) delete mode 100644 gnu/packages/patches/rust-pinot-0.1-implement-math-table.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index c8026a1ec1..de9545a8c7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1770,7 +1770,6 @@ dist_patch_DATA = \ %D%/packages/patches/rust-nettle-disable-vendor.patch \ %D%/packages/patches/rust-nettle-sys-disable-vendor.patch \ %D%/packages/patches/rust-openssl-sys-no-vendor.patch \ - %D%/packages/patches/rust-pinot-0.1-implement-math-table.patch \ %D%/packages/patches/rust-shell2batch-lint-fix.patch \ %D%/packages/patches/rust-wl-clipboard-rs-newer-wl.patch \ %D%/packages/patches/sbc-fix-build-non-x86.patch \ diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index 37aeb9f82a..96b868cc97 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -42435,16 +42435,14 @@ written with declarative macros.") (define-public rust-pinot-0.1 (package (name "rust-pinot") - (version "0.1.3") + (version "0.1.4") (source (origin (method url-fetch) (uri (crate-uri "pinot" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 - (base32 "153di76kx7xb4mp2i14zg1wkz3mclivv4c77mbhh7af553yqnsnh")) - ;; XXX: This patch is needed by Tectonic. - (patches (search-patches "rust-pinot-0.1-implement-math-table.patch")))) + (base32 "13zh0g7d47a3szi2z4q2p3q8yph2ipw7q5gnsxvk34l44h6yjfpy")))) (build-system cargo-build-system) (arguments `(#:skip-build? #t)) (home-page "https://github.com/dfrg/pinot") diff --git a/gnu/packages/patches/rust-pinot-0.1-implement-math-table.patch b/gnu/packages/patches/rust-pinot-0.1-implement-math-table.patch deleted file mode 100644 index d9594f09c9..0000000000 --- a/gnu/packages/patches/rust-pinot-0.1-implement-math-table.patch +++ /dev/null @@ -1,223 +0,0 @@ -From f93bac061c59a6efab309b43eb893bf041c93ee1 Mon Sep 17 00:00:00 2001 -From: Peter Williams -Date: Sun, 30 Jan 2022 11:12:58 -0500 -Subject: [PATCH] Start implementing the MATH table - ---- - src/font.rs | 6 ++ - src/lib.rs | 1 + - src/math.rs | 155 ++++++++++++++++++++++++++++++++++++++++++++++ - src/otl/shared.rs | 2 +- - 4 files changed, 163 insertions(+), 1 deletion(-) - create mode 100644 src/math.rs - -diff --git a/src/font.rs b/src/font.rs -index aeb17b5..762ff71 100644 ---- a/src/font.rs -+++ b/src/font.rs -@@ -13,6 +13,7 @@ use super::{ - hhea::*, - hmtx::*, - hvar::*, -+ math::*, - maxp::*, - name::*, - os2::*, -@@ -329,6 +330,11 @@ pub trait TableProvider<'a> { - fn gpos(&self) -> Option> { - Some(Gpos::new(self.table_data(GPOS)?, self.gdef())) - } -+ -+ /// Returns the mathemetical typesetting table. -+ fn math(&self) -> Option> { -+ Some(Math::new(self.table_data(MATH)?)) -+ } - } - - impl<'a> TableProvider<'a> for FontRef<'a> { -diff --git a/src/lib.rs b/src/lib.rs -index 8203630..d5e473d 100644 ---- a/src/lib.rs -+++ b/src/lib.rs -@@ -14,6 +14,7 @@ pub mod head; - pub mod hhea; - pub mod hmtx; - pub mod hvar; -+pub mod math; - pub mod maxp; - pub mod name; - pub mod os2; -diff --git a/src/math.rs b/src/math.rs -new file mode 100644 -index 0000000..10a5ec6 ---- /dev/null -+++ b/src/math.rs -@@ -0,0 +1,155 @@ -+//! Mathematical typesetting table. -+ -+use super::otl::Coverage; -+use super::parse_prelude::*; -+ -+/// Tag for the `math` table. -+pub const MATH: Tag = Tag::new(b"MATH"); -+ -+/// Mathematical typesetting table. -+/// -+/// -+/// -+/// The math constants and math glyph information subtables are not (yet) -+/// implemented. -+#[derive(Copy, Clone)] -+pub struct Math<'a>(Buffer<'a>); -+ -+impl<'a> Math<'a> { -+ /// Creates a new math table from a byte slice containing the table data. -+ pub fn new(data: &'a [u8]) -> Self { -+ Self(Buffer::new(data)) -+ } -+ -+ /// Returns the major version. -+ pub fn major_version(&self) -> u16 { -+ self.0.read(0).unwrap_or(0) -+ } -+ -+ /// Returns the minor version. -+ pub fn minor_version(&self) -> u16 { -+ self.0.read(2).unwrap_or(0) -+ } -+ -+ /// Returns the MathVariants subtable. -+ pub fn variants(&self) -> Option { -+ let offset = self.0.read_offset16(8, 0)?; -+ Some(MathVariants { math: self, offset }) -+ } -+} -+ -+/// Mathematical variants subtable. -+/// -+/// -+#[derive(Copy, Clone)] -+pub struct MathVariants<'a> { -+ math: &'a Math<'a>, -+ offset: u32, -+} -+ -+impl<'a> MathVariants<'a> { -+ /// Returns the minimum overlap of connecting glyphs during glyph -+ /// construction. -+ pub fn min_connector_overlap(&self) -> UfWord { -+ self.math.0.read(self.offset as usize).unwrap_or(0) -+ } -+ -+ /// Returns the number of glyphs for which information is provided for -+ /// vertically growing variants. -+ pub fn vert_glyph_count(&self) -> u16 { -+ self.math.0.read(self.offset as usize + 6).unwrap_or(0) -+ } -+ -+ /// Returns the number of glyphs for which information is provided for -+ /// horizontally growing variants. -+ pub fn horiz_glyph_count(&self) -> u16 { -+ self.math.0.read(self.offset as usize + 8).unwrap_or(0) -+ } -+ -+ /// Returns the coverage table associated with vertically growing glyphs. -+ pub fn vert_glyph_coverage(&self) -> Option { -+ let offset = self -+ .math -+ .0 -+ .read_offset16(self.offset as usize + 2, self.offset)?; -+ Some(Coverage::new(self.math.0, offset)) -+ } -+ -+ /// Returns the coverage table associated with horizontally growing glyphs. -+ pub fn horiz_glyph_coverage(&self) -> Option { -+ let offset = self -+ .math -+ .0 -+ .read_offset16(self.offset as usize + 4, self.offset)?; -+ Some(Coverage::new(self.math.0, offset)) -+ } -+ -+ /// Returns information about how to a construct vertically growing glyph, -+ /// based on its coverage index. -+ pub fn vert_glyph_construction(&self, coverage_index: u16) -> Option { -+ let offset = self.offset as usize + 10 + 2 * coverage_index as usize; -+ let offset = self.math.0.read_offset16(offset, self.offset)?; -+ Some(MathGlyphConstruction { -+ math: self.math, -+ offset: offset, -+ }) -+ } -+ -+ /// Returns information about how to a construct horizontally growing glyph, -+ /// based on its coverage index. -+ pub fn horiz_glyph_construction(&self, coverage_index: u16) -> Option { -+ let offset = self.offset as usize -+ + 10 -+ + 2 * self.vert_glyph_count() as usize -+ + 2 * coverage_index as usize; -+ let offset = self.math.0.read_offset16(offset, self.offset)?; -+ Some(MathGlyphConstruction { -+ math: self.math, -+ offset: offset, -+ }) -+ } -+} -+ -+/// Mathematical glyph construction subtable. -+/// -+/// -+/// -+/// The "glyph assembly" subtable is not (yet) implemented. -+#[derive(Copy, Clone)] -+pub struct MathGlyphConstruction<'a> { -+ math: &'a Math<'a>, -+ offset: u32, -+} -+ -+impl<'a> MathGlyphConstruction<'a> { -+ /// Returns the number of growing variants for this glyph. -+ pub fn variant_count(&self) -> u16 { -+ self.math.0.read(self.offset as usize + 2).unwrap_or(0) -+ } -+ -+ /// Return the growing variants associated with this glyph. -+ pub fn variants(&self) -> Option> { -+ self.math -+ .0 -+ .read_slice(self.offset as usize + 4, self.variant_count() as usize) -+ } -+} -+ -+/// Information about a math glyph variant. -+#[derive(Copy, Clone, Debug)] -+pub struct MathGlyphVariantRecord { -+ /// The variant glyph -+ pub variant_glyph: GlyphId, -+ /// The advance width/height of the variant, in the direction of this -+ /// record's associated table. -+ pub advance_measurement: UfWord, -+} -+ -+impl ReadData for MathGlyphVariantRecord { -+ unsafe fn read_data_unchecked(buf: &[u8], offset: usize) -> Self { -+ Self { -+ variant_glyph: GlyphId::read_data_unchecked(buf, offset), -+ advance_measurement: UfWord::read_data_unchecked(buf, offset + 2), -+ } -+ } -+} -diff --git a/src/otl/shared.rs b/src/otl/shared.rs -index 24f0f1d..f1a00fb 100644 ---- a/src/otl/shared.rs -+++ b/src/otl/shared.rs -@@ -13,7 +13,7 @@ pub struct Coverage<'a> { - } - - impl<'a> Coverage<'a> { -- pub(super) fn new(data: Buffer<'a>, offset: u32) -> Self { -+ pub(crate) fn new(data: Buffer<'a>, offset: u32) -> Self { - Self { data, offset } - } - -- cgit v1.2.3 From 56cf53fb7b163eba1b76f8d95352920c09c48b3b Mon Sep 17 00:00:00 2001 From: Philip McGrath Date: Sun, 27 Feb 2022 16:28:58 -0500 Subject: gnu: racket: Update to 8.4. * gnu/packages/patches/racket-enable-scheme-backport.patch, gnu/packages/patches/racket-gui-tethered-launcher-backport.patch: New patches. * gnu/local.mk (dist_patch_DATA): Add them. * gnu/packages/racket.scm (%racket-version, %racket-commit) (%racket-origin): New variables. [patches]: Add "racket-enable-scheme-backport.patch". (racket-minimal): Update to 8.4. [version]: Use '%racket-version'. [source]: Use '%racket-origin'. [inputs]: Add 'ncurses'. Remove 'zlib:static' and 'lz4:static'. (racket-minimal-bc-3m)[inputs]: Adjust accordingly. (racket-bootstrap-chez-bootfiles)[version]: Use Chez Scheme's '(scheme-fork-version-number)'. (racket)[version]: Use '%racket-version'. [native-inputs]: Use '%racket-origin'. [source]: Update to 8.4. : Use "racket-gui-tethered-launcher-backport.patch". : Remove "srfi-doc-nonfree". Signed-off-by: Liliana Marie Prikler --- gnu/local.mk | 4 +- .../patches/racket-enable-scheme-backport.patch | 465 +++++++++++++++++++++ .../racket-gui-tethered-launcher-backport.patch | 26 ++ gnu/packages/racket.scm | 98 +++-- 4 files changed, 556 insertions(+), 37 deletions(-) create mode 100644 gnu/packages/patches/racket-enable-scheme-backport.patch create mode 100644 gnu/packages/patches/racket-gui-tethered-launcher-backport.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index b7339ff472..9bfeede60f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -41,7 +41,7 @@ # Copyright © 2020 Vinicius Monego # Copyright © 2021 Björn Höfling # Copyright © 2021 Greg Hogan -# Copyright © 2021 Philip McGrath +# Copyright © 2021, 2022 Philip McGrath # Copyright © 2021 Arun Isaac # Copyright © 2021 Sharlatan Hellseher # Copyright © 2021 Dmitry Polyakov @@ -1749,6 +1749,8 @@ dist_patch_DATA = \ %D%/packages/patches/ripperx-missing-file.patch \ %D%/packages/patches/rpcbind-CVE-2017-8779.patch \ %D%/packages/patches/rtags-separate-rct.patch \ + %D%/packages/patches/racket-enable-scheme-backport.patch \ + %D%/packages/patches/racket-gui-tethered-launcher-backport.patch \ %D%/packages/patches/racket-minimal-sh-via-rktio.patch \ %D%/packages/patches/remake-impure-dirs.patch \ %D%/packages/patches/restic-0.9.6-fix-tests-for-go1.15.patch \ diff --git a/gnu/packages/patches/racket-enable-scheme-backport.patch b/gnu/packages/patches/racket-enable-scheme-backport.patch new file mode 100644 index 0000000000..3a5a4a3d82 --- /dev/null +++ b/gnu/packages/patches/racket-enable-scheme-backport.patch @@ -0,0 +1,465 @@ +From 8d7687842f099e3e7e60d3a83fed58b2c6a92863 Mon Sep 17 00:00:00 2001 +From: Matthew Flatt +Date: Sun, 6 Feb 2022 10:36:09 -0700 +Subject: [PATCH 1/2] Chez Scheme: adapt bootfile build for supplied `Scheme=` + +(cherry picked from commit fca1e02349664060e10278ca2ce6577a949bebf5) + +(Fixed conflicts by dropping pbchunks and pbarch changes.) +--- + racket/src/ChezScheme/configure | 15 ++++++++++++++- + racket/src/ChezScheme/s/Mf-base | 4 ++-- + racket/src/ChezScheme/s/Mf-cross | 4 +++- + 3 files changed, 19 insertions(+), 4 deletions(-) + +diff --git a/racket/src/ChezScheme/configure b/racket/src/ChezScheme/configure +index 4515ffc105..0098829091 100755 +--- a/racket/src/ChezScheme/configure ++++ b/racket/src/ChezScheme/configure +@@ -45,6 +45,7 @@ threads=yes + nothreads=no + temproot="" + help=no ++forceworkarea=no + gzipmanpages=yes + installowner="" + installgroup="" +@@ -205,6 +206,9 @@ while [ $# != 0 ] ; do + --pb) + pb=yes + ;; ++ --force) ++ forceworkarea=yes ++ ;; + --installprefix=*) + installprefix=`echo $1 | sed -e 's/^--installprefix=//'` + ;; +@@ -439,6 +443,7 @@ if [ "$help" = "yes" ]; then + echo " --toolprefix= prefix tool (compiler, linker, ...) names" + echo " --[no]gzip-man-pages compress manual pages ($gzipmanpages)" + echo " --workarea= build directory ($w)" ++ echo " --force configure even without boot files" + echo " CC= C compiler" + echo " CPPFLAGS= C preprocessor flags" + echo " CFLAGS= C compiler flags" +@@ -721,8 +726,16 @@ case "${flagsmuni}" in + ;; + esac + ++if [ "$w" = "$m" ] ; then ++ configuringin="" ++else ++ configuringin=" in $w" ++fi ++ + if [ -f boot/$m/scheme.boot -o -f "$srcdir"/boot/$m/scheme.boot ] ; then +- echo "Configuring for $m" ++ echo "Configuring for $m$configuringin" ++elif [ "$forceworkarea" = yes ] ; then ++ echo "Configuring for $m$configuringin despite missing boot files" + else + if [ "$m" = "" ] ; then + maybem="" +diff --git a/racket/src/ChezScheme/s/Mf-base b/racket/src/ChezScheme/s/Mf-base +index cc6178c973..1f4a967998 100644 +--- a/racket/src/ChezScheme/s/Mf-base ++++ b/racket/src/ChezScheme/s/Mf-base +@@ -94,7 +94,7 @@ endif + # that Scheme and SCHEMEHEAPDIRS are set by Mf-cross to point to the host Scheme + # implementation + Scheme = ../bin/$m/scheme${ExeSuffix} +-export SCHEMEHEAPDIRS=../boot/%m ++export SCHEMEHEAPDIRS=../boot/$m + export CHEZSCHEMELIBDIRS=. + + # Define the libdirs separator character +@@ -691,4 +691,4 @@ reset-one: + + .PHONY: run + run: +- env SCHEMEHEAPDIRS=../boot/$m/ ../bin/$m/scheme $(ARGS) ++ env SCHEMEHEAPDIRS=${SCHEMEHEAPDIRS} ${Scheme} $(ARGS) +diff --git a/racket/src/ChezScheme/s/Mf-cross b/racket/src/ChezScheme/s/Mf-cross +index d796cbb459..397af59a28 100644 +--- a/racket/src/ChezScheme/s/Mf-cross ++++ b/racket/src/ChezScheme/s/Mf-cross +@@ -43,5 +43,7 @@ x$(xm).$(m): + $(MAKE) -f Mf-cross m=$(m) xm=$(xm) i=f o=3 d=0 xpatch + mv xpatch x$(xm).$(m) + ++ifneq ($(SCHEMEHEAPDIRS),:) + # Ensure that cross-compiling "nanopass.so" is rebuilt if the host compiler changed +-nanopass.so: ${SCHEME} ${SCHEMEHEAPDIRS}/petite.boot ${SCHEMEHEAPDIRS}/scheme.boot ++nanopass.so: ${Scheme} ${SCHEMEHEAPDIRS}/petite.boot ${SCHEMEHEAPDIRS}/scheme.boot ++endif +-- +2.32.0 + + +From 26c8e2c1d9b02ad85acef8bda40d92154cf0b699 Mon Sep 17 00:00:00 2001 +From: Matthew Flatt +Date: Sun, 6 Feb 2022 11:03:30 -0700 +Subject: [PATCH 2/2] configure: make `--enable-scheme` work with an executable + +When the same Chez Scheme version as used by Racket is already +available, then `--enable-scheme=...` can supply an executable. For +cross builds, `--enable-scheme=...` can still supply a build +directory, instead, as before. + +(cherry picked from commit 4f0e76855ce7e86107de495292a553469daf0b3f) +--- + racket/src/ChezScheme/makefiles/Makefile.in | 3 ++ + racket/src/README.txt | 30 +++++++++++--- + racket/src/configure | 8 +++- + racket/src/cs/README.txt | 6 ++- + racket/src/cs/c/Makefile.in | 44 ++++++++++++++++----- + racket/src/cs/c/configure | 24 +++++++++-- + racket/src/cs/c/configure.ac | 21 ++++++++-- + 7 files changed, 112 insertions(+), 24 deletions(-) + +diff --git a/racket/src/ChezScheme/makefiles/Makefile.in b/racket/src/ChezScheme/makefiles/Makefile.in +index c396efc851..3998ef9ccd 100644 +--- a/racket/src/ChezScheme/makefiles/Makefile.in ++++ b/racket/src/ChezScheme/makefiles/Makefile.in +@@ -59,6 +59,9 @@ reset: + %.boot: + (cd $(workarea) && $(MAKE) $*.boot) + ++auto.boot: ++ (cd $(workarea) && $(MAKE) $(defaultm).boot) ++ + # .bootquick to build boot files for + # with o=3 d=0 for the cross compiler, and only after + # building the kernel for the configured machine +diff --git a/racket/src/README.txt b/racket/src/README.txt +index 98647aebce..d77310b4a4 100644 +--- a/racket/src/README.txt ++++ b/racket/src/README.txt +@@ -354,6 +354,10 @@ variant of MinGW without "libdelayimp.a", get the implementation of + ======================================================================== + + Cross-compilation requires at least two flags to `configure`: ++`--host=OS` and either `--enable-racket=RACKET` or (for Racket CS) ++`--enable-scheme-SCHEME`. ++ ++More information: + + * `--host=OS`, where OS is something like `i386-gnu-linux` to + indicate the target platform. +@@ -374,11 +378,27 @@ Cross-compilation requires at least two flags to `configure`: + run `configure` again (with no arguments) in a "local" subdirectory + to create a build for the current platform. + +-An additional flag is needed for building Racket CS, unless the flag +-`--enable-racket=auto` is used: +- +- * `--enable-scheme=DIR`, where DIR is a path that has a "ChezScheme" +- directory where Chez Scheme is built for the host system. ++ * `--enable-scheme=SCHEME`, where SCHEME is a Chez Scheme executable ++ executable that runs on the build platform; the executable must be ++ the same version as used in Racket built for the target platform. ++ ++ Supplying `--enable-scheme=DIR` is also supported in cross-build ++ mode, where DIR is a path that has a "ChezScheme" directory where ++ Chez Scheme is built for the host system. ++ ++The `--enable-racket=RACKET` and `--enable-scheme=SCHEME` flags are ++allowed for non-cross builds, too: ++ ++ * For Racket CS, supplying either selects a Racket or Chez Scheme ++ implementation used to create boot files to the build platform. ++ Suppling Chez Scheme is a much more direct path, but when Racket is ++ supplied, its version does not have to match the version being ++ built. ++ ++ * For Racket BC, `--enable-racket=RACKET` selects a Racket for ++ prepare C sources to cooperate with garbage collection. Its version ++ needs to be close to the one being built, and potentially exactly ++ the same version. + + Some less commonly needed `configure` flags are for Racket BC: + +diff --git a/racket/src/configure b/racket/src/configure +index c9f3ba4419..1b53ec7ce2 100755 +--- a/racket/src/configure ++++ b/racket/src/configure +@@ -9,6 +9,7 @@ pb_dir="$dir/ChezScheme/boot/pb" + use_cs=maybe + use_bc=maybe + supplied_racket=no ++supplied_scheme=no + enable_boothelp= + + # We don't have to detect conflicts like `--enable-csdefault --enable-bcdefault`, +@@ -34,6 +35,9 @@ for arg in $*; do + --enable-racket=*) + supplied_racket=yes + ;; ++ --enable-scheme=*) ++ supplied_scheme=yes ++ ;; + --help | -h) + echo $0: + echo see --help-bc or --help-cs, since the Racket CS build and the +@@ -70,8 +74,8 @@ elif test "$use_cs" = "maybe" ; then + fi + + if test "$use_cs" = "yes" ; then +- if test $use_bc = no -a $supplied_racket = no -a ! -d "$pb_dir" ; then +- echo $0: must have $pb_dir or --enable-racket=... for --enable-csonly ++ if test $use_bc = no -a $supplied_racket = no -a $supplied_scheme = no -a ! -d "$pb_dir" ; then ++ echo $0: must have $pb_dir, --enable-racket=... or --enable-scheme=... for --enable-csonly + exit 1 + fi + +diff --git a/racket/src/cs/README.txt b/racket/src/cs/README.txt +index 2ece417b78..8e6fc57b74 100644 +--- a/racket/src/cs/README.txt ++++ b/racket/src/cs/README.txt +@@ -39,6 +39,11 @@ build: + installed in the "../ChezScheme/boot/pb" directory as described by + "../ChezScheme/BUILDING". + ++ Supplying `--enable-scheme=...` is also an option if you alerady ++ have the same version of Chez Scheme built on the current platform. ++ Another build will be created, anyway, but more quickly than ++ without Chez Scheme. ++ + * Racket is needed to generate the files in the "schemified" + directory from the sources in sibling directories like "../io". The + Racket version must be practically the same as the current Racket +@@ -48,7 +53,6 @@ build: + Unlike Chez Scheme boot files, the files generated in "schemified" + are human-readable and -editable Scheme code. That provides a way + out of bootstrapping black holes, even without BC. +- + + + ======================================================================== +diff --git a/racket/src/cs/c/Makefile.in b/racket/src/cs/c/Makefile.in +index 54a644a1d9..d73993f0fc 100644 +--- a/racket/src/cs/c/Makefile.in ++++ b/racket/src/cs/c/Makefile.in +@@ -12,7 +12,9 @@ CS_HOST_WORKAREA_PREFIX = @CS_HOST_WORKAREA_PREFIX@ + SCHEME_HOST_WORKAREA = $(CS_HOST_WORKAREA_PREFIX)$(SCHEME_WORKAREA) + SCHEME_BIN = $(SCHEME_HOST_WORKAREA)/$(MACH)/bin/$(MACH)/scheme + SCHEME_INC = $(SCHEME_HOST_WORKAREA)/$(MACH)/boot/$(MACH) +-SCHEME = $(SCHEME_BIN) -B $(SCHEME_INC)/petite.boot -B $(SCHEME_INC)/scheme.boot ++SCHEME_built = $(SCHEME_BIN) -B $(SCHEME_INC)/petite.boot -B $(SCHEME_INC)/scheme.boot ++SCHEME_existing = @MAKE_SCHEME_SCHEME@ ++SCHEME = $(SCHEME@USE_SCHEME_MODE@) + + TARGET_MACH = @TARGET_MACH@ + SCHEME_TARGET_INC = $(SCHEME_WORKAREA)/$(TARGET_MACH)/boot/$(TARGET_MACH) +@@ -88,7 +90,7 @@ mainsrcdir = @srcdir@/../.. + @INCLUDEDEP@ @srcdir@/../../version/version.mak + + cs: +- $(MAKE) scheme@T_CROSS_MODE@ ++ $(MAKE) scheme@MAKE_SCHEME_MODE@ + $(MAKE) racket-so + cd rktio; $(MAKE) + $(MAKE) racketcs +@@ -121,9 +123,13 @@ racket-so: + + RACKET_SO_ENV = @CONFIGURE_RACKET_SO_COMPILE@ + ++TARGET_MACH_built = $(TARGET_MACH) ++TARGET_MACH_existing = xc-$(TARGET_MACH) ++XPATCH_FILE = $(SCHEME_WORKAREA)/$(TARGET_MACH@USE_SCHEME_MODE@)/s/xpatch ++ + CS_PROGS = SCHEME="$(SCHEME)" + CS_OPTS = COMPRESS_COMP=@COMPRESS_COMP@ @ENABLE_OR_DISABLE_WPO@ +-CS_OPTScross = $(CS_OPTS) CSO=$(MACH) CROSS_COMP="--xpatch $(SCHEME_WORKAREA)/$(TARGET_MACH)/s/xpatch" ++CS_OPTScross = $(CS_OPTS) CSO=$(MACH) CROSS_COMP="--xpatch $(XPATCH_FILE)" + PASS_COMPILE_DEPS = EXTRA_COMPILE_DEPS="$(SCHEME_INC)/petite.boot $(SCHEME_INC)/scheme.boot" + + build-racket-so: +@@ -163,6 +169,15 @@ pb-bootquick: + cd $(SCHEME_WORKAREA) && $(MAKE) reset + $(SHELL) $(srcdir)/ready_boot.sh $(MACH) $(SCHEME_WORKAREA) + ++scheme-via-scheme: ++ $(MAKE) $(SCHEME_WORKAREA)/boot/$(MACH)/scheme.boot ++ $(MAKE) mach-make ++ ++$(SCHEME_WORKAREA)/boot/$(MACH)/scheme.boot: ++ mkdir -p $(SCHEME_WORKAREA) ++ $(MAKE) config-scheme CONFIG_SCHEME_MODE="$(CONFIG_SCHEME_MODE) --force" ++ cd $(SCHEME_WORKAREA) && $(MAKE) $(MACH).boot Scheme="$(SCHEME)" SCHEMEHEAPDIRS=: o=3 d=0 what=all ++ + mach-make: + $(MAKE) config-scheme + cd $(SCHEME_WORKAREA) && $(MAKE) +@@ -182,24 +197,33 @@ config-scheme: + + scheme-cross: + env MAKE_BOOT_FOR_CROSS=yes SCHEME_SRC="$(SCHEME_DIR)" SCHEME_WORKAREA=$(SCHEME_WORKAREA) MACH="$(TARGET_MACH)" $(BOOTSTRAP_RACKET) "$(SCHEME_DIR)"/rktboot/make-boot.rkt ++ $(MAKE) finish-scheme-cross ++ ++finish-scheme-cross: + $(SHELL) $(srcdir)/reset_boot.sh $(TARGET_MACH) $(SCHEME_WORKAREA) + cd $(SCHEME_WORKAREA) && "$(UP_SCHEME_DIR)"/configure @SCHEME_CROSS_CONFIG_ARGS@ $(SCHEME_CONFIG_VARS) + cd $(SCHEME_WORKAREA)/$(TARGET_MACH)/c && $(CHOST_HACK@T_CROSS_MODE@) $(MAKE) o=o cross=t +- $(MAKE) $(SCHEME_WORKAREA)/$(TARGET_MACH)/s/xpatch ++ $(MAKE) $(XPATCH_FILE) ++ ++scheme-cross-via-scheme: ++ $(MAKE) $(SCHEME_WORKAREA)/boot/$(TARGET_MACH)/scheme.boot MACH=$(TARGET_MACH) ++ $(MAKE) finish-scheme-cross + + # Rebuild patch file and cross "petite.boot" and "scheme.boot" when older +-# than the build-host "scheme.boot" or when "make-boot.rkt" touchs dummy boot files +-XPATCH_DEPS = $(SCHEME_HOST_WORKAREA)/$(MACH)/boot/$(MACH)/scheme.boot \ +- $(SCHEME_WORKAREA)/boot/$(TARGET_MACH)/scheme.boot ++# than the build- use as Racket for build; or "auto" to create +- --enable-scheme= use as host's build directory for cross ++ --enable-scheme= use as host build for cross + --enable-mach= use Chez Scheme machine type + --enable-target= cross-build for Chez Scheme machine type + --enable-portable prefer portable to host-specific +@@ -2867,7 +2870,7 @@ show_explicitly_enabled "${enable_xonx}" "Unix style" + show_explicitly_enabled "${enable_libzo}" 'Compiled ".zo" files moved to lib' + + show_explicitly_set "${enable_racket}" "Racket" +-show_explicitly_set "${enable_scheme}" "Chez Scheme build directory" ++show_explicitly_set "${enable_scheme}" "Chez Scheme for build" + show_explicitly_set "${enable_mach}" "machine type" + show_explicitly_set "${enable_target}" "cross-build machine type" + show_explicitly_enabled "${enable_portable}" "portable" +@@ -4745,9 +4748,21 @@ esac + + SCHEME_DIR=${srcdir}/../../ChezScheme + MAKE_BUILD_SCHEME=checkout ++USE_SCHEME_MODE="_built" ++MAKE_SCHEME_MODE="${T_CROSS_MODE}" + + if test "${enable_scheme}" != "" ; then +- CS_HOST_WORKAREA_PREFIX="${enable_scheme}/" ++ if test -d "${enable_scheme}" ; then ++ # Directory exists, so use it as a build directory ++ echo "Using supplied Scheme path as a build directory" ++ CS_HOST_WORKAREA_PREFIX="${enable_scheme}/" ++ else ++ # Directory does not exist, so assume it's an executable ++ echo "Using supplied Scheme path as an executable" ++ MAKE_SCHEME_MODE="${T_CROSS_MODE}-via-scheme" ++ MAKE_SCHEME_SCHEME="${enable_scheme}" ++ USE_SCHEME_MODE="_existing" ++ fi + fi + + if test "${enable_racket}" != "" ; then +@@ -6012,6 +6027,9 @@ SCHEME_CROSS_CONFIG_ARGS="--machine=${TARGET_MACH} --disable-x11 ${cs_auto_flags + + + ++ ++ ++ + + + +diff --git a/racket/src/cs/c/configure.ac b/racket/src/cs/c/configure.ac +index 464ebe1760..aaee88156d 100644 +--- a/racket/src/cs/c/configure.ac ++++ b/racket/src/cs/c/configure.ac +@@ -23,7 +23,7 @@ AC_ARG_ENABLE(compressmore, [ --enable-compressmore compress compiled code ev + AC_ARG_ENABLE(compressboot, [ --enable-compressboot compress boot files]) + m4_include(../ac/path_arg.m4) + AC_ARG_ENABLE(racket, [ --enable-racket= use as Racket for build; or "auto" to create]) +-AC_ARG_ENABLE(scheme, [ --enable-scheme= use as host's build directory for cross]) ++AC_ARG_ENABLE(scheme, [ --enable-scheme= use as host build for cross]) + AC_ARG_ENABLE(mach, [ --enable-mach= use Chez Scheme machine type ]) + AC_ARG_ENABLE(target, [ --enable-target= cross-build for Chez Scheme machine type ]) + m4_include(../ac/portable_arg.m4) +@@ -81,7 +81,7 @@ show_explicitly_disabled "${enable_compressboot}" "Compressed boot files" + show_explicitly_enabled "${enable_xonx}" "Unix style" + m4_include(../ac/path_show.m4) + show_explicitly_set "${enable_racket}" "Racket" +-show_explicitly_set "${enable_scheme}" "Chez Scheme build directory" ++show_explicitly_set "${enable_scheme}" "Chez Scheme for build" + show_explicitly_set "${enable_mach}" "machine type" + show_explicitly_set "${enable_target}" "cross-build machine type" + m4_include(../ac/portable_show.m4) +@@ -504,9 +504,21 @@ esac + + SCHEME_DIR=${srcdir}/../../ChezScheme + MAKE_BUILD_SCHEME=checkout ++USE_SCHEME_MODE="_built" ++MAKE_SCHEME_MODE="${T_CROSS_MODE}" + + if test "${enable_scheme}" != "" ; then +- CS_HOST_WORKAREA_PREFIX="${enable_scheme}/" ++ if test -d "${enable_scheme}" ; then ++ # Directory exists, so use it as a build directory ++ echo "Using supplied Scheme path as a build directory" ++ CS_HOST_WORKAREA_PREFIX="${enable_scheme}/" ++ else ++ # Directory does not exist, so assume it's an executable ++ echo "Using supplied Scheme path as an executable" ++ MAKE_SCHEME_MODE="${T_CROSS_MODE}-via-scheme" ++ MAKE_SCHEME_SCHEME="${enable_scheme}" ++ USE_SCHEME_MODE="_existing" ++ fi + fi + + if test "${enable_racket}" != "" ; then +@@ -821,6 +833,9 @@ AC_SUBST(DIFF_MACH) + AC_SUBST(CROSS_MODE) + AC_SUBST(T_CROSS_MODE) + AC_SUBST(TT_CROSS_MODE) ++AC_SUBST(MAKE_SCHEME_MODE) ++AC_SUBST(MAKE_SCHEME_SCHEME) ++AC_SUBST(USE_SCHEME_MODE) + AC_SUBST(SETUP_BOOT_MODE) + AC_SUBST(OSX) + AC_SUBST(NOT_OSX) +-- +2.32.0 + diff --git a/gnu/packages/patches/racket-gui-tethered-launcher-backport.patch b/gnu/packages/patches/racket-gui-tethered-launcher-backport.patch new file mode 100644 index 0000000000..abf253486f --- /dev/null +++ b/gnu/packages/patches/racket-gui-tethered-launcher-backport.patch @@ -0,0 +1,26 @@ +From aa792e707b1fbc5cc33691bfaee5828dc3fbebaa Mon Sep 17 00:00:00 2001 +From: Matthew Flatt +Date: Mon, 31 Jan 2022 15:31:22 -0700 +Subject: [PATCH] fix creation of tethered launchers + +Related to racket/racket#4133 + +(cherry picked from commit 563c68432f127729592f234ef30c31e92618b517) +--- + share/pkgs/gui-lib/mred/installer.rkt | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/gui-lib/mred/installer.rkt b/gui-lib/mred/installer.rkt +index b1691472..9ef06c53 100644 +--- a/share/pkgs/gui-lib/mred/installer.rkt ++++ b/share/pkgs/gui-lib/mred/installer.rkt +@@ -72,4 +72,5 @@ + (list "-A" (path->string (find-system-path 'addon-dir))))) + + (define (config-flags) +- (list "-G" (path->string (find-config-dir)))) ++ (list "-X" (path->string (find-collects-dir)) ++ "-G" (path->string (find-config-dir)))) +-- +2.32.0 + diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index ec9e836a4c..3911dc1ad8 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -43,6 +43,7 @@ #:use-module (gnu packages libedit) #:use-module (gnu packages libffi) #:use-module (gnu packages multiprecision) + #:use-module (gnu packages ncurses) #:use-module (gnu packages sqlite) #:use-module (gnu packages tls) #:use-module (gnu packages xorg) @@ -95,6 +96,41 @@ ;; ;; Code: +(define %racket-version "8.4") +;; ^ Remember to update racket-bootstrap-chez-bootfiles! +(define %racket-commit + (string-append "v" %racket-version)) +(define %racket-origin + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/racket") + (commit %racket-commit))) + (sha256 + (base32 "1vpl66gdgc8rnldmn8rmb7ar9l057jqjvgpfn29k57i3c5skr8s6")) + (file-name (git-file-name "racket" %racket-version)) + (patches (search-patches "racket-minimal-sh-via-rktio.patch" + ;; Remove by Racket 8.5: + "racket-enable-scheme-backport.patch")) + (modules '((guix build utils))) + (snippet + #~(begin + (use-modules (guix build utils)) + ;; Unbundle Chez submodules. + (with-directory-excursion "racket/src/ChezScheme" + ;; TODO: consider putting this in a (guix ...) or (guix build ...) + ;; module so it can be shared with the upstream Chez Scheme origin + ;; without cyclic issues. + (for-each (lambda (dir) + (when (directory-exists? dir) + (delete-file-recursively dir))) + '("stex" + "nanopass" + "lz4" + "zlib"))) + ;; Unbundle libffi. + (delete-file-recursively "racket/src/bc/foreign/libffi"))))) + (define cfg-flag:sh-for-rktio `(string-append "CPPFLAGS=-DGUIX_RKTIO_PATCH_BIN_SH=" (assoc-ref %build-inputs "sh") @@ -128,41 +164,17 @@ (define-public racket-minimal (package (name "racket-minimal") - (version "8.3") ; note: remember to also update racket! - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/racket/racket") - (commit (string-append "v" version)))) - (sha256 - "1i1jnv1wb0kanfg47hniafx2vhwjc33qqx66lq7wkf5hbmgsyws3") - (file-name (git-file-name name version)) - (patches (search-patches "racket-minimal-sh-via-rktio.patch")) - (modules '((guix build utils))) - (snippet - (with-imported-modules '((guix build utils)) - #~(begin - ;; Unbundle Chez submodules. - (with-directory-excursion "racket/src/ChezScheme" - ;; Remove bundled libraries (copied from 'chez-scheme'). - (for-each delete-file-recursively - '("stex" - "nanopass" - "lz4" - "zlib"))) - ;; Unbundle libffi. - (delete-file-recursively "racket/src/bc/foreign/libffi")))))) + (version %racket-version) + (source %racket-origin) (inputs `(;; common to all racket-minimal variants: ("openssl" ,openssl) ("sqlite" ,sqlite) - ("sh" ,bash-minimal) + ("sh" ,bash-minimal) ;; <- for `system` + ("ncurses" ,ncurses) ;; <- for #%terminal ;; only for CS ("zlib" ,zlib) - ("zlib:static" ,zlib "static") - ("lz4" ,lz4) - ("lz4:static" ,lz4 "static"))) + ("lz4" ,lz4))) (native-inputs `(("bootfiles" ,racket-bootstrap-chez-bootfiles) ,@(package-native-inputs racket-bootstrap-chez-bootfiles))) @@ -263,9 +275,8 @@ DrRacket IDE, are not included.") (name "racket-minimal-bc-3m") (inputs (modify-inputs (package-inputs racket-minimal) - (delete "zlib" "zlib:static" "lz4" "lz4:static") - (prepend libffi ;; <- only for BC variants - ))) + (prepend libffi) ;; <- only for BC variants + (delete "zlib" "lz4"))) (native-inputs `(("libtool" ,libtool) ("racket" ,(if (%current-target-system) @@ -327,6 +338,11 @@ code to use the 3M garbage collector."))) (package (inherit racket-minimal) (name "racket-bootstrap-chez-bootfiles") + (version "9.5.7.3") + ;; The version should match `(scheme-fork-version-number)`. + ;; See racket/src/ChezScheme/s/cmacros.ss c. line 360. + ;; It will always be different than the upstream version! + ;; When updating, remember to also update %racket-version in racket.scm. (inputs `()) (native-inputs `(("racket" ,(if (%current-target-system) @@ -416,7 +432,7 @@ Chez Scheme.") (package (inherit racket-minimal) (name "racket") - (version (package-version racket-minimal)) ; needed for origin uri to work + (version %racket-version) (source (origin (method url-fetch) @@ -425,7 +441,11 @@ Chez Scheme.") %installer-mirrors)) (sha256 (base32 - "0jdr0y7scvv2a3sq456ifrgq0yfsbiwavdf2m86zmrapp481mby4")) + "0dsv7br85nvh5gjfihznq9jb1dzas0f6gnv5qwc9zmb7yn75nrp5")) + (patches + ;; remove in Racket 8.5 + ;; see https://github.com/racket/racket/issues/4133 + (search-patches "racket-gui-tethered-launcher-backport.patch")) (snippet #~(begin (use-modules (guix build utils) @@ -442,7 +462,13 @@ Chez Scheme.") (with-directory-excursion "share/pkgs" (for-each delete-file-recursively '#+%main-repo-main-distribution-pkgs)) - #t)))) + ;; Minimal workaround for FSDG issue: + ;; see . + ;; We will backport a better fix once we use Git + ;; origins for Racket packages. + (delete-file-recursively "share/pkgs/srfi-doc-nonfree") + (substitute* "share/pkgs/srfi/info.rkt" + (("\"srfi-doc-nonfree\"") "")))))) (inputs `(("cairo" ,cairo) ("fontconfig" ,fontconfig) @@ -461,7 +487,7 @@ Chez Scheme.") (native-inputs `(("racket" ,racket-minimal) ("extend-layer" ,extend-layer) - ("main-repo" ,(package-source racket-minimal)))) + ("main-repo" ,%racket-origin))) (arguments `(#:phases (modify-phases %standard-phases -- cgit v1.2.3 From 81e532ff1908fcbbc35a1688fc9cb50982a68af2 Mon Sep 17 00:00:00 2001 From: Philip McGrath Date: Sun, 27 Feb 2022 16:28:59 -0500 Subject: gnu: racket: Use Git origins for Racket packages. * gnu/packages/patches/racket-gui-tethered-launcher-backport.patch: Adjust path. * gnu/packages/racket.scm (racket-packages-origin) (simple-racket-origin): New procedures. (extend-layer): Rename to ... (configure-layer.rkt): ... this variable. Tweak command-line arguments. Adapt to 'config-tethered-apps-dir'. (racket): Stop inheriting from 'racket-minimal'. [version]: Use '%racket-version'. [source]: Stop using bundled tarball. [inputs]: Remove labels. Add 'racket-minimal' and package sources. [native-inputs]: Reduce to racket-minimal. Untested, as cross-compilation doesn't work yet. [arguments]: Rewrite to use G-expressions, package sources from 'inputs', an explicit 'install' phase, and the revised 'configure-layer.rkt'. Signed-off-by: Liliana Marie Prikler --- .../racket-gui-tethered-launcher-backport.patch | 6 +- gnu/packages/racket.scm | 714 ++++++++++++++++----- 2 files changed, 540 insertions(+), 180 deletions(-) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/racket-gui-tethered-launcher-backport.patch b/gnu/packages/patches/racket-gui-tethered-launcher-backport.patch index abf253486f..1e018eaa79 100644 --- a/gnu/packages/patches/racket-gui-tethered-launcher-backport.patch +++ b/gnu/packages/patches/racket-gui-tethered-launcher-backport.patch @@ -7,13 +7,13 @@ Related to racket/racket#4133 (cherry picked from commit 563c68432f127729592f234ef30c31e92618b517) --- - share/pkgs/gui-lib/mred/installer.rkt | 3 ++- + gui-lib/mred/installer.rkt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gui-lib/mred/installer.rkt b/gui-lib/mred/installer.rkt index b1691472..9ef06c53 100644 ---- a/share/pkgs/gui-lib/mred/installer.rkt -+++ b/share/pkgs/gui-lib/mred/installer.rkt +--- a/gui-lib/mred/installer.rkt ++++ b/gui-lib/mred/installer.rkt @@ -72,4 +72,5 @@ (list "-A" (path->string (find-system-path 'addon-dir))))) diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index 3911dc1ad8..446abf2f1c 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -28,7 +28,9 @@ #:use-module (guix gexp) #:use-module (guix build-system gnu) #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26) #:use-module (ice-9 match) + #:use-module (ice-9 exceptions) #:use-module (gnu packages) #:use-module (gnu packages autotools) #:use-module (gnu packages bash) @@ -389,171 +391,505 @@ Scheme, and @code{cs-bootstrap} does not currently support building upstream Chez Scheme.") (license (list license:asl2.0))))) +(define (racket-packages-origin name origin specs) + "Extract from ORIGIN the sources for the Racket packages specified by SPECS, +a non-empty list of package specifications. In the resulting file-like +object, each package's source will be in the directory +\"/share/racket/pkgs/PKG/\", where PKG is the Racket name for the package. +The NAME will be used in the store file name for the resulting file-like +object. -(define %installer-mirrors - ;; Source: - ;; https://github.com/racket/racket-lang-org/blob/master/download/data.rkt#L58 - ;; Matthew Flatt says: "note that many are commented out" - ;; INVARIANT: End with a trailing "/"! - '("https://mirror.racket-lang.org/installers/" - "https://www.cs.utah.edu/plt/installers/" - "https://plt.cs.northwestern.edu/racket-mirror/" - "https://mirror.csclub.uwaterloo.ca/racket/racket-installers/" - ;; Universität Tübingen is using a self-signed HTTPS certificate: - "http://mirror.informatik.uni-tuebingen.de/mirror/racket/" - "https://racket.infogroep.be/" - )) +A package specification is a list of the form: -(define %main-repo-main-distribution-pkgs - ;; These are the packages developed in the main Racket Git repository - ;; that are part of the main distribution. - '("at-exp-lib" - "base" - "compiler-lib" - ;; NOT "compiler-test" - "compiler" - "net-doc" - "net-lib" - ;; NOT "net-test" - "net" - ;; NOT "plt-services" - ;; NOT "racket-benchmarks" - ;; NOT "racket-build-guide" - "racket-doc" - "racket-index" - "racket-lib" - ;; NOT "racket-test-core" - ;; NOT "racket-test-extra" - ;; NOT "racket-test" - "zo-lib")) + (PKG PATH) +where PATH is the path to the package source relative to ORIGIN---possibly +\".\". As a special case, a package specification may also be a string, which +is equivalent to: + + (PKG PKG) + +Examples: + +- \"expeditor\" +- (\"main-distribution\" \".\") +- (\"racket-lib\" \"pkgs/racket-lib\")" + (computed-file + (string-append "racket-pkg-" name "-sources") + (with-imported-modules `((guix build utils)) + #~(begin + (use-modules (guix build utils)) + (mkdir-p (string-append #$output "/share/racket/pkgs")) + (chdir (string-append #$output "/share/racket/pkgs")) + #$@(map (match-lambda + ((? string? name) + #~(copy-recursively #$(file-append origin (string-append "/" name)) + #$name)) + ((name ".") + #~(copy-recursively #$origin #$name)) + ((name path) + #~(copy-recursively #$(file-append origin (string-append "/" path)) + #$name))) + specs))))) + +(define (simple-racket-origin repo hash specs) + "Like 'racket-packages-origin', but specialized for packages hosted at +\"https://github.com/racket/REPO\" with sha256 checksum HASH. REPO is also +used to build the name of the resulting store item." + (racket-packages-origin + repo + (origin + (method git-fetch) + (uri (git-reference + (url (format #f "https://github.com/racket/~a" repo)) + (commit %racket-commit))) + (sha256 hash) + (file-name (git-file-name (string-append "racket-" repo) + %racket-version))) + specs)) (define-public racket (package - (inherit racket-minimal) (name "racket") (version %racket-version) - (source - (origin - (method url-fetch) - (uri (map (lambda (base) - (string-append base version "/racket-src.tgz")) - %installer-mirrors)) - (sha256 - (base32 - "0dsv7br85nvh5gjfihznq9jb1dzas0f6gnv5qwc9zmb7yn75nrp5")) - (patches - ;; remove in Racket 8.5 - ;; see https://github.com/racket/racket/issues/4133 - (search-patches "racket-gui-tethered-launcher-backport.patch")) - (snippet - #~(begin - (use-modules (guix build utils) - (ice-9 match) - (ice-9 regex)) - ;; unbundle minimal Racket - (for-each delete-file-recursively - '("collects" - "doc" - "etc" - "README" - "src")) - ;; unbundle package sources included elsewhere - (with-directory-excursion "share/pkgs" - (for-each delete-file-recursively - '#+%main-repo-main-distribution-pkgs)) - ;; Minimal workaround for FSDG issue: - ;; see . - ;; We will backport a better fix once we use Git - ;; origins for Racket packages. - (delete-file-recursively "share/pkgs/srfi-doc-nonfree") - (substitute* "share/pkgs/srfi/info.rkt" - (("\"srfi-doc-nonfree\"") "")))))) + (source #f) + (native-inputs (list racket-minimal)) ; XXX: conservative estimate, untested (inputs - `(("cairo" ,cairo) - ("fontconfig" ,fontconfig) - ("glib" ,glib) - ("glu" ,glu) - ("gmp" ,gmp) - ("gtk+" ,gtk+) ; propagates gdk-pixbuf+svg - ("libjpeg" ,libjpeg-turbo) - ("libpng" ,libpng) - ("libx11" ,libx11) - ("mesa" ,mesa) - ("mpfr" ,mpfr) - ("pango" ,pango) - ("unixodbc" ,unixodbc) - ("libedit" ,libedit))) - (native-inputs - `(("racket" ,racket-minimal) - ("extend-layer" ,extend-layer) - ("main-repo" ,%racket-origin))) + (list + cairo + fontconfig + glib + glu + gmp + gtk+ ;; propagates gdk-pixbuf+svg + libjpeg-turbo + libpng + libx11 ;; ?? wayland ?? + mesa + mpfr + pango + unixodbc + libedit ;; TODO reconsider in light of expeditor and readline-gpl + racket-minimal ;; <-- TODO non-tethered layer + (simple-racket-origin + "2d" (base32 "1zzcz5qyjv7syi41vb8jkxjp1rqgj61zbsdrg0nlc4qy9qsafzgr") + '("2d" "2d-doc" "2d-lib")) + (simple-racket-origin + "algol60" (base32 "09kj6asypmc24n29w0izc9p0q8hpga2hpkchsypfwn5c8zpvihlx") + '(("algol60" "."))) + (racket-packages-origin + "racket" %racket-origin + '(("base" "pkgs/base") ;; FIXME belongs in racket-minimal + ("racket-lib" "pkgs/racket-lib") ;; FIXME belongs in racket-minimal + ("at-exp-lib" "pkgs/at-exp-lib") + ("compiler" "pkgs/compiler") + ("compiler-lib" "pkgs/compiler-lib") + ("net" "pkgs/net") + ("net-doc" "pkgs/net-doc") + ("net-lib" "pkgs/net-lib") + ("racket-doc" "pkgs/racket-doc") + ("racket-index" "pkgs/racket-index") + ("sandbox-lib" "pkgs/sandbox-lib") + ("zo-lib" "pkgs/zo-lib"))) + (simple-racket-origin + "cext-lib" (base32 "00w38jpv88fpl4pgj6ndnysvn0s21rjvj0xhznay80msan0vc341") + '("cext-lib" "dynext-lib")) + (simple-racket-origin + "class-iop" (base32 "08z57q83cr7wnh6g8ah3hdhmsmf9zp1jfs7yvxv188l3hzvygy5l") + '("class-iop-lib")) + (simple-racket-origin + "compatibility" (base32 "0bfqwscjpyi325br5pa6g62g9c8lq18a80zp5g3d2qzn3n3mi6x0") + '("compatibility" "compatibility-doc" "compatibility-lib")) + (simple-racket-origin + "contract-profile" (base32 "1xm2z8g0dpv5d9h2sg680vx1a8ix9gbsdpxxb8qv1w7akp73paj3") + '(("contract-profile" "."))) + (simple-racket-origin + "data" (base32 "10iabgrk9alaggvksnyb0hdq7f1p30pq6pq2bcakvhzpxwiv1f55") + '("data" "data-doc" "data-enumerate-lib" "data-lib")) + (simple-racket-origin + "datalog" (base32 "0n5j5gnqh7g31mvgx19ggl18hirzbvq2r189lbngmnrmbc7b73fp") + '(("datalog" "."))) + (simple-racket-origin + "db" (base32 "1n02ja0yj3mjjhmz0yv04yfhyvrsznbljn8bjviyfxnm4xf9rcc5") + '("db" "db-doc" "db-lib")) + (simple-racket-origin + "deinprogramm" (base32 "1is6fapgv6rxfjz47nh6qf3kh7y7sjdinakaxqffi46gf1al8prd") + '("deinprogramm" "deinprogramm-signature")) + (simple-racket-origin + "distributed-places" (base32 "1dajpkj9balqcpv6cdk9hwjz592h1vq8rrx5vncariiac4vbdpa0") + '("distributed-places" "distributed-places-doc" "distributed-places-lib")) + (simple-racket-origin + "draw" (base32 "1xgjfbh70hqw67z88iqqajg98d04qwbzn6im2wj47rs28jxlm9ly") + '("draw" "draw-doc" "draw-lib")) + (simple-racket-origin + "drracket" (base32 "0m3l4an3nq2ycd1h287s1az2v2zprjbzd8if2x7d5r71vaj4i00c") + '("drracket" + "drracket-plugin-lib" + "drracket-tool" + "drracket-tool-doc" + "drracket-tool-lib" + "drracket-tool-text-lib")) + (simple-racket-origin + "ds-store" (base32 "0ajr27kipp4dr1qlisaghsb3h7lhhjwrfw2r79b5myczsa1mp661") + '("ds-store" "ds-store-doc" "ds-store-lib")) + (simple-racket-origin + "eli-tester" (base32 "0icx6wn14gjm8kdmq1jppqgq87sxkras4qb5xmdr6wigxafhjqyk") + '(("eli-tester" "."))) + (simple-racket-origin + "eopl" (base32 "1fmiixj6rxsgzwvgva8lvrvv0gl49v2405mp3s0i7ipis5c4n27s") + '(("eopl" "."))) + (simple-racket-origin + "errortrace" (base32 "14m7rhaxngj36070iw15am434hm438pfgmwjfsiqhsglz4pcxhip") + '("errortrace" "errortrace-doc" "errortrace-lib")) + (simple-racket-origin + "expeditor" (base32 "07djzxs6307l51mcsk3yr2g4g47ayxa3878g7sf5xhqdr4hd9vxf") + '("expeditor" "expeditor-doc" "expeditor-lib")) + (simple-racket-origin + "frtime" (base32 "0ydz2yn8vvv6z7brwlswcyx0f31a6y6d443i89rysfvd2xkhpfd5") + '(("frtime" "."))) + (simple-racket-origin + "future-visualizer" (base32 "1758qq769m0r14xf64sl2ix2l9z340kvapar0j7s5kdg42lmvnhm") + '("future-visualizer" + "future-visualizer-pict" + "future-visualizer-typed")) + (simple-racket-origin + "games" (base32 "0kpn3izlx1ccd0pj0dnvmnrhny51b85xy418a7psj70lz8j8415d") + '(("games" "."))) + (racket-packages-origin + "gui" (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/gui") + (commit %racket-commit))) + (sha256 (base32 + "1x33jgrx3r32k7hgwr591z3xqv1m2r5nc4km2fnxv0ak2xa0j3gj")) + (patches + ;; remove in Racket 8.5 + ;; see https://github.com/racket/racket/issues/4133 + (search-patches "racket-gui-tethered-launcher-backport.patch")) + (file-name (git-file-name "racket-gui" %racket-version))) + '("gui" "gui-doc" "gui-lib" "tex-table")) + (simple-racket-origin + "gui-pkg-manager" (base32 "1ji9448d723nklqvycwdswj0ni28sabrncag14f9mx47did5myb5") + '("gui-pkg-manager-lib")) + (simple-racket-origin + "htdp" (base32 "0r4ykybcpr10y2db9rlza9pr0xh58nd7ac389mjcxp8g386hgihl") + '("htdp" "htdp-doc" "htdp-lib")) + (simple-racket-origin + "html" (base32 "18n1jnjgzfknc8nv8dppi85nb8q08gqdwkg6hfjk08x0p00anx2x") + '("html" "html-doc" "html-lib")) + (simple-racket-origin + "icons" (base32 "1s5a6j11fg3fdr6b7vm2q7q178d7q8b8igy73bs211r27qrd1gg7") + '(("icons" "."))) + (simple-racket-origin + "images" (base32 "0rpjxqw34bq5m08kh1ldl1mr7s9z1lyydxxcyzb292kqh9qiqvfl") + '("images" "images-doc" "images-gui-lib" "images-lib")) + (simple-racket-origin + "lazy" (base32 "176ylzgbdsbmqknpihaz519afq71pyjkv1h87j5v8jfbpbddyfsf") + '(("lazy" "."))) + (simple-racket-origin + "macro-debugger" (base32 "14hyrwbkffr61fk44l02xb47bhv5zccw0ymaa9kxld86hvyqhqbm") + '("macro-debugger" "macro-debugger-text-lib")) + (simple-racket-origin + "main-distribution" (base32 "0m2n9s32s8a4a2gn4ywrm9l8jycdm5ayi5w9kh5wchhrrw7qzq7y") + '(("main-distribution" "."))) + (simple-racket-origin + "make" (base32 "10852fj30bz5r46c3d99s37fkgy5yh44gb01j29sf3kxnhi0g2sa") + '(("make" "."))) + (simple-racket-origin + "math" (base32 "02sqbnvxvmvslk33b44fx4v93zafcvhva0cx8z21jqbl5wp217ac") + '("math" "math-doc" "math-lib")) + (simple-racket-origin + "mysterx" (base32 "11p9jzrafw0hizhl0cs4sxx7rv281185q8hryic2rpk0kzjdyr48") + '(("mysterx" "."))) + (simple-racket-origin + "mzcom" (base32 "0rc9pfj7gwm5azghqvcibz6si1x5s2v8mr2yngk7ssq9gzfbi6a4") + '(("mzcom" "."))) + (simple-racket-origin + "mzscheme" (base32 "192c52zi726h5wjamxrhivjw2waq1im0zpyxhbrkrxknm8x84bs9") + '("mzscheme" "mzscheme-doc" "mzscheme-lib")) + (racket-packages-origin + "net-cookies" (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/RenaissanceBug/racket-cookies") + (commit %racket-commit))) + (sha256 (base32 + "0k0hifxhywl5c3hjcaiizc098dpyk001d981p572gly116yvjxc1")) + (file-name + (git-file-name "RenaissanceBug-racket-cookies" %racket-version))) + '("net-cookies" "net-cookies-doc" "net-cookies-lib")) + (racket-packages-origin + "optimization-coach" + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/stamourv/optimization-coach") + (commit %racket-commit))) + (sha256 (base32 + "0b27sw48d7rhz0hin88c7rbr9vpg1c23sn82nd4jkmq54h6gasr1")) + (file-name + (git-file-name "stamourv-optimization-coach" %racket-version))) + '(("optimization-coach" "."))) + (simple-racket-origin + "option-contract" (base32 "026b7n5l0c3024nymshz8zp1yhn493rdzgpflzfd52hj7awafqhk") + '("option-contract" "option-contract-doc" "option-contract-lib")) + (simple-racket-origin + "parser-tools" (base32 "08pvz4zramirzm3j64hbhjm0mmh5zfy37iv4s3vmq0rj49cr8fl3") + '("parser-tools" "parser-tools-doc" "parser-tools-lib")) + (simple-racket-origin + "pconvert" (base32 "00czi0p399mmyrvxyrs5kniizpkqfxyz2ncxqi2jy79a7wk79pb1") + '("pconvert-lib")) + (simple-racket-origin + "pict" (base32 "0g1iwdr6qh1xb0crhj96830vjjnbds409xbpqn7j5sh0ksy6vr5x") + '("pict" "pict-doc" "pict-lib")) + (simple-racket-origin + "pict-snip" (base32 "081nwiy4a0n4f7xws16hqbhf0j3kz5alizndi3nnyr3chm4kng6x") + '("pict-snip" "pict-snip-doc" "pict-snip-lib")) + (simple-racket-origin + "picturing-programs" (base32 "1g6xr39hx1j03gb3d4dljm3v91xcj2gfpq3dgy5xvplzr6cmmxgr") + '(("picturing-programs" "."))) + (simple-racket-origin + "plai" (base32 "0i983sh0r0zm2ng4j44m5aw9669kh5fhp91bzpc9jm280rfcqvyl") + '("plai" "plai-doc" "plai-lib")) + (simple-racket-origin + "planet" (base32 "0r2yqrzrmdjjyr14k6hhlzc5kzrcx3583m1s02mhrcmpfw0s85w9") + '("planet" "planet-doc" "planet-lib")) + (simple-racket-origin + "plot" (base32 "07kq32si34ybcwz8idxxcrzssg8diyrp1nfgkcj0mmvr45321zm7") + '("plot" "plot-compat" "plot-doc" "plot-gui-lib" "plot-lib")) + (simple-racket-origin + "preprocessor" (base32 "1p5aid58ifnjy4xl0ysh85cq39k25661v975jrpk182z3k5621mg") + '(("preprocessor" "."))) + (simple-racket-origin + "profile" (base32 "179i86lyby29nywz60l4vnadi02w8b12h7501nm5h5g4pq9jjmbb") + '("profile" "profile-doc" "profile-lib")) + (racket-packages-origin + "quickscript" (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/Metaxal/quickscript") + (commit %racket-commit))) + (sha256 (base32 + "100g3yqhbjdq06b6l6d72ywsw29awgy8crqg33wj7h12xq07nzcr")) + (file-name (git-file-name "Metaxal-quickscript" %racket-version))) + '(("quickscript" "."))) + (simple-racket-origin + "r5rs" (base32 "1g3cysj7z88r38vkzvi8g2fb2hn4yg1fdhy5smxw303jxgl3inp6") + '("r5rs" "r5rs-doc" "r5rs-lib")) + (simple-racket-origin + "r6rs" (base32 "0b1ymzdp10r0flw2acbidjsh5ma1pm5hy54jss37sxf89z3xbvm4") + '("r6rs" "r6rs-doc" "r6rs-lib")) + (racket-packages-origin + "racket-cheat" (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/jeapostrophe/racket-cheat") + (commit %racket-commit))) + (sha256 (base32 + "06wcj558rzkbl2bwkmikyspya9v1f4iwlzwnwxpkc33h2xapwabr")) + (file-name + (git-file-name "jeapostrophe-racket-cheat" %racket-version))) + '(("racket-cheat" "."))) + (simple-racket-origin + "racklog" (base32 "1rgrvwy3kr9b9w5cghsffiv3ly00yfvvzr5xaaw83g1w7yin0mnb") + '(("racklog" "."))) + (simple-racket-origin + "rackunit" (base32 "057z31rja6h3nabh5b2xgwfrzmlm6h1cv1qcgf3xfy4g2q5dqn5p") + '("rackunit" + "rackunit-doc" + "rackunit-gui" + "rackunit-lib" + "rackunit-plugin-lib" + "rackunit-typed" + "schemeunit" + "testing-util-lib")) + (simple-racket-origin + "readline" (base32 "13kbcn2wchv82d709mw3r8n37bk8iwq0y4kpvm9dbzx0w2pxkfwn") + '("readline" "readline-doc" "readline-lib")) + (simple-racket-origin + "realm" (base32 "0hxcgla08iack54j8v40fj51811chpy66ym2zq76zb52c7kzn0hi") + '(("realm" "."))) + (simple-racket-origin + "redex" (base32 "0vlgxbnbgrlihk1hh5zd6hsc4566ldi4q76f87z5vai54dxkwy2f") + '("redex" + "redex-benchmark" + "redex-doc" + "redex-examples" + "redex-gui-lib" + "redex-lib" + "redex-pict-lib")) + (simple-racket-origin + "sasl" (base32 "0ibh4wb4gn8pggx6gkv4vk4d6rwzn5nrvjibhvkzhaynf6lhb824") + '("sasl" "sasl-doc" "sasl-lib")) + (simple-racket-origin + "scheme-lib" (base32 "0pcf0y8rp4qyjhaz5ww5sr5diq0wpcdfrrnask7zapyklzx1jx8x") + '(("scheme-lib" "."))) + (simple-racket-origin + "scribble" (base32 "0rgvnsykrxkah6s5fw1vyp9lxsb4z9w6hgwk5j6wbwjp2gsfczbm") + '("scribble" + "scribble-doc" + "scribble-html-lib" + "scribble-lib" + "scribble-text-lib")) + (simple-racket-origin + "serialize-cstruct-lib" + (base32 "1rq3n1fa7ldjwx3lrh9ybhig7jlsw1crpzyklbzp3xqdw6jymfnz") + '(("serialize-cstruct-lib" "."))) + (simple-racket-origin + "sgl" (base32 "0nkymhdyjrwi5h199j4w5zh7y3x3ai42gsiwxzh0hy7yqrqqg9zv") + '(("sgl" "."))) + (simple-racket-origin + "shell-completion" (base32 "04m144gy2mp4fiq6rcbf12wjr8mws8k9scfhg9lc38vqppp4lxsj") + '(("shell-completion" "."))) + (simple-racket-origin + "simple-tree-text-markup" + (base32 "0fyd9gfz6bnv0m1901wv5mnhc05rm8hw9i6ddrqx33hs6qsg2zqr") + '("simple-tree-text-markup" + "simple-tree-text-markup-doc" + "simple-tree-text-markup-lib")) + (simple-racket-origin + "slatex" (base32 "0pkm2isbbdk63slrbsxcql7rr0wdrw5kapw1xq4ps5k8dhlzv8x0") + '(("slatex" "."))) + (simple-racket-origin + "slideshow" (base32 "1znv1i2d0610hhy71q932xy7wka00q3q50in1xfnk8ibg7nzkagm") + '("slideshow" "slideshow-doc" "slideshow-exe" "slideshow-lib" "slideshow-plugin")) + (simple-racket-origin + "snip" (base32 "01r9wc5xr3q3n4yyif6j0a37rgdzmpslxn05k13ksik73b3wj6hj") + '("snip" "snip-lib")) + (simple-racket-origin + "typed-racket" (base32 "1462kj9yswsxbnw71casylzlvhd7cxrml2v9j7rcsnn9hmrqx4vv") + '("source-syntax" + "typed-racket" + "typed-racket-compatibility" + "typed-racket-doc" + "typed-racket-lib" + "typed-racket-more")) + (racket-packages-origin + "srfi" (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/srfi") + ;; Includes an FSDG fix: return to %racket-commit in 8.5. + ;; See . + (commit "7243029b135741ce08ae30f877e2f49a2a460b22"))) + (sha256 (base32 + "0aqbcdv2dfc2xnk0h6zfi56p7bpwqji8s88qds3d03hhh9k28gvn")) + ;; Use the relevant version for srfi-doc and srfi-lib, + ;; since we're using a newer commit than the v8.4 tag. + (file-name (git-file-name "racket-srfi" "1.1"))) + '("srfi" "srfi-doc" "srfi-lib" "srfi-lite-lib")) + (simple-racket-origin + "string-constants" (base32 "1qizjq4n0hzdgdcjjpr94464gsywpsk2g9mnvwzqr7dcqbrsfvn6") + '("string-constants" "string-constants-doc" "string-constants-lib")) + (simple-racket-origin + "swindle" (base32 "164gdsphjzdl2vv7zxz7dfk9jwax8njpmim6sidm8qz8a8589y67") + '(("swindle" "."))) + (simple-racket-origin + "syntax-color" (base32 "1vf2fc3qvx8a1igi7swsg8gaqhx786sa0vqxd18xhbsidfgb5ywp") + '("syntax-color" "syntax-color-doc" "syntax-color-lib")) + (simple-racket-origin + "trace" (base32 "070ihla5j796hdarn5wxdwn4xj0xnkm50shgh49jy994mribvhia") + '(("trace" "."))) + (simple-racket-origin + "unix-socket" (base32 "02dfwas5ynbpyz74w9kwb4wgb37y5wys7svrlmir8k0n9ph9vq0y") + '("unix-socket" "unix-socket-doc" "unix-socket-lib")) + (simple-racket-origin + "web-server" (base32 "1zgb6jl7zx6258ljs8f3lvryrq5n5zpd71dqzr698m92kw3x2pkn") + '("web-server" "web-server-doc" "web-server-lib")) + (simple-racket-origin + "wxme" (base32 "1qp5gr9gqsakiq3alw6m4yyv5vw4i3hp4y4nhq8vl2nkjmirvn0b") + '("wxme" "wxme-lib")) + (simple-racket-origin + "xrepl" (base32 "12zjgsy5zqm3fck3ihg4a70wj56s2cnnjyb4jlfi5nnsfqyrnxg3") + '("xrepl" "xrepl-doc" "xrepl-lib")))) + (build-system gnu-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'configure 'unpack-packages - (let ((unpack (assoc-ref %standard-phases 'unpack))) - (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) - (let* ((racket (assoc-ref (or native-inputs inputs) "racket")) - (prefix (assoc-ref outputs "out")) - (pkgs-dir (string-append prefix "/share/racket/pkgs"))) - (mkdir-p pkgs-dir) - (copy-recursively - "share/links.rktd" - (string-append prefix "/share/racket/links.rktd")) - (copy-recursively "share/pkgs" pkgs-dir) - ;; NOTE: unpack changes the working directory - (unpack #:source (assoc-ref (or native-inputs inputs) - "main-repo")) - (for-each (lambda (pkg) - (define dest (string-append pkgs-dir "/" pkg)) - (mkdir-p dest) - (copy-recursively (string-append "pkgs/" pkg) - dest)) - ',%main-repo-main-distribution-pkgs) - #t)))) - (replace 'configure - (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) - (let ((racket (assoc-ref (or native-inputs inputs) "racket")) - (prefix (assoc-ref outputs "out"))) - (apply invoke - (string-append racket "/bin/racket") - (assoc-ref inputs "extend-layer") - racket - prefix - (map - (lambda (lib) - (string-append (assoc-ref inputs lib) "/lib")) - '("cairo" - "fontconfig" - "glib" - "glu" - "gmp" - "gtk+" - "libjpeg" - "libpng" - "libx11" - "mesa" - "mpfr" - "pango" - "unixodbc" - "libedit"))) - #t))) - (replace 'build - (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) - (invoke (string-append (assoc-ref (or native-inputs inputs) - "racket") - "/bin/racket") - "--config" - (string-append (assoc-ref outputs "out") - "/etc/racket") - "-l" - "raco" - "setup") - #t)) - (delete 'install)) - ;; we still don't have these: - #:tests? #f)) + ;; We're using #:configure-flags to pass flags for + ;; `configure-layer.rkt` and #:make-flags to pass arguments for + ;; `raco pkg install`. + (list + #:configure-flags + #~`("--extra-foreign-lib-search-dirs" + ,(format #f "~s" + '(#$@(map (lambda (name) + (cond + ((this-package-input name) + => (cut file-append <> "/lib")) + (else + (raise-exception + (make-exception + (make-assertion-failure) + (make-exception-with-message + "missing input to the 'racket' package") + (make-exception-with-irritants + (list name))))))) + '("cairo" + "fontconfig-minimal" ;; aka fontconfig + "glib" + "glu" + "gmp" + "gtk+" + "libjpeg-turbo" + "libpng" + "libx11" + "mesa" + "mpfr" + "pango" + "unixodbc" + "libedit"))))) + #:make-flags #~`("main-distribution") + #:tests? #f ;; packaged separately + #:modules '((guix build gnu-build-system) + (guix build utils) + (guix build union) + (ice-9 match)) + #:imported-modules `((guix build union) + ,@%gnu-build-system-modules) + #:phases + #~(modify-phases %standard-phases + (delete 'unpack) + (replace 'configure + (lambda* (#:key inputs configure-flags #:allow-other-keys) + (let* ((racket (search-input-file inputs "bin/racket"))) + (apply invoke + racket + #$configure-layer.rkt + `(,@configure-flags + ,(dirname (dirname racket)) + ,#$output)) + (invoke racket + "--config" (string-append #$output "/etc/racket") + "-l" "raco" "setup" + "--no-user")))) + (replace 'build + (lambda* (#:key inputs #:allow-other-keys) + ;; We use "share/racket/pkgs" for sources to distinguish them + ;; from the "lib/racket/pkgs" of a potential parent layer. + (union-build (string-append #$output "/lib/racket/pkgs") + (search-path-as-list '("share/racket/pkgs") + (map cdr inputs)) + #:create-all-directories? #t))) + (replace 'install + (lambda* (#:key inputs make-flags #:allow-other-keys) + (let ((racket (search-input-file inputs "/bin/racket"))) + (unless (null? make-flags) + (invoke racket + "-l-" + "pkg/dirs-catalog" + "--link" + "local-catalog" + (string-append #$output "/lib/racket/pkgs")) + (apply invoke + racket + "--config" (string-append #$output "/etc/racket") + "-l" "raco" + "pkg" "install" + "--installation" + "--auto" + "--catalog" "local-catalog" + make-flags)))))))) + (home-page "https://racket-lang.org") (synopsis "Programmable programming language in the Scheme family") (description "Racket is a general-purpose programming language in the Scheme family, @@ -563,17 +899,20 @@ languages to complete language implementations. The main Racket distribution comes with many bundled packages, including the DrRacket IDE, libraries for GUI and web programming, and implementations of -languages such as Typed Racket, R5RS and R6RS Scheme, Algol 60, and Datalog."))) - +languages such as Typed Racket, R5RS and R6RS Scheme, Algol 60, and Datalog.") + ;; https://download.racket-lang.org/license.html + ;; The LGPL components are only used by Racket BC. + (license (list license:asl2.0 license:expat)))) -(define extend-layer +(define configure-layer.rkt (scheme-file - "extend-layer.rkt" + "configure-layer.rkt" `(module - extend-layer racket/base + configure-layer racket/base (require racket/cmdline racket/match racket/file + racket/port racket/list racket/pretty) (define config-file-pth @@ -583,8 +922,14 @@ languages such as Typed Racket, R5RS and R6RS Scheme, Algol 60, and Datalog."))) (define rx:racket ;; Guile's reader doesn't support #rx"racket" (regexp "racket")) + (define extra-foreign-lib-search-dirs '()) (command-line - #:args (parent-layer prefix . lib-dir*) + #:once-each + [("--extra-foreign-lib-search-dirs") dir-list + "foreign library directories, as a list of strings in `read` syntax" + (set! extra-foreign-lib-search-dirs + (call-with-input-string dir-list read))] + #:args (parent-layer prefix) (let* ([config (for/fold ([config (file->value (build-path parent-layer @@ -614,27 +959,42 @@ languages such as Typed Racket, R5RS and R6RS Scheme, Algol 60, and Datalog."))) (build-path-string parent-layer pth)) (filter values (hash-ref config search-key null)))))] [config - (hash-set config - 'apps-dir - (build-path-string prefix "share/applications"))] + (hash-update config + 'lib-search-dirs + (lambda (dirs) + ;; add after other layers, but before older + ;; foreign lib search directories + (define-values [rkt old-foreign-dirs] + (partition (lambda (pth) + (or (not pth) + (regexp-match? rx:racket pth))) + dirs)) + (append rkt + extra-foreign-lib-search-dirs + old-foreign-dirs)))] [config - ;; place new foreign lib-search-dirs before old - ;; foreign dirs, but after Racket layers - (let-values - ([(rkt extra) - (partition (lambda (pth) - (or (not pth) - (regexp-match? rx:racket pth))) - (hash-ref config 'lib-search-dirs))]) - (hash-set config - 'lib-search-dirs - (append rkt - lib-dir* - extra)))] + (hash-set* config + 'apps-dir + (build-path-string prefix "share/applications") + 'absolute-installation? #t + ;; Let Guix coexist with other installation + ;; methods without clobbering user-specific packages. + ;; This could be set in various places, but doing + ;; it here is convienient, at least until we support + ;; cross-compilation. + 'installation-name + (string-append (version) + "-guix" + (match (system-type 'gc) + ['cgc "-cgc"] + ;; workaround Guile reader/printer: + ['|3m| "-bc"] + [_ ""])))] [bin-dir (hash-ref config 'bin-dir)] [config (hash-set* config + 'config-tethered-apps-dir (hash-ref config 'apps-dir) 'config-tethered-console-bin-dir bin-dir 'config-tethered-gui-bin-dir bin-dir)] [new-config-pth -- cgit v1.2.3 From 1a7424957dbe50c68a49145f95955984c4fa118e Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Tue, 8 Mar 2022 20:51:35 -0500 Subject: gnu: python-robotframework-sshlibrary: Patch for RobotFramework 5 compatibility. * gnu/packages/patches/python-robotframework-sshlibrary-rf5-compat.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/python-xyz.scm (python-robotframework-sshlibrary): Apply it. --- gnu/local.mk | 1 + .../python-robotframework-sshlibrary-rf5-compat.patch | 19 +++++++++++++++++++ gnu/packages/python-xyz.scm | 4 +++- 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/python-robotframework-sshlibrary-rf5-compat.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 9bfeede60f..11e16c2a16 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1706,6 +1706,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-pytorch-system-libraries.patch \ %D%/packages/patches/python-pytorch-1.9.0-system-libraries.patch \ %D%/packages/patches/python-robotframework-source-date-epoch.patch \ + %D%/packages/patches/python-robotframework-sshlibrary-rf5-compat.patch \ %D%/packages/patches/python-seaborn-kde-test.patch \ %D%/packages/patches/python-seaborn-2690.patch \ %D%/packages/patches/python2-subprocess32-disable-input-test.patch \ diff --git a/gnu/packages/patches/python-robotframework-sshlibrary-rf5-compat.patch b/gnu/packages/patches/python-robotframework-sshlibrary-rf5-compat.patch new file mode 100644 index 0000000000..d867d4cabb --- /dev/null +++ b/gnu/packages/patches/python-robotframework-sshlibrary-rf5-compat.patch @@ -0,0 +1,19 @@ +This patches add compatibility for the forthcoming RobotFramework 5. + +Taken from: https://github.com/robotframework/SSHLibrary/pull/403. +diff --git a/src/SSHLibrary/pythonforward.py b/src/SSHLibrary/pythonforward.py +index 8b85997b7..607985cf4 100644 +--- a/src/SSHLibrary/pythonforward.py ++++ b/src/SSHLibrary/pythonforward.py +@@ -1,9 +1,9 @@ + import select + import socket + import threading +-from robot.utils import platform ++from robot.utils import PY2, WINDOWS + from .logger import logger +-if platform.PY2 and platform.WINDOWS: ++if PY2 and WINDOWS: + import win_inet_pton + try: + import SocketServer diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index e977620ac6..53db2e2062 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -4850,7 +4850,9 @@ trace directly to the terminal to ease debugging.") (file-name (git-file-name name version)) (sha256 (base32 - "1fn72hw7xacjjpl4dd6wynh2x63i9rk8iqhj3v640db21qpcnbkw")))) + "1fn72hw7xacjjpl4dd6wynh2x63i9rk8iqhj3v640db21qpcnbkw")) + (patches (search-patches + "python-robotframework-sshlibrary-rf5-compat.patch")))) (build-system python-build-system) (arguments `(#:phases -- cgit v1.2.3 From ebd2093b32942756fa376833786e0cc70fc9765f Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Wed, 9 Mar 2022 14:16:54 -0500 Subject: gnu: python-robotframework: Fully build the documentation. * gnu/packages/patches/python-robotframework-ug2html.patch: New patch. * gnu/local.mk: Register it. * gnu/packages/python-xyz.scm (python-robotframework): Apply patch. [modules]: New argument. [phases]{build-and-install-doc}: Modify to build the full HTML documentation, including the user guide. [native-inputs]: Add python-pygments. --- gnu/local.mk | 1 + .../patches/python-robotframework-ug2html.patch | 57 ++++++++++++++++++++ gnu/packages/python-xyz.scm | 63 +++++++++++++--------- 3 files changed, 96 insertions(+), 25 deletions(-) create mode 100644 gnu/packages/patches/python-robotframework-ug2html.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 11e16c2a16..60ee713508 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1706,6 +1706,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-pytorch-system-libraries.patch \ %D%/packages/patches/python-pytorch-1.9.0-system-libraries.patch \ %D%/packages/patches/python-robotframework-source-date-epoch.patch \ + %D%/packages/patches/python-robotframework-ug2html.patch \ %D%/packages/patches/python-robotframework-sshlibrary-rf5-compat.patch \ %D%/packages/patches/python-seaborn-kde-test.patch \ %D%/packages/patches/python-seaborn-2690.patch \ diff --git a/gnu/packages/patches/python-robotframework-ug2html.patch b/gnu/packages/patches/python-robotframework-ug2html.patch new file mode 100644 index 0000000000..eea88e01f3 --- /dev/null +++ b/gnu/packages/patches/python-robotframework-ug2html.patch @@ -0,0 +1,57 @@ +Do not require the obsolete robotframeworklexer. + +Submitted upstream at: https://github.com/robotframework/robotframework/pull/4265. +diff --git a/doc/userguide/ug2html.py b/doc/userguide/ug2html.py +index 43cdb31bd..033203552 100755 +--- a/doc/userguide/ug2html.py ++++ b/doc/userguide/ug2html.py +@@ -93,34 +93,26 @@ from docutils.parsers.rst import directives + from pygments import highlight, __version__ as pygments_version + from pygments.lexers import get_lexer_by_name + +-# Use latest version, not version bundled with Pygments +-import robotframeworklexer +- + + def too_old(version_string, minimum): + version = tuple(int(v) for v in version_string.split('.')[:2]) + return version < minimum + + +-if too_old(getattr(robotframeworklexer, '__version__', '1.0'), (1, 1)): +- sys.exit('robotframeworklexer >= 1.1 is required.') +-if too_old(pygments_version, (2, 1)): +- sys.exit('Pygments >= 2.1 is required.') ++if too_old(pygments_version, (2, 8)): ++ sys.exit('Pygments >= 2.8 is required.') + + + def pygments_directive(name, arguments, options, content, lineno, + content_offset, block_text, state, state_machine): + try: +- if arguments[0] == 'robotframework': +- lexer = robotframeworklexer.RobotFrameworkLexer() +- else: +- lexer = get_lexer_by_name(arguments[0]) ++ lexer = get_lexer_by_name(arguments[0]) + except ValueError as err: + raise ValueError(f'Invalid syntax highlighting language "{arguments[0]}".') + # take an arbitrary option if more than one is given + formatter = options and VARIANTS[options.keys()[0]] or DEFAULT + # possibility to read the content from an external file +- filtered = [ line for line in content if line.strip() ] ++ filtered = [line for line in content if line.strip()] + if len(filtered) == 1: + path = filtered[0].replace('/', os.sep) + if os.path.isfile(path): +diff --git a/requirements-build.txt b/requirements-build.txt +index e0f5e19a2..a2fcdcfd5 100644 +--- a/requirements-build.txt ++++ b/requirements-build.txt +@@ -5,5 +5,4 @@ rellu >= 0.7 + twine >= 1.12 + wheel + docutils +-pygments >= 2.1 +-robotframeworklexer >= 1.1 ++pygments >= 2.8 diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 860ea35959..1387f1f260 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -4689,37 +4689,50 @@ ecosystem, but can naturally be used also by other projects.") (sha256 (base32 "0j71awmfkwk7prz82kr1zbcl3nrih3396sshrygnqlrdjmgivd3p")) (patches (search-patches - "python-robotframework-source-date-epoch.patch")))) + "python-robotframework-source-date-epoch.patch" + "python-robotframework-ug2html.patch")))) (build-system python-build-system) (arguments - `(#:phases (modify-phases %standard-phases - (add-before 'build 'build-and-install-doc - (lambda* (#:key outputs #:allow-other-keys) - (let* ((doc-output (assoc-ref outputs "doc")) - (doc (string-append doc-output "/share/" - ,name "-" ,version "/"))) - (invoke "invoke" "library-docs" "all") - (mkdir-p doc) - (copy-recursively "doc/libraries" - (string-append doc "/libraries"))))) - (replace 'check - (lambda* (#:key native-inputs inputs tests? - #:allow-other-keys) - (when tests? - ;; Some tests require timezone data. Otherwise, they - ;; look up /etc/localtime, which doesn't exist, and - ;; fail with: - ;; - ;; OverflowError: mktime argument out of range - (setenv "TZDIR" - (search-input-directory - (or native-inputs inputs) "share/zoneinfo")) - (setenv "TZ" "Europe/Paris") - (invoke "python" "utest/run.py"))))))) + `(#:modules ((guix build python-build-system) + (guix build utils) + (ice-9 ftw) + (ice-9 match) + (srfi srfi-26)) + #:phases + (modify-phases %standard-phases + (add-before 'build 'build-and-install-doc + (lambda* (#:key outputs #:allow-other-keys) + (let ((doc (string-append (assoc-ref outputs "doc") + "/share/doc/robotframework"))) + (invoke "invoke" "library-docs" "all") + (invoke "doc/userguide/ug2html.py" "dist") ;user guide + (mkdir-p doc) + (with-directory-excursion "dist" + (define user-guide-dir + (match (scandir "." (cut string-prefix? + "robotframework-userguide-" <>)) + ((dir) dir) + (_ (error "could not find the user guide directory")))) + (copy-recursively user-guide-dir doc))))) + (replace 'check + (lambda* (#:key native-inputs inputs tests? + #:allow-other-keys) + (when tests? + ;; Some tests require timezone data. Otherwise, they + ;; look up /etc/localtime, which doesn't exist, and + ;; fail with: + ;; + ;; OverflowError: mktime argument out of range + (setenv "TZDIR" + (search-input-directory + (or native-inputs inputs) "share/zoneinfo")) + (setenv "TZ" "Europe/Paris") + (invoke "python" "utest/run.py"))))))) (native-inputs `(("python-docutils" ,python-docutils) ("python-jsonschema" ,python-jsonschema) ("python-invoke" ,python-invoke) + ("python-pygments" ,python-pygments) ("python-rellu" ,python-rellu) ("python:tk" ,python "tk") ;used when building the HTML doc ("tzdata" ,tzdata-for-tests))) -- cgit v1.2.3 From 199da75a8adf37381c32ee1e3028b08b94703584 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Thu, 10 Mar 2022 17:05:41 -0500 Subject: gnu: python-robotframework: Do not embed a timestamp in the user guide. * gnu/packages/patches/python-robotframework-source-date-epoch.patch: Update patch to cover for the user guide. --- .../python-robotframework-source-date-epoch.patch | 104 +++++++++++---------- 1 file changed, 53 insertions(+), 51 deletions(-) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/python-robotframework-source-date-epoch.patch b/gnu/packages/patches/python-robotframework-source-date-epoch.patch index ccd87911d8..11424bf4db 100644 --- a/gnu/packages/patches/python-robotframework-source-date-epoch.patch +++ b/gnu/packages/patches/python-robotframework-source-date-epoch.patch @@ -1,62 +1,64 @@ -From 3cc41c05fad5601c0dd1832f64a6e9efca017727 Mon Sep 17 00:00:00 2001 -From: Maxim Cournoyer -Date: Mon, 1 Apr 2019 11:36:04 -0400 -Subject: [PATCH] robottime: Honor the SOURCE_DATE_EPOCH environment variable. +Do not embed any timestamp in the built documentation. -Honoring the SOURCE_DATE_EPOCH environment variable allows building -the documentation using libdoc reproducibly, by setting the generated -timestamp to a fixed value. +Upstream issue: https://github.com/robotframework/robotframework/issues/4262. -For more background on reproducible builds and the SOURCE_DATE_EPOCH -environment variable, see: -https://reproducible-builds.org/specs/source-date-epoch/. - -* src/robot/utils/robottime.py: import `os'. -(TimestampCache._get_epoch): Retrieve date from SOURCE_DATE_EPOCH if -it is defined, otherwise from time.time(). -* utest/output/test_logger.py (TestLogger.test_write_to_one_logger): -Check for the existance of a timestamp attribute instead of checking -for its content as the later is easy to break when using the -SOURCE_DATE_EPOCH environment variable. ---- - src/robot/utils/robottime.py | 3 +++ - utest/output/test_logger.py | 2 +- - 2 files changed, 4 insertions(+), 1 deletion(-) - -diff --git a/src/robot/utils/robottime.py b/src/robot/utils/robottime.py -index 06432a4a6..91526f826 100644 ---- a/src/robot/utils/robottime.py -+++ b/src/robot/utils/robottime.py +diff --git a/doc/userguide/ug2html.py b/doc/userguide/ug2html.py +index 43cdb31bd..550e74a79 100755 +--- a/doc/userguide/ug2html.py ++++ b/doc/userguide/ug2html.py +@@ -158,8 +158,7 @@ def create_userguide(): + install_file = _copy_installation_instructions() + + description = 'HTML generator for Robot Framework User Guide.' +- arguments = ['--time', +- '--stylesheet-path', ['src/userguide.css'], ++ arguments = ['--stylesheet-path', ['src/userguide.css'], + 'src/RobotFrameworkUserGuide.rst', + 'RobotFrameworkUserGuide.html'] + os.chdir(CURDIR) +diff --git a/src/robot/libdocpkg/model.py b/src/robot/libdocpkg/model.py +index 4d9ffd70b..5c276d1d6 100644 +--- a/src/robot/libdocpkg/model.py ++++ b/src/robot/libdocpkg/model.py @@ -14,6 +14,7 @@ # limitations under the License. - import datetime + import json +import os - import time import re + from itertools import chain -@@ -395,6 +396,8 @@ class TimestampCache(object): +@@ -113,7 +114,8 @@ class LibraryDoc(object): + 'name': self.name, + 'doc': self.doc, + 'version': self.version, +- 'generated': get_timestamp(daysep='-', millissep=None), ++ 'generated': ('' if os.environ['SOURCE_DATE_EPOCH'] ++ else get_timestamp(daysep='-', millissep=None)), + 'type': self.type, + 'scope': self.scope, + 'docFormat': self.doc_format, +diff --git a/src/robot/libdocpkg/xmlwriter.py b/src/robot/libdocpkg/xmlwriter.py +index 3882e1219..4a84fb42e 100644 +--- a/src/robot/libdocpkg/xmlwriter.py ++++ b/src/robot/libdocpkg/xmlwriter.py +@@ -14,6 +14,8 @@ + # limitations under the License. - # Seam for mocking - def _get_epoch(self): -+ if os.getenv('SOURCE_DATE_EPOCH'): -+ return float(os.getenv('SOURCE_DATE_EPOCH')) - return time.time() + import os.path ++import os ++ + from datetime import datetime - def _use_cache(self, secs, *separators): -diff --git a/utest/output/test_logger.py b/utest/output/test_logger.py -index 92fe6d77d..e980227aa 100644 ---- a/utest/output/test_logger.py -+++ b/utest/output/test_logger.py -@@ -46,7 +46,7 @@ class TestLogger(unittest.TestCase): - logger = LoggerMock(('Hello, world!', 'INFO')) - self.logger.register_logger(logger) - self.logger.write('Hello, world!', 'INFO') -- assert_true(logger.msg.timestamp.startswith('20')) -+ assert_true(hasattr(logger.msg, 'timestamp')) + from robot.utils import WINDOWS, XmlWriter, unicode +@@ -30,7 +32,9 @@ class LibdocXmlWriter(object): + self._write_end(writer) - def test_write_to_one_logger_with_trace_level(self): - logger = LoggerMock(('expected message', 'TRACE')) --- -2.20.1 - + def _write_start(self, libdoc, writer): +- generated = datetime.utcnow().replace(microsecond=0).isoformat() + 'Z' ++ generated = ( ++ '' if os.environ['SOURCE_DATE_EPOCH'] ++ else datetime.utcnow().replace(microsecond=0).isoformat() + 'Z') + attrs = {'name': libdoc.name, + 'type': libdoc.type, + 'format': libdoc.doc_format, -- cgit v1.2.3 From 61edb25e9b59b23687d1bcc2014f4fbf6dc70c30 Mon Sep 17 00:00:00 2001 From: Simon South Date: Thu, 10 Mar 2022 07:31:18 -0500 Subject: gnu: sdcc: Update to 4.2.0. * gnu/packages/embedded.scm (sdcc): Update to 4.2.0. [description]: Update to mention the newly supported MOS 6502. * gnu/packages/patches/sdcc-disable-non-free-code.patch: Update to match new version. Signed-off-by: Nicolas Goaziou --- gnu/packages/embedded.scm | 12 +- .../patches/sdcc-disable-non-free-code.patch | 363 +++++++++++---------- 2 files changed, 196 insertions(+), 179 deletions(-) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm index 65e0109891..24d454820b 100644 --- a/gnu/packages/embedded.scm +++ b/gnu/packages/embedded.scm @@ -8,7 +8,7 @@ ;;; Copyright © 2020 Marius Bakke ;;; Copyright © 2020 Björn Höfling ;;; Copyright © 2021 Julien Lepiller -;;; Copyright © 2020, 2021 Simon South +;;; Copyright © 2020, 2021, 2022 Simon South ;;; Copyright © 2021 Morgan Smith ;;; Copyright © 2022 Mathieu Othacehe ;;; @@ -1527,7 +1527,7 @@ and Zilog Z80 families, plus many of their variants.") (define-public sdcc (package (name "sdcc") - (version "4.1.0") + (version "4.2.0") (source (origin (method url-fetch) (uri (string-append @@ -1535,7 +1535,7 @@ and Zilog Z80 families, plus many of their variants.") "/" version "/sdcc-src-" version ".tar.bz2")) (sha256 (base32 - "0gskzli17ghnn5qllvn4d56qf9bvvclqjh63nnj63p52smvggvc1")) + "0ly0m3q9vzjb9kcfjh79s77wpl4w7xhybzy4h9x0bmmw4cfsx6xl")) (modules '((guix build utils))) (snippet '(begin @@ -1573,9 +1573,9 @@ and Zilog Z80 families, plus many of their variants.") (home-page "http://sdcc.sourceforge.net") (synopsis "C compiler suite for 8-bit microcontrollers") (description "SDCC is a retargetable, optimizing Standard C compiler suite -that targets 8-bit microcontrollers in the Intel MCS-51 (8051); Motorola -68HC08; Padauk PDK13, PDK14 and PDK15; STMicroelectronics STM8; and Zilog Z80 -families, plus many of their variants.") +that targets 8-bit microcontrollers in the Intel MCS-51 (8051); MOS Technology +6502; Motorola 68HC08; Padauk PDK13, PDK14 and PDK15; STMicroelectronics STM8; +and Zilog Z80 families, plus many of their variants.") (license (list license:gpl2+ license:gpl3+ license:lgpl2.0+ diff --git a/gnu/packages/patches/sdcc-disable-non-free-code.patch b/gnu/packages/patches/sdcc-disable-non-free-code.patch index 1c823c3c18..39046ae280 100644 --- a/gnu/packages/patches/sdcc-disable-non-free-code.patch +++ b/gnu/packages/patches/sdcc-disable-non-free-code.patch @@ -15,10 +15,10 @@ remove instructions that encourage the use of SDCC with non-free software. diff --git a/Makefile.common.in b/Makefile.common.in -index 926b761..0362fd5 100644 +index 1a11f67..69d5efe 100644 --- a/Makefile.common.in +++ b/Makefile.common.in -@@ -71,7 +71,6 @@ OPT_DISABLE_PACKIHX = @OPT_DISABLE_PACKIHX@ +@@ -73,7 +73,6 @@ OPT_DISABLE_PACKIHX = @OPT_DISABLE_PACKIHX@ OPT_DISABLE_SDBINUTILS = @OPT_DISABLE_SDBINUTILS@ OPT_DISABLE_SDCPP = @OPT_DISABLE_SDCPP@ OPT_DISABLE_UCSIM = @OPT_DISABLE_UCSIM@ @@ -27,10 +27,10 @@ index 926b761..0362fd5 100644 SLIB = $(top_builddir)/support/util diff --git a/Makefile.in b/Makefile.in -index 5485074..3071472 100644 +index d899b62..554a1c3 100644 --- a/Makefile.in +++ b/Makefile.in -@@ -100,9 +100,6 @@ endif +@@ -105,9 +105,6 @@ endif ifeq ($(OPT_DISABLE_DEVICE_LIB), 0) TARGETS += sdcc-device-lib PKGS += device/lib @@ -40,7 +40,7 @@ index 5485074..3071472 100644 endif ifeq ($(OPT_DISABLE_PACKIHX), 0) -@@ -123,9 +120,6 @@ endif +@@ -128,9 +125,6 @@ endif TARGETS += sdcc-libs sdcc-cc sdcc-device-inc sdcc-as sdcc-ld sdcc-scripts PKGS += $(SDCC_LIBS) src device/include @@ -50,7 +50,7 @@ index 5485074..3071472 100644 PKGS += $(SDCC_AS) sdas/linksrc $(SDCC_SCRIPTS) PORTS = $(shell cat ports.build) -@@ -171,21 +165,12 @@ sdcc-sdbinutils: +@@ -176,21 +170,12 @@ sdcc-sdbinutils: sdcc-device-inc: $(MAKE) -C device/include @@ -73,10 +73,10 @@ index 5485074..3071472 100644 # doc depends on latex and latex2html diff --git a/configure b/configure -index 4c2226b..b8a9251 100755 +index 232d98e..3eeb17c 100755 --- a/configure +++ b/configure -@@ -632,7 +632,6 @@ LATEX +@@ -659,7 +659,6 @@ LATEX LATEX2HTML LYX OPT_ENABLE_DOC @@ -84,7 +84,7 @@ index 4c2226b..b8a9251 100755 OPT_DISABLE_SDBINUTILS OPT_DISABLE_SDCDB OPT_DISABLE_SDCPP -@@ -661,10 +660,7 @@ OPT_DISABLE_R2K +@@ -690,10 +689,7 @@ OPT_DISABLE_R2K OPT_DISABLE_Z180 OPT_DISABLE_Z80 OPT_DISABLE_MCS51 @@ -95,7 +95,7 @@ index 4c2226b..b8a9251 100755 include_dir_suffix inclib_dir_suffix LIB_TYPE -@@ -785,7 +781,6 @@ enable_packihx +@@ -821,7 +817,6 @@ enable_packihx enable_sdcpp enable_sdcdb enable_sdbinutils @@ -103,7 +103,7 @@ index 4c2226b..b8a9251 100755 enable_doc enable_libgc ' -@@ -806,10 +801,7 @@ sdccconf_h_dir_separator +@@ -842,10 +837,7 @@ sdccconf_h_dir_separator LIB_TYPE inclib_dir_suffix include_dir_suffix @@ -114,7 +114,7 @@ index 4c2226b..b8a9251 100755 docdir' ac_subdirs_all='support/cpp support/packihx -@@ -817,9 +809,7 @@ sim/ucsim +@@ -853,9 +845,7 @@ sim/ucsim debugger/mcs51 support/sdbinutils device/lib/pic14 @@ -125,7 +125,7 @@ index 4c2226b..b8a9251 100755 # Initialize some variables set by options. ac_init_help= -@@ -1473,7 +1463,6 @@ Optional Features: +@@ -1509,7 +1499,6 @@ Optional Features: --disable-sdcpp Disables building sdcpp --disable-sdcdb Disables building sdcdb --disable-sdbinutils Disables configuring and building of sdbinutils @@ -133,7 +133,7 @@ index 4c2226b..b8a9251 100755 --enable-doc Enables building the documentation --enable-libgc Use the Bohem memory allocator. Lower runtime footprint. -@@ -1502,16 +1491,8 @@ Some influential environment variables: +@@ -1538,16 +1527,8 @@ Some influential environment variables: appended to datadir to define SDCC's include/lib directory include_dir_suffix appended to datadir to define SDCC's include directory @@ -150,7 +150,7 @@ index 4c2226b..b8a9251 100755 docdir documentation installation directory Use these variables to override the choices made by `configure' or to help -@@ -7156,19 +7137,6 @@ if test "${include_dir_suffix}" = ""; then +@@ -7421,19 +7402,6 @@ if test "${include_dir_suffix}" = ""; then include_dir_suffix="${inclib_dir_suffix}/include" fi @@ -170,7 +170,7 @@ index 4c2226b..b8a9251 100755 # lib_dir_suffix: # *nix default: "sdcc/lib" -@@ -7176,13 +7144,6 @@ if test "${lib_dir_suffix}" = ""; then +@@ -7441,13 +7409,6 @@ if test "${lib_dir_suffix}" = ""; then lib_dir_suffix="${inclib_dir_suffix}/lib" fi @@ -184,9 +184,9 @@ index 4c2226b..b8a9251 100755 # docdir: # *nix default: "${datadir}/sdcc/doc" -@@ -7349,24 +7310,6 @@ cat >>confdefs.h <<_ACEOF - #define INCLUDE_DIR_SUFFIX DIR_SEPARATOR_STRING "${norm_inc_dir_suffix}" - _ACEOF +@@ -7600,22 +7561,6 @@ esac + + printf "%s\n" "#define INCLUDE_DIR_SUFFIX DIR_SEPARATOR_STRING \"${norm_inc_dir_suffix}\"" >>confdefs.h -norm_non_free_inc_dir_suffix=${non_free_include_dir_suffix} -case ":$norm_non_free_inc_dir_suffix:" in @@ -202,16 +202,14 @@ index 4c2226b..b8a9251 100755 - *) norm_non_free_inc_dir_suffix=`echo "$norm_non_free_inc_dir_suffix" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; -esac - --cat >>confdefs.h <<_ACEOF --#define NON_FREE_INCLUDE_DIR_SUFFIX DIR_SEPARATOR_STRING "${norm_non_free_inc_dir_suffix}" --_ACEOF +-printf "%s\n" "#define NON_FREE_INCLUDE_DIR_SUFFIX DIR_SEPARATOR_STRING \"${norm_non_free_inc_dir_suffix}\"" >>confdefs.h - norm_lib_dir_suffix=${lib_dir_suffix} case ":$norm_lib_dir_suffix:" in -@@ -7386,24 +7329,6 @@ cat >>confdefs.h <<_ACEOF - #define LIB_DIR_SUFFIX DIR_SEPARATOR_STRING "${norm_lib_dir_suffix}" - _ACEOF +@@ -7633,22 +7578,6 @@ esac + + printf "%s\n" "#define LIB_DIR_SUFFIX DIR_SEPARATOR_STRING \"${norm_lib_dir_suffix}\"" >>confdefs.h -norm_non_free_lib_dir_suffix=${non_free_lib_dir_suffix} -case ":$norm_non_free_lib_dir_suffix:" in @@ -227,19 +225,18 @@ index 4c2226b..b8a9251 100755 - *) norm_non_free_lib_dir_suffix=`echo "$norm_non_free_lib_dir_suffix" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; -esac - --cat >>confdefs.h <<_ACEOF --#define NON_FREE_LIB_DIR_SUFFIX DIR_SEPARATOR_STRING "${norm_non_free_lib_dir_suffix}" --_ACEOF +-printf "%s\n" "#define NON_FREE_LIB_DIR_SUFFIX DIR_SEPARATOR_STRING \"${norm_non_free_lib_dir_suffix}\"" >>confdefs.h - # relative paths for _lcl_i in expanded_bindir:expanded_datadir:bin2data_dir; do -@@ -8513,28 +8438,6 @@ _ACEOF +@@ -8751,27 +8680,6 @@ printf "%s\n" "#define OPT_DISABLE_SDBINUTILS $OPT_DISABLE_SDBINUTILS" >>confdef - # Check whether --enable-non-free was given. --if test "${enable_non_free+set}" = set; then : +-if test ${enable_non_free+y} +-then : - enableval=$enable_non_free; -fi - @@ -253,17 +250,15 @@ index 4c2226b..b8a9251 100755 - fi - - --cat >>confdefs.h <<_ACEOF --#define OPT_DISABLE_NON_FREE $OPT_DISABLE_NON_FREE --_ACEOF +-printf "%s\n" "#define OPT_DISABLE_NON_FREE $OPT_DISABLE_NON_FREE" >>confdefs.h - - - - # Check whether --enable-doc was given. - if test "${enable_doc+set}" = set; then : -@@ -8929,20 +8832,12 @@ if test $OPT_DISABLE_PIC14 = 0; then + if test ${enable_doc+y} +@@ -9199,20 +9107,12 @@ if test $OPT_DISABLE_PIC14 = 0; then test $OPT_DISABLE_DEVICE_LIB = 0 && subdirs="$subdirs device/lib/pic14" @@ -283,8 +278,8 @@ index 4c2226b..b8a9251 100755 - fi - if test $OPT_DISABLE_Z80 = 0 || test $OPT_DISABLE_Z180 = 0 || test $OPT_DISABLE_R2K = 0 || test $OPT_DISABLE_R2KA = 0 || test $OPT_DISABLE_R3KA = 0 || test $OPT_DISABLE_GBZ80 = 0 || test $OPT_DISABLE_TLCS90 = 0 || test $OPT_DISABLE_EZ80_Z80 = 0 || test $OPT_DISABLE_Z80N = 0; then -@@ -9019,15 +8914,9 @@ fi + if test $OPT_DISABLE_Z80 = 0 || test $OPT_DISABLE_Z180 = 0 || test $OPT_DISABLE_R2K = 0 || test $OPT_DISABLE_R2KA = 0 || test $OPT_DISABLE_R3KA = 0 || test $OPT_DISABLE_SM83 = 0 || test $OPT_DISABLE_TLCS90 = 0 || test $OPT_DISABLE_EZ80_Z80 = 0 || test $OPT_DISABLE_Z80N = 0; then +@@ -9289,15 +9189,9 @@ fi test $OPT_DISABLE_DEVICE_LIB = 0 && ac_config_files="$ac_config_files device/lib/Makefile" @@ -300,7 +295,7 @@ index 4c2226b..b8a9251 100755 cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure -@@ -9768,7 +9657,6 @@ do +@@ -10037,7 +9931,6 @@ do "device/lib/pdk15-stack-auto/Makefile") CONFIG_FILES="$CONFIG_FILES device/lib/pdk15-stack-auto/Makefile" ;; "sdas/aspdk16/Makefile") CONFIG_FILES="$CONFIG_FILES sdas/aspdk16/Makefile" ;; "device/lib/Makefile") CONFIG_FILES="$CONFIG_FILES device/lib/Makefile" ;; @@ -308,7 +303,7 @@ index 4c2226b..b8a9251 100755 "main.mk") CONFIG_FILES="$CONFIG_FILES main.mk:main_in.mk" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "device/include/Makefile") CONFIG_FILES="$CONFIG_FILES device/include/Makefile" ;; -@@ -9780,7 +9668,6 @@ do +@@ -10049,7 +9942,6 @@ do "support/regression/ports/host/spec.mk") CONFIG_FILES="$CONFIG_FILES support/regression/ports/host/spec.mk:support/regression/ports/host/spec.mk.in" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "Makefile.common") CONFIG_FILES="$CONFIG_FILES Makefile.common:Makefile.common.in" ;; @@ -316,7 +311,7 @@ index 4c2226b..b8a9251 100755 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac -@@ -10589,54 +10476,6 @@ esac +@@ -10856,54 +10748,6 @@ esac incPath3=`echo "$incPath3" | sed 's,\\\\\\\\,\\\\,g'` @@ -371,7 +366,7 @@ index 4c2226b..b8a9251 100755 libPath1=`echo "/${prefix2data_dir}/${norm_lib_dir_suffix}" | sed 's,/\./,/,g'` case ":$libPath1:" in -@@ -10686,54 +10525,6 @@ esac +@@ -10953,54 +10797,6 @@ esac libPath3=`echo "$libPath3" | sed 's,\\\\\\\\,\\\\,g'` @@ -423,18 +418,18 @@ index 4c2226b..b8a9251 100755 -nonFreeLibPath3=`echo "$nonFreeLibPath3" | sed 's,\\\\\\\\,\\\\,g'` - - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: sdcc ${VERSION} is now configured for -@@ -10772,7 +10563,6 @@ sdcc ${VERSION} is now configured for - pdk15 ${enable_pdk15_port} - pdk16 ${enable_pdk16_port} +@@ -11041,7 +10837,6 @@ sdcc ${VERSION} is now configured for + mos6502 ${enable_mos6502_port} + mos65c02 ${enable_mos65c02_port} - Disable non-free lib: ${OPT_DISABLE_NON_FREE} Disable packihx: ${OPT_DISABLE_PACKIHX} Disable ucsim: ${OPT_DISABLE_UCSIM} Disable device lib: ${OPT_DISABLE_DEVICE_LIB} -@@ -10787,9 +10577,6 @@ sdcc ${VERSION} is now configured for +@@ -11056,9 +10851,6 @@ sdcc ${VERSION} is now configured for include/library files: ${datadir}/${inclib_dir_suffix} include files: ${datadir}/${include_dir_suffix} library files: ${datadir}/${lib_dir_suffix} @@ -444,7 +439,7 @@ index 4c2226b..b8a9251 100755 documentation: ${docdir} prefix: ${prefix} -@@ -10801,15 +10588,9 @@ sdcc ${VERSION} is now configured for +@@ -11070,15 +10862,9 @@ sdcc ${VERSION} is now configured for include files: ${incPath1} path(argv[0])${incPath2} ${incPath3} @@ -458,17 +453,17 @@ index 4c2226b..b8a9251 100755 - path(argv[0])${nonFreeLibPath2}${dirch} - ${nonFreeLibPath3}${dirch} " >&5 - $as_echo " + printf "%s\n" " sdcc ${VERSION} is now configured for -@@ -10849,7 +10630,6 @@ sdcc ${VERSION} is now configured for - pdk15 ${enable_pdk15_port} - pdk16 ${enable_pdk16_port} +@@ -11120,7 +10906,6 @@ sdcc ${VERSION} is now configured for + mos6502 ${enable_mos6502_port} + mos65c02 ${enable_mos65c02_port} - Disable non-free lib: ${OPT_DISABLE_NON_FREE} Disable packihx: ${OPT_DISABLE_PACKIHX} Disable ucsim: ${OPT_DISABLE_UCSIM} Disable device lib: ${OPT_DISABLE_DEVICE_LIB} -@@ -10864,9 +10644,6 @@ sdcc ${VERSION} is now configured for +@@ -11135,9 +10920,6 @@ sdcc ${VERSION} is now configured for include/library files: ${datadir}/${inclib_dir_suffix} include files: ${datadir}/${include_dir_suffix} library files: ${datadir}/${lib_dir_suffix} @@ -478,7 +473,7 @@ index 4c2226b..b8a9251 100755 documentation: ${docdir} prefix: ${prefix} -@@ -10878,14 +10655,8 @@ sdcc ${VERSION} is now configured for +@@ -11149,15 +10931,9 @@ sdcc ${VERSION} is now configured for include files: ${incPath1} path(argv[0])${incPath2} ${incPath3} @@ -493,11 +488,12 @@ index 4c2226b..b8a9251 100755 - ${nonFreeLibPath3}${dirch} " >&6; } # End of configure/configure.in + diff --git a/configure.ac b/configure.ac -index 455fee1..48e0a20 100644 +index cc5309e..5eb4326 100644 --- a/configure.ac +++ b/configure.ac -@@ -548,19 +548,6 @@ if test "${include_dir_suffix}" = ""; then +@@ -562,19 +562,6 @@ if test "${include_dir_suffix}" = ""; then include_dir_suffix="${inclib_dir_suffix}/include" fi @@ -517,7 +513,7 @@ index 455fee1..48e0a20 100644 # lib_dir_suffix: # *nix default: "sdcc/lib" AC_ARG_VAR([lib_dir_suffix], [appended to datadir to define SDCC's library root directory]) -@@ -568,13 +555,6 @@ if test "${lib_dir_suffix}" = ""; then +@@ -582,13 +569,6 @@ if test "${lib_dir_suffix}" = ""; then lib_dir_suffix="${inclib_dir_suffix}/lib" fi @@ -531,7 +527,7 @@ index 455fee1..48e0a20 100644 # docdir: # *nix default: "${datadir}/sdcc/doc" AC_ARG_VAR([docdir], [documentation installation directory]) -@@ -615,19 +595,11 @@ norm_inc_dir_suffix=${include_dir_suffix} +@@ -629,19 +609,11 @@ norm_inc_dir_suffix=${include_dir_suffix} adl_NORMALIZE_PATH([norm_inc_dir_suffix], [$sdccconf_h_dir_separator]) AC_DEFINE_UNQUOTED(INCLUDE_DIR_SUFFIX, DIR_SEPARATOR_STRING "${norm_inc_dir_suffix}", [XXX]) @@ -551,7 +547,7 @@ index 455fee1..48e0a20 100644 # relative paths adl_COMPUTE_RELATIVE_PATHS([expanded_bindir:expanded_datadir:bin2data_dir]) -@@ -803,7 +775,6 @@ AC_DO_DISABLER(packihx, PACKIHX, [Disables building packihx]) +@@ -819,7 +791,6 @@ AC_DO_DISABLER(packihx, PACKIHX, [Disables building packihx]) AC_DO_DISABLER(sdcpp, SDCPP, [Disables building sdcpp]) AC_DO_DISABLER(sdcdb, SDCDB, [Disables building sdcdb]) AC_DO_DISABLER(sdbinutils, SDBINUTILS, [Disables configuring and building of sdbinutils]) @@ -559,7 +555,7 @@ index 455fee1..48e0a20 100644 AC_DO_ENABLER(doc, DOC, [Enables building the documentation]) AC_CHECK_PROG([LYX], [lyx], [lyx], [:]) -@@ -874,16 +845,10 @@ if test $OPT_DISABLE_PIC14 = 0; then +@@ -897,16 +868,10 @@ if test $OPT_DISABLE_PIC14 = 0; then AC_CONFIG_FILES(src/pic14/Makefile) test $OPT_DISABLE_DEVICE_LIB = 0 && AC_CONFIG_SUBDIRS(device/lib/pic14) fi @@ -574,9 +570,9 @@ index 455fee1..48e0a20 100644 - test $OPT_DISABLE_DEVICE_LIB = 0 && AC_CONFIG_SUBDIRS(device/non-free/lib/pic16) -fi - if test $OPT_DISABLE_Z80 = 0 || test $OPT_DISABLE_Z180 = 0 || test $OPT_DISABLE_R2K = 0 || test $OPT_DISABLE_R2KA = 0 || test $OPT_DISABLE_R3KA = 0 || test $OPT_DISABLE_GBZ80 = 0 || test $OPT_DISABLE_TLCS90 = 0 || test $OPT_DISABLE_EZ80_Z80 = 0 || test $OPT_DISABLE_Z80N = 0; then + if test $OPT_DISABLE_Z80 = 0 || test $OPT_DISABLE_Z180 = 0 || test $OPT_DISABLE_R2K = 0 || test $OPT_DISABLE_R2KA = 0 || test $OPT_DISABLE_R3KA = 0 || test $OPT_DISABLE_SM83 = 0 || test $OPT_DISABLE_TLCS90 = 0 || test $OPT_DISABLE_EZ80_Z80 = 0 || test $OPT_DISABLE_Z80N = 0; then AC_CONFIG_FILES([src/z80/Makefile]) -@@ -947,7 +912,6 @@ fi +@@ -970,7 +935,6 @@ fi test $OPT_DISABLE_DEVICE_LIB = 0 && AC_CONFIG_FILES([device/lib/Makefile]) @@ -584,7 +580,7 @@ index 455fee1..48e0a20 100644 AC_CONFIG_FILES([main.mk:main_in.mk src/Makefile -@@ -961,9 +925,6 @@ support/regression/ports/host/spec.mk:support/regression/ports/host/spec.mk.in +@@ -984,9 +948,6 @@ support/regression/ports/host/spec.mk:support/regression/ports/host/spec.mk.in Makefile Makefile.common:Makefile.common.in ]) @@ -594,7 +590,7 @@ index 455fee1..48e0a20 100644 AC_OUTPUT # I found no better place -@@ -981,16 +942,10 @@ adl_NORMALIZE_PATH_MSG(/${prefix2bin_dir}, [binPath], [ +@@ -1004,16 +965,10 @@ adl_NORMALIZE_PATH_MSG(/${prefix2bin_dir}, [binPath], [ adl_NORMALIZE_PATH_MSG(/${prefix2data_dir}/${norm_inc_dir_suffix}, [incPath1], [$dirch]) adl_NORMALIZE_PATH_MSG(/${bin2data_dir}/${norm_inc_dir_suffix}, [incPath2], [$dirch]) adl_NORMALIZE_PATH_MSG(${expanded_datadir}/${norm_inc_dir_suffix}, [incPath3], [$dirch]) @@ -611,15 +607,15 @@ index 455fee1..48e0a20 100644 AC_MSG_RESULT([ sdcc ${VERSION} is now configured for -@@ -1030,7 +985,6 @@ sdcc ${VERSION} is now configured for - pdk15 ${enable_pdk15_port} - pdk16 ${enable_pdk16_port} +@@ -1055,7 +1010,6 @@ sdcc ${VERSION} is now configured for + mos6502 ${enable_mos6502_port} + mos65c02 ${enable_mos65c02_port} - Disable non-free lib: ${OPT_DISABLE_NON_FREE} Disable packihx: ${OPT_DISABLE_PACKIHX} Disable ucsim: ${OPT_DISABLE_UCSIM} Disable device lib: ${OPT_DISABLE_DEVICE_LIB} -@@ -1045,9 +999,6 @@ sdcc ${VERSION} is now configured for +@@ -1070,9 +1024,6 @@ sdcc ${VERSION} is now configured for include/library files: ${datadir}/${inclib_dir_suffix} include files: ${datadir}/${include_dir_suffix} library files: ${datadir}/${lib_dir_suffix} @@ -629,7 +625,7 @@ index 455fee1..48e0a20 100644 documentation: ${docdir} prefix: ${prefix} -@@ -1059,14 +1010,8 @@ sdcc ${VERSION} is now configured for +@@ -1084,14 +1035,8 @@ sdcc ${VERSION} is now configured for include files: ${incPath1} path(argv[[0]])${incPath2} ${incPath3} @@ -875,7 +871,7 @@ index 01ad950..62839b9 100644 clean-local: diff --git a/device/lib/pic16/Makefile.in b/device/lib/pic16/Makefile.in -index e4e3abb..730066b 100644 +index 6a4c9cf..4b07384 100644 --- a/device/lib/pic16/Makefile.in +++ b/device/lib/pic16/Makefile.in @@ -87,10 +87,7 @@ PRE_UNINSTALL = : @@ -890,7 +886,7 @@ index e4e3abb..730066b 100644 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ -@@ -295,8 +292,7 @@ top_build_prefix = @top_build_prefix@ +@@ -297,8 +294,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = debug libc libio libm libsdcc startup @@ -900,7 +896,7 @@ index e4e3abb..730066b 100644 #AM_CFLAGS += --no-optimize-goto #AM_CFLAGS += --debug-ralloc -@@ -310,11 +306,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \ +@@ -312,11 +308,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \ #AM_CFLAGS += --noinduction #AM_CFLAGS += --nojtbound #AM_CFLAGS += --noloopreverse @@ -915,19 +911,40 @@ index e4e3abb..730066b 100644 all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive diff --git a/device/lib/pic16/configure b/device/lib/pic16/configure -index ed8ad06..65baa93 100755 +index add51b9..c451a74 100755 --- a/device/lib/pic16/configure +++ b/device/lib/pic16/configure -@@ -3657,7 +3657,6 @@ fi +@@ -3828,7 +3828,6 @@ fi -LIBDEV="${srcdir}/../../non-free/lib/pic16/libdev" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking devices supported by gputils" >&5 - $as_echo_n "checking devices supported by gputils... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking devices supported by gputils" >&5 + printf %s "checking devices supported by gputils... " >&6; } GOOD_PICS=""; +@@ -3839,20 +3838,6 @@ N_GOOD=0 + N_BAD=0 + mkdir -p ".checkdevices"; + rm -f "$RESULT"; +-for i in "${LIBDEV}/pic1"*.c; do +- p="${i##*pic}"; +- p="${p%.c}"; +- P=$(echo "$p" | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ); +- printf " include \"p%s.inc\"\n END" "$p" > "${CHECK}.asm"; +- if "$mCCAS" -p "$p" -o "${CHECK}.o" -c "${CHECK}.asm" >/dev/null 2>&1 && "$mLD" "${CHECK}.o" >/dev/null 2>&1; then +- GOOD_PICS="$GOOD_PICS $p"; +- N_GOOD=`expr $N_GOOD + 1`; +- echo "$P" >> "$RESULT"; +- else +- BAD_PICS="$BAD_PICS $p"; +- N_BAD=`expr $N_BAD + 1`; +- fi; +-done; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $N_GOOD devices ($GOOD_PICS)" >&5 + printf "%s\n" "$N_GOOD devices ($GOOD_PICS)" >&6; } + diff --git a/device/lib/pic16/configure.ac b/device/lib/pic16/configure.ac -index 3966c11..cdbffc7 100644 +index 75bea9d..65e98be 100644 --- a/device/lib/pic16/configure.ac +++ b/device/lib/pic16/configure.ac @@ -68,10 +68,6 @@ AC_SUBST(OBJEXT, [o]) @@ -942,7 +959,7 @@ index 3966c11..cdbffc7 100644 # Checks for header files. diff --git a/device/lib/pic16/debug/Makefile.in b/device/lib/pic16/debug/Makefile.in -index 8d5eb80..9dd8bb2 100644 +index 05108a8..a6a94bb 100644 --- a/device/lib/pic16/debug/Makefile.in +++ b/device/lib/pic16/debug/Makefile.in @@ -88,10 +88,7 @@ PRE_UNINSTALL = : @@ -957,7 +974,7 @@ index 8d5eb80..9dd8bb2 100644 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -@@ -291,8 +288,7 @@ top_builddir = @top_builddir@ +@@ -292,8 +289,7 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ lib_LIBRARIES = libdebug.a libdebug_a_SOURCES = gstack/gstack.c @@ -967,7 +984,7 @@ index 8d5eb80..9dd8bb2 100644 #AM_CFLAGS += --no-optimize-goto #AM_CFLAGS += --debug-ralloc -@@ -306,11 +302,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \ +@@ -307,11 +303,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \ #AM_CFLAGS += --noinduction #AM_CFLAGS += --nojtbound #AM_CFLAGS += --noloopreverse @@ -982,7 +999,7 @@ index 8d5eb80..9dd8bb2 100644 .SUFFIXES: diff --git a/device/lib/pic16/libc/Makefile.in b/device/lib/pic16/libc/Makefile.in -index 659db72..cbb73bf 100644 +index 49a437d..5579b71 100644 --- a/device/lib/pic16/libc/Makefile.in +++ b/device/lib/pic16/libc/Makefile.in @@ -88,10 +88,7 @@ PRE_UNINSTALL = : @@ -997,7 +1014,7 @@ index 659db72..cbb73bf 100644 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -@@ -381,8 +378,7 @@ libc18f_a_SOURCES = ctype/iscntrl.c ctype/isdigit.c ctype/isgraph.c \ +@@ -382,8 +379,7 @@ libc18f_a_SOURCES = ctype/iscntrl.c ctype/isdigit.c ctype/isgraph.c \ string/strpbrk.c string/strrchr.c string/strspn.c \ string/strstr.c string/strtok.c string/strupr.c \ utils/cnvfrac.S utils/cnvint.S utils/cvtdec.S @@ -1007,7 +1024,7 @@ index 659db72..cbb73bf 100644 #AM_CFLAGS += --no-optimize-goto #AM_CFLAGS += --debug-ralloc -@@ -396,11 +392,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \ +@@ -397,11 +393,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \ #AM_CFLAGS += --noinduction #AM_CFLAGS += --nojtbound #AM_CFLAGS += --noloopreverse @@ -1022,7 +1039,7 @@ index 659db72..cbb73bf 100644 .SUFFIXES: diff --git a/device/lib/pic16/libio/Makefile.in b/device/lib/pic16/libio/Makefile.in -index 128ffcc..b298c7c 100644 +index 5b1a9b0..664958f 100644 --- a/device/lib/pic16/libio/Makefile.in +++ b/device/lib/pic16/libio/Makefile.in @@ -481,10 +481,7 @@ POST_UNINSTALL = : @@ -1037,7 +1054,7 @@ index 128ffcc..b298c7c 100644 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -@@ -15600,8 +15597,7 @@ libio18lf8722_a_SOURCES = dummy.c i2c/i2cack.c i2c/i2cclose.c \ +@@ -15601,8 +15598,7 @@ libio18lf8722_a_SOURCES = dummy.c i2c/i2cack.c i2c/i2cclose.c \ libio18lf8722_a_CFLAGS = -p18lf8722 $(AM_CFLAGS) libio18lf8723_a_SOURCES = dummy.c libio18lf8723_a_CFLAGS = -p18lf8723 $(AM_CFLAGS) @@ -1047,7 +1064,7 @@ index 128ffcc..b298c7c 100644 #AM_CFLAGS += --no-optimize-goto #AM_CFLAGS += --debug-ralloc -@@ -15615,11 +15611,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \ +@@ -15616,11 +15612,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \ #AM_CFLAGS += --noinduction #AM_CFLAGS += --nojtbound #AM_CFLAGS += --noloopreverse @@ -1107,7 +1124,7 @@ index 211604e..e8896bf 100755 include \$(top_srcdir)/Makefile.common diff --git a/device/lib/pic16/libm/Makefile.in b/device/lib/pic16/libm/Makefile.in -index af29662..05f1c24 100644 +index 285c5b8..ad6c293 100644 --- a/device/lib/pic16/libm/Makefile.in +++ b/device/lib/pic16/libm/Makefile.in @@ -88,10 +88,7 @@ PRE_UNINSTALL = : @@ -1122,7 +1139,7 @@ index af29662..05f1c24 100644 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -@@ -312,8 +309,7 @@ libm18f_a_SOURCES = acosf.c asincosf.c asinf.c atan2f.c atanf.c \ +@@ -313,8 +310,7 @@ libm18f_a_SOURCES = acosf.c asincosf.c asinf.c atan2f.c atanf.c \ frexpf.c isinf.c isnan.c ldexpf.c log10f.c logf.c modff.c \ powf.c sincosf.c sincoshf.c sinf.c sinhf.c sqrtf.c tancotf.c \ tanf.c tanhf.c @@ -1132,7 +1149,7 @@ index af29662..05f1c24 100644 #AM_CFLAGS += --no-optimize-goto #AM_CFLAGS += --debug-ralloc -@@ -327,11 +323,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \ +@@ -328,11 +324,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \ #AM_CFLAGS += --noinduction #AM_CFLAGS += --nojtbound #AM_CFLAGS += --noloopreverse @@ -1147,7 +1164,7 @@ index af29662..05f1c24 100644 .SUFFIXES: diff --git a/device/lib/pic16/libsdcc/Makefile.in b/device/lib/pic16/libsdcc/Makefile.in -index d384631..01129e3 100644 +index 808b8a5..412dc80 100644 --- a/device/lib/pic16/libsdcc/Makefile.in +++ b/device/lib/pic16/libsdcc/Makefile.in @@ -88,10 +88,7 @@ PRE_UNINSTALL = : @@ -1162,7 +1179,7 @@ index d384631..01129e3 100644 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -@@ -413,8 +410,7 @@ libsdcc_a_SOURCES = char/divschar.c char/divuchar.c char/modschar.c \ +@@ -414,8 +411,7 @@ libsdcc_a_SOURCES = char/divschar.c char/divuchar.c char/modschar.c \ int/modsint.c int/moduint.c int/mulint.c long/divslong.c \ long/divulong.c long/modslong.c long/modulong.c long/mullong.c \ lregs/lrrest.c lregs/lrst.c stack/stack.S @@ -1172,7 +1189,7 @@ index d384631..01129e3 100644 #AM_CFLAGS += --no-optimize-goto #AM_CFLAGS += --debug-ralloc -@@ -428,11 +424,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \ +@@ -429,11 +425,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \ #AM_CFLAGS += --noinduction #AM_CFLAGS += --nojtbound #AM_CFLAGS += --noloopreverse @@ -1187,7 +1204,7 @@ index d384631..01129e3 100644 .SUFFIXES: diff --git a/device/lib/pic16/startup/Makefile.in b/device/lib/pic16/startup/Makefile.in -index 6169096..0172a25 100644 +index d57c254..7394a4c 100644 --- a/device/lib/pic16/startup/Makefile.in +++ b/device/lib/pic16/startup/Makefile.in @@ -89,10 +89,7 @@ PRE_UNINSTALL = : @@ -1202,7 +1219,7 @@ index 6169096..0172a25 100644 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -@@ -308,8 +305,7 @@ libcrt0iz_a_SOURCES = crt0iz.c +@@ -309,8 +306,7 @@ libcrt0iz_a_SOURCES = crt0iz.c # Force installation of .o files into $libdir crtdir = $(libdir) crt_DATA = crt0.o crt0i.o crt0iz.o @@ -1212,7 +1229,7 @@ index 6169096..0172a25 100644 #AM_CFLAGS += --no-optimize-goto #AM_CFLAGS += --debug-ralloc -@@ -323,11 +319,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \ +@@ -324,11 +320,10 @@ AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \ #AM_CFLAGS += --noinduction #AM_CFLAGS += --nojtbound #AM_CFLAGS += --noloopreverse @@ -1227,7 +1244,7 @@ index 6169096..0172a25 100644 .SUFFIXES: diff --git a/doc/INSTALL.txt b/doc/INSTALL.txt -index d630b99..8cd747f 100644 +index 3c4bc1f..0a6fdd5 100644 --- a/doc/INSTALL.txt +++ b/doc/INSTALL.txt @@ -18,9 +18,7 @@ To install: @@ -1261,10 +1278,10 @@ index d630b99..8cd747f 100644 You can test the install by entering: diff --git a/doc/README.txt b/doc/README.txt -index 88f8c98..a36db81 100644 +index 3720fd6..5a0d0a8 100644 --- a/doc/README.txt +++ b/doc/README.txt -@@ -35,10 +35,9 @@ Exception are pic device libraries and header files which are derived +@@ -37,10 +37,9 @@ Exception are pic device libraries and header files which are derived from Microchip header (.inc) and linker script (.lkr) files. Microchip requires that "The header files should state that they are only to be used with authentic Microchip devices" which makes them incompatible @@ -1276,13 +1293,13 @@ index 88f8c98..a36db81 100644 +and run-time options that enable their use) are omitted in the SDCC +package distributed with GNU Guix. - See: - + However: Many think that the Microchip requirement is not legally enforceable, + arguing that the header files only contain noncopyrightable facts. diff --git a/doc/sdccman.lyx b/doc/sdccman.lyx -index c8f8e73..e4afb0c 100644 +index 9ba31eb..3d69b5a 100644 --- a/doc/sdccman.lyx +++ b/doc/sdccman.lyx -@@ -1092,54 +1092,9 @@ A possible exception are pic device libraries and header files which are +@@ -1093,54 +1093,9 @@ A possible exception are pic device libraries and header files which are to be used with authentic Microchip devices" which makes them incompatible with the GPL, if Microchip has any copyright in them (which might depend on local copyright laws). @@ -1340,7 +1357,7 @@ index c8f8e73..e4afb0c 100644 \end_layout \begin_layout Itemize -@@ -2890,18 +2845,6 @@ include_dir_suffix environment variable, see table below +@@ -2943,18 +2898,6 @@ include_dir_suffix environment variable, see table below \end_inset @@ -1359,7 +1376,7 @@ index c8f8e73..e4afb0c 100644 \begin_inset space ~ \end_inset -@@ -2914,22 +2857,6 @@ lib_dir_suffix environment variable, see table below +@@ -2967,22 +2910,6 @@ lib_dir_suffix environment variable, see table below \end_inset @@ -1382,7 +1399,7 @@ index c8f8e73..e4afb0c 100644 \begin_inset space ~ \end_inset -@@ -3428,7 +3355,7 @@ These defaults are: +@@ -3481,7 +3408,7 @@ These defaults are: \begin_layout Standard \align center \begin_inset Tabular @@ -1391,7 +1408,7 @@ index c8f8e73..e4afb0c 100644 -@@ -3712,68 +3639,6 @@ sdcc/include +@@ -3765,68 +3692,6 @@ sdcc/include include \end_layout @@ -1460,7 +1477,7 @@ index c8f8e73..e4afb0c 100644 \end_inset -@@ -3784,7 +3649,7 @@ lib +@@ -3837,7 +3702,7 @@ lib \begin_layout Plain Layout \emph on @@ -1469,7 +1486,7 @@ index c8f8e73..e4afb0c 100644 \end_layout \end_inset -@@ -3793,7 +3658,7 @@ NON_FREE_LIB_DIR_SUFFIX +@@ -3846,7 +3711,7 @@ NON_FREE_LIB_DIR_SUFFIX \begin_inset Text \begin_layout Plain Layout @@ -1478,7 +1495,7 @@ index c8f8e73..e4afb0c 100644 \end_layout \end_inset -@@ -3802,7 +3667,7 @@ sdcc/non-free/lib +@@ -3855,7 +3720,7 @@ sdcc/non-free/lib \begin_inset Text \begin_layout Plain Layout @@ -1487,7 +1504,7 @@ index c8f8e73..e4afb0c 100644 \end_layout \end_inset -@@ -4201,20 +4066,6 @@ include +@@ -4254,20 +4119,6 @@ include \end_inset @@ -1508,7 +1525,7 @@ index c8f8e73..e4afb0c 100644 \backslash \begin_inset Newline newline -@@ -4229,20 +4080,6 @@ lib +@@ -4282,20 +4133,6 @@ lib \end_inset @@ -1529,7 +1546,7 @@ index c8f8e73..e4afb0c 100644 \backslash \begin_inset Newline newline -@@ -4423,20 +4260,6 @@ include +@@ -4476,20 +4313,6 @@ include \end_inset @@ -1550,7 +1567,7 @@ index c8f8e73..e4afb0c 100644 \backslash \begin_inset Newline newline -@@ -4451,20 +4274,6 @@ lib +@@ -4504,20 +4327,6 @@ lib \end_inset @@ -1571,7 +1588,7 @@ index c8f8e73..e4afb0c 100644 \backslash \begin_inset Newline newline -@@ -4561,7 +4370,7 @@ Install paths +@@ -4614,7 +4423,7 @@ Install paths \begin_layout Standard \align center \begin_inset Tabular @@ -1580,7 +1597,7 @@ index c8f8e73..e4afb0c 100644 -@@ -4717,64 +4526,6 @@ include +@@ -4770,64 +4579,6 @@ include \begin_inset Text @@ -1645,7 +1662,7 @@ index c8f8e73..e4afb0c 100644 \begin_layout Plain Layout Library file** \end_layout -@@ -4824,64 +4575,6 @@ sdcc +@@ -4877,64 +4628,6 @@ sdcc lib \end_layout @@ -1710,7 +1727,7 @@ index c8f8e73..e4afb0c 100644 \end_inset -@@ -5204,7 +4897,7 @@ $PATH +@@ -5257,7 +4950,7 @@ $PATH \begin_layout Standard \align center \begin_inset Tabular @@ -1719,7 +1736,7 @@ index c8f8e73..e4afb0c 100644 -@@ -5482,203 +5175,13 @@ include +@@ -5535,203 +5228,13 @@ include @@ -1924,7 +1941,7 @@ index c8f8e73..e4afb0c 100644 \end_inset -@@ -5694,21 +5197,13 @@ $DATADIR/ +@@ -5747,21 +5250,13 @@ $DATADIR/ \end_inset @@ -1947,7 +1964,7 @@ index c8f8e73..e4afb0c 100644 \begin_inset Text \begin_layout Plain Layout -@@ -5716,7 +5211,7 @@ $INCLUDE_DIR_SUFFIX +@@ -5769,7 +5264,7 @@ $INCLUDE_DIR_SUFFIX \begin_inset Newline newline \end_inset @@ -1956,7 +1973,7 @@ index c8f8e73..e4afb0c 100644 \end_layout \end_inset -@@ -5814,7 +5309,7 @@ model +@@ -5867,7 +5362,7 @@ model \begin_layout Standard \align center \begin_inset Tabular @@ -1965,7 +1982,7 @@ index c8f8e73..e4afb0c 100644 -@@ -6094,7 +5589,7 @@ lib +@@ -6147,7 +5642,7 @@ lib @@ -1974,7 +1991,7 @@ index c8f8e73..e4afb0c 100644 \begin_inset Text \begin_layout Plain Layout -@@ -6103,7 +5598,7 @@ lib +@@ -6156,7 +5651,7 @@ lib \end_inset @@ -1983,7 +2000,7 @@ index c8f8e73..e4afb0c 100644 \begin_inset Text \begin_layout Plain Layout -@@ -6134,7 +5629,7 @@ $LIB_DIR_SUFFIX/ +@@ -6187,7 +5682,7 @@ $LIB_DIR_SUFFIX/ \end_inset @@ -1992,7 +2009,7 @@ index c8f8e73..e4afb0c 100644 \begin_inset Text \begin_layout Plain Layout -@@ -6149,7 +5644,7 @@ lib/ +@@ -6202,7 +5697,7 @@ lib/ \end_inset @@ -2001,7 +2018,7 @@ index c8f8e73..e4afb0c 100644 \begin_inset Text \begin_layout Plain Layout -@@ -6172,308 +5667,6 @@ lib +@@ -6225,308 +5720,6 @@ lib \end_layout @@ -2310,7 +2327,7 @@ index c8f8e73..e4afb0c 100644 \end_inset -@@ -8737,14 +7930,6 @@ In /share/sdcc/include +@@ -8801,14 +7994,6 @@ In /share/sdcc/include the include files \end_layout @@ -2325,7 +2342,7 @@ index c8f8e73..e4afb0c 100644 \begin_layout Standard In /share/sdcc/lib \end_layout -@@ -8753,14 +7938,6 @@ In /share/sdcc/lib +@@ -8817,14 +8002,6 @@ In /share/sdcc/lib the src and target subdirectories with the precompiled relocatables. \end_layout @@ -2340,7 +2357,7 @@ index c8f8e73..e4afb0c 100644 \begin_layout Standard In /share/sdcc/doc \end_layout -@@ -15274,66 +14451,6 @@ splint +@@ -15590,66 +14767,6 @@ splint myprogram.c \end_layout @@ -2407,7 +2424,7 @@ index c8f8e73..e4afb0c 100644 \begin_layout Subsection Linker Options \begin_inset Index idx -@@ -44653,66 +43770,9 @@ http://sourceforge.net/projects/gputils +@@ -45248,66 +44365,9 @@ http://sourceforge.net/projects/gputils Pic device specific header and c source files are automatically generated from MPLAB include files, which are published by Microchip with a special requirement that they are only to be used with authentic Microchip devices. @@ -2477,7 +2494,7 @@ index c8f8e73..e4afb0c 100644 \begin_inset Newline newline \end_inset -@@ -44766,7 +43826,7 @@ Makefile +@@ -45361,7 +44421,7 @@ Makefile \begin_inset space ~ \end_inset @@ -2486,7 +2503,7 @@ index c8f8e73..e4afb0c 100644 \begin_inset Newline newline \end_inset -@@ -44860,7 +43920,7 @@ Makefile +@@ -45455,7 +44515,7 @@ Makefile \begin_inset space ~ \end_inset @@ -2495,7 +2512,7 @@ index c8f8e73..e4afb0c 100644 \begin_inset Newline newline \end_inset -@@ -45142,47 +44202,6 @@ status collapsed +@@ -45737,47 +44797,6 @@ status collapsed \begin_layout Plain Layout @@ -2543,7 +2560,7 @@ index c8f8e73..e4afb0c 100644 \backslash / \end_layout -@@ -46055,47 +45074,6 @@ status collapsed +@@ -46650,47 +45669,6 @@ status collapsed -all-callee-saves \end_layout @@ -2591,7 +2608,7 @@ index c8f8e73..e4afb0c 100644 \begin_layout Subsection Port Specific Options \begin_inset Index idx -@@ -47372,188 +46350,6 @@ Linker +@@ -47967,188 +46945,6 @@ Linker \end_inset @@ -2780,7 +2797,7 @@ index c8f8e73..e4afb0c 100644 \end_layout \begin_layout Subsection -@@ -48249,66 +47045,9 @@ name "subsec:PIC16_Header-Files-and-Libraries" +@@ -48844,66 +47640,9 @@ name "subsec:PIC16_Header-Files-and-Libraries" Pic device specific header and c source files are automatically generated from MPLAB include files, which are published by Microchip with a special requirement that they are only to be used with authentic Microchip devices. @@ -2850,7 +2867,7 @@ index c8f8e73..e4afb0c 100644 \end_layout \begin_layout Subsection -@@ -48554,195 +47293,6 @@ vfprintf.c +@@ -49149,195 +47888,6 @@ vfprintf.c should also work, but is untested. \end_layout @@ -3046,7 +3063,7 @@ index c8f8e73..e4afb0c 100644 \begin_layout Subsection Memory Models \end_layout -@@ -73528,6 +72078,12 @@ This document was initially written by Sandeep Dutta and updated by SDCC +@@ -74082,6 +72632,12 @@ This document was initially written by Sandeep Dutta and updated by SDCC developers. \end_layout @@ -3060,7 +3077,7 @@ index c8f8e73..e4afb0c 100644 All product names mentioned herein may be trademarks \begin_inset Index idx diff --git a/sdcc.spec b/sdcc.spec -index 3609ffe..4b4a5cb 100644 +index 85ae200..8e0ef4b 100644 --- a/sdcc.spec +++ b/sdcc.spec @@ -89,9 +89,7 @@ rm -rf $RPM_BUILD_ROOT @@ -3073,8 +3090,8 @@ index 3609ffe..4b4a5cb 100644 %files doc %defattr(-,root,root) -@@ -100,6 +98,8 @@ rm -rf $RPM_BUILD_ROOT - %changelog +@@ -102,6 +100,8 @@ rm -rf $RPM_BUILD_ROOT + - version updated to 4.2.0 * Sat Feb 20 2021 - pkk AT spth.de - version updated to 4.0.0 +* Tue Dec 08 2020 - simon AT simonsouth.net @@ -3083,7 +3100,7 @@ index 3609ffe..4b4a5cb 100644 - version updated to 4.0.0 * Fri Apr 05 2019 - krauseph AT informatik.uni-freiburg.de diff --git a/sdcc_vc.h.in b/sdcc_vc.h.in -index 06d8cca..736c325 100644 +index 8cf401b..19f5113 100644 --- a/sdcc_vc.h.in +++ b/sdcc_vc.h.in @@ -23,8 +23,6 @@ @@ -3096,7 +3113,7 @@ index 06d8cca..736c325 100644 #define BIN2DATA_DIR "\\.." #define PREFIX2BIN_DIR "\\bin" diff --git a/sdccconf_in.h b/sdccconf_in.h -index eb6f48b..9f5b003 100644 +index ca8d69f..980af8d 100644 --- a/sdccconf_in.h +++ b/sdccconf_in.h @@ -100,12 +100,6 @@ @@ -3112,9 +3129,9 @@ index eb6f48b..9f5b003 100644 /* Define to 1 to disable the AVR port */ #undef OPT_DISABLE_AVR -@@ -130,9 +124,6 @@ +@@ -133,9 +127,6 @@ /* XXX */ - #undef OPT_DISABLE_MCS51 + #undef OPT_DISABLE_MOS65C02 -/* XXX */ -#undef OPT_DISABLE_NON_FREE @@ -3123,10 +3140,10 @@ index eb6f48b..9f5b003 100644 #undef OPT_DISABLE_PACKIHX diff --git a/src/SDCCglobl.h b/src/SDCCglobl.h -index 9383f68..c2f0b42 100644 +index b49fa1b..d357169 100644 --- a/src/SDCCglobl.h +++ b/src/SDCCglobl.h -@@ -288,7 +288,6 @@ struct options +@@ -287,7 +287,6 @@ struct options int stack_size; /* MCS51/DS390 - Tells the linker to allocate this space for stack */ int acall_ajmp; /* MCS51 - Use acall/ajmp instead of lcall/ljmp */ int no_ret_without_call; /* MCS51 - Do not use ret independent of acall/lcall */ @@ -3135,7 +3152,7 @@ index 9383f68..c2f0b42 100644 int xstack_loc; /* initial location of external stack */ int stack_loc; /* initial value of internal stack pointer */ diff --git a/src/SDCCmain.c b/src/SDCCmain.c -index 2a7a711..f46370f 100644 +index bc1493d..e775988 100644 --- a/src/SDCCmain.c +++ b/src/SDCCmain.c @@ -151,7 +151,6 @@ char buffer[PATH_MAX * 2]; @@ -3146,7 +3163,7 @@ index 2a7a711..f46370f 100644 #define OPTION_PEEP_RETURN "--peep-return" #define OPTION_NO_PEEP_RETURN "--no-peep-return" #define OPTION_NO_OPTSDCC_IN_ASM "--no-optsdcc-in-asm" -@@ -207,7 +206,6 @@ static const OPTION optionsTable[] = { +@@ -209,7 +208,6 @@ static const OPTION optionsTable[] = { {0, OPTION_STD_SDCC2X, NULL, "Use ISO C2X standard with SDCC extensions"}, {0, OPTION_DOLLARS_IN_IDENT, &options.dollars_in_ident, "Permit '$' as an identifier character"}, {0, OPTION_SIGNED_CHAR, &options.signed_char, "Make \"char\" signed by default"}, @@ -3154,7 +3171,7 @@ index 2a7a711..f46370f 100644 {0, NULL, NULL, "Code generation options"}, {'m', NULL, NULL, "Set the port to use e.g. -mz80."}, -@@ -2113,10 +2111,6 @@ preProcess (char **envp) +@@ -2132,10 +2130,6 @@ preProcess (char **envp) else addSet (&preArgvSet, Safe_strdup ("-D__SDCC_CHAR_UNSIGNED")); @@ -3165,7 +3182,7 @@ index 2a7a711..f46370f 100644 /* set the macro for large model */ switch (options.model) { -@@ -2336,12 +2330,6 @@ setIncludePath (void) +@@ -2365,12 +2359,6 @@ setIncludePath (void) * 6. - $SDCC_HOME/PREFIX2DATA_DIR/INCLUDE_DIR_SUFFIX * 7. - path(argv[0])/BIN2DATA_DIR/INCLUDE_DIR_SUFFIX * 8. - DATADIR/INCLUDE_DIR_SUFFIX (only on *nix) @@ -3178,7 +3195,7 @@ index 2a7a711..f46370f 100644 */ if (!options.nostdinc) -@@ -2357,17 +2345,6 @@ setIncludePath (void) +@@ -2386,17 +2374,6 @@ setIncludePath (void) includeDirsSet = processStrSet (includeDirsSet, NULL, port->target, NULL); mergeSets (&includeDirsSet, tempSet); @@ -3196,7 +3213,7 @@ index 2a7a711..f46370f 100644 if ((p = getenv (SDCC_INCLUDE_NAME)) != NULL) { struct dbuf_s dbuf; -@@ -2392,9 +2369,6 @@ setLibPath (void) +@@ -2421,9 +2398,6 @@ setLibPath (void) * 3. - $SDCC_HOME/PREFIX2DATA_DIR/LIB_DIR_SUFFIX/ * 4. - path(argv[0])/BIN2DATA_DIR/LIB_DIR_SUFFIX/ * 5. - DATADIR/LIB_DIR_SUFFIX/ (only on *nix) @@ -3206,7 +3223,7 @@ index 2a7a711..f46370f 100644 */ if (!options.nostdlib) -@@ -2411,13 +2385,6 @@ setLibPath (void) +@@ -2440,13 +2414,6 @@ setLibPath (void) dbuf_makePath (&dbuf, LIB_DIR_SUFFIX, port->general.get_model ? port->general.get_model () : targetname); libDirsSet = processStrSet (dataDirsSet, NULL, dbuf_c_str (&dbuf), NULL); @@ -3221,7 +3238,7 @@ index 2a7a711..f46370f 100644 { addSetHead (&libDirsSet, Safe_strdup (p)); diff --git a/src/pic14/main.c b/src/pic14/main.c -index ee90470..519ccfc 100644 +index 38d8730..a0eecdb 100644 --- a/src/pic14/main.c +++ b/src/pic14/main.c @@ -42,7 +42,6 @@ static OPTION _pic14_poptions[] = @@ -3232,7 +3249,7 @@ index ee90470..519ccfc 100644 { 0, NULL, NULL, NULL } }; -@@ -176,16 +175,6 @@ _pic14_finaliseOptions (void) +@@ -180,16 +179,6 @@ _pic14_finaliseOptions (void) addSet (&preArgvSet, Safe_strdup (dbuf_detach_c_str (&dbuf))); } @@ -3274,10 +3291,10 @@ index cdfbba0..5877f09 100644 extern pic16_options_t pic16_options; diff --git a/src/pic16/main.c b/src/pic16/main.c -index d416642..bfe514d 100644 +index b0e717a..d7616f5 100644 --- a/src/pic16/main.c +++ b/src/pic16/main.c -@@ -655,7 +655,6 @@ OPTION pic16_optionsTable[]= { +@@ -660,7 +660,6 @@ OPTION pic16_optionsTable[]= { { 0, "--pcode-verbose", &pic16_pcode_verbose, "dump pcode related info"}, { 0, "--calltree", &pic16_options.dumpcalltree, "dump call tree in .calltree file"}, { 0, "--gstack", &pic16_options.gstack, "trace stack pointer push/pop to overflow"}, @@ -3285,7 +3302,7 @@ index d416642..bfe514d 100644 { 0, NULL, NULL, NULL} }; -@@ -940,16 +939,6 @@ _pic16_finaliseOptions (void) +@@ -945,16 +944,6 @@ _pic16_finaliseOptions (void) addSet (&asmOptionsSet, Safe_strdup ("-D__STACK_MODEL_SMALL")); } @@ -3302,7 +3319,7 @@ index d416642..bfe514d 100644 dbuf_destroy (&dbuf); } -@@ -979,7 +968,6 @@ _pic16_setDefaultOptions (void) +@@ -984,7 +973,6 @@ _pic16_setDefaultOptions (void) pic16_options.ip_stack = 1; /* set to 1 to enable ipop/ipush for stack */ pic16_options.gstack = 0; pic16_options.debgen = 0; @@ -3496,10 +3513,10 @@ index 6db417a..4b35225 100755 ); diff --git a/support/scripts/sdcc.nsi b/support/scripts/sdcc.nsi -index da63063..dae8d8d 100644 +index cebb8a6..778472a 100644 --- a/support/scripts/sdcc.nsi +++ b/support/scripts/sdcc.nsi -@@ -479,11 +479,6 @@ ${Section} "SDCC include files" SEC05 +@@ -480,11 +480,6 @@ ${Section} "SDCC include files" SEC05 SetOutPath "$INSTDIR\include" File "${DEV_ROOT}\include\*.h" @@ -3511,7 +3528,7 @@ index da63063..dae8d8d 100644 ${SectionEnd} ${Section} "SDCC DS390 library" SEC06 -@@ -581,18 +576,12 @@ ${Section} "SDCC PIC16 library" SEC21 +@@ -582,18 +577,12 @@ ${Section} "SDCC PIC16 library" SEC21 SetOutPath "$INSTDIR\lib\pic16" File "${DEV_ROOT}\lib\pic16\*.o" File "${DEV_ROOT}\lib\pic16\*.lib" @@ -3530,7 +3547,7 @@ index da63063..dae8d8d 100644 ${SectionEnd} ${Section} "SDCC STM8 small model library" SEC23 -@@ -697,10 +686,6 @@ ${Section} "SDCC library sources" SEC25 +@@ -702,10 +691,6 @@ ${Section} "SDCC library sources" SEC25 File "${DEV_ROOT}\lib\src\pic14\libsdcc\enhanced\*.inc" # File "${DEV_ROOT}\lib\src\pic14\libsdcc\Makefile" @@ -3541,7 +3558,7 @@ index da63063..dae8d8d 100644 SetOutPath "$INSTDIR\lib\src\pic14\libm" # File "${DEV_ROOT}\lib\src\pic14\libm\*.c" -@@ -752,10 +737,6 @@ ${Section} "SDCC library sources" SEC25 +@@ -757,10 +742,6 @@ ${Section} "SDCC library sources" SEC25 File "${DEV_ROOT}\lib\src\pic16\libc\utils\*.S" # File "${DEV_ROOT}\lib\src\pic16\libc\utils\Makefile" @@ -3552,7 +3569,7 @@ index da63063..dae8d8d 100644 SetOutPath "$INSTDIR\lib\src\pic16\libio" File "${DEV_ROOT}\lib\src\pic16\libio\*.ignore" # File "${DEV_ROOT}\lib\src\pic16\libio\Makefile" -@@ -1105,13 +1086,9 @@ ${Section} Uninstall SECUNINSTALL +@@ -1126,13 +1107,9 @@ ${Section} Uninstall SECUNINSTALL Delete "$INSTDIR\lib\pic14\*.lib" @@ -3566,7 +3583,7 @@ index da63063..dae8d8d 100644 Delete "$INSTDIR\lib\hc08\*.lib" Delete "$INSTDIR\lib\s08\*.lib" -@@ -1182,9 +1159,7 @@ ${Section} Uninstall SECUNINSTALL +@@ -1208,9 +1185,7 @@ ${Section} Uninstall SECUNINSTALL Delete "$INSTDIR\include\pic14\*.h" Delete "$INSTDIR\include\pic14\*.txt" Delete "$INSTDIR\include\pic14\*.inc" @@ -3576,7 +3593,7 @@ index da63063..dae8d8d 100644 Delete "$INSTDIR\include\pic16\*.txt" Delete "$INSTDIR\include\mcs51\*.h" Delete "$INSTDIR\include\hc08\*.h" -@@ -1246,9 +1221,7 @@ ${Section} Uninstall SECUNINSTALL +@@ -1273,9 +1248,7 @@ ${Section} Uninstall SECUNINSTALL Delete "$INSTDIR\uninstall.exe" RMDir /r "$INSTDIR\lib\src\pic14" @@ -3586,8 +3603,8 @@ index da63063..dae8d8d 100644 RMDir "$INSTDIR\lib\src\small" RMDir "$INSTDIR\lib\src\medium" RMDir "$INSTDIR\lib\src\large" -@@ -1274,12 +1247,9 @@ ${Section} Uninstall SECUNINSTALL - RMDir "$INSTDIR\lib\src\tlcs90" +@@ -1303,12 +1276,9 @@ ${Section} Uninstall SECUNINSTALL + RMDir "$INSTDIR\lib\src\mos6502" RMDir "$INSTDIR\lib\src\z80n" RMDir "$INSTDIR\lib\src" - RMDir "$INSTDIR\non-free\lib\src" @@ -3599,8 +3616,8 @@ index da63063..dae8d8d 100644 RMDir "$INSTDIR\lib\z80" RMDir "$INSTDIR\lib\z180" RMDir "$INSTDIR\lib\r2k" -@@ -1305,15 +1275,12 @@ ${Section} Uninstall SECUNINSTALL - RMDir "$INSTDIR\lib\tlcs90" +@@ -1336,15 +1306,12 @@ ${Section} Uninstall SECUNINSTALL + RMDir "$INSTDIR\lib\mos6502" RMDir "$INSTDIR\lib\z80n" RMDir "$INSTDIR\lib" - RMDir "$INSTDIR\non-free\lib" @@ -3613,9 +3630,9 @@ index da63063..dae8d8d 100644 RMDir "$INSTDIR\include\asm\pic14" - RMDir "$INSTDIR\non-free\include\asm\pic14" RMDir "$INSTDIR\include\asm\mcs51" - RMDir "$INSTDIR\include\asm\gbz80" + RMDir "$INSTDIR\include\asm\sm83" RMDir "$INSTDIR\include\asm\ds390" -@@ -1322,17 +1289,12 @@ ${Section} Uninstall SECUNINSTALL +@@ -1353,17 +1320,12 @@ ${Section} Uninstall SECUNINSTALL RMDir "$INSTDIR\include\asm" RMDir "$INSTDIR\include\z180" RMDir "$INSTDIR\include\pic14" -- cgit v1.2.3 From 4e0c4ab7f962a56b1c5b023b40dbeb3e856c96f6 Mon Sep 17 00:00:00 2001 From: Ivan Vilata i Balaguer Date: Mon, 7 Mar 2022 00:47:32 +0100 Subject: gnu: transfig: Fix "multiple definition" errors with GCC 10+. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/patches/transfig-gcc10-fno-common.patch: New patch. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/xfig.scm (transfig)[source]: Use patch "transfig-gcc10-fno-common.patch" to avoid "multiple definition" errors with GCC 10+ and "-f-no-common". Signed-off-by: Ludovic Courtès --- gnu/local.mk | 1 + .../patches/transfig-gcc10-fno-common.patch | 33 ++++++++++++++++++++++ gnu/packages/xfig.scm | 5 +++- 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/transfig-gcc10-fno-common.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 60ee713508..484757b207 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1855,6 +1855,7 @@ dist_patch_DATA = \ gnu/packages/patches/tootle-reason-phrase.patch \ %D%/packages/patches/tor-sandbox-i686.patch \ %D%/packages/patches/transcode-ffmpeg.patch \ + %D%/packages/patches/transfig-gcc10-fno-common.patch \ %D%/packages/patches/transmission-honor-localedir.patch \ %D%/packages/patches/tremc-fix-decodestring.patch \ %D%/packages/patches/trytond-add-egg-modules-to-path.patch \ diff --git a/gnu/packages/patches/transfig-gcc10-fno-common.patch b/gnu/packages/patches/transfig-gcc10-fno-common.patch new file mode 100644 index 0000000000..ebe9236533 --- /dev/null +++ b/gnu/packages/patches/transfig-gcc10-fno-common.patch @@ -0,0 +1,33 @@ +Fixes "multiple definition" errors when building with GCC 10+. + +Based on . +--- a/fig2dev/dev/gensvg.c 2010-07-01 22:41:16.000000000 +0200 ++++ b/fig2dev/dev/gensvg.c 2022-02-27 20:02:33.379945500 +0100 +@@ -230,10 +230,12 @@ + }; + + /* arrowhead arrays */ +-Point points[50], fillpoints[50], clippoints[50]; +-int npoints, nfillpoints, nclippoints; +-int arrowx1, arrowy1; /* first point of object */ +-int arrowx2, arrowy2; /* second point of object */ ++Point fillpoints[50]; ++int nfillpoints; ++extern Point points[50], clippoints[50]; ++extern int npoints, nclippoints; ++extern int arrowx1, arrowy1; /* first point of object */ ++extern int arrowx2, arrowy2; /* second point of object */ + + static int tileno=0; /* number of current tile */ + +--- a/fig2dev/fig2dev.h 2010-03-16 19:53:20.000000000 +0100 ++++ b/fig2dev/fig2dev.h 2022-02-27 19:56:06.072253991 +0100 +@@ -126,7 +126,7 @@ + extern char *prog, *from, *to; + extern char *name; + extern double font_size; +-Boolean correct_font_size; /* use correct font size */ ++extern Boolean correct_font_size; /* use correct font size */ + extern double mag, fontmag; + extern FILE *tfp; + diff --git a/gnu/packages/xfig.scm b/gnu/packages/xfig.scm index ad2f701ff1..1d4d17527c 100644 --- a/gnu/packages/xfig.scm +++ b/gnu/packages/xfig.scm @@ -86,7 +86,10 @@ selected in various ways. For text, 35 fonts are available.") version ".tar.gz")) (sha256 (base32 - "0i3p7qmg2w8qrad3pn42b0miwarql7yy0gpd49b1bpal6bqsiicf")))) + "0i3p7qmg2w8qrad3pn42b0miwarql7yy0gpd49b1bpal6bqsiicf")) + (patches + (search-patches + "transfig-gcc10-fno-common.patch")))) ; fix GCC10 build (build-system gnu-build-system) (native-inputs (list imake makedepend)) -- cgit v1.2.3 From bb9b3645e8472adfb1e96788ed27b692c76db4f4 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 15 Mar 2022 22:20:15 +0200 Subject: gnu: mariadb: Fix building for powerpc-linux. * gnu/packages/databases.scm (mariadb)[arguments]: Add custom phase for powerpc-linux to apply patch. [native-inputs]: When building for powerpc-linux add patch and a patch file. * gnu/packages/patches/mariadb-link-libatomic.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. --- gnu/local.mk | 1 + gnu/packages/databases.scm | 16 ++++- gnu/packages/patches/mariadb-link-libatomic.patch | 83 +++++++++++++++++++++++ 3 files changed, 99 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/mariadb-link-libatomic.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 484757b207..a755681f21 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1464,6 +1464,7 @@ dist_patch_DATA = \ %D%/packages/patches/lvm2-static-link.patch \ %D%/packages/patches/mailutils-variable-lookup.patch \ %D%/packages/patches/make-impure-dirs.patch \ + %D%/packages/patches/mariadb-link-libatomic.patch \ %D%/packages/patches/mars-install.patch \ %D%/packages/patches/mars-sfml-2.3.patch \ %D%/packages/patches/mathjax-disable-webpack.patch \ diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index 73eb20ff39..d2b4ef62f4 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -991,6 +991,14 @@ Language.") #:parallel-tests? ,(target-x86-64?) #:phases (modify-phases %standard-phases + ,@(if (target-ppc32?) + `((add-after 'unpack 'apply-libatomics-patch + (lambda* (#:key inputs #:allow-other-keys) + (let ((patch-file + (assoc-ref inputs + "mariadb-link-libatomic.patch"))) + (invoke "patch" "-p1" "-i" patch-file))))) + '()) (add-after 'unpack 'adjust-output-references (lambda _ ;; The build system invariably prepends $CMAKE_INSTALL_PREFIX @@ -1141,7 +1149,13 @@ Language.") (("-lssl -lcrypto" all) (string-append "-L" openssl "/lib " all))))))))) (native-inputs - (list bison perl)) + (if (target-ppc32?) + `(("mariadb-link-libatomic.patch" + ,(search-patch "mariadb-link-libatomic.patch")) + ("patch" ,patch) + ("bison" ,bison) + ("perl" ,perl)) + (list bison perl))) (inputs `(("jemalloc" ,jemalloc) ("libaio" ,libaio) diff --git a/gnu/packages/patches/mariadb-link-libatomic.patch b/gnu/packages/patches/mariadb-link-libatomic.patch new file mode 100644 index 0000000000..f331067b6e --- /dev/null +++ b/gnu/packages/patches/mariadb-link-libatomic.patch @@ -0,0 +1,83 @@ +https://github.com/MariaDB/server/commit/f502ccbcb5dfce29067434885a23db8d1bd5f134.patch +This was apparently merged in 10.8.2. + +From f502ccbcb5dfce29067434885a23db8d1bd5f134 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Vicen=C8=9Biu=20Ciorbaru?= +Date: Fri, 15 Oct 2021 16:51:05 +0300 +Subject: [PATCH] Link with libatomic to enable C11 atomics support +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Some architectures (mips) require libatomic to support proper +atomic operations. Check first if support is available without +linking, otherwise use the library. + +Contributors: +James Cowgill +Jessica Clarke +Vicențiu Ciorbaru +--- + configure.cmake | 20 +++++++++++++++++++- + mysys/CMakeLists.txt | 4 ++++ + sql/CMakeLists.txt | 1 - + 3 files changed, 23 insertions(+), 2 deletions(-) + +diff --git a/configure.cmake b/configure.cmake +index 7a1369d77703f..db8742bb93b5a 100644 +--- a/configure.cmake ++++ b/configure.cmake +@@ -895,7 +895,25 @@ int main() + long long int *ptr= &var; + return (int)__atomic_load_n(ptr, __ATOMIC_SEQ_CST); + }" +-HAVE_GCC_C11_ATOMICS) ++HAVE_GCC_C11_ATOMICS_WITHOUT_LIBATOMIC) ++IF (HAVE_GCC_C11_ATOMICS_WITHOUT_LIBATOMIC) ++ SET(HAVE_GCC_C11_ATOMICS True) ++ELSE() ++ SET(OLD_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES}) ++ LIST(APPEND CMAKE_REQUIRED_LIBRARIES "atomic") ++ CHECK_CXX_SOURCE_COMPILES(" ++ int main() ++ { ++ long long int var= 1; ++ long long int *ptr= &var; ++ return (int)__atomic_load_n(ptr, __ATOMIC_SEQ_CST); ++ }" ++ HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC) ++ IF(HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC) ++ SET(HAVE_GCC_C11_ATOMICS True) ++ ENDIF() ++ SET(CMAKE_REQUIRED_LIBRARIES ${OLD_CMAKE_REQUIRED_LIBRARIES}) ++ENDIF() + + IF(WITH_VALGRIND) + SET(HAVE_valgrind 1) +diff --git a/mysys/CMakeLists.txt b/mysys/CMakeLists.txt +index f97e3b4d3904c..09d3f726ffc74 100644 +--- a/mysys/CMakeLists.txt ++++ b/mysys/CMakeLists.txt +@@ -78,6 +78,10 @@ TARGET_LINK_LIBRARIES(mysys dbug strings ${ZLIB_LIBRARY} + ${LIBNSL} ${LIBM} ${LIBRT} ${CMAKE_DL_LIBS} ${LIBSOCKET} ${LIBEXECINFO} ${CRC32_LIBRARY}) + DTRACE_INSTRUMENT(mysys) + ++IF (HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC) ++ TARGET_LINK_LIBRARIES(mysys atomic) ++ENDIF() ++ + IF(HAVE_BFD_H) + TARGET_LINK_LIBRARIES(mysys bfd) + ENDIF(HAVE_BFD_H) +diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt +index 5f5d7daf1a5bc..f574f1f20295d 100644 +--- a/sql/CMakeLists.txt ++++ b/sql/CMakeLists.txt +@@ -307,7 +307,6 @@ IF(WITH_MYSQLD_LDFLAGS) + "${MYSQLD_LINK_FLAGS} ${WITH_MYSQLD_LDFLAGS}") + ENDIF() + +- + FIND_PACKAGE(BISON 2.0) + + -- cgit v1.2.3 From f1aa1f3412169bf1eeee2f90adc426f766d79d3c Mon Sep 17 00:00:00 2001 From: Jai Vetrivelan Date: Sat, 5 Mar 2022 18:52:40 +0530 Subject: gnu: dunst: Update to 1.8.1. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/dunst.scm (dunst): Update to 1.8.1. * gnu/packages/patches/dunst-1.7.3-fix-crash.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. Signed-off-by: Ludovic Courtès --- gnu/local.mk | 1 - gnu/packages/dunst.scm | 6 +++--- gnu/packages/patches/dunst-1.7.3-fix-crash.patch | 21 --------------------- 3 files changed, 3 insertions(+), 25 deletions(-) delete mode 100644 gnu/packages/patches/dunst-1.7.3-fix-crash.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index a755681f21..2911541275 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1008,7 +1008,6 @@ dist_patch_DATA = \ %D%/packages/patches/dovecot-trees-support-dovecot-2.3.patch \ %D%/packages/patches/dstat-fix-crash-when-specifying-delay.patch \ %D%/packages/patches/dstat-skip-devices-without-io.patch \ - %D%/packages/patches/dunst-1.7.3-fix-crash.patch \ %D%/packages/patches/dvd+rw-tools-add-include.patch \ %D%/packages/patches/dynaconf-unvendor-deps.patch \ %D%/packages/patches/ecl-16-format-directive-limit.patch \ diff --git a/gnu/packages/dunst.scm b/gnu/packages/dunst.scm index 7446c3689a..35df682d46 100644 --- a/gnu/packages/dunst.scm +++ b/gnu/packages/dunst.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2020 Brice Waegeneire ;;; Copyright © 2021 Alexandru-Sergiu Marton ;;; Copyright © 2021 Guillaume Le Vaillant +;;; Copyright © 2022 Jai Vetrivelan ;;; ;;; This file is part of GNU Guix. ;;; @@ -40,7 +41,7 @@ (define-public dunst (package (name "dunst") - (version "1.7.3") + (version "1.8.1") (source (origin (method git-fetch) (uri (git-reference @@ -49,8 +50,7 @@ (file-name (git-file-name name version)) (sha256 (base32 - "1ra0ii805w3rrs0qqbjxzl6i79ksz42lnvbglw18h4igkza21kzj")) - (patches (search-patches "dunst-1.7.3-fix-crash.patch")))) + "19bh5789whlc0n5wbyx3yx8px93hccn42f1p6i1dz96hdkk5mjb8")))) (build-system gnu-build-system) (arguments `(#:tests? #f ; no check target diff --git a/gnu/packages/patches/dunst-1.7.3-fix-crash.patch b/gnu/packages/patches/dunst-1.7.3-fix-crash.patch deleted file mode 100644 index 8b51d820a4..0000000000 --- a/gnu/packages/patches/dunst-1.7.3-fix-crash.patch +++ /dev/null @@ -1,21 +0,0 @@ -Author: Danny Milosavljevic -Date: 2022-02-04 21:52:05 CET - -Fix crash if notification contains invalid pixbuf data. - -diff -ru /gnu/store/5885czxhmhkckjqj939b0hd6b6czizwb-dunst-1.7.3-checkout/src/notification.c 5885czxhmhkckjqj939b0hd6b6czizwb-dunst-1.7.3-checkout/src/notification.c ---- /gnu/store/5885czxhmhkckjqj939b0hd6b6czizwb-dunst-1.7.3-checkout/src/notification.c 1970-01-01 01:00:01.000000000 +0100 -+++ 5885czxhmhkckjqj939b0hd6b6czizwb-dunst-1.7.3-checkout/src/notification.c 2022-02-04 19:05:57.534906600 +0100 -@@ -359,8 +359,10 @@ - g_clear_pointer(&n->icon_id, g_free); - - GdkPixbuf *icon = icon_get_for_data(new_icon, &n->icon_id, draw_get_scale()); -- n->icon = gdk_pixbuf_to_cairo_surface(icon); -- g_object_unref(icon); -+ if (icon) { -+ n->icon = gdk_pixbuf_to_cairo_surface(icon); -+ g_object_unref(icon); -+ } - } - - /* see notification.h */ -- cgit v1.2.3 From 2b315fe020ab47acb0835aa6395d3e31d43756b2 Mon Sep 17 00:00:00 2001 From: itd Date: Sun, 13 Mar 2022 21:08:03 +0100 Subject: gnu: python-mypy: Fix test errors on i686-linux. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/patches/python-mypy-12332.patch: New patch. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/python-check.scm (python-mypy)[source]: Use patch "python-mypy-12332.patch" to avoid overflow issues resulting in test failures. Signed-off-by: Ludovic Courtès --- gnu/local.mk | 1 + gnu/packages/patches/python-mypy-12332.patch | 68 ++++++++++++++++++++++++++++ gnu/packages/python-check.scm | 4 +- 3 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/python-mypy-12332.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 4649ec6cd9..423feb2028 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1717,6 +1717,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-versioneer-guix-support.patch \ %D%/packages/patches/python-waitress-fix-tests.patch \ %D%/packages/patches/python-werkzeug-tests.patch \ + %D%/packages/patches/python-mypy-12332.patch \ %D%/packages/patches/qemu-build-info-manual.patch \ %D%/packages/patches/qemu-glibc-2.27.patch \ %D%/packages/patches/qemu-glibc-2.30.patch \ diff --git a/gnu/packages/patches/python-mypy-12332.patch b/gnu/packages/patches/python-mypy-12332.patch new file mode 100644 index 0000000000..d43cf42ed1 --- /dev/null +++ b/gnu/packages/patches/python-mypy-12332.patch @@ -0,0 +1,68 @@ +From 518c864805dd93e62d59439e665a0ce9d6778419 Mon Sep 17 00:00:00 2001 +From: Ekin Dursun +Date: Thu, 10 Mar 2022 22:06:48 +0300 +Subject: [PATCH] mypyc: Fix overflow in id function (CPyTagged_Id) + +In CPython, the id of an object is its address. It's computed by +converting the pointer to an unsigned integer (PyLong_FromVoidPtr). A +similar logic is present here, pointer is converted to a Py_ssize_t and +CPyTagged_FromSsize_t is called with that integer. + +There is a problem with that approach: Py_ssize_t cannot hold every +pointer value. Sometimes overflow happens and CPyTagged_FromSsize_t is +called with a negative integer. + +With the new approach, the number is checked: If it fits in a +Py_ssize_t, CPyTagged_FromSsize_t is called. If not, it is directly +converted to a PyObject using PyLong_FromVoidPtr. +--- + mypyc/lib-rt/CPy.h | 1 + + mypyc/lib-rt/int_ops.c | 9 +++++++++ + mypyc/lib-rt/misc_ops.c | 2 +- + 3 files changed, 11 insertions(+), 1 deletion(-) + +diff --git a/mypyc/lib-rt/CPy.h b/mypyc/lib-rt/CPy.h +index 987819154ab..9f5ae52d4e4 100644 +--- a/mypyc/lib-rt/CPy.h ++++ b/mypyc/lib-rt/CPy.h +@@ -121,6 +121,7 @@ static inline size_t CPy_FindAttrOffset(PyTypeObject *trait, CPyVTableItem *vtab + + + CPyTagged CPyTagged_FromSsize_t(Py_ssize_t value); ++CPyTagged CPyTagged_FromVoidPtr(void *ptr); + CPyTagged CPyTagged_FromObject(PyObject *object); + CPyTagged CPyTagged_StealFromObject(PyObject *object); + CPyTagged CPyTagged_BorrowFromObject(PyObject *object); +diff --git a/mypyc/lib-rt/int_ops.c b/mypyc/lib-rt/int_ops.c +index 1275f2c1057..edf06314161 100644 +--- a/mypyc/lib-rt/int_ops.c ++++ b/mypyc/lib-rt/int_ops.c +@@ -26,6 +26,15 @@ CPyTagged CPyTagged_FromSsize_t(Py_ssize_t value) { + } + } + ++CPyTagged CPyTagged_FromVoidPtr(void *ptr) { ++ if ((uintptr_t)ptr > PY_SSIZE_T_MAX) { ++ PyObject *object = PyLong_FromVoidPtr(ptr); ++ return ((CPyTagged)object) | CPY_INT_TAG; ++ } else { ++ return CPyTagged_FromSsize_t((Py_ssize_t)ptr); ++ } ++} ++ + CPyTagged CPyTagged_FromObject(PyObject *object) { + int overflow; + // The overflow check knows about CPyTagged's width +diff --git a/mypyc/lib-rt/misc_ops.c b/mypyc/lib-rt/misc_ops.c +index cebd1cf997f..dcce89d9072 100644 +--- a/mypyc/lib-rt/misc_ops.c ++++ b/mypyc/lib-rt/misc_ops.c +@@ -437,7 +437,7 @@ CPyPickle_GetState(PyObject *obj) + } + + CPyTagged CPyTagged_Id(PyObject *o) { +- return CPyTagged_FromSsize_t((Py_ssize_t)o); ++ return CPyTagged_FromVoidPtr(o); + } + + #define MAX_INT_CHARS 22 diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm index 05a378601f..5bbe544113 100644 --- a/gnu/packages/python-check.scm +++ b/gnu/packages/python-check.scm @@ -1658,7 +1658,9 @@ supported by the MyPy typechecker.") (file-name (git-file-name name version)) (sha256 (base32 - "1v83flrdxh8grcp40qw04q4hzjflih9xwib64078vsxv2w36f817")))) + "1v83flrdxh8grcp40qw04q4hzjflih9xwib64078vsxv2w36f817")) + (patches + (search-patches "python-mypy-12332.patch")))) (build-system python-build-system) (arguments `(#:phases -- cgit v1.2.3 From ad85ca09777052426e801788032beb7592f0f21a Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Mon, 21 Mar 2022 14:19:29 -0400 Subject: gnu: openboardview: Unbundle imgui. * gnu/packages/patches/openboardview-use-system-imgui.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/electronics.scm (openboardview)[source]: Delete "imgui" subdirectory from snippet and apply patch. [inputs]{imgui}: New input. --- gnu/local.mk | 1 + gnu/packages/electronics.scm | 10 +- .../patches/openboardview-use-system-imgui.patch | 170 +++++++++++++++++++++ 3 files changed, 177 insertions(+), 4 deletions(-) create mode 100644 gnu/packages/patches/openboardview-use-system-imgui.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 423feb2028..ad39e648f7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1557,6 +1557,7 @@ dist_patch_DATA = \ %D%/packages/patches/onnx-use-system-googletest.patch \ %D%/packages/patches/onnx-shared-libraries.patch \ %D%/packages/patches/onnx-skip-model-downloads.patch \ + %D%/packages/patches/openboardview-use-system-imgui.patch \ %D%/packages/patches/openboardview-use-system-utf8.patch \ %D%/packages/patches/opencascade-oce-glibc-2.26.patch \ %D%/packages/patches/openfoam-4.1-cleanup.patch \ diff --git a/gnu/packages/electronics.scm b/gnu/packages/electronics.scm index 3631d08519..ab72c36563 100644 --- a/gnu/packages/electronics.scm +++ b/gnu/packages/electronics.scm @@ -56,7 +56,8 @@ #:use-module (gnu packages qt) #:use-module (gnu packages sdl) #:use-module (gnu packages sqlite) - #:use-module (gnu packages stb)) + #:use-module (gnu packages stb) + #:use-module (gnu packages toolkits)) (define-public libserialport (package @@ -264,14 +265,14 @@ supported devices, as well as input/output file format support.") (guix build utils))) (snippet '(with-directory-excursion "src" - ;; TODO: Unbundle ImGui. - (define keep (list "." ".." "imgui" "openboardview")) + (define keep (list "." ".." "openboardview")) (for-each (lambda (f) (when (eq? 'directory (stat:type (lstat f))) (delete-file-recursively f))) (scandir "." (negate (cut member <> keep)))))) (patches - (search-patches "openboardview-use-system-utf8.patch")) + (search-patches "openboardview-use-system-imgui.patch" + "openboardview-use-system-utf8.patch")) (sha256 (base32 "1n2yfi8wpky0y231kq2zdgwn7f7kff8m53m904hxi5ppmwhx1d6q")))) @@ -327,6 +328,7 @@ supported devices, as well as input/output file format support.") (inputs (list fontconfig gtk+ + imgui sdl2 sqlite zlib)) diff --git a/gnu/packages/patches/openboardview-use-system-imgui.patch b/gnu/packages/patches/openboardview-use-system-imgui.patch new file mode 100644 index 0000000000..7345f1fe99 --- /dev/null +++ b/gnu/packages/patches/openboardview-use-system-imgui.patch @@ -0,0 +1,170 @@ +Patch submitted upstream: https://github.com/OpenBoardView/OpenBoardView/pull/233 + +diff --git a/CMakeModules/FindImGui.cmake b/CMakeModules/FindImGui.cmake +new file mode 100644 +index 0000000..4d1fa42 +--- /dev/null ++++ b/CMakeModules/FindImGui.cmake +@@ -0,0 +1,36 @@ ++# Copyright (C) 2018, 2022 Maxim Cournoyer ++# Redistribution and use of this file is allowed according to the terms of the MIT license. ++# For details see the LICENSE file distributed with OpenBoardView. ++# Note: ++# Searching headers and libraries is very simple and is NOT as powerful as scripts ++# distributed with CMake, because LuaDist defines directories to search for. ++# Everyone is encouraged to contact the author with improvements. Maybe this file ++# becomes part of CMake distribution sometimes. ++ ++# - Find ImGui ++# Find the native imgui headers and libraries. ++# ++# IMGUI_INCLUDE_DIRS - where to find imgui/imgui.h, etc. ++# IMGUI_LIBRARIES - List of libraries when using imgui. ++# IMGUI_FOUND - True if imgui is found. ++ ++# Look for the header file. ++FIND_PATH(IMGUI_INCLUDE_DIR NAMES imgui.h PATH_SUFFIXES imgui) ++ ++# Look for the library. ++FIND_LIBRARY(IMGUI_LIBRARY NAMES ImGui imgui) ++ ++# Handle the QUIETLY and REQUIRED arguments and set IMGUI_FOUND to TRUE if all listed variables are TRUE. ++INCLUDE(FindPackageHandleStandardArgs) ++FIND_PACKAGE_HANDLE_STANDARD_ARGS(ImGui DEFAULT_MSG IMGUI_LIBRARY IMGUI_INCLUDE_DIR) ++ ++# Copy the results to the output variables. ++IF(IMGUI_FOUND) ++ SET(IMGUI_LIBRARIES ${IMGUI_LIBRARY}) ++ SET(IMGUI_INCLUDE_DIRS ${IMGUI_INCLUDE_DIR}) ++ELSE() ++ SET(IMGUI_LIBRARIES) ++ SET(IMGUI_INCLUDE_DIRS) ++ENDIF() ++ ++MARK_AS_ADVANCED(IMGUI_INCLUDE_DIRS IMGUI_LIBRARIES) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 301f933..24bf263 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -76,28 +76,30 @@ endif() + # note: in the future there may be integrated CMake support into imgui + # see: https://github.com/ocornut/imgui/pull/1713 + # for now do it manually, after glad and SDL2 because we use the includes for the sdl_opengl examples +-execute_process( ++find_package(ImGui) # search ImGui from system ++if(NOT IMGUI_FOUND) # else fallback to bundled copy ++ execute_process( + COMMAND git submodule update --init src/imgui +- WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} +-) +-add_definitions("-DImDrawIdx=unsigned int") # short is not enough for us +-add_definitions("-DIMGUI_IMPL_OPENGL_LOADER_GLAD") # We use glad +-# Configure GL3 renderer to be GLES2 compatible if GLES2 is enabled +-if(ENABLE_GLES2) +- add_definitions("-DIMGUI_IMPL_OPENGL_ES2") +-endif() +- +-# workaround for OpenGL include for OpenGL2, need to be glad rather than gl itself +-file(READ "${CMAKE_CURRENT_SOURCE_DIR}/imgui/backends/imgui_impl_opengl2.cpp" input) +-string(REPLACE "OpenGL/gl.h" "glad/glad.h" input "${input}") +-string(REPLACE "GL/gl.h" "glad/glad.h" input "${input}") +-file(WRITE "${CMAKE_CURRENT_SOURCE_DIR}/imgui/backends/imgui_impl_opengl2.cpp" "${input}") +- +-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/imgui +- ${GLAD_INCLUDE_DIRS} +-) +- +-set(SOURCES ++ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) ++ add_definitions("-DImDrawIdx=unsigned int") # short is not enough for us ++ add_definitions("-DIMGUI_IMPL_OPENGL_LOADER_GLAD") # We use glad ++ # Configure GL3 renderer to be GLES2 compatible if GLES2 is enabled ++ if(ENABLE_GLES2) ++ add_definitions("-DIMGUI_IMPL_OPENGL_ES2") ++ endif() ++ ++ # workaround for OpenGL include for OpenGL2, need to be glad rather than gl itself ++ file(READ "${CMAKE_CURRENT_SOURCE_DIR}/imgui/backends/imgui_impl_opengl2.cpp" input) ++ string(REPLACE "OpenGL/gl.h" "glad/glad.h" input "${input}") ++ string(REPLACE "GL/gl.h" "glad/glad.h" input "${input}") ++ file(WRITE "${CMAKE_CURRENT_SOURCE_DIR}/imgui/backends/imgui_impl_opengl2.cpp" "${input}") ++ ++ set(IMGUI_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/imgui ++ ${CMAKE_CURRENT_SOURCE_DIR}/imgui/examples) ++ ++ set(IMGUI_LIBRARIES imgui) ++ ++ set(SOURCES + imgui/imgui.cpp + imgui/imgui_draw.cpp + imgui/imgui_tables.cpp +@@ -106,33 +108,35 @@ set(SOURCES + imgui/backends/imgui_impl_sdl.cpp) + + +-if(ENABLE_GL1) ++ if(ENABLE_GL1) + LIST(APPEND SOURCES +- imgui/backends/imgui_impl_opengl2.cpp +- ) +-endif() +-if(ENABLE_GL3) ++ imgui/backends/imgui_impl_opengl2.cpp ++ ) ++ endif() ++ if(ENABLE_GL3) + LIST(APPEND SOURCES +- imgui/backends/imgui_impl_opengl3.cpp +- ) +-endif() ++ imgui/backends/imgui_impl_opengl3.cpp ++ ) ++ endif() + +-add_library(imgui STATIC ${SOURCES}) +-target_link_libraries(imgui ++ add_library(imgui STATIC ${SOURCES}) ++ target_link_libraries(imgui + ${GLAD_LIBRARIES} +-) +-if(MINGW) +-target_link_libraries(imgui +- SDL2::SDL2-static +-) +-else() +-target_link_libraries(imgui +- SDL2::SDL2 +-) ++ ) ++ if(MINGW) ++ target_link_libraries(imgui ++ SDL2::SDL2-static ++ ) ++ else() ++ target_link_libraries(imgui ++ SDL2::SDL2 ++ ) ++ endif() + endif() + +-set(IMGUI_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/imgui ${CMAKE_CURRENT_SOURCE_DIR}/imgui/examples) +- ++include_directories( ++ ${IMGUI_INCLUDE_DIRS} ++ ${GLAD_INCLUDE_DIRS}) + + #install(TARGETS imgui DESTINATION ${INSTALL_ARCHIVE_DIR}) # No need to install a static lib + +diff --git a/src/openboardview/CMakeLists.txt b/src/openboardview/CMakeLists.txt +index d049ef9..bb56f70 100644 +--- a/src/openboardview/CMakeLists.txt ++++ b/src/openboardview/CMakeLists.txt +@@ -129,7 +129,7 @@ elseif(APPLE) + endif() + + target_link_libraries(${PROJECT_NAME_LOWER} +- imgui ++ ${IMGUI_LIBRARIES} + SQLite::SQLite3 + ${GLAD_LIBRARIES} + ${COCOA_LIBRARY} -- cgit v1.2.3