mirror of
https://github.com/void-linux/void-packages.git
synced 2025-04-22 17:17:03 +02:00
New package: oneko-1.2.5
This commit is contained in:
parent
f67b698f55
commit
7f8575efdf
4 changed files with 207 additions and 0 deletions
73
srcpkgs/oneko/patches/cursorrecover.diff
Normal file
73
srcpkgs/oneko/patches/cursorrecover.diff
Normal file
|
@ -0,0 +1,73 @@
|
|||
diff --git a/oneko.c b/oneko.c
|
||||
index d2b81fe..8c0d965 100644
|
||||
--- a/oneko.c
|
||||
+++ b/oneko.c
|
||||
@@ -8,6 +8,10 @@ static char rcsid[] = "$Header: /home/sun/unix/kato/xsam/oneko/oneko.c,v 1.5 90/
|
||||
|
||||
#include "oneko.h"
|
||||
#include "patchlevel.h"
|
||||
+
|
||||
+#include <X11/cursorfont.h>
|
||||
+int restoredCursor = 0;
|
||||
+
|
||||
/*
|
||||
* $@%0%m!<%P%kJQ?t(J
|
||||
*/
|
||||
@@ -716,7 +720,14 @@ RestoreCursor()
|
||||
XSetWindowAttributes theWindowAttributes;
|
||||
BitmapGCData *BitmapGCDataTablePtr;
|
||||
|
||||
- theWindowAttributes.cursor = None;
|
||||
+ Cursor font_cursor;
|
||||
+ if(restoredCursor >= XC_X_cursor && restoredCursor < XC_X_cursor + XC_num_glyphs)
|
||||
+ font_cursor=XCreateFontCursor(theDisplay, restoredCursor );
|
||||
+ if(font_cursor)
|
||||
+ theWindowAttributes.cursor = font_cursor;
|
||||
+ else
|
||||
+ theWindowAttributes.cursor = None;
|
||||
+
|
||||
XChangeWindowAttributes(theDisplay, theRoot, CWCursor,
|
||||
&theWindowAttributes);
|
||||
for (BitmapGCDataTablePtr = BitmapGCDataTable;
|
||||
@@ -1376,6 +1387,7 @@ char *message[] = {
|
||||
"-tofocus : Neko runs on top of focus window",
|
||||
"-rv : Reverse video. (effects monochrome display only)",
|
||||
"-position <geometry> : adjust position relative to mouse pointer.",
|
||||
+"-cursor <cursornumber> : cursor number to set when quitting.",
|
||||
"-debug : puts you in synchronous mode.",
|
||||
"-patchlevel : print out your current patchlevel.",
|
||||
NULL };
|
||||
@@ -1504,6 +1516,10 @@ GetArguments(argc, argv, theDisplayName)
|
||||
ArgCounter++;
|
||||
result=XParseGeometry(argv[ArgCounter],&XOffset,&YOffset,&foo,&bar);
|
||||
}
|
||||
+ else if (strcmp(argv[ArgCounter], "-cursor") == 0) {
|
||||
+ ArgCounter++;
|
||||
+ restoredCursor=atoi(argv[ArgCounter]);
|
||||
+ }
|
||||
else if (strcmp(argv[ArgCounter], "-debug") ==0) {
|
||||
Synchronous = True;
|
||||
}
|
||||
diff --git a/oneko.man b/oneko.man
|
||||
index d6d2b40..333388a 100644
|
||||
--- a/oneko.man
|
||||
+++ b/oneko.man
|
||||
@@ -9,7 +9,7 @@ The program oneko creates a cute cat chasing around your mouse cursor.
|
||||
[\fB-time\fP \fIn\fP] [\fB-speed\fP \fIn\fP] [\fB-idle\fP \fIn\fP]
|
||||
[\fB-name\fP \fIname\fP] [\fB-towindow\fP] [\fB-toname\fP \fIname\fP]
|
||||
[\fB-tofocus\fP]
|
||||
-[\fB-position\fP \fIgeometry\fP]
|
||||
+[\fB-position\fP \fIgeometry\fP] [\fB-cursor\fP]
|
||||
[\fB-rv\fP] [\fB-noshape\fP] [\fB-fg\fP] [\fB-bg\fP]
|
||||
.SH DESCRIPTION
|
||||
.I oneko
|
||||
@@ -88,6 +88,9 @@ When focus window is not in sight, cat chases mouse as usually.
|
||||
Specify X and Y offsets in pixels to adjust position of cat relative
|
||||
to mouse pointer.
|
||||
.TP
|
||||
+.BI \-cursor " cursornumber"
|
||||
+Specify a cursor number to set when quitting. For example, 132 is the
|
||||
+default root cursor.
|
||||
.B -rv
|
||||
Reverse background color and foreground color.
|
||||
.TP
|
43
srcpkgs/oneko/patches/fix-warnings.diff
Normal file
43
srcpkgs/oneko/patches/fix-warnings.diff
Normal file
|
@ -0,0 +1,43 @@
|
|||
diff --git a/oneko.c b/oneko.c
|
||||
index d569eb5..926c1cd 100644
|
||||
--- a/oneko.c
|
||||
+++ b/oneko.c
|
||||
@@ -335,7 +335,7 @@ char *resource;
|
||||
* $@%j%=!<%9!&%G!<%?%Y!<%9$+$i%*%W%7%g%s$r@_Dj(J
|
||||
*/
|
||||
|
||||
-GetResources()
|
||||
+void GetResources()
|
||||
{
|
||||
char *resource;
|
||||
int num;
|
||||
@@ -434,7 +434,7 @@ GetResources()
|
||||
* $@$M$:$_7?%+!<%=%k$r:n$k(J
|
||||
*/
|
||||
|
||||
-MakeMouseCursor()
|
||||
+void MakeMouseCursor()
|
||||
{
|
||||
Pixmap theCursorSource;
|
||||
Pixmap theCursorMask;
|
||||
@@ -463,7 +463,7 @@ MakeMouseCursor()
|
||||
* $@?'$r=i4|@_Dj$9$k(J
|
||||
*/
|
||||
|
||||
-SetupColors()
|
||||
+void SetupColors()
|
||||
{
|
||||
XColor theExactColor;
|
||||
Colormap theColormap;
|
||||
diff --git a/oneko.h b/oneko.h
|
||||
index 414e12f..225d975 100644
|
||||
--- a/oneko.h
|
||||
+++ b/oneko.h
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <signal.h>
|
||||
#include <math.h>
|
||||
#include <sys/time.h>
|
||||
+#include <unistd.h>
|
||||
|
||||
|
||||
/*
|
69
srcpkgs/oneko/patches/rmshape_fixtypos.diff
Normal file
69
srcpkgs/oneko/patches/rmshape_fixtypos.diff
Normal file
|
@ -0,0 +1,69 @@
|
|||
diff --git a/oneko.c b/oneko.c
|
||||
index d2b81fe..39b8b1d 100644
|
||||
--- a/oneko.c
|
||||
+++ b/oneko.c
|
||||
@@ -618,13 +618,11 @@ InitScreen(DisplayName)
|
||||
XSynchronize(theDisplay,True);
|
||||
}
|
||||
|
||||
-#ifdef SHAPE
|
||||
if (!NoShape && XShapeQueryExtension(theDisplay,
|
||||
&event_base, &error_base) == False) {
|
||||
- fprintf(stderr, "Display not suported shape extension.\n");
|
||||
+ fprintf(stderr, "Display does not support shape extension.\n");
|
||||
NoShape = True;
|
||||
}
|
||||
-#endif SHAPE
|
||||
|
||||
theScreen = DefaultScreen(theDisplay);
|
||||
theDepth = DefaultDepth(theDisplay, theScreen);
|
||||
@@ -803,13 +801,11 @@ DrawNeko(x, y, DrawAnime)
|
||||
theChanges.x = x;
|
||||
theChanges.y = y;
|
||||
XConfigureWindow(theDisplay, theWindow, CWX | CWY, &theChanges);
|
||||
-#ifdef SHAPE
|
||||
if (NoShape == False) {
|
||||
XShapeCombineMask(theDisplay, theWindow, ShapeBounding,
|
||||
0, 0, DrawMask, ShapeSet);
|
||||
|
||||
}
|
||||
-#endif SHAPE
|
||||
if (DontMapped) {
|
||||
XMapWindow(theDisplay, theWindow);
|
||||
DontMapped = 0;
|
||||
diff --git a/oneko.man b/oneko.man
|
||||
index d6d2b40..f24f19c 100644
|
||||
--- a/oneko.man
|
||||
+++ b/oneko.man
|
||||
@@ -1,6 +1,6 @@
|
||||
.TH ONEKO 6
|
||||
-.SH NAME oneko
|
||||
-The program oneko creates a cute cat chasing around your mouse cursor.
|
||||
+.SH NAME
|
||||
+oneko \- Creates a cute cat chasing around your mouse cursor.
|
||||
.SH SYNOPSIS
|
||||
.B oneko
|
||||
[\fB-help\fP] [\fB-tora\fP]
|
||||
@@ -22,8 +22,7 @@ start sleeping.
|
||||
Prints help message on usage.
|
||||
.TP
|
||||
.B -tora
|
||||
-Make cat into "tora-neko". "Tora-neko" means cat wite tiger-like stripe.
|
||||
-I don't know how to say it in English.
|
||||
+Make cat into "tora-neko", a cat with a tiger-like stripe.
|
||||
.TP
|
||||
.B -dog
|
||||
Runs a dog instead of a cat.
|
||||
diff --git a/oneko.man.jp b/oneko.man.jp
|
||||
index 96f9e3a..ed795bf 100644
|
||||
--- a/oneko.man.jp
|
||||
+++ b/oneko.man.jp
|
||||
@@ -1,6 +1,6 @@
|
||||
.TH ONEKO 6
|
||||
-.SH $@L>>N(J oneko
|
||||
-$@$+$o$$$$G-$,%^%&%9%+!<%=%k$rDI$$$+$1$k%W%m%0%i%`(J
|
||||
+.SH $@L>>N(J
|
||||
+oneko \- $@$+$o$$$$G-$,%^%&%9%+!<%=%k$rDI$$$+$1$k%W%m%0%i%`(J
|
||||
.SH $@=q<0(J
|
||||
.B oneko
|
||||
[\fB-help\fP] [\fB-tora\fP]
|
22
srcpkgs/oneko/template
Normal file
22
srcpkgs/oneko/template
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Template file for 'oneko'
|
||||
pkgname=oneko
|
||||
version=1.2.sakura.5
|
||||
revision=1
|
||||
hostmakedepends="pkg-config"
|
||||
makedepends="libX11-devel libXext-devel"
|
||||
short_desc="Cat that chases around your cursor"
|
||||
maintainer="wael <40663@protonmail.com>"
|
||||
license="Public Domain"
|
||||
homepage="http://www.daidouji.com/oneko"
|
||||
distfiles="http://www.daidouji.com/oneko/distfiles/oneko-${version}.tar.gz"
|
||||
checksum=2c2e05f1241e9b76f54475b5577cd4fb6670de058218d04a741a04ebd4a2b22f
|
||||
|
||||
do_build() {
|
||||
${CC} ${CFLAGS} -DSHAPE oneko.c -o oneko $(pkg-config --libs xext x11) -lm
|
||||
}
|
||||
|
||||
do_install() {
|
||||
vbin oneko
|
||||
vman oneko.man oneko.1
|
||||
vman oneko.man.jp oneko.jp.1
|
||||
}
|
Loading…
Add table
Reference in a new issue