summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2020-05-02 17:36:20 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2020-05-03 08:48:47 +0700
commit1b0e878df48448e62e395d339f8736badd451e95 (patch)
tree56c0541b259effb9ee284ed2a294373f8ba0f9e0
parent78650c23f8d6d7a893c57d852ee7e4ab7d80039d (diff)
downloadslackbuilds-1b0e878df48448e62e395d339f8736badd451e95.tar.gz
libraries/libcapsimage: Added libcapsimage (decoder library)
Signed-off-by: Dave Woodfall <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--libraries/libcapsimage/README12
-rw-r--r--libraries/libcapsimage/libcapsimage.SlackBuild126
-rw-r--r--libraries/libcapsimage/libcapsimage.info10
-rw-r--r--libraries/libcapsimage/slack-desc19
4 files changed, 167 insertions, 0 deletions
diff --git a/libraries/libcapsimage/README b/libraries/libcapsimage/README
new file mode 100644
index 0000000000..e34dd5f2a5
--- /dev/null
+++ b/libraries/libcapsimage/README
@@ -0,0 +1,12 @@
+libcapsimage (decoder library for KyroFlux CTR and IPF disk images)
+
+libcapsimage is a support library that allows applications to access
+low-level disk image files stored in the IPF (Interchange Preservation
+Format) and CTR ("CT Raw") formats. This library is also known as the
+"SPS Decoder Library", spsdeclib, and was formerly known as ipflib.
+
+In particular, this library allows hatari (and various other emulators)
+to use the low-level IPF and CTR dumps found on many ST archive sites.
+
+This is not free software: read /usr/doc/libcapsimage-$VERSION/LICENCE.txt
+for details. The short version is that it's free for non-commercial use.
diff --git a/libraries/libcapsimage/libcapsimage.SlackBuild b/libraries/libcapsimage/libcapsimage.SlackBuild
new file mode 100644
index 0000000000..879f493111
--- /dev/null
+++ b/libraries/libcapsimage/libcapsimage.SlackBuild
@@ -0,0 +1,126 @@
+#!/bin/sh
+
+# Slackware build script for libcapsimage
+
+# Written by B. Watson (yalhcru@gmail.com)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# This software goes by many names. I've chosen to name the package
+# after the shared library it installs.
+
+# Currently this only exists for hatari to use. If you're going to use
+# it as a dep for your SlackBuild:
+# - You'll want to make sure it looks for headers in /usr/include/caps5,
+# probly with a -I option in CFLAGS.
+# - The library is in the normal place, /usr/lib(64), so the only linker
+# flag you'll need (if it's not there already) is -lcapsimage.
+# - Some software might want to call it -lcapsimg, just sed your Makefile
+# or whatever's needed.
+# - The license for libcapsimage isn't GPL-compatible: it's "free for
+# non-commercial use". This shouldn't stop you or your users from
+# building and using packages, but you should note in your README if
+# the package is non-redistributable. I don't know if this affects
+# other licenses such as BSD or MIT.
+# - The only other problem you might run into is that your software
+# might be written for version 4.x, which is totally different (this
+# script can't build it). If there's any interest, I'll do a build
+# for that as well.
+# If you do use this as a dependency for your build, let me know, I'm
+# interested.
+
+PRGNAM=libcapsimage
+VERSION=${VERSION:-5.1}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+SRCNAM=spsdeclib
+
+# Yo dawg, I herd you like zip files, so I put a zip file in your zip
+# file, so you can unzip while you unzip.
+INNERDIR=capsimg_source_linux_macosx
+INNERZIP="$INNERDIR.zip"
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+mkdir -p $PRGNAM-$VERSION
+cd $PRGNAM-$VERSION
+unzip -a $CWD/${SRCNAM}_${VERSION}_source.zip $INNERZIP '*.txt'
+unzip -a $INNERZIP
+chown -R root:root .
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
+
+cd $INNERDIR/CAPSImg
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+sh ./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --build=$ARCH-slackware-linux
+
+make
+
+# 'make install' is useless, so:
+PKGLIB=$PKG/usr/lib$LIBDIRSUFFIX
+mkdir -p $PKGLIB
+install -s -m0755 $PRGNAM.so.$VERSION $PKGLIB
+ln -s $PRGNAM.so.$VERSION $PKGLIB/$PRGNAM.so
+# The .so.5 link is made by ldconfig at package install time.
+
+# List of headers came from peeking at the windows binary build. Also it's
+# the same set of headers hatari's readme.txt says it needs. I'm installing
+# them where hatari expects to find them. Since this stuff was ported from
+# Windows, it's littered with MS-specific __cdecl attributes which we
+# don't need on Linux, so zap them.
+mkdir -p $PKG/usr/include/caps5
+cd ..
+install -m0644 LibIPF/*.h Core/CommonTypes.h $PKG/usr/include/caps5
+sed -i 's,__cdecl,,g' $PKG/usr/include/caps5/*.h
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cd ..
+cp -a *.txt $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+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}
diff --git a/libraries/libcapsimage/libcapsimage.info b/libraries/libcapsimage/libcapsimage.info
new file mode 100644
index 0000000000..92883471b2
--- /dev/null
+++ b/libraries/libcapsimage/libcapsimage.info
@@ -0,0 +1,10 @@
+PRGNAM="libcapsimage"
+VERSION="5.1"
+HOMEPAGE="http://www.kryoflux.com/"
+DOWNLOAD="http://www.kryoflux.com/download/spsdeclib_5.1_source.zip"
+MD5SUM="27710eb05d4391560addeeb970ea1d45"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="B. Watson"
+EMAIL="yalhcru@gmail.com"
diff --git a/libraries/libcapsimage/slack-desc b/libraries/libcapsimage/slack-desc
new file mode 100644
index 0000000000..43795935b2
--- /dev/null
+++ b/libraries/libcapsimage/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+libcapsimage: libcapsimage (decoder library for KyroFlux CTR and IPF disk images)
+libcapsimage:
+libcapsimage: libcapsimage is a support library that allows applications to access
+libcapsimage: low-level disk image files stored in the IPF (Interchange Preservation
+libcapsimage: Format) and CTR ("CT Raw") formats. This library is also known as the
+libcapsimage: "SPS Decoder Library", spsdeclib, and was formerly known as ipflib.
+libcapsimage:
+libcapsimage:
+libcapsimage:
+libcapsimage:
+libcapsimage: