diff options
author | B. Watson <urchlay@slackware.uk> | 2022-12-28 18:33:27 +0000 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-12-31 09:14:41 +0700 |
commit | ecb464279e06c936f4560266972c89f0c8b4617e (patch) | |
tree | d6f64353fb5bc55043d500b24f24969bfea8e8ec /graphics/yvonne | |
parent | 1d37f98063ecb675049839fb898193497156a3a0 (diff) |
graphics/yvonne: Added (viewer for Atari 8-bit image formats)
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'graphics/yvonne')
-rw-r--r-- | graphics/yvonne/README | 9 | ||||
-rw-r--r-- | graphics/yvonne/doinst.sh | 9 | ||||
-rw-r--r-- | graphics/yvonne/fixencoding.diff | 12 | ||||
-rw-r--r-- | graphics/yvonne/fixgarbage.diff | 18 | ||||
-rw-r--r-- | graphics/yvonne/fixwarnings.diff | 36 | ||||
-rw-r--r-- | graphics/yvonne/slack-desc | 19 | ||||
-rw-r--r-- | graphics/yvonne/yvonne.SlackBuild | 118 | ||||
-rw-r--r-- | graphics/yvonne/yvonne.desktop | 8 | ||||
-rw-r--r-- | graphics/yvonne/yvonne.info | 10 |
9 files changed, 239 insertions, 0 deletions
diff --git a/graphics/yvonne/README b/graphics/yvonne/README new file mode 100644 index 000000000000..50733b6ca577 --- /dev/null +++ b/graphics/yvonne/README @@ -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. diff --git a/graphics/yvonne/doinst.sh b/graphics/yvonne/doinst.sh new file mode 100644 index 000000000000..3e5691a052b5 --- /dev/null +++ b/graphics/yvonne/doinst.sh @@ -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 diff --git a/graphics/yvonne/fixencoding.diff b/graphics/yvonne/fixencoding.diff new file mode 100644 index 000000000000..fd6ae6c9f2bd --- /dev/null +++ b/graphics/yvonne/fixencoding.diff @@ -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; + } + diff --git a/graphics/yvonne/fixgarbage.diff b/graphics/yvonne/fixgarbage.diff new file mode 100644 index 000000000000..ce257fad47eb --- /dev/null +++ b/graphics/yvonne/fixgarbage.diff @@ -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++) diff --git a/graphics/yvonne/fixwarnings.diff b/graphics/yvonne/fixwarnings.diff new file mode 100644 index 000000000000..6d2193ae9198 --- /dev/null +++ b/graphics/yvonne/fixwarnings.diff @@ -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) + { diff --git a/graphics/yvonne/slack-desc b/graphics/yvonne/slack-desc new file mode 100644 index 000000000000..e7dfe45ca17b --- /dev/null +++ b/graphics/yvonne/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------------------------------------------------------| +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: diff --git a/graphics/yvonne/yvonne.SlackBuild b/graphics/yvonne/yvonne.SlackBuild new file mode 100644 index 000000000000..3c96949f54bd --- /dev/null +++ b/graphics/yvonne/yvonne.SlackBuild @@ -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 diff --git a/graphics/yvonne/yvonne.desktop b/graphics/yvonne/yvonne.desktop new file mode 100644 index 000000000000..41c8b2b58193 --- /dev/null +++ b/graphics/yvonne/yvonne.desktop @@ -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; diff --git a/graphics/yvonne/yvonne.info b/graphics/yvonne/yvonne.info new file mode 100644 index 000000000000..adf89e2c50f7 --- /dev/null +++ b/graphics/yvonne/yvonne.info @@ -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" |