Browse Source

xap/cardpeek: Removed.

current-20191101
Damien Goutte-Gattat 2 years ago
parent
commit
e3112dd5f8
  1. 99
      xap/cardpeek/cardpeek-0.8.4-lua-checkinteger.patch
  2. 1
      xap/cardpeek/cardpeek-0.8.4.tar.gz.sha1
  3. 125
      xap/cardpeek/cardpeek.SlackBuild
  4. 4
      xap/cardpeek/doinst.sh
  5. 12
      xap/cardpeek/slack-desc

99
xap/cardpeek/cardpeek-0.8.4-lua-checkinteger.patch

@ -1,99 +0,0 @@
diff -Naur cardpeek-0.8.4.orig/lua_bytes.c cardpeek-0.8.4/lua_bytes.c
--- cardpeek-0.8.4.orig/lua_bytes.c 2015-03-08 22:33:10.000000000 +0100
+++ cardpeek-0.8.4/lua_bytes.c 2016-07-26 14:56:47.221522330 +0200
@@ -116,7 +116,7 @@
static int subr_bytes_new(lua_State *L)
{
- int width = luaL_checkint(L, 1);
+ int width = luaL_checkinteger(L, 1);
int n = lua_gettop(L);
bytestring_t *bs;
@@ -259,7 +259,7 @@
b_index = 0;
else
{
- b_index=luaL_checkint(L,2);
+ b_index=luaL_checkinteger(L,2);
if (b_index<0) b_index = 0;
}
@@ -267,7 +267,7 @@
e_index = b_index;
else
{
- e_index=luaL_checkint(L,2);
+ e_index=luaL_checkinteger(L,2);
if (e_index>=(int)bytestring_get_size(bs)) e_index = bytestring_get_size(bs)-1;
}
@@ -293,13 +293,13 @@
unsigned i;
unsigned char c;
- b_index=(unsigned)luaL_checkint(L,2);
+ b_index=(unsigned)luaL_checkinteger(L,2);
e_index = b_index + lua_gettop(L)-3;
for (i=b_index;i<=e_index;i++)
{
- c = (unsigned char)luaL_checkint(L,i-b_index+3);
+ c = (unsigned char)luaL_checkinteger(L,i-b_index+3);
if (i<bytestring_get_size(bs))
{
bytestring_set_element(bs,i,c);
@@ -324,8 +324,8 @@
static int subr_bytes_pad_left(lua_State *L)
{
bytestring_t *bs = bytestring_duplicate(luaL_check_bytestring(L, 1));
- unsigned pad_length = luaL_checkint(L,2);
- unsigned pad_value = luaL_checkint(L,3);
+ unsigned pad_length = luaL_checkinteger(L,2);
+ unsigned pad_value = luaL_checkinteger(L,3);
if (bytestring_pad_left(bs,pad_length,pad_value)!=BYTESTRING_OK)
{
bytestring_free(bs);
@@ -340,8 +340,8 @@
static int subr_bytes_pad_right(lua_State *L)
{
bytestring_t *bs = bytestring_duplicate(luaL_check_bytestring(L, 1));
- unsigned pad_length = luaL_checkint(L,2);
- unsigned pad_value = luaL_checkint(L,3);
+ unsigned pad_length = luaL_checkinteger(L,2);
+ unsigned pad_value = luaL_checkinteger(L,3);
if (bytestring_pad_right(bs,pad_length,pad_value)!=BYTESTRING_OK)
{
bytestring_free(bs);
@@ -376,12 +376,12 @@
static int subr_bytes_sub(lua_State *L)
{
bytestring_t *bs = luaL_check_bytestring(L, 1);
- int start=luaL_checkint(L,2);
+ int start=luaL_checkinteger(L,2);
int end=-1;
bytestring_t *ret;
if (lua_gettop(L)>2)
- end=luaL_checkint(L,3);
+ end=luaL_checkinteger(L,3);
if (start<0)
start=bytestring_get_size(bs)+start;
if (end<0)
@@ -431,13 +431,13 @@
"\tchange bytes.convert(A,B) to bytes.convert(B,A)\n"
"\tThis warning will only appear once.");
}
- width=luaL_checkint(L,1);
+ width=luaL_checkinteger(L,1);
bs = luaL_check_bytestring(L, 2);
}
else
{
bs = luaL_check_bytestring(L, 1);
- width=luaL_checkint(L,2);
+ width=luaL_checkinteger(L,2);
}
if (width!=8 && width!=4 && width!=1)

1
xap/cardpeek/cardpeek-0.8.4.tar.gz.sha1

@ -1 +0,0 @@
b5616185c3675072486b00dbbf345c9a7818eb14 cardpeek-0.8.4.tar.gz

125
xap/cardpeek/cardpeek.SlackBuild

@ -1,125 +0,0 @@
#!/bin/bash
# Build script for Slackware
# Copyright (C) 2013,2014,2016 Damien Goutte-Gattat
#
# Redistribution and use of this script, with or without modifications,
# is permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# Contact: Damien Goutte-Gattat <dgouttegattat@incenp.org>
#
# Latest cardpeek sourcecode is available at:
# <https://github.com/L1L1/cardpeek>.
#
# Depends: d/lua, l/pcsc-lite
# Source package infos
NAMESRC=${NAMESRC:-cardpeek}
VERSION=${VERSION:-0.8.4}
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz}
WGET=${WGET:-https://github.com/L1L1/cardpeek/archive/$ARCHIVE}
# Build infos
NAMEPKG=${NAMEPKG:-cardpeek}
BUILD=${BUILD:-1GGD}
ARCH=${ARCH:-$(uname -m | sed 's/^i.86$/i486/;s/^arm.*/arm/')}
JOBS=${JOBS:-1}
EXT=${EXT:-txz}
# Directories
TMP=${TMP:-/tmp}
OUT=${OUT:-$TMP/build}
PKG=${PKG:-$OUT/$NAMEPKG}
CWD=$(pwd)
set -e # Quit if a command returns non-zero
# Sanity checks
if [ $UID -eq 0 ]; then
echo "You should NOT run this script as ROOT!"
exit 1
fi
if [ ! -d $TMP ]; then
echo "$TMP does not exists or is not a directory!"
exit 1
fi
# Compilation flags
LIBDIRSUFFIX=""
case "$ARCH" in
i?86)
CPUOPT="-O2 -march=$ARCH -mtune=i686"
;;
x86_64)
CPUOPT="-O2 -fPIC"
LIBDIRSUFFIX="64"
;;
*)
CPUOPT="-O2"
;;
esac
# Get and verify the source archive
if [ ! -r $ARCHIVE ]; then
wget -c -O $ARCHIVE.part "$WGET"
mv $ARCHIVE.part $ARCHIVE
fi
sha1sum -c $ARCHIVE.sha1
NAME=$(tar ft $ARCHIVE | head -n 1 | cut -d / -f 1)
# Compile
cd $TMP
echo "Building $ARCHIVE..."
tar xf $CWD/$ARCHIVE
cd $NAME
# Patch for Lua-5.3
patch -p 1 < $CWD/cardpeek-0.8.4-lua-checkinteger.patch
autoreconf -i
CFLAGS=$CPUOPT \
CXXFLAGS=$CPUOPT \
LDFLAGS="-L/lib$LIBDIRSUFFIX -ldl" \
./configure \
--prefix=/usr \
--mandir=/usr/man \
--docdir=/usr/doc/$NAMEPKG-$VERSION
make -j $JOBS
make install-strip DESTDIR=$PKG
# Compress man page
find $PKG/usr/man -type f -exec gzip -9 {} \;
# Install the documentation
install -m 644 AUTHORS COPYING ChangeLog README $PKG/usr/doc/$NAMEPKG-$VERSION
# 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
# Package the tree
cd $PKG
mkdir -p $OUT
PACKAGING="
chown root:root . -R
/sbin/makepkg -l y -c n $OUT/$NAMEPKG-$VERSION-$ARCH-$BUILD.$EXT
rm -rf $PKG
rm -rf $TMP/$NAME
"
if type -p fakeroot ; then
echo "$PACKAGING" | fakeroot
else
su -c "$PACKAGING"
fi

4
xap/cardpeek/doinst.sh

@ -1,4 +0,0 @@
#!/bin/sh
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database ./usr/share/applications >/dev/null 2>&1
fi

12
xap/cardpeek/slack-desc

@ -1,12 +0,0 @@
|-----handy-ruler-----------------------------------------------------|
cardpeek: cardpeek (smart card tool)
cardpeek:
cardpeek: Cardpeek is a Linux tool to read the contents of ISO7816 smart
cardpeek: cards. It features a GTK GUI to represent card data is a tree view,
cardpeek: and is extendable with a scripting language (LUA).
cardpeek:
cardpeek:
cardpeek:
cardpeek:
cardpeek:
cardpeek:
Loading…
Cancel
Save