pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/devel/hs-fsnotify devel/hs-fsnotify: Use hinotify on L...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/0c8c5d252fc3
branches:  trunk
changeset: 374775:0c8c5d252fc3
user:      pho <pho%pkgsrc.org@localhost>
date:      Sat Feb 26 12:33:45 2022 +0000

description:
devel/hs-fsnotify: Use hinotify on Linux and some BSDs

On any other platforms it falls back to the polling method as the last
resort, which is obviously isn't very practical.

diffstat:

 devel/hs-fsnotify/Makefile                     |  16 +++++++----
 devel/hs-fsnotify/PLIST                        |  35 --------------------------
 devel/hs-fsnotify/PLIST.common                 |  35 ++++++++++++++++++++++++++
 devel/hs-fsnotify/PLIST.inotify                |   4 ++
 devel/hs-fsnotify/buildlink3.mk                |  10 +++++-
 devel/hs-fsnotify/distinfo                     |   3 +-
 devel/hs-fsnotify/patches/patch-fsnotify.cabal |  16 +++++++++++
 7 files changed, 75 insertions(+), 44 deletions(-)

diffs (176 lines):

diff -r 8e9ec845fe65 -r 0c8c5d252fc3 devel/hs-fsnotify/Makefile
--- a/devel/hs-fsnotify/Makefile        Sat Feb 26 12:30:18 2022 +0000
+++ b/devel/hs-fsnotify/Makefile        Sat Feb 26 12:33:45 2022 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.5 2022/02/26 03:57:54 pho Exp $
+# $NetBSD: Makefile,v 1.6 2022/02/26 12:33:45 pho Exp $
 
 DISTNAME=      fsnotify-0.3.0.1
-PKGREVISION=   4
+PKGREVISION=   5
 CATEGORIES=    devel
 
 MAINTAINER=    pho%cielonegro.org@localhost
@@ -11,11 +11,15 @@
 # On these platforms fsnotify depends on additional packages which
 # haven't been packaged yet.
 BROKEN_ON_PLATFORM+=   Darwin-*-*
-BROKEN_ON_PLATFORM+=   Linux-*-*
+
+PLIST_SRC+=    PLIST.common
 
-# TODO: On *BSD this package falls back on an inefficient polling
-# backend as the last resort. We should consider implementing kqueue
-# backend and contributing it to the upstream.
+.include "../../mk/bsd.fast.prefs.mk"
+.if ${OPSYS} == "Linux" || !empty(OPSYS:M*BSD)
+.  include "../../devel/hs-hinotify/buildlink3.mk"
+.  include "../../devel/hs-shelly/buildlink3.mk"
+PLIST_SRC+=    PLIST.inotify
+.endif
 
 .include "../../devel/hs-async/buildlink3.mk"
 .include "../../devel/hs-unix-compat/buildlink3.mk"
