graphics/pencil2d: Added (animation/drawing software)

Signed-off-by: Dave Woodfall <dave@slackbuilds.org>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Michales Michaloudes 2021-01-09 00:20:49 +00:00 committed by Willy Sudiarto Raharjo
parent be7f509020
commit 8fc44e0890
No known key found for this signature in database
GPG Key ID: 3F617144D7238786
5 changed files with 137 additions and 0 deletions

6
graphics/pencil2d/README Normal file
View File

@ -0,0 +1,6 @@
Pencil2D is an animation/drawing software for Windows, macOS, Linux, and
FreeBSD. It lets you create traditional hand-drawn animation (cartoon)
using both bitmap and vector graphics. Pencil2D is free and open source.
ffmpeg is runtime requirement. It's used to render mp4 and gif.
Otherwise you can render every frame to png.

View File

@ -0,0 +1,13 @@
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi
if [ -x /usr/bin/update-mime-database ]; then
/usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
fi
if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
if [ -x /usr/bin/gtk-update-icon-cache ]; then
/usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1
fi
fi

View File

@ -0,0 +1,89 @@
#!/bin/sh
# Slackware build script for <pencil2d>
#
# Michales (clavisound) Michaloudes korgie@gmail.com <2020>
PRGNAM=pencil2d
SRCNAM=pencil
VERSION=${VERSION:-0.6.5}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
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 $SRCNAM-$VERSION
tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
cd $SRCNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
qmake-qt5 \
PREFIX=/usr \
CONFIG+=release \
DEFINES+=QT_NO_DEBUG_OUTPUT \
DEFINES+=PENCIL2D_RELEASE
make
make install INSTALL_ROOT=$PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
for i in 16 32 48 64 96 128
do
mkdir -p $PKG/usr/share/icons/hicolor/${i}x${i}/apps/
convert $PKG/usr/share/icons/hicolor/256x256/apps/org.$PRGNAM.Pencil2D.png \
-resize ${i}x${i} $PKG/usr/share/icons/hicolor/${i}x${i}/apps/org.$PRGNAM.Pencil2D.png
done
sed -i 's+Icon=pencil2d+Icon=/usr/share/icons/hicolor/48x48/apps/pencil2d.png+' \
$PKG/usr/share/applications/org.$PRGNAM.Pencil2D.desktop
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
LICENSE.TXT CODE_OF_CONDUCT.md ChangeLog.md README.md \
$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
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}

View File

@ -0,0 +1,10 @@
PRGNAM="pencil2d"
VERSION="0.6.5"
HOMEPAGE="https://www.pencil2d.org/"
DOWNLOAD="https://github.com/pencil2d/pencil/archive/v0.6.5/pencil-0.6.5.tar.gz"
MD5SUM="80f5f5ca1ba49453631353b5b1c8c5ee"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="six pyudev python-evdev graphviz ninja meson libwacom libinput libxkbcommon qt5"
MAINTAINER="Michales Michaloudes"
EMAIL="korgie@gmail.com"

View File

@ -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------------------------------------------------------|
pencil2d: pencil2d (animation/drawing software)
pencil2d:
pencil2d: Pencil2D is an animation/drawing software for Windows, macOS, Linux,
pencil2d: and FreeBSD. It lets you create traditional hand-drawn animation
pencil2d: (cartoon) using both bitmap and vector graphics. Pencil2D is free and
pencil2d: open source.
pencil2d:
pencil2d: https://www.pencil2d.org
pencil2d:
pencil2d:
pencil2d: