mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-24 10:02:29 +01:00
graphics/yvonne: Added (viewer for Atari 8-bit image formats)
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
1d37f98063
commit
ecb464279e
9 changed files with 239 additions and 0 deletions
9
graphics/yvonne/README
Normal file
9
graphics/yvonne/README
Normal file
|
@ -0,0 +1,9 @@
|
|||
yvonne (viewer for Atari 8-bit image formats)
|
||||
|
||||
Yvonne is an Atari picture viewer. For interlaced or split images,
|
||||
Yvonne emulates the result by mixing colours and displaying bigger
|
||||
pixels. You can save the pictures in PC formats such as: BMP, JPG,
|
||||
PNG, and XPM.
|
||||
|
||||
Supported Atari formats: AP3, APC, APV, AP3, BG9, CIN, G09, GR8, GR9,
|
||||
HPM, INP (partially), INT, MIC, PLM.
|
9
graphics/yvonne/doinst.sh
Normal file
9
graphics/yvonne/doinst.sh
Normal file
|
@ -0,0 +1,9 @@
|
|||
if [ -x /usr/bin/update-desktop-database ]; then
|
||||
/usr/bin/update-desktop-database -q usr/share/applications >/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 usr/share/icons/hicolor >/dev/null 2>&1
|
||||
fi
|
||||
fi
|
12
graphics/yvonne/fixencoding.diff
Normal file
12
graphics/yvonne/fixencoding.diff
Normal file
|
@ -0,0 +1,12 @@
|
|||
diff -Naur yvonne-1.0.orig/widget.cpp yvonne-1.0/widget.cpp
|
||||
--- yvonne-1.0.orig/widget.cpp 2006-12-28 16:37:54.000000000 -0500
|
||||
+++ yvonne-1.0/widget.cpp 2022-12-27 22:54:26.778944637 -0500
|
||||
@@ -363,7 +363,7 @@
|
||||
sName=NAME;
|
||||
sName+=" ";
|
||||
sName+=VERSION;
|
||||
- QMessageBox::about(m_pParent, sName, "Atari Picture Viewer.\nby Rafa³ 'bob_er' Ciepiela, 2006\ncontact: bob_er@users.sourceforge.net\n\nThis is free software.\nCheck 'copying' file for details.");
|
||||
+ QMessageBox::about(m_pParent, sName, "Atari Picture Viewer.\nby Rafal 'bob_er' Ciepiela, 2006\ncontact: bob_er@users.sourceforge.net\n\nThis is free software.\nCheck 'copying' file for details.");
|
||||
return;
|
||||
}
|
||||
|
18
graphics/yvonne/fixgarbage.diff
Normal file
18
graphics/yvonne/fixgarbage.diff
Normal file
|
@ -0,0 +1,18 @@
|
|||
diff -Naur yvonne-1.0.orig/widget.cpp yvonne-1.0/widget.cpp
|
||||
--- yvonne-1.0.orig/widget.cpp 2006-12-28 16:37:54.000000000 -0500
|
||||
+++ yvonne-1.0/widget.cpp 2022-12-27 22:50:09.965687828 -0500
|
||||
@@ -182,6 +182,14 @@
|
||||
nWidth=m_pImage->getWidth();
|
||||
nHeight=m_pImage->getHeight();
|
||||
pDisplayImage=new QImage(IMAGE_WIDTH_MAX, IMAGE_HEIGHT_MAX, QImage::Format_RGB32);
|
||||
+ QRgb black = qRgb(0, 0, 0);
|
||||
+ for(unsigned int y=0;y<IMAGE_HEIGHT_MAX;y++)
|
||||
+ {
|
||||
+ for(unsigned int x=0;x<IMAGE_WIDTH_MAX;x++)
|
||||
+ {
|
||||
+ pDisplayImage->setPixel(x, y, black);
|
||||
+ }
|
||||
+ }
|
||||
nSeekX=(IMAGE_WIDTH_MAX-nWidth)>>1;
|
||||
nSeekY=(IMAGE_HEIGHT_MAX-nHeight)>>1;
|
||||
for(int y=0;y<nHeight;y++)
|
36
graphics/yvonne/fixwarnings.diff
Normal file
36
graphics/yvonne/fixwarnings.diff
Normal file
|
@ -0,0 +1,36 @@
|
|||
diff -Naur yvonne-1.0.orig/color_provider.h yvonne-1.0/color_provider.h
|
||||
--- yvonne-1.0.orig/color_provider.h 2006-12-28 16:37:54.000000000 -0500
|
||||
+++ yvonne-1.0/color_provider.h 2022-12-27 22:38:08.296725828 -0500
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
CCPException(CPReason _eReason) throw():m_eReason(_eReason) {};
|
||||
CPReason getReason(void) { return m_eReason; }
|
||||
- char* what(void)
|
||||
+ const char* what(void)
|
||||
{
|
||||
switch(m_eReason)
|
||||
{
|
||||
diff -Naur yvonne-1.0.orig/image.h yvonne-1.0/image.h
|
||||
--- yvonne-1.0.orig/image.h 2006-12-28 16:37:54.000000000 -0500
|
||||
+++ yvonne-1.0/image.h 2022-12-27 22:38:24.529994904 -0500
|
||||
@@ -56,7 +56,7 @@
|
||||
CImageException(IEReason _eReason) throw():m_eReason(_eReason) {};
|
||||
IEReason getReason(void)
|
||||
{ return m_eReason; }
|
||||
- char* what(void)
|
||||
+ const char* what(void)
|
||||
{
|
||||
switch(m_eReason)
|
||||
{
|
||||
diff -Naur yvonne-1.0.orig/rc_file.h yvonne-1.0/rc_file.h
|
||||
--- yvonne-1.0.orig/rc_file.h 2006-12-28 16:37:54.000000000 -0500
|
||||
+++ yvonne-1.0/rc_file.h 2022-12-27 22:38:47.368373460 -0500
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
CRCFileException(RCFReason _eReason) throw():m_eReason(_eReason) {};
|
||||
RCFReason getReason(void) { return m_eReason; }
|
||||
- char* what(void)
|
||||
+ const char* what(void)
|
||||
{
|
||||
switch(m_eReason)
|
||||
{
|
19
graphics/yvonne/slack-desc
Normal file
19
graphics/yvonne/slack-desc
Normal 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------------------------------------------------------|
|
||||
yvonne: yvonne (viewer for Atari 8-bit image formats)
|
||||
yvonne:
|
||||
yvonne: Yvonne is an Atari picture viewer. For interlaced or split images,
|
||||
yvonne: Yvonne emulates the result by mixing colours and displaying bigger
|
||||
yvonne: pixels. You can save the pictures in PC formats such as: BMP, JPG,
|
||||
yvonne: PNG, and XPM.
|
||||
yvonne:
|
||||
yvonne: Supported Atari formats: AP3, APC, APV, AP3, BG9, CIN, G09, GR8, GR9,
|
||||
yvonne: HPM, INP (partially), INT, MIC, PLM.
|
||||
yvonne:
|
||||
yvonne:
|
118
graphics/yvonne/yvonne.SlackBuild
Normal file
118
graphics/yvonne/yvonne.SlackBuild
Normal file
|
@ -0,0 +1,118 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Slackware build script for yvonne
|
||||
|
||||
# Written by B. Watson (urchlay@slackware.uk)
|
||||
|
||||
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
|
||||
|
||||
# This is a Qt4 app, from 2006. Was never ported to Qt5. I may
|
||||
# eventually port it myself, but Qt and C++ are not my favorite things
|
||||
# to work with. For now, it's submitted as a qt4 app, and it works.
|
||||
|
||||
cd $(dirname $0) ; CWD=$(pwd)
|
||||
|
||||
PRGNAM=yvonne
|
||||
VERSION=${VERSION:-1.0}
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
PKGTYPE=${PKGTYPE:-tgz}
|
||||
|
||||
if [ -z "$ARCH" ]; then
|
||||
case "$( uname -m )" in
|
||||
i?86) ARCH=i586 ;;
|
||||
arm*) ARCH=arm ;;
|
||||
*) ARCH=$( uname -m ) ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
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}
|
||||
|
||||
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
|
||||
tar xvf $CWD/$PRGNAM-$VERSION.tgz
|
||||
cd $PRGNAM-$VERSION
|
||||
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 {} \+
|
||||
|
||||
# The display window doesn't actually start out all black; there's
|
||||
# garbage that gets displayed outside the image area. This sets
|
||||
# all the pixels to black, gets rid of the garbage. Probably there's
|
||||
# a more elegant way to fix this, but it does work.
|
||||
patch -p1 < $CWD/fixgarbage.diff
|
||||
|
||||
# Fix the compiler warnings about converting string constants to char *.
|
||||
# Not actually necessary, but it helped me with the garbage fix, above.
|
||||
patch -p1 < $CWD/fixwarnings.diff
|
||||
|
||||
# One source file has an ISO-8859-2 character (Polish l-with-slash)
|
||||
# embedded in it, which displays incorrectly (as a superscript 3) in
|
||||
# the Help/About dialog. Converting to UTF-8 doesn't actually help:
|
||||
# it shows up as two wrong characters instead of one.
|
||||
# Qt4 only knows ISO-8859-1 (Latin-1), which doesn't have the
|
||||
# character in question... so convert it to a regular lowercase l,
|
||||
# which at least looks closer to correct.
|
||||
patch -p1 < $CWD/fixencoding.diff
|
||||
|
||||
# Add a missing library, and use our flags.
|
||||
sed -i -e '/^LFLAGS/s,$, -lQtCore,' \
|
||||
-e "/^CFLAGS/s,=,=$SLKCFLAGS ," \
|
||||
Makefile
|
||||
|
||||
# This will fail with "qt4.sh: no such file or directory" and kill the
|
||||
# shell due to "set -e", if the user forgot to install the required
|
||||
# qt4 dep.
|
||||
source /etc/profile.d/qt4.sh
|
||||
make $PRGNAM
|
||||
|
||||
mkdir -p $PKG/usr/bin
|
||||
install -s -m0755 $PRGNAM $PKG/usr/bin
|
||||
|
||||
# Use upstream's icon, even though it's a pretty generic Atari logo.
|
||||
mkdir -p $PKG/usr/share/icons/hicolor/48x48/apps $PKG/usr/share/pixmaps
|
||||
cp -a icon.png $PKG/usr/share/icons/hicolor/48x48/apps/$PRGNAM.png
|
||||
ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
|
||||
|
||||
# .desktop file written by SlackBuild author.
|
||||
mkdir -p $PKG/usr/share/applications
|
||||
cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
|
||||
|
||||
# Not much documentation (just the GPL), so include our own README.
|
||||
PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
|
||||
mkdir -p $PKGDOC
|
||||
cp -a copying $PKGDOC
|
||||
cat $CWD/README > $PKGDOC/README
|
||||
cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$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
|
8
graphics/yvonne/yvonne.desktop
Normal file
8
graphics/yvonne/yvonne.desktop
Normal file
|
@ -0,0 +1,8 @@
|
|||
[Desktop Entry]
|
||||
Name=Yvonne
|
||||
Comment=Atari 8-bit image viewer
|
||||
Exec=yvonne
|
||||
Icon=yvonne
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Graphics;2DGraphics;Viewer;
|
10
graphics/yvonne/yvonne.info
Normal file
10
graphics/yvonne/yvonne.info
Normal file
|
@ -0,0 +1,10 @@
|
|||
PRGNAM="yvonne"
|
||||
VERSION="1.0"
|
||||
HOMEPAGE="https://atari8.sourceforge.net/yvonne.html"
|
||||
DOWNLOAD="https://downloads.sourceforge.net/project/atari8/yvonne/Yvonne-1.0/yvonne-1.0.tgz"
|
||||
MD5SUM="a32a19700200f3a39a6537aed5936b0e"
|
||||
DOWNLOAD_x86_64=""
|
||||
MD5SUM_x86_64=""
|
||||
REQUIRES="qt4"
|
||||
MAINTAINER="B. Watson"
|
||||
EMAIL="urchlay@slackware.uk"
|
Loading…
Reference in a new issue