diff -r 8e9ec845fe65 -r 0c8c5d252fc3 devel/hs-fsnotify/PLIST
--- a/devel/hs-fsnotify/PLIST   Sat Feb 26 12:30:18 2022 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-@comment $NetBSD: PLIST,v 1.2 2021/04/23 13:07:39 pho Exp $
-lib/fsnotify-${PKGVERSION}/${HS_VERSION}/package-description
-lib/fsnotify-${PKGVERSION}/${HS_VERSION}/package-id
-lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify.dyn_hi
-lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify.hi
-lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify.p_hi
-lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Devel.dyn_hi
-lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Devel.hi
-lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Devel.p_hi
-lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Listener.dyn_hi
-lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Listener.hi
-lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Listener.p_hi
-lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Path.dyn_hi
-lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Path.hi
-lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Path.p_hi
-lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Polling.dyn_hi
-lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Polling.hi
-lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Polling.p_hi
-lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Types.dyn_hi
-lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Types.hi
-lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Types.p_hi
-lib/${HS_PLATFORM}/${HS_PKGID}/libHS${HS_PKGID}.a
-lib/${HS_PLATFORM}/${HS_PKGID}/libHS${HS_PKGID}_p.a
-lib/${HS_PLATFORM}/libHS${HS_PKGID}-${HS_VER}.so
-share/doc/${HS_PLATFORM}/fsnotify-${PKGVERSION}/LICENSE
-share/doc/${HS_PLATFORM}/fsnotify-${PKGVERSION}/html/System-FSNotify-Devel.html
-share/doc/${HS_PLATFORM}/fsnotify-${PKGVERSION}/html/System-FSNotify.html
-share/doc/${HS_PLATFORM}/fsnotify-${PKGVERSION}/html/doc-index.html
-share/doc/${HS_PLATFORM}/fsnotify-${PKGVERSION}/html/fsnotify.haddock
-share/doc/${HS_PLATFORM}/fsnotify-${PKGVERSION}/html/haddock-bundle.min.js
-share/doc/${HS_PLATFORM}/fsnotify-${PKGVERSION}/html/index.html
-share/doc/${HS_PLATFORM}/fsnotify-${PKGVERSION}/html/linuwial.css
-share/doc/${HS_PLATFORM}/fsnotify-${PKGVERSION}/html/meta.json
-share/doc/${HS_PLATFORM}/fsnotify-${PKGVERSION}/html/quick-jump.css
-share/doc/${HS_PLATFORM}/fsnotify-${PKGVERSION}/html/synopsis.png
diff -r 8e9ec845fe65 -r 0c8c5d252fc3 devel/hs-fsnotify/PLIST.common
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/hs-fsnotify/PLIST.common    Sat Feb 26 12:33:45 2022 +0000
@@ -0,0 +1,35 @@
+@comment $NetBSD: PLIST.common,v 1.1 2022/02/26 12:33:45 pho Exp $
+lib/fsnotify-${PKGVERSION}/${HS_VERSION}/package-description
+lib/fsnotify-${PKGVERSION}/${HS_VERSION}/package-id
+lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify.dyn_hi
+lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify.hi
+lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify.p_hi
+lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Devel.dyn_hi
+lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Devel.hi
+lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Devel.p_hi
+lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Listener.dyn_hi
+lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Listener.hi
+lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Listener.p_hi
+lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Path.dyn_hi
+lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Path.hi
+lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Path.p_hi
+lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Polling.dyn_hi
+lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Polling.hi
+lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Polling.p_hi
+lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Types.dyn_hi
+lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Types.hi
+lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Types.p_hi
+lib/${HS_PLATFORM}/${HS_PKGID}/libHS${HS_PKGID}.a
+lib/${HS_PLATFORM}/${HS_PKGID}/libHS${HS_PKGID}_p.a
+lib/${HS_PLATFORM}/libHS${HS_PKGID}-${HS_VER}.so
+share/doc/${HS_PLATFORM}/fsnotify-${PKGVERSION}/LICENSE
+share/doc/${HS_PLATFORM}/fsnotify-${PKGVERSION}/html/System-FSNotify-Devel.html
+share/doc/${HS_PLATFORM}/fsnotify-${PKGVERSION}/html/System-FSNotify.html
+share/doc/${HS_PLATFORM}/fsnotify-${PKGVERSION}/html/doc-index.html
+share/doc/${HS_PLATFORM}/fsnotify-${PKGVERSION}/html/fsnotify.haddock
+share/doc/${HS_PLATFORM}/fsnotify-${PKGVERSION}/html/haddock-bundle.min.js
+share/doc/${HS_PLATFORM}/fsnotify-${PKGVERSION}/html/index.html
+share/doc/${HS_PLATFORM}/fsnotify-${PKGVERSION}/html/linuwial.css
+share/doc/${HS_PLATFORM}/fsnotify-${PKGVERSION}/html/meta.json
+share/doc/${HS_PLATFORM}/fsnotify-${PKGVERSION}/html/quick-jump.css
+share/doc/${HS_PLATFORM}/fsnotify-${PKGVERSION}/html/synopsis.png
diff -r 8e9ec845fe65 -r 0c8c5d252fc3 devel/hs-fsnotify/PLIST.inotify
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/hs-fsnotify/PLIST.inotify   Sat Feb 26 12:33:45 2022 +0000
@@ -0,0 +1,4 @@
+@comment $NetBSD: PLIST.inotify,v 1.1 2022/02/26 12:33:45 pho Exp $
+lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Linux.dyn_hi
+lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Linux.hi
+lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Linux.p_hi
diff -r 8e9ec845fe65 -r 0c8c5d252fc3 devel/hs-fsnotify/buildlink3.mk
--- a/devel/hs-fsnotify/buildlink3.mk   Sat Feb 26 12:30:18 2022 +0000
+++ b/devel/hs-fsnotify/buildlink3.mk   Sat Feb 26 12:33:45 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.5 2022/02/26 03:57:54 pho Exp $
+# $NetBSD: buildlink3.mk,v 1.6 2022/02/26 12:33:45 pho Exp $
 
 BUILDLINK_TREE+=       hs-fsnotify
 
