diff options
author | tcberner <tcberner@FreeBSD.org> | 2017-08-11 04:50:41 +0800 |
---|---|---|
committer | tcberner <tcberner@FreeBSD.org> | 2017-08-11 04:50:41 +0800 |
commit | e340278431e12c8e51874a0f2e3b304874ed6b6a (patch) | |
tree | 7d7159533723277ad183d4fc49852c0eba6f7fd7 /textproc | |
parent | be148e09f1bc4716926e1cdfdbc30da228ade65c (diff) | |
download | freebsd-ports-gnome-e340278431e12c8e51874a0f2e3b304874ed6b6a.tar.gz freebsd-ports-gnome-e340278431e12c8e51874a0f2e3b304874ed6b6a.tar.zst freebsd-ports-gnome-e340278431e12c8e51874a0f2e3b304874ed6b6a.zip |
Fix textproc/cgrep after r447548.
Unfortunately a fix did not make it into the previous ghc-update commit.
This backports an upstream fix to the duplicate definition of isSymbolicLink.
Reported by: antoine
Reviewed by: pgj
Differential Revision: https://reviews.freebsd.org/D11960
Diffstat (limited to 'textproc')
-rw-r--r-- | textproc/cgrep/Makefile | 1 | ||||
-rw-r--r-- | textproc/cgrep/files/patch-src_Main.hs | 32 |
2 files changed, 33 insertions, 0 deletions
diff --git a/textproc/cgrep/Makefile b/textproc/cgrep/Makefile index 18319a52e802..98f8b8cfc791 100644 --- a/textproc/cgrep/Makefile +++ b/textproc/cgrep/Makefile @@ -3,6 +3,7 @@ PORTNAME= cgrep PORTVERSION= 6.4.3 +PORTREVISION= 1 DISTVERSIONPREFIX= v CATEGORIES= textproc diff --git a/textproc/cgrep/files/patch-src_Main.hs b/textproc/cgrep/files/patch-src_Main.hs new file mode 100644 index 000000000000..08eb8a0f3289 --- /dev/null +++ b/textproc/cgrep/files/patch-src_Main.hs @@ -0,0 +1,32 @@ +Backport of: +From 2f787c5c1ba42ccee2f1ced759b3a4570afa9b28 Mon Sep 17 00:00:00 2001 +From: ilovezfs <ilovezfs@icloud.com> +Date: Mon, 23 May 2016 03:53:52 -0700 +Subject: [PATCH] cgrep: fix isSymbolicLink collision + +System.Directory.isSymbolicLink collides with +System.PosixCompat.Files.isSymbolicLink (and with +System.Posix.Files.isSymbolicLink) + +This applies the solution proposed here: +https://github.com/haskell/directory/issues/52#issuecomment-220879392 +--- src/Main.hs.orig 2014-06-21 09:27:05 UTC ++++ src/Main.hs +@@ -37,7 +37,7 @@ import System.Console.CmdArgs + import System.Directory + import System.FilePath ((</>), takeFileName) + import System.Environment +-import System.Posix.Files ++import System.Posix.Files as PosixFiles + import System.IO + import System.Exit + +@@ -67,7 +67,7 @@ putRecursiveContents opts inchan topdir langs prunedir + status <- getFileStatus path + lstatus <- getSymbolicLinkStatus path + unless (cpath `Set.member` visited) $ +- if isDirectory status && (not (isSymbolicLink lstatus) || deference_recursive opts) ++ if isDirectory status && (not (PosixFiles.isSymbolicLink lstatus) || deference_recursive opts) + then unless (filename `elem` prunedir) $ + putRecursiveContents opts inchan path langs prunedir (Set.insert cpath visited) + else case getLang opts filename >>= (\f -> f `elemIndex` langs <|> toMaybe 0 (null langs) ) of |