From: wael444 <wael444@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] New package: oneko-1.2.5
Date: Fri, 20 May 2022 07:46:45 +0200 [thread overview]
Message-ID: <20220520054645.KVhp7qDLvBQIGm4Ad6l11ehqUq_KT19swDh8gH2bcZQ@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-36622@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 606 bytes --]
There is an updated pull request by wael444 against master on the void-packages repository
https://github.com/wael444/void-packages oneko
https://github.com/void-linux/void-packages/pull/36622
New package: oneko-1.2.5
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**
~~it's cute tho.~~
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
A patch file from https://github.com/void-linux/void-packages/pull/36622.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-oneko-36622.patch --]
[-- Type: text/x-diff, Size: 7779 bytes --]
From 84455ddf19e87e2c3513fdb621e334a2cd8769de Mon Sep 17 00:00:00 2001
From: wael <40663@protonmail.com>
Date: Sun, 10 Apr 2022 22:56:44 +0300
Subject: [PATCH] New package: oneko-1.2.5
---
srcpkgs/oneko/patches/cursorrecover.diff | 73 +++++++++++++++++++++
srcpkgs/oneko/patches/fix-warnings.diff | 43 ++++++++++++
srcpkgs/oneko/patches/rmshape_fixtypos.diff | 69 +++++++++++++++++++
srcpkgs/oneko/template | 22 +++++++
4 files changed, 207 insertions(+)
create mode 100644 srcpkgs/oneko/patches/cursorrecover.diff
create mode 100644 srcpkgs/oneko/patches/fix-warnings.diff
create mode 100644 srcpkgs/oneko/patches/rmshape_fixtypos.diff
create mode 100644 srcpkgs/oneko/template
diff --git a/srcpkgs/oneko/patches/cursorrecover.diff b/srcpkgs/oneko/patches/cursorrecover.diff
new file mode 100644
index 000000000000..f19497812f32
--- /dev/null
+++ b/srcpkgs/oneko/patches/cursorrecover.diff
@@ -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
diff --git a/srcpkgs/oneko/patches/fix-warnings.diff b/srcpkgs/oneko/patches/fix-warnings.diff
new file mode 100644
index 000000000000..7e2593ba8357
--- /dev/null
+++ b/srcpkgs/oneko/patches/fix-warnings.diff
@@ -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>
+
+
+ /*
diff --git a/srcpkgs/oneko/patches/rmshape_fixtypos.diff b/srcpkgs/oneko/patches/rmshape_fixtypos.diff
new file mode 100644
index 000000000000..4a5a96c88b83
--- /dev/null
+++ b/srcpkgs/oneko/patches/rmshape_fixtypos.diff
@@ -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]
diff --git a/srcpkgs/oneko/template b/srcpkgs/oneko/template
new file mode 100644
index 000000000000..3d45f449ae62
--- /dev/null
+++ b/srcpkgs/oneko/template
@@ -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
+}
next prev parent reply other threads:[~2022-05-20 5:46 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-10 20:23 [PR PATCH] " wael444
2022-04-11 0:01 ` [PR REVIEW] " tibequadorian
2022-04-11 4:41 ` classabbyamp
2022-04-11 4:41 ` classabbyamp
2022-04-11 4:41 ` classabbyamp
2022-04-11 10:54 ` wael444
2022-04-11 10:54 ` wael444
2022-04-11 10:55 ` wael444
2022-04-11 10:58 ` wael444
2022-04-11 10:59 ` [PR PATCH] [Updated] " wael444
2022-04-11 11:01 ` [PR REVIEW] " wael444
2022-04-11 11:19 ` tibequadorian
2022-04-11 11:21 ` wael444
2022-04-11 11:22 ` [PR PATCH] [Updated] " wael444
2022-04-11 12:29 ` [PR REVIEW] " classabbyamp
2022-04-11 12:30 ` wael444
2022-04-11 12:47 ` [PR PATCH] [Updated] " wael444
2022-04-11 13:11 ` [PR REVIEW] " classabbyamp
2022-04-11 13:46 ` paper42
2022-04-11 13:46 ` paper42
2022-04-11 13:46 ` paper42
2022-04-11 13:47 ` paper42
2022-04-11 13:48 ` paper42
2022-04-11 13:55 ` wael444
2022-04-11 13:57 ` [PR PATCH] [Updated] " wael444
2022-04-11 14:04 ` [PR REVIEW] " paper42
2022-04-11 15:16 ` wael444
2022-04-11 15:17 ` [PR PATCH] [Updated] " wael444
2022-04-11 15:21 ` [PR REVIEW] " classabbyamp
2022-04-11 15:31 ` wael444
2022-04-11 16:38 ` wael444
2022-04-11 18:31 ` 0x5c
2022-04-11 18:34 ` 0x5c
2022-04-11 18:41 ` wael444
2022-04-11 19:08 ` 0x5c
2022-04-11 20:36 ` [PR PATCH] [Updated] " wael444
2022-04-11 20:44 ` wael444
2022-04-11 22:31 ` [PR REVIEW] " 0x5c
2022-04-11 22:34 ` wael444
2022-04-11 22:36 ` [PR PATCH] [Updated] " wael444
2022-04-11 23:26 ` classabbyamp
2022-04-11 23:29 ` wael444
2022-05-07 4:04 ` wael444
2022-05-07 4:24 ` 0x5c
2022-05-07 4:49 ` wael444
2022-05-07 7:32 ` 0x5c
2022-05-11 16:47 ` [PR PATCH] [Updated] " wael444
2022-05-11 16:51 ` wael444
2022-05-11 19:38 ` 0x5c
2022-05-20 5:46 ` wael444 [this message]
2022-05-26 9:20 ` wael444
2022-05-28 21:16 ` [PR PATCH] [Merged]: " leahneukirchen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220520054645.KVhp7qDLvBQIGm4Ad6l11ehqUq_KT19swDh8gH2bcZQ@z \
--to=wael444@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).