summaryrefslogtreecommitdiffstats
path: root/system/flashcards
diff options
context:
space:
mode:
Diffstat (limited to 'system/flashcards')
-rw-r--r--system/flashcards/fixes.diff24
-rw-r--r--system/flashcards/flashcards.SlackBuild22
2 files changed, 43 insertions, 3 deletions
diff --git a/system/flashcards/fixes.diff b/system/flashcards/fixes.diff
new file mode 100644
index 0000000000..8096bd21b4
--- /dev/null
+++ b/system/flashcards/fixes.diff
@@ -0,0 +1,24 @@
+diff -Naur flashcards-2.4/flashcards/configure.py flashcards-2.4.patched/flashcards/configure.py
+--- flashcards-2.4/flashcards/configure.py 2012-02-06 03:32:51.000000000 -0500
++++ flashcards-2.4.patched/flashcards/configure.py 2020-01-17 23:03:15.495097878 -0500
+@@ -29,6 +29,8 @@
+ documents = os.path.join(home_path, 'Documents')
+ ROOT = os.path.join(documents, 'flashcards')
+
++if not os.path.isdir(documents):
++ os.mkdir(documents)
+ if not os.path.isdir(ROOT):
+ os.mkdir(ROOT)
+
+diff -Naur flashcards-2.4/setup.py flashcards-2.4.patched/setup.py
+--- flashcards-2.4/setup.py 2012-02-06 03:45:22.000000000 -0500
++++ flashcards-2.4.patched/setup.py 2020-01-17 23:03:32.311096350 -0500
+@@ -14,7 +14,7 @@
+ author_email = "luisnaranjo733@hotmail.com",
+ description = ("A simple command line flashcards utility, similar to physical flashcards."),
+ license = "GNU GPL",
+- install_requires= ['argparse','configobj',],
++ install_requires= ['configobj',],
+ entry_points = {
+ 'console_scripts': ['flashcards = flashcards.flashcards:main']
+ },
diff --git a/system/flashcards/flashcards.SlackBuild b/system/flashcards/flashcards.SlackBuild
index 73fd70a471..779be8ed0e 100644
--- a/system/flashcards/flashcards.SlackBuild
+++ b/system/flashcards/flashcards.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for flashcards
@@ -22,10 +22,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=flashcards
VERSION=${VERSION:-2.4}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +38,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -69,6 +79,12 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+# 20200117 bkw: this has apparently been broken for a LONG time. It
+# complains that there's no "distribution" called argparse... but
+# argparse ships with Slackware. Also, application fails to start if
+# $HOME/Documents doesn't already exist. Patch fixes both issues.
+patch -p1 < $CWD/fixes.diff
+
python setup.py install --root=$PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
@@ -82,4 +98,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE