commit:     d4fc7ca828271978da86963e4a5fdc00fc3335e6
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 20 19:53:25 2015 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Mon Jul 20 19:53:25 2015 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=d4fc7ca8

sys-libs/gpm: add headers and portable sigaction.

Package-Manager: portage-2.2.18
RepoMan-Options: --force
Manifest-Sign-Key: 0xF52D4BBA

 sys-libs/gpm/Manifest                              |  8 +++
 .../files/gpm-1.20.7-musl-missing-headers.patch    | 33 +++++++++
 .../files/gpm-1.20.7-musl-portable-sigaction.patch | 16 +++++
 sys-libs/gpm/files/gpm.conf.d                      | 23 +++++++
 sys-libs/gpm/files/gpm.rc6-2                       | 29 ++++++++
 sys-libs/gpm/files/gpm.service                     | 12 ++++
 sys-libs/gpm/gpm-1.20.7-r99.ebuild                 | 80 ++++++++++++++++++++++
 sys-libs/gpm/metadata.xml                          |  5 ++
 8 files changed, 206 insertions(+)

diff --git a/sys-libs/gpm/Manifest b/sys-libs/gpm/Manifest
new file mode 100644
index 0000000..b04e267
--- /dev/null
+++ b/sys-libs/gpm/Manifest
@@ -0,0 +1,8 @@
+AUX gpm-1.20.7-musl-missing-headers.patch 1811 SHA256 
1c2d857c003d280f9158ec430911f19a636fe0c8799348f59c76b8ed4a056389 SHA512 
547baf4b3c5ac8912b27c4f6e1475d23f1b0dc0e89b8490b451e98c7f0aba6a466574399477aa0e48059662ccfdcebd2d84aa093b45f00148d8638473c24718c
 WHIRLPOOL 
36884880df2fa3db7001972f8b2ac115c92c8cfecac2e8fb69c8a7790ba9618b48232b17bf85ff9655921ad38f7ac4d10ba834d702f6e7731cd4d77b67546dac
+AUX gpm-1.20.7-musl-portable-sigaction.patch 649 SHA256 
c129eebf3a6c21902e28262ef49dcad8606fcd953068c8c84dbe1fc940058e6d SHA512 
04573f095be09592de9d61d32149878f93d53c8f0d54c47ad869aa2307caabcf473abf17448ae340a9ee548cdceafe2caf2f18d1989db9f31ebef44bea31697e
 WHIRLPOOL 
d7070c12b871e653f1b174449c92891c4550c3210b91633779fd8d0637dd998cf55c2c6c87ea2a68cfa2f3044ac5eff134f50e1f0f024931b52d1041910156b9
+AUX gpm.conf.d 580 SHA256 
73e7483fdc4b12ab4225a4cb13bbe7da71b07b9e69b17e3a6a4c63cb5e2287c8 SHA512 
14a4306a7454d1a12fda29973b51aadd6d1a5cf4833b1be5298cfe0c1ebc63a479cc79490007ae92c6ae24368e19215dfc4bd50ef5b0cfa0fef88cf69db67065
 WHIRLPOOL 
61039423b5749f65505db3d0c3355599f5776b8807b7e79720d9498916f1dc1312070209ec470375d0bcb9a36919ad0dbde1f5c6a283454c7ea9be3cc3e33c43
+AUX gpm.rc6-2 655 SHA256 
e692e7b97efdd79f6e92fbdaed60f7a71bfd23a82c5561b160b88a7aa50c8461 SHA512 
a3d0725c67cb8c6bbf2068e0088e74cadf25baec96cabd65641537142ab2cebc7c32e2132e3a2efc28db67f46499da6be7c85b420cb8e877470927b7b138b98c
 WHIRLPOOL 
216a6c87f2b5b8701ccd0caab5308aa270a369feb0de75c01f27473727b6487e1712cf37191fc70c9cbc8c6b7d90840b58d8ca0f7502d2a8e6a1bfd0fcadb8c9
+AUX gpm.service 222 SHA256 
85f7d7144de8b2b941ba118ff1e6c0579ed825bbb34b576814b05cc45c5a067d SHA512 
d710169f06a17aa372e88952bc67d1fb91c795349e9edc37f9c0bebf3bbd6502646ac9aac12ccbb5630b1b39143976e0780b9c7325d3610c3ac1683ffda7f05b
 WHIRLPOOL 
