Compare commits

..

No commits in common. "rawhide" and "f42" have entirely different histories.

9 changed files with 163 additions and 23 deletions

2
.gitignore vendored
View file

@ -1,3 +1 @@
xpenguins-2.2.tar.gz
/xpenguins-3.2.3.tar.gz
/xpenguins-3.2.4.tar.gz

View file

@ -1 +1 @@
SHA512 (xpenguins-3.2.4.tar.gz) = bd25975b8002dd2fa18c3b3f12241dfce0d44edd597e4ce235b61c8453d073caefd424b8ada0dad48cfca4c36dc63a1df7b838c061b07acfed4ff76d121b8f3b
2ccf555d55f9b0377017322b3b3d27a4 xpenguins-2.2.tar.gz

View file

@ -0,0 +1,11 @@
--- a/src/xpenguins_theme.c~ 2001-10-02 00:36:12.000000000 +0200
+++ b/src/xpenguins_theme.c 2013-12-03 12:54:49.000000000 +0100
@@ -608,7 +608,7 @@
xpm_file_name = word;
}
else {
- snprintf(file_base, MAX_STRING_LENGTH, word);
+ snprintf(file_base, MAX_STRING_LENGTH, "%s", word);
xpm_file_name = file_name;
}
if (current->image) {

View file

@ -0,0 +1,23 @@
--- a/src/toon_init.cshape 2001-06-24 18:28:17.000000000 +0200
+++ b/src/toon_init.c 2014-03-16 13:44:18.000000000 +0100
@@ -29,6 +29,8 @@
Display *
ToonOpenDisplay(char *display_name)
{
+ int event_base, error_base;
+
toon_display=XOpenDisplay(display_name);
if (toon_display == NULL) {
if (display_name == NULL && getenv("DISPLAY") == NULL)
@@ -39,6 +41,11 @@
TOON_MESSAGE_LENGTH);
return(NULL);
}
+ if (!XShapeQueryExtension(toon_display, &event_base, &error_base)) {
+ strncpy(toon_error_message, _("Display doesn't support the SHAPE extension"),
+ TOON_MESSAGE_LENGTH);
+ return(NULL);
+ }
ToonInit(toon_display);
return toon_display;
}

21
xpenguins-c23.patch Normal file
View file

@ -0,0 +1,21 @@
--- xpenguins-2.2/src/toon.h.orig 2001-09-30 20:21:45.000000000 +0200
+++ xpenguins-2.2/src/toon.h 2025-01-24 23:17:25.000000000 +0100
@@ -118,7 +118,6 @@
unsigned int wid;
XRectangle pos;
} __ToonWindowData;
-typedef int __ToonErrorHandler();
void __ToonSignalHandler(int sig);
int __ToonError(Display *toon_display, XErrorEvent *error);
void __ToonExitGracefully(int sig);
--- xpenguins-2.2/src/toon_core.c.orig 2001-06-24 19:05:34.000000000 +0200
+++ xpenguins-2.2/src/toon_core.c 2025-01-24 23:29:46.000000000 +0100
@@ -255,7 +255,7 @@
}
}
XFree(children);
- XSetErrorHandler((__ToonErrorHandler *) NULL);
+ XSetErrorHandler((XErrorHandler) NULL);
return 0;
}

15
xpenguins-c99.patch Normal file
View file

@ -0,0 +1,15 @@
Include <stdlib.h> for the exit function, to avoid build problems with
future compilers.
diff --git a/src/toon_signal.c b/src/toon_signal.c
index 7135f0efcb4810d0..c093584cf6d88ae6 100644
--- a/src/toon_signal.c
+++ b/src/toon_signal.c
@@ -16,6 +16,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <signal.h>
+#include <stdlib.h>
#include "toon.h"
/* SIGNAL AND ERROR HANDLING FUNCTIONS */

View file