@@ -6,9 +6,15 @@
 HS_FSNOTIFY_BUILDLINK3_MK:=
 
 BUILDLINK_API_DEPENDS.hs-fsnotify+=    hs-fsnotify>=0.3.0
-BUILDLINK_ABI_DEPENDS.hs-fsnotify+=    hs-fsnotify>=0.3.0.1nb4
+BUILDLINK_ABI_DEPENDS.hs-fsnotify+=    hs-fsnotify>=0.3.0.1nb5
 BUILDLINK_PKGSRCDIR.hs-fsnotify?=      ../../devel/hs-fsnotify
 
+.include "../../mk/bsd.fast.prefs.mk"
+.if ${OPSYS} == "Linux" || !empty(OPSYS:M*BSD)
+.  include "../../devel/hs-hinotify/buildlink3.mk"
+.  include "../../devel/hs-shelly/buildlink3.mk"
+.endif
+
 .include "../../devel/hs-async/buildlink3.mk"
 .include "../../devel/hs-unix-compat/buildlink3.mk"
 .endif # HS_FSNOTIFY_BUILDLINK3_MK
diff -r 8e9ec845fe65 -r 0c8c5d252fc3 devel/hs-fsnotify/distinfo
--- a/devel/hs-fsnotify/distinfo        Sat Feb 26 12:30:18 2022 +0000
+++ b/devel/hs-fsnotify/distinfo        Sat Feb 26 12:33:45 2022 +0000
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.3 2021/10/26 10:14:56 nia Exp $
+$NetBSD: distinfo,v 1.4 2022/02/26 12:33:45 pho Exp $
 
 BLAKE2s (fsnotify-0.3.0.1.tar.gz) = 3a3d44c278c0deae26d2216fb2978dad5a3b0ecff915a26fad9dfe302b269827
 SHA512 (fsnotify-0.3.0.1.tar.gz) = d5c96a54c1b4788e1d50f259d11d4e2d6eb7224552b50cb359a1f4cdcc2a9b7270f9b5ccdfe9738a163b54ab7ab5a0114de9cabc56660a7324cdfc4b16179e1a
 Size (fsnotify-0.3.0.1.tar.gz) = 20638 bytes
+SHA1 (patch-fsnotify.cabal) = c7e5c32063476540253c1b660316fb9ff74eae91
diff -r 8e9ec845fe65 -r 0c8c5d252fc3 devel/hs-fsnotify/patches/patch-fsnotify.cabal
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/hs-fsnotify/patches/patch-fsnotify.cabal    Sat Feb 26 12:33:45 2022 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-fsnotify.cabal,v 1.1 2022/02/26 12:33:45 pho Exp $
+
+Use hinotify on some BSDs. Not upstreamed yet; can only be upstreamed after
+../../devel/hs-hinotify/patches/patch-hinotify.cabal gets merged.
+
+--- fsnotify.cabal.orig        2022-02-26 11:04:55.313630845 +0000
++++ fsnotify.cabal
+@@ -38,7 +38,7 @@ Library
+                         , System.FSNotify.Types
+   Hs-Source-Dirs:       src
+   GHC-Options:          -Wall
+-  if os(linux)
++  if os(linux) || os(freebsd) || os(netbsd) || os(openbsd)
+     CPP-Options:        -DOS_Linux
+     Other-Modules:      System.FSNotify.Linux
+     Build-Depends:      hinotify >= 0.3.0,



Home | Main Index | Thread Index | Old Index