pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/p5-IO-KQueue Rely on PKG_HAVE_KQUEUE to tell ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8fdecc4896b6
branches:  trunk
changeset: 365037:8fdecc4896b6
user:      schmonz <schmonz%pkgsrc.org@localhost>
date:      Sun Jul 09 17:17:06 2017 +0000

description:
Rely on PKG_HAVE_KQUEUE to tell us whether the OS supports kqueue(2).
Fixes build on Darwin 10.12.5 (and probably Bitrig and MirBSD, which had
been excluded from ONLY_FOR_PLATFORM).

diffstat:

 sysutils/p5-IO-KQueue/Makefile                  |   8 +++-
 sysutils/p5-IO-KQueue/distinfo                  |   3 +-
 sysutils/p5-IO-KQueue/patches/patch-Makefile.PL |  40 +++++++++++++++++++++++++
 3 files changed, 48 insertions(+), 3 deletions(-)

diffs (78 lines):

diff -r 4fae7455a306 -r 8fdecc4896b6 sysutils/p5-IO-KQueue/Makefile
--- a/sysutils/p5-IO-KQueue/Makefile    Sun Jul 09 17:03:12 2017 +0000
+++ b/sysutils/p5-IO-KQueue/Makefile    Sun Jul 09 17:17:06 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2017/06/05 14:24:36 ryoon Exp $
+# $NetBSD: Makefile,v 1.12 2017/07/09 17:17:06 schmonz Exp $
 
 DISTNAME=      IO-KQueue-0.34
 PKGNAME=       p5-${DISTNAME}
@@ -13,7 +13,11 @@
 
 BUILD_DEPENDS+=        p5-perl-headers-[0-9]*:../../devel/p5-perl-headers
 
-ONLY_FOR_PLATFORM=     FreeBSD-*-* NetBSD-*-* OpenBSD-*-* DragonFly-*-* Darwin-*-*
+.include "../../mk/bsd.prefs.mk"
+
+.if !defined(PKG_HAVE_KQUEUE)
+PKG_FAIL_REASON+=      "Requires kqueue(2)"
+.endif
 
 PERL5_PACKLIST=                auto/IO/KQueue/.packlist
 
diff -r 4fae7455a306 -r 8fdecc4896b6 sysutils/p5-IO-KQueue/distinfo
--- a/sysutils/p5-IO-KQueue/distinfo    Sun Jul 09 17:03:12 2017 +0000
+++ b/sysutils/p5-IO-KQueue/distinfo    Sun Jul 09 17:17:06 2017 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.2 2015/11/04 01:32:24 agc Exp $
+$NetBSD: distinfo,v 1.3 2017/07/09 17:17:06 schmonz Exp $
 
 SHA1 (IO-KQueue-0.34.tar.gz) = 8a006a1f43412569a38912c177aff483f9719d59
 RMD160 (IO-KQueue-0.34.tar.gz) = c3110d99a29057e33d341b0c532c4331ee52ffe2
 SHA512 (IO-KQueue-0.34.tar.gz) = 55833358bed2398d598bbe21204704e51c37afe12f0f6019979137228b75065757c8c71bca957a21fdf6388c15058713437b2ccec1237013e00d368a5f20c132
 Size (IO-KQueue-0.34.tar.gz) = 8532 bytes
+SHA1 (patch-Makefile.PL) = c4c652acfe5f7ceca99aedb03053f5cd15729b3a
diff -r 4fae7455a306 -r 8fdecc4896b6 sysutils/p5-IO-KQueue/patches/patch-Makefile.PL
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/p5-IO-KQueue/patches/patch-Makefile.PL   Sun Jul 09 17:17:06 2017 +0000
@@ -0,0 +1,40 @@
+$NetBSD: patch-Makefile.PL,v 1.1 2017/07/09 17:17:06 schmonz Exp $
+
+This check fails on OS X, but the code otherwise builds and passes
+its tests. Let pkgsrc decide whether the OS has kqueue(2).
+
+--- Makefile.PL.orig   2005-02-17 22:15:36.000000000 +0000
++++ Makefile.PL
+@@ -3,19 +3,19 @@
+ use strict;
+ use ExtUtils::MakeMaker;
+ 
+-eval { require 'syscall.ph'; 1 } || eval { require 'sys/syscall.ph'; 1 };
+-
+-my $SYS_kqueue = eval { &::SYS_kqueue } || 362;
+-
+-my $kq = eval { syscall($SYS_kqueue) };
+-
+-if ($@) {
+-    print <<EOT;
+-No kqueue() available on this platform.
+-
+-EOT
+-    exit;
+-}
++#eval { require 'syscall.ph'; 1 } || eval { require 'sys/syscall.ph'; 1 };
++#
++#my $SYS_kqueue = eval { &::SYS_kqueue } || 362;
++#
++#my $kq = eval { syscall($SYS_kqueue) };
++#
++#if ($@) {
++#    print <<EOT;
++#No kqueue() available on this platform.
++#
++#EOT
++#    exit;
++#}
+ 
+ WriteMakefile(
+     VERSION_FROM   => 'KQueue.pm',



Home | Main Index | Thread Index | Old Index