6a7df1311c6f742168bd6aca9ec3c2def2f9755c9fa9f24b60e22a158f366636cefa2d430c5ee30d05dfccd2a576d981c32134052d207608dcf8fa0a8b292b0a
+DIST gpm-1.20.7.tar.lzma 789691 SHA256 
a955053b36556ffa7c628ce18fd6de7d625966573fa412fb08869533d8f7385c SHA512 
a502741e2f457b47e41c6d155b1f7ef7c95384fd394503f82ddacf80cde9cdc286c906c77be12b6af8565ef1c3ab24d226379c1dcebcfcd15d64bcf3e94b63b9
 WHIRLPOOL 
d3d142c3aa385e2ef4b16c96e0f94c04b3666376d893c516d439737c2f3016a12fff7884a8f18b5e6b58e4ba21d82379204b18621a2f338d8ab6d478e4e1ec1a
+EBUILD gpm-1.20.7-r99.ebuild 2027 SHA256 
01e11464fc315e51d7ee578ab2b7d14b04b161a2b4c5430f18d37468f8e0e8b4 SHA512 
0558feee6a81dfa74ee25cbd58e4e86f7b1003236d7062a80d42ad39fd1afce7dcd003cccfa36240704358b675fcd3523a406b9f1409a48828b8e7014b83a368
 WHIRLPOOL 
8152fd624242529629572db1e3076d05650593fe263cb7aa51ff99d1acfc1b07c8ee772818ee06b6de15169422e21e941afd18f831912f6a230cbfb9a37f74e5
+MISC metadata.xml 164 SHA256 
f5f2891f2a4791cd31350bb2bb572131ad7235cd0eeb124c9912c187ac10ce92 SHA512 
8eb0d5153d388f6ea069c64b93882244816a0a09aecc0d73cb872121ce0eb24c5ccafa96aad0b620b2300f319e1af101fa7fa6c5d0d561719d49bb07da0a2eca
 WHIRLPOOL 
11a1441bddb7a6c69653c663902b7da5767ae6ad515ac2aabfc42fe37927a1ccc21472deeee454009ff720201a41c3e4a912df42661a0a87150fb46126da2d52

diff --git a/sys-libs/gpm/files/gpm-1.20.7-musl-missing-headers.patch 
b/sys-libs/gpm/files/gpm-1.20.7-musl-missing-headers.patch
new file mode 100644
index 0000000..c981658
--- /dev/null
+++ b/sys-libs/gpm/files/gpm-1.20.7-musl-missing-headers.patch
@@ -0,0 +1,33 @@
+diff -Naur gpm-1.20.7.orig/src/daemon/open_console.c 
gpm-1.20.7/src/daemon/open_console.c
+--- gpm-1.20.7.orig/src/daemon/open_console.c  2012-10-26 21:21:38.000000000 
+0000
++++ gpm-1.20.7/src/daemon/open_console.c       2015-07-20 19:31:22.225131984 
+0000
+@@ -22,6 +22,7 @@
+ #include <fcntl.h>                  /* open and co.      */
+ #include <sys/stat.h>               /* stat()            */
+ #include <sys/ioctl.h>              /* ioctl             */
++#include <sys/sysmacros.h>          /* major             */
+ 
+ /* Linux specific (to be outsourced in gpm2 */
+ #include <linux/serial.h>           /* for serial console check */
+diff -Naur gpm-1.20.7.orig/src/prog/display-buttons.c 
gpm-1.20.7/src/prog/display-buttons.c
+--- gpm-1.20.7.orig/src/prog/display-buttons.c 2012-10-26 21:21:38.000000000 
+0000
++++ gpm-1.20.7/src/prog/display-buttons.c      2015-07-20 19:27:48.489140025 
+0000
+@@ -36,6 +36,7 @@
+ #include <stdio.h>            /* printf()             */
+ #include <time.h>             /* time()               */
+ #include <errno.h>            /* errno                */
++#include <sys/select.h>       /* fd_set, select, FD_* */
+ #include <gpm.h>              /* gpm information      */
+ 
+ /* display resulting data */
+diff -Naur gpm-1.20.7.orig/src/prog/display-coords.c 
gpm-1.20.7/src/prog/display-coords.c
+--- gpm-1.20.7.orig/src/prog/display-coords.c  2012-10-26 21:21:38.000000000 
+0000
++++ gpm-1.20.7/src/prog/display-coords.c       2015-07-20 19:28:45.829137867 
+0000
+@@ -37,6 +37,7 @@
+ #include <stdio.h>            /* printf()             */
+ #include <time.h>             /* time()               */
+ #include <errno.h>            /* errno                */
++#include <sys/select.h>       /* fd_set, select, FD_* */
+ #include <gpm.h>              /* gpm information      */
+ 
+ /* display resulting data */

