Browse Source

fix musl compile

Waldemar Brodkorb 11 years ago
parent
commit
efb53809a4

+ 3 - 1
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:

+ 11 - 0
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

+ 4 - 4
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@

+ 9 - 10
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 <linux/serial.h>           /* for serial console check */
+ #include <asm/ioctls.h>            /* for serial console check */
  
- #include <fcntl.h>                  /* open and co.      */
- #include <sys/stat.h>               /* stat()            */
--#include <stropts.h>                /* ioctl             */
-+#include <sys/ioctl.h>              /* ioctl             */
++#define major(dev) (((unsigned) (dev))>>8)
++#define minor(dev) ((dev)&0xff)
  
- /* Linux specific (to be outsourced in gpm2 */
- #include <linux/serial.h>           /* for serial console check */
+ #include "headers/message.h"        /* messaging in gpm  */
+ #include "headers/daemon.h"         /* daemon internals  */

+ 10 - 0
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 <sys/select.h>
+ #include <unistd.h>           /* write, read, open    */
+ #include <stdlib.h>           /* strtol()             */
+ #include <stdio.h>            /* printf()             */

+ 10 - 0
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 <sys/select.h>
+ #include <unistd.h>           /* write, read, open    */
+ #include <stdlib.h>           /* strtol()             */
+ #include <stdio.h>            /* printf()             */

+ 25 - 0
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);
+