From 1d0508d33dc124e212a0e144f8f50090da63c258 Mon Sep 17 00:00:00 2001 From: Damien Goutte-Gattat Date: Sat, 30 Nov 2019 22:12:40 +0000 Subject: [PATCH] ap/opensc: Upgraded to opensc-0.19.0. --- ap/opensc/opensc-0.16.0.tar.gz.sha1 | 1 - ...pensc-0.19.0-fix-debug-format-string.patch | 12 +++++++++++ ap/opensc/opensc-0.19.0.tar.gz.sha256 | 1 + ap/opensc/opensc.SlackBuild | 21 ++++++++++++------- 4 files changed, 26 insertions(+), 9 deletions(-) delete mode 100644 ap/opensc/opensc-0.16.0.tar.gz.sha1 create mode 100644 ap/opensc/opensc-0.19.0-fix-debug-format-string.patch create mode 100644 ap/opensc/opensc-0.19.0.tar.gz.sha256 diff --git a/ap/opensc/opensc-0.16.0.tar.gz.sha1 b/ap/opensc/opensc-0.16.0.tar.gz.sha1 deleted file mode 100644 index 49280ed5..00000000 --- a/ap/opensc/opensc-0.16.0.tar.gz.sha1 +++ /dev/null @@ -1 +0,0 @@ -8a5616ac514c4fbad50b0505dc61f082de3e479c opensc-0.16.0.tar.gz diff --git a/ap/opensc/opensc-0.19.0-fix-debug-format-string.patch b/ap/opensc/opensc-0.19.0-fix-debug-format-string.patch new file mode 100644 index 00000000..0cf754bc --- /dev/null +++ b/ap/opensc/opensc-0.19.0-fix-debug-format-string.patch @@ -0,0 +1,12 @@ +diff -Naur opensc-0.19.0.orig/src/pkcs15init/pkcs15-oberthur.c opensc-0.19.0/src/pkcs15init/pkcs15-oberthur.c +--- opensc-0.19.0.orig/src/pkcs15init/pkcs15-oberthur.c 2018-09-13 12:52:42.000000000 +0100 ++++ opensc-0.19.0/src/pkcs15init/pkcs15-oberthur.c 2019-11-30 22:09:35.207173090 +0000 +@@ -70,7 +70,7 @@ + ctx = p15card->card->ctx; + + SC_FUNC_CALLED(ctx, SC_LOG_DEBUG_VERBOSE); +- sc_debug(ctx, SC_LOG_DEBUG_NORMAL, "cosm_write_tokeninfo() label '%s'; flags 0x%X", label, flags); ++ sc_debug(ctx, SC_LOG_DEBUG_NORMAL, "cosm_write_tokeninfo() label '%s'; flags 0x%X", label ? label : "", flags); + if (sc_profile_get_file(profile, COSM_TITLE"-token-info", &file)) { + rv = SC_ERROR_INCONSISTENT_PROFILE; + SC_TEST_GOTO_ERR(ctx, SC_LOG_DEBUG_NORMAL, rv, "Cannot find "COSM_TITLE"-token-info"); diff --git a/ap/opensc/opensc-0.19.0.tar.gz.sha256 b/ap/opensc/opensc-0.19.0.tar.gz.sha256 new file mode 100644 index 00000000..e53909fc --- /dev/null +++ b/ap/opensc/opensc-0.19.0.tar.gz.sha256 @@ -0,0 +1 @@ +2c5a0e4df9027635290b9c0f3addbbf0d651db5ddb0ab789cb0e978f02fd5826 opensc-0.19.0.tar.gz diff --git a/ap/opensc/opensc.SlackBuild b/ap/opensc/opensc.SlackBuild index e33c474b..8f4a3205 100755 --- a/ap/opensc/opensc.SlackBuild +++ b/ap/opensc/opensc.SlackBuild @@ -1,6 +1,6 @@ #!/bin/bash # Build script for Slackware -# Copyright (C) 2013,2015,2016 Damien Goutte-Gattat +# Copyright (C) 2013,2015,2016,2019 Damien Goutte-Gattat # # Redistribution and use of this script, with or without modifications, # is permitted provided that the following conditions are met: @@ -29,9 +29,9 @@ # Source package infos NAMESRC=${NAMESRC:-opensc} -VERSION=${VERSION:-0.16.0} +VERSION=${VERSION:-0.19.0} ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz} -WGET=${WGET:-http://downloads.sourceforge.net/opensc/$ARCHIVE} +WGET=${WGET:-https://github.com/OpenSC/OpenSC/releases/download/$VERSION/$ARCHIVE} # Build infos NAMEPKG=${NAMEPKG:-opensc} @@ -78,7 +78,7 @@ if [ ! -r $ARCHIVE ]; then wget -c -O $ARCHIVE.part "$WGET" mv $ARCHIVE.part $ARCHIVE fi -sha1sum -c $ARCHIVE.sha1 +sha256sum -c $ARCHIVE.sha256 NAME=$(tar ft $ARCHIVE | head -n 1 | cut -d / -f 1) # Compile @@ -86,6 +86,7 @@ cd $TMP echo "Building $ARCHIVE..." tar xf $CWD/$ARCHIVE cd $NAME +patch -p 1 < $CWD/opensc-0.19.0-fix-debug-format-string.patch CFLAGS=$CPUOPT \ CXXFLAGS=$CPUOPT \ ./configure \ @@ -94,7 +95,7 @@ CXXFLAGS=$CPUOPT \ --sysconfdir=/etc \ --mandir=/usr/man \ --docdir=/usr/doc/$NAME \ - --with-xsl-stylesheetsdir=/usr/share/xml/docbook/xsl-stylesheets-1.78.1 \ + --with-xsl-stylesheetsdir=/usr/share/xml/docbook/xsl-stylesheets-1.79.2 \ --enable-man \ --enable-doc \ --disable-static @@ -107,14 +108,18 @@ find $PKG/usr/man -type f -exec gzip -9 {} \; # Protect config file mv $PKG/etc/opensc.conf $PKG/etc/opensc.conf.new -# Install the documentation -mkdir -p $PKG/usr/doc/$NAME -install -m 644 COPYING NEWS $PKG/usr/doc/$NAME +# Install missing documentation +install -m 644 COPYING $PKG/usr/doc/$NAME # Copy slack-desc and doinst.sh files install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc install -m 755 $CWD/doinst.sh $PKG/install/doinst.sh +# Add dependency infos +cat < $PKG/install/slack-required +pcsc-lite +EOF + # Package the tree cd $PKG mkdir -p $OUT