From 2dff594dd5ced35ae9ea75ccb52175030ef4718f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Wed, 25 Jan 2017 15:00:54 +0100 Subject: [PATCH] xautlock: fix build --- .../xautolock/patches/fix-wait_status.patch | 14 ++++++++ srcpkgs/xautolock/patches/processwait.patch | 33 ------------------- srcpkgs/xautolock/template | 4 +-- 3 files changed, 16 insertions(+), 35 deletions(-) create mode 100644 srcpkgs/xautolock/patches/fix-wait_status.patch delete mode 100644 srcpkgs/xautolock/patches/processwait.patch diff --git a/srcpkgs/xautolock/patches/fix-wait_status.patch b/srcpkgs/xautolock/patches/fix-wait_status.patch new file mode 100644 index 00000000000..87fb606ae52 --- /dev/null +++ b/srcpkgs/xautolock/patches/fix-wait_status.patch @@ -0,0 +1,14 @@ +--- src/engine.c 2007-12-28 18:15:26.000000000 +0100 ++++ src/engine.c 2017-01-25 14:48:00.087399865 +0100 +@@ -210,11 +210,7 @@ + #else /* VMS */ + if (lockerPid) + { +-#if !defined (UTEKV) && !defined (SYSV) && !defined (SVR4) +- union wait status; /* childs process status */ +-#else /* !UTEKV && !SYSV && !SVR4 */ + int status = 0; /* childs process status */ +-#endif /* !UTEKV && !SYSV && !SVR4 */ + + if (unlockNow && !disabled) + { diff --git a/srcpkgs/xautolock/patches/processwait.patch b/srcpkgs/xautolock/patches/processwait.patch deleted file mode 100644 index 1856231820b..00000000000 --- a/srcpkgs/xautolock/patches/processwait.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- src/engine.c.orig 2014-08-28 12:50:56.086307943 +0000 -+++ src/engine.c 2014-08-28 12:50:59.496333650 +0000 -@@ -209,24 +209,24 @@ evaluateTriggers (Display* d) - { - #else /* VMS */ - if (lockerPid) - { --#if !defined (UTEKV) && !defined (SYSV) && !defined (SVR4) -+#if (!defined (UTEKV) && !defined (SYSV) && !defined (SVR4)) && defined (__GLIBC__) - union wait status; /* childs process status */ --#else /* !UTEKV && !SYSV && !SVR4 */ -+#else /* (!UTEKV && !SYSV && !SVR4) && __GLIBC__ */ - int status = 0; /* childs process status */ --#endif /* !UTEKV && !SYSV && !SVR4 */ -+#endif /* (!UTEKV && !SYSV && !SVR4) && __GLIBC__ */ - - if (unlockNow && !disabled) - { - (void) kill (lockerPid, SIGTERM); - } - --#if !defined (UTEKV) && !defined (SYSV) && !defined (SVR4) -+#if (!defined (UTEKV) && !defined (SYSV) && !defined (SVR4)) && defined (__GLIBC__) - if (wait3 (&status, WNOHANG, 0)) --#else /* !UTEKV && !SYSV && !SVR4 */ -+#else /* (!UTEKV && !SYSV && !SVR4) && __GLIBC__ */ - if (waitpid (-1, &status, WNOHANG)) --#endif /* !UTEKV && !SYSV && !SVR4 */ -+#endif /* (!UTEKV && !SYSV && !SVR4) && __GLIBC__ */ - { - /* - * If the locker exited normally, we disable any pending kill - * trigger. Otherwise, we assume that it either has crashed or diff --git a/srcpkgs/xautolock/template b/srcpkgs/xautolock/template index 43c38bee763..b18127cd55a 100644 --- a/srcpkgs/xautolock/template +++ b/srcpkgs/xautolock/template @@ -1,7 +1,7 @@ # Template file for 'xautolock' pkgname=xautolock version=2.2 -revision=3 +revision=4 hostmakedepends="imake xorg-cf-files" makedepends="libXScrnSaver-devel xproto" short_desc="Autolock utility for X" @@ -12,7 +12,7 @@ distfiles="${homepage}/${pkgname}-${version}.tgz" checksum=11f0275175634e6db756e96f5713ec91b8b1c41f8663df54e8a5d27dc71c4da2 do_build() { - xmkmf + CC=cc xmkmf make CC=$CC CDEBUGFLAGS="-D_DEFAULT_SOURCE ${CFLAGS}" EXTRA_LDOPTIONS="${LDFLAGS}" } do_install() {