2 Commits

5 changed files with 46 additions and 7 deletions
Split View
  1. +38
    -0
      l/omero-figure/omero-figure-4.3.1-fix-cgi-escape.patch
  2. +3
    -1
      l/omero-figure/omero-figure.SlackBuild
  3. +0
    -1
      n/gnupg/gnupg-2.2.20.tar.bz2.sha256
  4. +1
    -0
      n/gnupg/gnupg-2.2.21.tar.bz2.sha256
  5. +4
    -5
      n/gnupg/gnupg.SlackBuild

+ 38
- 0
l/omero-figure/omero-figure-4.3.1-fix-cgi-escape.patch View File

@@ -0,0 +1,39 @@
commit a004e3c51683240a7fce59d9e8efd022278b54c7
Author: Damien Goutte-Gattat <dgouttegattat@incenp.org>
Date: Tue Jul 7 23:23:41 2020 +0100

Replace cgi.escape by html.escape.
The escape function in the cgi module has been deprecated since
Python 3.2 [1] and has finally been removed in Python 3.8 [2],
resulting in the Figure_To_Pdf.py script failing to run under
Python 3.8.
This patch replaces the call to cgi.escape by html.escape, as
recommended by the Python developers.
[1] https://docs.python.org/3.7/library/cgi.html#cgi.escape
[2] https://docs.python.org/3.8/whatsnew/3.8.html#api-and-feature-removals

diff --git a/omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py b/omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py
index a7a51c4..6955c36 100644
--- a/omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py
@@ -20,7 +20,7 @@
import logging
import json
import numpy
-import cgi
+import html
from datetime import datetime
import os
@@ -301,7 +301,7 @@ class ShapeToPdfExport(ShapeExport):
def draw_shape_label(self, shape, bounds):
center = bounds.get_center()
- text = cgi.escape(shape.get('text', ''))
+ text = html.escape(shape.get('text', ''))
if not text or not center:
return
size = shape.get('fontSize', 12) * 2 / 3

+ 3
- 1
l/omero-figure/omero-figure.SlackBuild View File

@@ -34,7 +34,7 @@ ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz}

# Build infos
NAMEPKG=${NAMEPKG:-omero-figure}
BUILD=${BUILD:-1GGD}
BUILD=${BUILD:-2GGD}
ARCH=${ARCH:-$(uname -m | sed 's/^i.86$/i486/;s/^arm.*/arm/')}
JOBS=${JOBS:-1}
EXT=${EXT:-txz}
@@ -69,6 +69,8 @@ cd $TMP
echo "Building $ARCHIVE..."
tar xf $CWD/$ARCHIVE
cd $NAME
# Fix use of removed API in Python 3.8
patch -p 1 < $CWD/omero-figure-4.3.1-fix-cgi-escape.patch
python3 setup.py build
python3 setup.py install --root=$PKG



+ 0
- 1
n/gnupg/gnupg-2.2.20.tar.bz2.sha256 View File

@@ -1 +0,0 @@
04a7c9d48b74c399168ee8270e548588ddbe52218c337703d7f06373d326ca30 gnupg-2.2.20.tar.bz2

+ 1
- 0
n/gnupg/gnupg-2.2.21.tar.bz2.sha256 View File

@@ -0,0 +1 @@
61e83278fb5fa7336658a8b73ab26f379d41275bb1c7c6e694dd9f9a6e8e76ec gnupg-2.2.21.tar.bz2

+ 4
- 5
n/gnupg/gnupg.SlackBuild View File

@@ -24,13 +24,13 @@
#
# Latest gnupg sourcecode is available at: <https://www.gnupg.org/>.
#
# Note: As of 25 November 2019, the following dependencies are
# all provided by Slackware-current in their latest versions:
# Note: As of 9 July 2020, the following dependencies are all
# provided by Slackware-current in recent enough versions:
# l/npth, l/libgcrypt, l/libassuan, l/libksba.

# Source package infos
NAMESRC=${NAMESRC:-gnupg}
VERSION=${VERSION:-2.2.20}
VERSION=${VERSION:-2.2.21}
PKGVERSION=${VERSION/-beta/b}
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.bz2}
WGET=${WGET:-https://gnupg.org/ftp/gcrypt/gnupg/$ARCHIVE}
@@ -98,7 +98,6 @@ CXXFLAGS=$CPUOPT \
--infodir=/usr/info \
--docdir=/usr/doc/$NAMEPKG-$PKGVERSION \
--localstatedir=/var \
--enable-wks-tools \
--disable-dependency-tracking \
--build=$ARCH-slackware-linux
make -j $JOBS
@@ -114,7 +113,7 @@ find $PKG/usr/info -type f -exec gzip -9 {} \;
make gnupg.html
mv gnupg.html $PKG/usr/doc/$NAMEPKG-$PKGVERSION/html
)
install -m 644 AUTHORS COPYING COPYING.* ChangeLog NEWS README THANKS \
install -m 644 AUTHORS COPYING COPYING.* ChangeLog NEWS THANKS \
TODO $PKG/usr/doc/$NAMEPKG-$PKGVERSION

# Copy slack-desc file


Loading…
Cancel
Save