Switch to new download format, fix building with GCC 15 and remove dependencies field from esvm service

This commit is contained in:
2025-11-09 15:58:43 +02:00
parent b4ddbf0294
commit 8b47ff4be6
4 changed files with 131 additions and 11 deletions
+9 -1
View File
@@ -1,8 +1,16 @@
name: gpm
description: General Purpose Mouse
version: 1.20.7
revision: 2
url: https://www.nico.schottelius.org/software/gpm/
license: GPL2-or-later
architecture: any
make_depends: ["git"]
type: source
depends:
- bash
- procps-ng
downloads:
- url: https://www.nico.schottelius.org/software/gpm/archives/gpm-${BPM_PKG_VERSION}.tar.gz
extract_to: ${BPM_SOURCE}
extract_strip_components: 1
checksum: c7e4661c24e05ae13547176b649bac8e3a0db2575f7dd57559f9e0b509f90f49
-1
View File
@@ -1,6 +1,5 @@
name: gpm
description: Virtual console mouse server
dependencies: ["udevd"]
type: simple
start_cmd: /usr/sbin/gpm -m /dev/input/mice -t imps2
exit_method: kill
+116
View File
@@ -0,0 +1,116 @@
Submitted by: Pierre Labastie <pierre dot labastie at neuf dot fr>
Date: 2020-05-10
Initial Package Version: 1.20.7
Origin: Upstream + PR's
Upstream Status: some fixes committed, others pending
Description: Fix several build failures
- some introduced by glibc-2.26
- some introduced by gcc-10
- also fix an ignored error when gpm.h is not already in
/usr/include
diff -Naur gpm-1.20.7.old/src/daemon/open_console.c gpm-1.20.7.new/src/daemon/open_console.c
--- gpm-1.20.7.old/src/daemon/open_console.c 2012-10-26 23:21:38.000000000 +0200
+++ gpm-1.20.7.new/src/daemon/open_console.c 2020-05-10 15:48:59.752067421 +0200
@@ -23,6 +23,10 @@
#include <sys/stat.h> /* stat() */
#include <sys/ioctl.h> /* ioctl */
+#ifdef HAVE_SYS_SYSMACROS_H
+#include <sys/sysmacros.h> /* major() w/newer glibc */
+#endif
+
/* Linux specific (to be outsourced in gpm2 */
#include <linux/serial.h> /* for serial console check */
#include <asm/ioctls.h> /* for serial console check */
diff -Naur gpm-1.20.7.old/src/headers/daemon.h gpm-1.20.7.new/src/headers/daemon.h
--- gpm-1.20.7.old/src/headers/daemon.h 2012-10-26 23:21:38.000000000 +0200
+++ gpm-1.20.7.new/src/headers/daemon.h 2020-05-10 15:48:52.719159555 +0200
@@ -180,7 +180,7 @@
extern Gpm_Type mice[];
extern Gpm_Type *repeated_type;
-time_t last_selection_time;
+extern time_t last_selection_time;
diff -Naur gpm-1.20.7.old/src/prog/display-buttons.c gpm-1.20.7.new/src/prog/display-buttons.c
--- gpm-1.20.7.old/src/prog/display-buttons.c 2012-10-26 23:21:38.000000000 +0200
+++ gpm-1.20.7.new/src/prog/display-buttons.c 2020-05-10 15:48:59.751067434 +0200
@@ -36,7 +36,7 @@
#include <stdio.h> /* printf() */
#include <time.h> /* time() */
#include <errno.h> /* errno */
-#include <gpm.h> /* gpm information */
+#include "headers/gpm.h" /* gpm information */
/* display resulting data */
int display_data(Gpm_Event *event, void *data)
diff -Naur gpm-1.20.7.old/src/prog/display-coords.c gpm-1.20.7.new/src/prog/display-coords.c
--- gpm-1.20.7.old/src/prog/display-coords.c 2012-10-26 23:21:38.000000000 +0200
+++ gpm-1.20.7.new/src/prog/display-coords.c 2020-05-10 15:48:59.751067434 +0200
@@ -37,7 +37,7 @@
#include <stdio.h> /* printf() */
#include <time.h> /* time() */
#include <errno.h> /* errno */
-#include <gpm.h> /* gpm information */
+#include "headers/gpm.h" /* gpm information */
/* display resulting data */
int display_data(Gpm_Event *event, void *data)
diff -Naur gpm-1.20.7.old/src/prog/get-versions.c gpm-1.20.7.new/src/prog/get-versions.c
--- gpm-1.20.7.old/src/prog/get-versions.c 2012-10-26 23:21:38.000000000 +0200
+++ gpm-1.20.7.new/src/prog/get-versions.c 2020-05-10 15:48:59.751067434 +0200
@@ -22,7 +22,7 @@
********/
#include <stdio.h> /* printf() */
-#include <gpm.h> /* gpm information */
+#include "headers/gpm.h" /* gpm information */
int main()
{
diff -Naur gpm-1.20.7.old/src/prog/gpm-root.y gpm-1.20.7.new/src/prog/gpm-root.y
--- gpm-1.20.7.old/src/prog/gpm-root.y 2012-10-26 23:21:38.000000000 +0200
+++ gpm-1.20.7.new/src/prog/gpm-root.y 2020-05-10 15:48:59.752067421 +0200
@@ -443,6 +443,7 @@
}
/*---------------------------------------------------------------------*/
+#if 0
static int f_debug_one(FILE *f, Draw *draw)
{
DrawItem *ip;
@@ -465,6 +466,7 @@
#undef LINE
return 0;
}
+#endif
int f_debug(int mode, DrawItem *self, int uid)
{
@@ -960,10 +962,8 @@
/*------------*/
static inline void scr_restore(int fd, FILE *f, unsigned char *buffer, int vc)
{
- int x,y, dumpfd;
+ int dumpfd;
char dumpname[20];
-
- x=buffer[2]; y=buffer[3];
/* WILL NOT WORK WITH DEVFS! FIXME! */
sprintf(dumpname,"/dev/vcsa%i",vc);
@@ -1196,11 +1196,7 @@
LOG_DAEMON : LOG_USER);
/* reap your zombies */
childaction.sa_handler=reap_children;
-#if defined(__GLIBC__)
- __sigemptyset(&childaction.sa_mask);
-#else /* __GLIBC__ */
- childaction.sa_mask=0;
-#endif /* __GLIBC__ */
+ sigemptyset(&childaction.sa_mask);
childaction.sa_flags=SA_INTERRUPT; /* need to break the select() call */
sigaction(SIGCHLD,&childaction,NULL);
+6 -9
View File
@@ -2,22 +2,18 @@
# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE
# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
COMMIT="e82d1a653ca94aa4ed12441424da6ce780b1e530"
REPO="https://github.com/telmich/gpm.git"
FILENAME="${DOWNLOAD##*/}"
# The prepare function is executed in the root of the temp directory
# This function is used for downloading files and putting them into the correct location
# This function is used for putting downloaded files to the correct location or applying patches
prepare() {
git clone --single-branch "$REPO" "$BPM_SOURCE"
cd "$BPM_SOURCE"
git checkout "$COMMIT"
patch -Np1 -i "$BPM_WORKDIR"/lfs-consolidated.patch
./autogen.sh
}
# The build function is executed in the source directory
# This function is used to compile the source code
build() {
./autogen.sh
export CFLAGS="${CFLAGS} -std=gnu17"
./configure --prefix=/usr --sysconfdir=/etc
make
}
@@ -27,7 +23,7 @@ build() {
package() {
make DESTDIR="$BPM_OUTPUT" install
# Fix libraries
# Add unversioned library symlink
pushd "$BPM_OUTPUT"/usr/lib
ln -s libgpm.so.2.* libgpm.so
chmod 0755 libgpm.so.*
@@ -36,5 +32,6 @@ package() {
# Install esvm service
install -Dm644 "$BPM_WORKDIR"/gpm.esv "$BPM_OUTPUT"/etc/esvm/services/gpm.esv
# Install package license
install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/gpm/COPYING
}