xplugd: Import xplugd-1.4 as wip/xplugd
xplugd is a UNIX daemon that executes a script on X input and RandR changes, i.e., when a, keyboard, mouse. or a monitor is plugged in or unplugged. Useful in combination with lightweight setups, e.g. when running an X window manager like Awesome, Fluxbox, or similar to detect when docking or undocking a laptop.
This commit is contained in:
parent
b3453ef5b2
commit
e252966235
1
Makefile
1
Makefile
|
@ -5288,6 +5288,7 @@ SUBDIR+= xpi-quick_locale_switcher
|
|||
SUBDIR+= xpilot-ng
|
||||
SUBDIR+= xpipe
|
||||
SUBDIR+= xplore
|
||||
SUBDIR+= xplugd
|
||||
SUBDIR+= xrdp
|
||||
SUBDIR+= xspd
|
||||
SUBDIR+= xspdapp
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
xplugd is a UNIX daemon that executes a script on X input and RandR
|
||||
changes, i.e., when a, keyboard, mouse. or a monitor is plugged in or
|
||||
unplugged. Useful in combination with lightweight setups, e.g. when
|
||||
running an X window manager like Awesome, Fluxbox, or similar to detect
|
||||
when docking or undocking a laptop.
|
|
@ -0,0 +1,27 @@
|
|||
# $NetBSD$
|
||||
|
||||
DISTNAME= xplugd-1.4
|
||||
CATEGORIES= x11
|
||||
MASTER_SITES= ${MASTER_SITE_GITHUB:=troglobit/}
|
||||
GITHUB_TAG= v${PKGVERSION_NOREV}
|
||||
|
||||
MAINTAINER= pkgsrc-users@NetBSD.org
|
||||
HOMEPAGE= https://github.com/troglobit/xplugd/
|
||||
COMMENT= Monitor, keyboard, and mouse plug/unplug helper for X
|
||||
LICENSE= mit
|
||||
|
||||
GNU_CONFIGURE= yes
|
||||
USE_TOOLS+= aclocal autoconf automake pkg-config
|
||||
|
||||
USE_LANGUAGES= c99
|
||||
|
||||
# FIXME: should be properly fixed via configure/Makefile
|
||||
CFLAGS.NetBSD+= -D_NETBSD_SOURCE # for alloca and daemon
|
||||
|
||||
pre-configure:
|
||||
cd ${WRKSRC} && ./autogen.sh
|
||||
|
||||
.include "../../x11/libX11/buildlink3.mk"
|
||||
.include "../../x11/libXi/buildlink3.mk"
|
||||
.include "../../x11/libXrandr/buildlink3.mk"
|
||||
.include "../../mk/bsd.pkg.mk"
|
|
@ -0,0 +1,6 @@
|
|||
@comment $NetBSD$
|
||||
bin/xplugd
|
||||
man/man1/xplugd.1
|
||||
share/doc/xplugd/LICENSE
|
||||
share/doc/xplugd/README.md
|
||||
share/doc/xplugd/xplugrc
|
|
@ -0,0 +1,8 @@
|
|||
$NetBSD$
|
||||
|
||||
SHA1 (xplugd-1.4.tar.gz) = 5711543c3eb76b3e79c9d7aa9680f04c969f7994
|
||||
RMD160 (xplugd-1.4.tar.gz) = 320ae608600d95df41a2fcd9ef0979ea71d900c6
|
||||
SHA512 (xplugd-1.4.tar.gz) = 1e4dcd28f260ba3bc33d6d2f044aceb614bf5298699467dc1f082224b8818c4059a9d8d97eb3b506adf3c77f92b173af4365259b44440c06bc4f0923445b2bbf
|
||||
Size (xplugd-1.4.tar.gz) = 18834 bytes
|
||||
SHA1 (patch-configure.ac) = fc11705f4458b6403ecea6aa132c65d342c28491
|
||||
SHA1 (patch-src_xplugd.c) = ac163552a2d0ab8ec63c6eaee0f8b19f6378ecca
|
|
@ -0,0 +1,15 @@
|
|||
$NetBSD$
|
||||
|
||||
Properly check for alloca(3).
|
||||
|
||||
--- configure.ac.orig 2020-07-08 09:02:10.000000000 +0000
|
||||
+++ configure.ac
|
||||
@@ -10,6 +10,8 @@ AC_PROG_CC
|
||||
AC_HEADER_STDC
|
||||
AC_PROG_INSTALL
|
||||
|
||||
+AC_FUNC_ALLOCA
|
||||
+
|
||||
# Check for required libraries
|
||||
AC_SEARCH_LIBS([pow], [m])
|
||||
PKG_CHECK_MODULES([X11], [x11])
|
|
@ -0,0 +1,25 @@
|
|||
$NetBSD$
|
||||
|
||||
Properly include alloca(3).
|
||||
|
||||
--- src/xplugd.c.orig 2020-07-08 09:02:10.000000000 +0000
|
||||
+++ src/xplugd.c
|
||||
@@ -23,7 +23,17 @@
|
||||
*/
|
||||
|
||||
#define SYSLOG_NAMES
|
||||
-#include <alloca.h>
|
||||
+#ifdef STDC_HEADERS
|
||||
+# include <stdlib.h>
|
||||
+# include <stddef.h>
|
||||
+#else
|
||||
+# ifdef HAVE_STDLIB_H
|
||||
+# include <stdlib.h>
|
||||
+# endif
|
||||
+#endif
|
||||
+#ifdef HAVE_ALLOCA_H
|
||||
+# include <alloca.h>
|
||||
+#endif
|
||||
#include <glob.h>
|
||||
#include "xplugd.h"
|
||||
|
Loading…
Reference in New Issue