mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
gpm: fix building with gcc14 and musl, update distfile
This commit is contained in:
parent
b87ec8f3ca
commit
150dc658a9
3 changed files with 123 additions and 27 deletions
|
@ -1,24 +0,0 @@
|
||||||
The location <sys/fcntl.h> is wrong, it is just <fcntl.h>
|
|
||||||
|
|
||||||
--- a/src/lib/liblow.c 2012-10-26 23:21:38.000000000 +0200
|
|
||||||
+++ b/src/lib/liblow.c 2015-06-22 15:36:38.956046661 +0200
|
|
||||||
@@ -33,7 +33,7 @@
|
|
||||||
#include <sys/types.h> /* socket() */
|
|
||||||
#include <sys/socket.h> /* socket() */
|
|
||||||
#include <sys/un.h> /* struct sockaddr_un */
|
|
||||||
-#include <sys/fcntl.h> /* O_RDONLY */
|
|
||||||
+#include <fcntl.h> /* O_RDONLY */
|
|
||||||
#include <sys/stat.h> /* stat() */
|
|
||||||
|
|
||||||
#ifdef SIGTSTP /* true if BSD system */
|
|
||||||
--- a/src/daemon/gpm.c 2012-10-26 23:21:38.000000000 +0200
|
|
||||||
+++ b/src/daemon/gpm.c 2015-06-22 15:44:46.825020280 +0200
|
|
||||||
@@ -29,7 +29,7 @@
|
|
||||||
#include <signal.h> /* SIGPIPE */
|
|
||||||
#include <time.h> /* time() */
|
|
||||||
#include <sys/param.h>
|
|
||||||
-#include <sys/fcntl.h> /* O_RDONLY */
|
|
||||||
+#include <fcntl.h> /* O_RDONLY */
|
|
||||||
#include <sys/wait.h> /* wait() */
|
|
||||||
#include <sys/stat.h> /* mkdir() */
|
|
||||||
#include <sys/time.h> /* timeval */
|
|
120
srcpkgs/gpm/patches/musl-includes.patch
Normal file
120
srcpkgs/gpm/patches/musl-includes.patch
Normal file
|
@ -0,0 +1,120 @@
|
||||||
|
Source: https://github.com/telmich/gpm/commit/4a938233fbe6de7af05aabc74891b68d4bae40f8
|
||||||
|
|
||||||
|
From 21f4f4aede1cae705fa0c9112ef34afbe38413d2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Kurt Nalty <46026992+kurtnalty@users.noreply.github.com>
|
||||||
|
Date: Sat, 29 Dec 2018 23:44:24 -0600
|
||||||
|
Subject: [PATCH 1/4] Update gpm.c
|
||||||
|
|
||||||
|
---
|
||||||
|
src/daemon/gpm.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/daemon/gpm.c b/src/daemon/gpm.c
|
||||||
|
index 771da5c..6806dce 100644
|
||||||
|
--- a/src/daemon/gpm.c
|
||||||
|
+++ b/src/daemon/gpm.c
|
||||||
|
@@ -29,7 +29,7 @@
|
||||||
|
#include <signal.h> /* SIGPIPE */
|
||||||
|
#include <time.h> /* time() */
|
||||||
|
#include <sys/param.h>
|
||||||
|
-#include <sys/fcntl.h> /* O_RDONLY */
|
||||||
|
+#include <fcntl.h> /* O_RDONLY */
|
||||||
|
#include <sys/wait.h> /* wait() */
|
||||||
|
#include <sys/stat.h> /* mkdir() */
|
||||||
|
#include <sys/time.h> /* timeval */
|
||||||
|
|
||||||
|
From 2085cab74a0a84df8b965addf007775a7225c9ec Mon Sep 17 00:00:00 2001
|
||||||
|
From: Kurt Nalty <46026992+kurtnalty@users.noreply.github.com>
|
||||||
|
Date: Sat, 29 Dec 2018 23:47:17 -0600
|
||||||
|
Subject: [PATCH 2/4] Add include <string.h>
|
||||||
|
|
||||||
|
Added
|
||||||
|
line 28, #include <string.h> /* strcpy, bzero */
|
||||||
|
for musl compilation
|
||||||
|
---
|
||||||
|
src/daemon/old_main.c | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/src/daemon/old_main.c b/src/daemon/old_main.c
|
||||||
|
index 2581e26..ab7a87f 100644
|
||||||
|
--- a/src/daemon/old_main.c
|
||||||
|
+++ b/src/daemon/old_main.c
|
||||||
|
@@ -25,6 +25,7 @@
|
||||||
|
#include <signal.h> /* guess again */
|
||||||
|
#include <errno.h> /* guess again */
|
||||||
|
#include <unistd.h> /* unlink */
|
||||||
|
+#include <string.h> /* strcpy, bzero */
|
||||||
|
#include <sys/stat.h> /* chmod */
|
||||||
|
|
||||||
|
#include <linux/kd.h> /* linux hd* */
|
||||||
|
|
||||||
|
From afe69339e311a498eba4c978a865839f33b66e7a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Kurt Nalty <46026992+kurtnalty@users.noreply.github.com>
|
||||||
|
Date: Sat, 29 Dec 2018 23:52:58 -0600
|
||||||
|
Subject: [PATCH 3/4] Update liblow.c for musl compatible
|
||||||
|
|
||||||
|
Changed #include <sys/fcntl.h> to #include <fcntl.h>
|
||||||
|
Changed SA_NOMASK to SA_NODEFER on lines 176, 367
|
||||||
|
---
|
||||||
|
src/lib/liblow.c | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/lib/liblow.c b/src/lib/liblow.c
|
||||||
|
index e789d09..8d6ba34 100644
|
||||||
|
--- a/src/lib/liblow.c
|
||||||
|
+++ b/src/lib/liblow.c
|
||||||
|
@@ -33,7 +33,7 @@
|
||||||
|
#include <sys/types.h> /* socket() */
|
||||||
|
#include <sys/socket.h> /* socket() */
|
||||||
|
#include <sys/un.h> /* struct sockaddr_un */
|
||||||
|
-#include <sys/fcntl.h> /* O_RDONLY */
|
||||||
|
+#include <fcntl.h> /* O_RDONLY */
|
||||||
|
#include <sys/stat.h> /* stat() */
|
||||||
|
|
||||||
|
#ifdef SIGTSTP /* true if BSD system */
|
||||||
|
@@ -173,7 +173,7 @@ static void gpm_suspend_hook (int signum)
|
||||||
|
/* Reincarnation. Prepare for another death early. */
|
||||||
|
sigemptyset(&sa.sa_mask);
|
||||||
|
sa.sa_handler = gpm_suspend_hook;
|
||||||
|
- sa.sa_flags = SA_NOMASK;
|
||||||
|
+ sa.sa_flags = SA_NODEFER;
|
||||||
|
sigaction (SIGTSTP, &sa, 0);
|
||||||
|
|
||||||
|
/* Pop the gpm stack by closing the useless connection */
|
||||||
|
@@ -364,7 +364,7 @@ int Gpm_Open(Gpm_Connect *conn, int flag)
|
||||||
|
|
||||||
|
/* if signal was originally ignored, job control is not supported */
|
||||||
|
if (gpm_saved_suspend_hook.sa_handler != SIG_IGN) {
|
||||||
|
- sa.sa_flags = SA_NOMASK;
|
||||||
|
+ sa.sa_flags = SA_NODEFER;
|
||||||
|
sa.sa_handler = gpm_suspend_hook;
|
||||||
|
sigaction(SIGTSTP, &sa, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
From 668445350055e4bbeec9c15bd4db14a7f07abc45 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Kurt Nalty <46026992+kurtnalty@users.noreply.github.com>
|
||||||
|
Date: Mon, 31 Dec 2018 18:41:19 -0600
|
||||||
|
Subject: [PATCH 4/4] Aligned comments
|
||||||
|
|
||||||
|
---
|
||||||
|
src/lib/liblow.c | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/lib/liblow.c b/src/lib/liblow.c
|
||||||
|
index 8d6ba34..8b40b71 100644
|
||||||
|
--- a/src/lib/liblow.c
|
||||||
|
+++ b/src/lib/liblow.c
|
||||||
|
@@ -29,11 +29,12 @@
|
||||||
|
#include <string.h> /* strncmp */
|
||||||
|
#include <unistd.h> /* select(); */
|
||||||
|
#include <errno.h>
|
||||||
|
+#include <fcntl.h> /* O_RDONLY */
|
||||||
|
+
|
||||||
|
#include <sys/time.h> /* timeval */
|
||||||
|
#include <sys/types.h> /* socket() */
|
||||||
|
#include <sys/socket.h> /* socket() */
|
||||||
|
#include <sys/un.h> /* struct sockaddr_un */
|
||||||
|
-#include <fcntl.h> /* O_RDONLY */
|
||||||
|
#include <sys/stat.h> /* stat() */
|
||||||
|
|
||||||
|
#ifdef SIGTSTP /* true if BSD system */
|
|
@ -1,15 +1,15 @@
|
||||||
# Template file for 'gpm'
|
# Template file for 'gpm'
|
||||||
pkgname=gpm
|
pkgname=gpm
|
||||||
version=1.20.7
|
version=1.20.7
|
||||||
revision=10
|
revision=11
|
||||||
build_style=gnu-configure
|
build_style=gnu-configure
|
||||||
hostmakedepends="automake libtool flex texinfo"
|
hostmakedepends="automake libtool flex texinfo"
|
||||||
makedepends="ncurses-devel libfl-devel"
|
makedepends="ncurses-devel libfl-devel"
|
||||||
short_desc="Mouse server for the console and xterm"
|
short_desc="Mouse server for the console and xterm"
|
||||||
maintainer="Orphaned <orphan@voidlinux.org>"
|
maintainer="Orphaned <orphan@voidlinux.org>"
|
||||||
license="GPL-2.0-or-later"
|
license="GPL-2.0-or-later"
|
||||||
homepage="http://www.nico.schottelius.org/software/gpm/"
|
homepage="https://www.nico.schottelius.org/software/gpm/"
|
||||||
distfiles="http://www.nico.schottelius.org/software/gpm/archives/gpm-${version}.tar.lzma"
|
distfiles="https://www.nico.schottelius.org/software/gpm/archives/gpm-${version}.tar.lzma"
|
||||||
checksum=a955053b36556ffa7c628ce18fd6de7d625966573fa412fb08869533d8f7385c
|
checksum=a955053b36556ffa7c628ce18fd6de7d625966573fa412fb08869533d8f7385c
|
||||||
|
|
||||||
CFLAGS="-fcommon"
|
CFLAGS="-fcommon"
|
||||||
|
|
Loading…
Add table
Reference in a new issue