pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
xidle: use libbsd on Linux to support strtonum()
Module Name: pkgsrc-wip
Committed By: Paolo Vincenzo Olivo <vms%retrobsd.ddns.net@localhost>
Pushed By: vms
Date: Mon Jul 18 10:17:20 2022 +0200
Changeset: fcd8e48e9fd9e23d1645a5de49a7123e6eda672e
Modified Files:
xidle/Makefile
xidle/distinfo
xidle/patches/patch-xidle.c
Log Message:
xidle: use libbsd on Linux to support strtonum()
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=fcd8e48e9fd9e23d1645a5de49a7123e6eda672e
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
xidle/Makefile | 7 +++++++
xidle/distinfo | 2 +-
xidle/patches/patch-xidle.c | 14 ++++++++++++--
3 files changed, 20 insertions(+), 3 deletions(-)
diffs:
diff --git a/xidle/Makefile b/xidle/Makefile
index f429d236a2..31f821b529 100644
--- a/xidle/Makefile
+++ b/xidle/Makefile
@@ -28,6 +28,13 @@ do-install:
${INSTALL_PROGRAM} ${WRKSRC}/xidle ${DESTDIR}${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/xidle.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "Linux" # strtonum()
+LDFLAGS+= -lbsd
+.include "../../devel/libbsd/buildlink3.mk"
+.endif
+
.include "../../x11/libXdmcp/buildlink3.mk"
.include "../../x11/libXScrnSaver/buildlink3.mk"
.include "../../x11/libXau/buildlink3.mk"
diff --git a/xidle/distinfo b/xidle/distinfo
index 6b45e30c4f..7471942f75 100644
--- a/xidle/distinfo
+++ b/xidle/distinfo
@@ -5,4 +5,4 @@ SHA512 (xidle-20220718/xidle-20220718.tar.xz) = f72fdc91a2c9173ca26291d46ed38576
Size (xidle-20220718/xidle-20220718.tar.xz) = 5640 bytes
SHA1 (patch-Makefile) = f93b2ffc31da13d143dd157d670e299f0568713a
SHA1 (patch-xidle.1) = dcb4906dd1ca4780925ffd96193afd3cdb3b6401
-SHA1 (patch-xidle.c) = bcdb287b5ea23407e916fe4b7b56c4a1da703d9d
+SHA1 (patch-xidle.c) = 02058baddefbad2ba42784eba6fce980a1020314
diff --git a/xidle/patches/patch-xidle.c b/xidle/patches/patch-xidle.c
index e09606a0c2..af7d0ad85e 100644
--- a/xidle/patches/patch-xidle.c
+++ b/xidle/patches/patch-xidle.c
@@ -5,10 +5,20 @@ Portability fixes:
- Define non-standard compiler attribute extension.
- Do not hard-code xlock path.
- Disable pledge.
+- Use libbsd on Linux.
--- xidle.c.orig 2022-07-18 06:17:31.000000000 +0000
+++ xidle.c
-@@ -45,9 +45,12 @@
+@@ -39,15 +39,21 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <unistd.h>
++#ifdef __linux__
++#include <bsd/stdlib.h>
++#endif
+
+ #ifndef CLASS_NAME
+ #define CLASS_NAME "XIdle"
#endif
#ifndef PATH_PROG
@@ -22,7 +32,7 @@ Portability fixes:
enum {
north = 0x01,
-@@ -354,9 +357,6 @@ main(int argc, char **argv)
+@@ -354,9 +360,6 @@ main(int argc, char **argv)
if (fd > 2)
close(fd);
Home |
Main Index |
Thread Index |
Old Index