diff --git a/sys-libs/gpm/files/gpm-1.20.7-musl-portable-sigaction.patch 
b/sys-libs/gpm/files/gpm-1.20.7-musl-portable-sigaction.patch
new file mode 100644
index 0000000..270109e
--- /dev/null
+++ b/sys-libs/gpm/files/gpm-1.20.7-musl-portable-sigaction.patch
@@ -0,0 +1,16 @@
+diff -Naur gpm-1.20.7.orig/src/prog/gpm-root.y gpm-1.20.7/src/prog/gpm-root.y
+--- gpm-1.20.7.orig/src/prog/gpm-root.y        2012-10-26 21:21:38.000000000 
+0000
++++ gpm-1.20.7/src/prog/gpm-root.y     2015-07-20 19:37:50.489117377 +0000
+@@ -1199,8 +1199,11 @@
+ #if defined(__GLIBC__)
+    __sigemptyset(&childaction.sa_mask);
+ #else /* __GLIBC__ */
+-   childaction.sa_mask=0;
++   sigemptyset(&childaction.sa_mask);
+ #endif /* __GLIBC__ */
++#ifndef SA_INTERRUPT
++# define SA_INTERRUPT 0x20000000 /* from GLIBC's <bits/sigaction.h> */
++#endif
+    childaction.sa_flags=SA_INTERRUPT; /* need to break the select() call */
+    sigaction(SIGCHLD,&childaction,NULL);
+ 

diff --git a/sys-libs/gpm/files/gpm.conf.d b/sys-libs/gpm/files/gpm.conf.d
new file mode 100644
index 0000000..f21c257
--- /dev/null
+++ b/sys-libs/gpm/files/gpm.conf.d
@@ -0,0 +1,23 @@
+# /etc/init.d/gpm
+
+# Please uncomment the type of mouse you have and the appropriate MOUSEDEV 
entry
+
+MOUSE=ps2
+#MOUSE=imps2
+#MOUSEDEV=/dev/psaux
+MOUSEDEV=/dev/input/mice
+
+# Extra settings
+
+#RESPONSIVENESS=
+#REPEAT_TYPE=raw
+
+# Please uncomment this line if you want gpm to understand charsets used
+# in URLs and names with ~ or : in them, etc. This is a good idea to turn on!
+
+#APPEND="-l \"a-zA-Z0-9_.:~/\300-\326\330-\366\370-\377\""
+
+# Various other options, see gpm(8) manpage for more.
+
+#APPEND="-g 1 -A60"
+#APPEND="-l \"a-zA-Z0-9_.:~/\300-\326\330-\366\370-\377\" -g 1 -A60"

diff --git a/sys-libs/gpm/files/gpm.rc6-2 b/sys-libs/gpm/files/gpm.rc6-2
new file mode 100644
index 0000000..1e0aaf3
--- /dev/null
+++ b/sys-libs/gpm/files/gpm.rc6-2
@@ -0,0 +1,29 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/gpm/files/gpm.rc6-2,v 1.2 
2012/10/28 11:35:56 vapier Exp $
+
+#NB: Config is in /etc/conf.d/gpm
+
+command=/usr/sbin/gpm
+command_args="
+       -m ${MOUSEDEV}
+       -t ${MOUSE}
+       ${RESPONSIVENESS:+ -r ${RESPONSIVENESS}}
+       ${REPEAT_TYPE:+ -R${REPEAT_TYPE}}
+       ${APPEND}
+"
+
+pidfile=/var/run/gpm.pid
+
+depend() {
+       need localmount
+       use hotplug logger
+}
+
+start_pre() {
+       if [ -z "${MOUSEDEV}" ] || [ -z "${MOUSE}" ] ; then
+               eerror "You need to setup MOUSEDEV and MOUSE in /etc/conf.d/gpm 
first"
+               return 1
+       fi
+}