@ -0,0 +1,36 @@
Fix generic C99 compatibility issues introduced by historic autoconf.
Potential future upstream releases will hopefully use a newer autoconf
version, so it's not necessary to upstream this.
diff --git a/configure b/configure
index 7a47544bd2f9d06c..4aa7e543f1cfd747 100755
--- a/configure
+++ b/configure
@@ -909,7 +909,7 @@ cat > conftest.$ac_ext << EOF
#line 910 "configure"
#include "confdefs.h"
-main(){return(0);}
+int main(){return(0);}
EOF
if { (eval echo configure:915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
@@ -1290,6 +1290,7 @@ cat > conftest.$ac_ext <<EOF
#line 1291 "configure"
#include "confdefs.h"
+char ${x_direct_test_function} (void);
int main() {
${x_direct_test_function}()
; return 0; }
@@ -2161,8 +2162,8 @@ else
#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int main () { int i; for (i = 0; i < 256; i++)
-if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
-exit (0); }
+if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2;
+return 0; }
EOF
if { (eval echo configure:2169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null

View file

@ -43,6 +43,6 @@
</image>
</screenshot>
</screenshots>
<url type="homepage">https://ratrabbit.nl/ratrabbit/software/xpenguins/</url>
<url type="homepage">http://xpenguins.seul.org/</url>
<update_contact>goeran@uddeborg.se</update_contact>
</component>

View file

@ -1,29 +1,38 @@
Name: xpenguins
Version: 3.2.4
Version: 2.2
Release: %autorelease
Summary: Cute little penguins that walk along the tops of your windows
Summary(sv): Söta små pingviner som vandrar längs överkanterna dina fönster
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
ExcludeArch: %{ix86}
# Automatically converted from old format: GPLv2+ - review is highly recommended.
License: GPL-2.0-or-later
URL: https://ratrabbit.nl/ratrabbit/software/xpenguins/
URL: http://xpenguins.seul.org/
Source0: https://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
Source0: http://xpenguins.seul.org/%name-%version.tar.gz
Source1: %name.appdata.xml
# Mailed upstreams developer with this patch, but it is unclear if
# there ever will be a new release. This is a rather inactive
# project.
Patch0: xpenguins-2.2-format-security.patch
# If run on a display without the SHAPE extension, xpenguins will
# crash. This patch causes it to exit more gracefully. Sent
# upstreams, in case there ever will be a new release.
Patch1: xpenguins-2.2-no-SHAPE.patch
Patch2: xpenguins-configure-c99.patch
Patch3: xpenguins-c99.patch
Patch4: xpenguins-c23.patch
BuildRequires: make
BuildRequires: gcc
BuildRequires: gtk3-devel
BuildRequires: desktop-file-utils
BuildRequires: ImageMagick
BuildRequires: libappstream-glib
BuildRequires: libXpm-devel
BuildRequires: libXext-devel
BuildRequires: libXt-devel
BuildRequires: pkgconf-pkg-config
%global desktopdir %_datadir/applications
%global icondir %_datadir/pixmaps
%global icondir %_datadir/icons/hicolor/48x48/apps
%description
XPenguins animates a friendly family of penguins in your root window.
@ -34,8 +43,9 @@ you are bored of penguins, try something else. The themes that come
with this package are "Penguins", "Classic Penguins", "Big Penguins",
"Turtles" and "Bill".
The penguins are able to walk on X11 windows, but are ignorant of
Wayland windows. Some of the effect is lost by this.
XPenguins works by drawing on the X root window. This might not have
the desired effect in modern desktop environments like Gnome where the
root window is not visible.
%description -l sv
XPengiuns animerar en vänlig familj av pingviner i ditt rotfönster.
@ -47,8 +57,9 @@ teman som följer med detta paket är "Penguins" (pingviner), "Classic
Penguins" (klassiska pingviner), "Big Penguins" (stora pingviner),
"Turtles" (sköldpaddor) och "Bill" (Bill).
Pingvinerna kan X11-fönster, men vet inte om Wayland-fönster.
Detta gör att lite av effekten går förlorad.
XPenguins fungerar genom att rita X rotfönster. Detta fungerar
kanske inte som önskat i moderna skrivbordsmiljöer som Gnome där
rotfönstret inte är synligt.
%prep
@ -57,25 +68,50 @@ Detta gör att lite av effekten går förlorad.
%build
%configure
make %{?_smp_mflags}
cat << EOF > %name.desktop
[Desktop Entry]
Name=XPenguins
GenericName=Animated penguins
GenericName[sv]=Animerade pingviner
Comment=Cute little penguins that walk along the tops of your windows
Comment[sv]=Söta små pingviner som vandrar längs överkanterna dina fönster
Exec=%name
Icon=%name
Terminal=false
Type=Application
Categories=Game;Amusement;
# Try to exclude desktops where the the X root window, and thus the penguins,
# are hidden.
#
# Sugar is not defined in
# https://standards.freedesktop.org/menu-spec/latest/apb.html
# I'm guessing at X-Sugar.
#
# Suggestions for improvements/corrections are welcome:
# https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=xpenguins
NotShowIn=Cinnamon;GNOME;KDE;LXDE;MATE;X-Sugar;
EOF
iconv -f ISO-8859-1 -t UTF-8 -o README.utf8 README
%install
make install DESTDIR=%buildroot
desktop-file-install --dir=%buildroot%desktopdir src/%name.desktop
install -D --target-directory=%buildroot%icondir src/%name.xpm
install -D --target-directory=%buildroot%_datadir/metainfo %SOURCE1
desktop-file-install --dir=%buildroot%desktopdir %name.desktop
mkdir -p %buildroot%icondir
convert themes/Big_Penguins/walker.xpm -crop 45x45+0+45 -gravity center -compose src -extent 48x48 %buildroot%icondir/%name.png
install -d %buildroot%_datadir/metainfo
cp -p %SOURCE1 %buildroot%_datadir/metainfo
%check
appstream-util validate-relax --nonet \
%buildroot%_datadir/metainfo/%name.appdata.xml
%files
%doc README AUTHORS ChangeLog lay-out-frames.scm resize-frames.scm
%license COPYING
%doc README.utf8 AUTHORS COPYING ChangeLog lay-out-frames.scm resize-frames.scm
%_bindir/%name
%_mandir/man1/*
%_datadir/%name
%desktopdir/%name.desktop
%icondir/%name.xpm
%icondir/%name.png
%_datadir/metainfo/%name.appdata.xml
%changelog