From efb53809a4fad1c54e9e8f32b20f5a2bcdf0307a Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 22 Dec 2013 13:08:05 +0100 Subject: fix musl compile --- package/gpm/Makefile | 4 +++- package/gpm/patches/patch-Makefile_in | 11 ++++++++++ package/gpm/patches/patch-src_Makefile_in | 8 +++---- .../gpm/patches/patch-src_daemon_open_console_c | 19 ++++++++-------- .../gpm/patches/patch-src_prog_display-buttons_c | 10 +++++++++ .../gpm/patches/patch-src_prog_display-coords_c | 10 +++++++++ package/gpm/patches/patch-src_prog_gpm-root_y | 25 ++++++++++++++++++++++ 7 files changed, 72 insertions(+), 15 deletions(-) create mode 100644 package/gpm/patches/patch-Makefile_in create mode 100644 package/gpm/patches/patch-src_prog_display-buttons_c create mode 100644 package/gpm/patches/patch-src_prog_display-coords_c create mode 100644 package/gpm/patches/patch-src_prog_gpm-root_y (limited to 'package/gpm') diff --git a/package/gpm/Makefile b/package/gpm/Makefile index 888233345..8ea741164 100644 --- a/package/gpm/Makefile +++ b/package/gpm/Makefile @@ -6,9 +6,10 @@ include ${TOPDIR}/rules.mk PKG_NAME:= gpm PKG_VERSION:= 1.20.7 PKG_RELEASE:= 1 -PKG_MD5SUM:= b75e794bfb9fe8114d0b083932673b8f +PKG_MD5SUM:= e9a4ba2711753c89b37950aada7aed4a PKG_DESCR:= console mouse support PKG_SECTION:= misc +PKG_BUILDDEP:= autotool PKG_URL:= http://launchpad.net/gpm PKG_SITES:= http://www.nico.schottelius.org/software/gpm/archives/ PKG_NOPARALLEL:= 1 @@ -22,6 +23,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,GPM,gpm,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) +AUTOTOOL_STYLE:= autogen TARGET_CPPFLAGS+= -I${WRKSRC}/src/headers gpm-install: diff --git a/package/gpm/patches/patch-Makefile_in b/package/gpm/patches/patch-Makefile_in new file mode 100644 index 000000000..d1999564b --- /dev/null +++ b/package/gpm/patches/patch-Makefile_in @@ -0,0 +1,11 @@ +--- gpm-1.20.7.orig/Makefile.in 2012-10-26 23:21:38.000000000 +0200 ++++ gpm-1.20.7/Makefile.in 2013-12-22 13:07:05.000000000 +0100 +@@ -19,7 +19,7 @@ include Makefile.include + # user-overridable flags, but it's also all the implicit rule looks at. + # missing ? + +-SUBDIRS = src doc contrib ++SUBDIRS = src contrib + + + ### simple, but effective rules diff --git a/package/gpm/patches/patch-src_Makefile_in b/package/gpm/patches/patch-src_Makefile_in index 3957260ae..22824e974 100644 --- a/package/gpm/patches/patch-src_Makefile_in +++ b/package/gpm/patches/patch-src_Makefile_in @@ -1,5 +1,5 @@ ---- gpm-1.20.6.orig/src/Makefile.in 2009-02-09 10:58:53.000000000 +0100 -+++ gpm-1.20.6/src/Makefile.in 2011-01-11 16:48:43.000000000 +0100 +--- gpm-1.20.7.orig/src/Makefile.in 2012-10-26 23:21:38.000000000 +0200 ++++ gpm-1.20.7/src/Makefile.in 2013-12-22 12:46:27.000000000 +0100 @@ -59,19 +59,19 @@ STRIP = -s # the prog rules are not very clean... @@ -26,7 +26,7 @@ # old, unused, but good rule [dependings] #%.d: $(srcdir)/%.c @@ -82,7 +82,7 @@ prog/%: prog/%.o - all: gpm lib/libgpm.so.@abi_lev@ lib/libgpm.a $(PROG) + all: gpm lib/libgpm.so.@abi_lev@ @LIBGPM_A@ $(PROG) gpm: $(GOBJ) - $(CC) @LDFLAGS@ $(LDFLAGS) -o $@ $(GOBJ) @LIBS@ $(LIBS) -lm @@ -34,7 +34,7 @@ # construct dependings of sourcefiles and link sourcefiles $(DEPFILE) dep: prog/gpm-root.c -@@ -148,11 +148,11 @@ prog/gpm-root.c: $(srcdir)/prog/gpm-root +@@ -150,11 +150,11 @@ prog/gpm-root.c: $(srcdir)/prog/gpm-root # gpm-root needs an own rule, because gpm-root.c is not in $(srcdir) prog/gpm-root: prog/gpm-root.c lib/libgpm.so.@abi_lev@ diff --git a/package/gpm/patches/patch-src_daemon_open_console_c b/package/gpm/patches/patch-src_daemon_open_console_c index 28bd57e11..9ead6ea40 100644 --- a/package/gpm/patches/patch-src_daemon_open_console_c +++ b/package/gpm/patches/patch-src_daemon_open_console_c @@ -1,12 +1,11 @@ -$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ ---- gpm-1.20.5.orig/src/daemon/open_console.c 2008-06-13 10:08:19.000000000 +0200 -+++ gpm-1.20.5/src/daemon/open_console.c 2008-09-16 17:11:51.000000000 +0200 -@@ -21,7 +21,7 @@ +--- gpm-1.20.7.orig/src/daemon/open_console.c 2012-10-26 23:21:38.000000000 +0200 ++++ gpm-1.20.7/src/daemon/open_console.c 2013-12-22 12:54:02.000000000 +0100 +@@ -27,6 +27,8 @@ + #include /* for serial console check */ + #include /* for serial console check */ - #include /* open and co. */ - #include /* stat() */ --#include /* ioctl */ -+#include /* ioctl */ ++#define major(dev) (((unsigned) (dev))>>8) ++#define minor(dev) ((dev)&0xff) - /* Linux specific (to be outsourced in gpm2 */ - #include /* for serial console check */ + #include "headers/message.h" /* messaging in gpm */ + #include "headers/daemon.h" /* daemon internals */ diff --git a/package/gpm/patches/patch-src_prog_display-buttons_c b/package/gpm/patches/patch-src_prog_display-buttons_c new file mode 100644 index 000000000..485a7b0dd --- /dev/null +++ b/package/gpm/patches/patch-src_prog_display-buttons_c @@ -0,0 +1,10 @@ +--- gpm-1.20.7.orig/src/prog/display-buttons.c 2012-10-26 23:21:38.000000000 +0200 ++++ gpm-1.20.7/src/prog/display-buttons.c 2013-12-22 12:58:43.000000000 +0100 +@@ -31,6 +31,7 @@ + * + */ + ++#include + #include /* write, read, open */ + #include /* strtol() */ + #include /* printf() */ diff --git a/package/gpm/patches/patch-src_prog_display-coords_c b/package/gpm/patches/patch-src_prog_display-coords_c new file mode 100644 index 000000000..8e52f1734 --- /dev/null +++ b/package/gpm/patches/patch-src_prog_display-coords_c @@ -0,0 +1,10 @@ +--- gpm-1.20.7.orig/src/prog/display-coords.c 2012-10-26 23:21:38.000000000 +0200 ++++ gpm-1.20.7/src/prog/display-coords.c 2013-12-22 12:59:32.000000000 +0100 +@@ -32,6 +32,7 @@ + * + */ + ++#include + #include /* write, read, open */ + #include /* strtol() */ + #include /* printf() */ diff --git a/package/gpm/patches/patch-src_prog_gpm-root_y b/package/gpm/patches/patch-src_prog_gpm-root_y new file mode 100644 index 000000000..786f7a6ec --- /dev/null +++ b/package/gpm/patches/patch-src_prog_gpm-root_y @@ -0,0 +1,25 @@ +--- gpm-1.20.7.orig/src/prog/gpm-root.y 2012-10-26 23:21:38.000000000 +0200 ++++ gpm-1.20.7/src/prog/gpm-root.y 2013-12-22 13:06:09.000000000 +0100 +@@ -56,6 +56,9 @@ + #define minor(dev) ((dev)&0xff) + #endif + ++#ifndef SA_INTERRUPT ++#define SA_INTERRUPT 0 ++#endif + + #define GPM_NULL_DEV "/dev/null" + +@@ -1196,11 +1199,7 @@ int main(int argc, char **argv) + 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); + -- cgit v1.2.3