diff --git a/sys-libs/gpm/files/gpm.service b/sys-libs/gpm/files/gpm.service
new file mode 100644
index 0000000..966ad80
--- /dev/null
+++ b/sys-libs/gpm/files/gpm.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Console Mouse manager
+After=syslog.target
+
+[Service]
+ExecStart=/usr/sbin/gpm -m /dev/input/mice -t exps2
+StandardOutput=syslog
+Type=forking
+PIDFile=/var/run/gpm.pid
+
+[Install]
+WantedBy=multi-user.target

diff --git a/sys-libs/gpm/gpm-1.20.7-r99.ebuild 
b/sys-libs/gpm/gpm-1.20.7-r99.ebuild
new file mode 100644
index 0000000..88bc0eb
--- /dev/null
+++ b/sys-libs/gpm/gpm-1.20.7-r99.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/gpm/gpm-1.20.7-r2.ebuild,v 1.9 
2014/12/10 23:51:13 zmedico Exp $
+
+# emacs support disabled due to #99533 #335900
+
+EAPI="4"
+
+inherit eutils systemd toolchain-funcs autotools multilib-minimal
+
+DESCRIPTION="Console-based mouse driver"
+HOMEPAGE="http://www.nico.schottelius.org/software/gpm/";
+SRC_URI="http://www.nico.schottelius.org/software/${PN}/archives/${P}.tar.lzma";
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm ~mips ppc x86"
+IUSE="selinux static-libs"
+
+RDEPEND=">=sys-libs/ncurses-5.9-r3[${MULTILIB_USEDEP}]
+       selinux? ( sec-policy/selinux-gpm )
+       abi_x86_32? (
+               !<=app-emulation/emul-linux-x86-baselibs-20130224-r12
+               !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+       )"
+DEPEND=">=sys-libs/ncurses-5.9-r3[${MULTILIB_USEDEP}]
+       app-arch/xz-utils
+       sys-apps/texinfo
+       virtual/yacc"
+
+src_prepare() {
+       # fix ABI values
+       sed -i \
+               -e '/^abi_lev=/s:=.*:=1:' \
+               -e '/^abi_age=/s:=.*:=20:' \
+               configure.ac.footer || die
+       sed -i -e '/ACLOCAL/,$d' autogen.sh || die
+       epatch "${FILESDIR}"/${P}-musl-missing-headers.patch
+       epatch "${FILESDIR}"/${P}-musl-portable-sigaction.patch
+
+       ./autogen.sh
+       eautoreconf
+       multilib_copy_sources
+}
+
+multilib_src_configure() {
+       econf \
+               --sysconfdir=/etc/gpm \
+               $(use_enable static-libs static) \
+               emacs=/bin/false
+}
+
+multilib_src_compile() {
+       # make sure nothing compiled is left
+       emake clean
+       emake EMACS=: $(multilib_is_native_abi || echo "PROG= ")
+}
+
+multilib_src_install() {
+       emake \
+               DESTDIR="${D}" \
+               EMACS=: ELISP="" \
+               $(multilib_is_native_abi || echo "PROG= ") \
+               install
+
+       dosym libgpm.so.1 /usr/$(get_libdir)/libgpm.so
+       multilib_is_native_abi && gen_usr_ldscript -a gpm
+}
+
+multilib_src_install_all() {
+       insinto /etc/gpm
+       doins conf/gpm-*.conf
+
+       dodoc README TODO
+       dodoc doc/Announce doc/FAQ doc/README*
+
+       newinitd "${FILESDIR}"/gpm.rc6-2 gpm
+       newconfd "${FILESDIR}"/gpm.conf.d gpm
+       systemd_dounit "${FILESDIR}"/gpm.service
+}

diff --git a/sys-libs/gpm/metadata.xml b/sys-libs/gpm/metadata.xml
new file mode 100644
index 0000000..96a2d58
--- /dev/null
+++ b/sys-libs/gpm/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+<herd>base-system</herd>
+</pkgmetadata>

Reply via email to