diff --git a/srcpkgs/gpm/files/gpm.service b/srcpkgs/gpm/files/gpm.service deleted file mode 100644 index 510ee9f8570..00000000000 --- a/srcpkgs/gpm/files/gpm.service +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=Virtual console mouse server - -[Service] -Type=forking -ExecStart=/usr/bin/gpm -m /dev/input/mice -t imps2 - -[Install] -WantedBy=multi-user.target diff --git a/srcpkgs/gpm/patches/musl-fcntl.patch b/srcpkgs/gpm/patches/musl-fcntl.patch new file mode 100644 index 00000000000..8c5e8fa69bb --- /dev/null +++ b/srcpkgs/gpm/patches/musl-fcntl.patch @@ -0,0 +1,24 @@ +The location is wrong, it is just + +--- src/lib/liblow.c 2012-10-26 23:21:38.000000000 +0200 ++++ src/lib/liblow.c 2015-06-22 15:36:38.956046661 +0200 +@@ -33,7 +33,7 @@ + #include /* socket() */ + #include /* socket() */ + #include /* struct sockaddr_un */ +-#include /* O_RDONLY */ ++#include /* O_RDONLY */ + #include /* stat() */ + + #ifdef SIGTSTP /* true if BSD system */ +--- src/daemon/gpm.c 2012-10-26 23:21:38.000000000 +0200 ++++ src/daemon/gpm.c 2015-06-22 15:44:46.825020280 +0200 +@@ -29,7 +29,7 @@ + #include /* SIGPIPE */ + #include /* time() */ + #include +-#include /* O_RDONLY */ ++#include /* O_RDONLY */ + #include /* wait() */ + #include /* mkdir() */ + #include /* timeval */ diff --git a/srcpkgs/gpm/patches/musl-gpm_h.patch b/srcpkgs/gpm/patches/musl-gpm_h.patch new file mode 100644 index 00000000000..9ba322c4f4c --- /dev/null +++ b/srcpkgs/gpm/patches/musl-gpm_h.patch @@ -0,0 +1,13 @@ +There is no -Isrc/headers, thus specify gpm.h relative location + +--- src/prog/get-versions.c 2012-10-26 23:21:38.000000000 +0200 ++++ src/prog/get-versions.c 2015-06-22 15:49:30.536004939 +0200 +@@ -22,7 +22,7 @@ + ********/ + + #include /* printf() */ +-#include /* gpm information */ ++#include "headers/gpm.h" /* gpm information */ + + int main() + { diff --git a/srcpkgs/gpm/patches/musl-linux_major_h.patch b/srcpkgs/gpm/patches/musl-linux_major_h.patch new file mode 100644 index 00000000000..d2671102c69 --- /dev/null +++ b/srcpkgs/gpm/patches/musl-linux_major_h.patch @@ -0,0 +1,12 @@ +The macro major() is defined in sys/sysmacros.h + +--- src/daemon/open_console.c 2012-10-26 23:21:38.000000000 +0200 ++++ src/daemon/open_console.c 2015-06-22 16:13:14.921927918 +0200 +@@ -25,6 +25,7 @@ + + /* Linux specific (to be outsourced in gpm2 */ + #include /* for serial console check */ ++#include /* for major() */ + #include /* for serial console check */ + + diff --git a/srcpkgs/gpm/patches/musl-select.patch b/srcpkgs/gpm/patches/musl-select.patch new file mode 100644 index 00000000000..02f8d1b8af9 --- /dev/null +++ b/srcpkgs/gpm/patches/musl-select.patch @@ -0,0 +1,36 @@ +The FD_ISSET macro and fd_set are defined in sys/select.h + +--- src/prog/display-buttons.c 2012-10-26 23:21:38.000000000 +0200 ++++ src/prog/display-buttons.c 2015-06-22 15:40:19.594034730 +0200 +@@ -36,7 +36,8 @@ + #include /* printf() */ + #include /* time() */ + #include /* errno */ +-#include /* gpm information */ ++#include /* FD_ISSET */ ++#include "headers/gpm.h" /* gpm information */ + + /* display resulting data */ + int display_data(Gpm_Event *event, void *data) +--- src/prog/display-coords.c 2012-10-26 23:21:38.000000000 +0200 ++++ src/prog/display-coords.c 2015-06-22 15:41:05.433032252 +0200 +@@ -37,7 +37,8 @@ + #include /* printf() */ + #include /* time() */ + #include /* errno */ +-#include /* gpm information */ ++#include /* FD_ISSET */ ++#include "headers/gpm.h" /* gpm information */ + + /* display resulting data */ + int display_data(Gpm_Event *event, void *data) +--- src/prog/open_console.c 2012-10-26 23:21:38.000000000 +0200 ++++ src/prog/open_console.c 2015-06-22 15:40:35.002033897 +0200 +@@ -22,6 +22,7 @@ + #include "headers/message.h" /* messaging in gpm */ + #include "headers/daemon.h" /* daemon internals */ + #include ++#include + + int open_console(const int mode) + { diff --git a/srcpkgs/gpm/patches/musl-sigaction.patch b/srcpkgs/gpm/patches/musl-sigaction.patch new file mode 100644 index 00000000000..b5a0f043912 --- /dev/null +++ b/srcpkgs/gpm/patches/musl-sigaction.patch @@ -0,0 +1,29 @@ +Use the generic sigemptyset() available on both, glibc and musl libc +The SA_INTERRUPT is not defined in musl libc. Copy the (unused?) +definition from glibc's header bits/sigaction.h + +--- src/prog/gpm-root.y 2012-10-26 23:21:38.000000000 +0200 ++++ src/prog/gpm-root.y 2015-06-22 15:56:19.167982843 +0200 +@@ -56,6 +56,9 @@ + #define minor(dev) ((dev)&0xff) + #endif + ++#if !defined(SA_INTERRUPT) ++# define SA_INTERRUPT 0x20000000 /* Historical no-op. */ ++#endif + + #define GPM_NULL_DEV "/dev/null" + +@@ -1196,11 +1199,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); + diff --git a/srcpkgs/gpm/template b/srcpkgs/gpm/template index 1ee3e67c8c5..68e87bbdc03 100644 --- a/srcpkgs/gpm/template +++ b/srcpkgs/gpm/template @@ -1,8 +1,7 @@ # Template file for 'gpm' pkgname=gpm version=1.20.7 -revision=7 -build_options="systemd" +revision=8 build_style=gnu-configure configure_args="--sbindir=/usr/bin" hostmakedepends="automake libtool flex" @@ -23,9 +22,6 @@ post_install() { touch ${DESTDIR}/usr/share/info/dir vinstall ${FILESDIR}/gpm.sh 644 etc/profile.d - if [ "$build_option_systemd" ]; then - vinstall ${FILESDIR}/gpm.service 644 usr/lib/systemd/system - fi vsv gpm } gpm-devel_package() {