Skip to content

Commit

Permalink
xbindkeys: initial commit, v1.8.7
Browse files Browse the repository at this point in the history
  • Loading branch information
sighook committed Oct 15, 2024
1 parent ef11b23 commit 85d4c63
Show file tree
Hide file tree
Showing 8 changed files with 550 additions and 0 deletions.
7 changes: 7 additions & 0 deletions xbindkeys/.footprint
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
drwxr-xr-x root/root usr/
drwxr-xr-x root/root usr/bin/
-rwxr-xr-x root/root usr/bin/xbindkeys
drwxr-xr-x root/root usr/share/
drwxr-xr-x root/root usr/share/man/
drwxr-xr-x root/root usr/share/man/man1/
-rw-r--r-- root/root usr/share/man/man1/xbindkeys.1.gz
6 changes: 6 additions & 0 deletions xbindkeys/.md5sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
d075955a84af103b6edc531214e6c746 dupchecks.patch
93fdf42e59219358ca3ab1669542496a examples.patch
37876113386944e80fb54bd8f25b1ddb manpages.patch
90c581c0e3ed1e80543ecd64e4fdb19a trueifs.patch
b5e1a9668ba13ff8673836d1d965d951 xbindkeys-1.8.7.tar.gz
c17ad71b04827139a448c34f0f5086df xbindkeys.1-no-guile.patch
31 changes: 31 additions & 0 deletions xbindkeys/Pkgfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Description: Bind keys to shell scripts in X
# URL: https://www.nongnu.org/xbindkeys/xbindkeys.html
# Depends on: xorg-libx11

name=xbindkeys
version=1.8.7
release=1
source="https://www.nongnu.org/$name/$name-$version.tar.gz
dupchecks.patch
examples.patch
manpages.patch
trueifs.patch
xbindkeys.1-no-guile.patch"

build() {
patch -d $name-$version -Np1 -i $SRC/manpages.patch
patch -d $name-$version -Np1 -i $SRC/examples.patch
patch -d $name-$version -Np1 -i $SRC/dupchecks.patch
patch -d $name-$version -Np1 -i $SRC/trueifs.patch
patch -d $name-$version -Np0 -i $SRC/xbindkeys.1-no-guile.patch

mkdir build; cd build

../$name-$version/configure \
--prefix=/usr \
--disable-tk \
--disable-guile \

make V=1
make DESTDIR=$PKG install
}
38 changes: 38 additions & 0 deletions xbindkeys/dupchecks.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
Description: check result of dup() calls
Removes two instances of "warning: ignoring return value of 'dup'
declared with attribute 'warn_unused_result' [-Wunused-result]"
Author: Ricardo Mones <[email protected]>
Forwarded: no

diff --git a/xbindkeys.c b/xbindkeys.c
index 5b1b86b..e1fcfb7 100644
--- a/xbindkeys.c
+++ b/xbindkeys.c
@@ -524,7 +524,7 @@ static void
start_as_daemon (void)
{
pid_t pid;
- int i;
+ int i, j;

pid = fork ();
if (pid < 0)
@@ -554,8 +554,16 @@ start_as_daemon (void)
}

i = open ("/dev/null", O_RDWR);
- dup (i);
- dup (i);
+ j = dup (i);
+ if (j < 0)
+ {
+ perror ("Could not duplicate handle");
+ }
+ j = dup (i);
+ if (j < 0)
+ {
+ perror ("Could not duplicate handle again");
+ }

/* umask (022); */
/* chdir ("/tmp"); */
Loading

0 comments on commit 85d4c63

Please sign in to comment.