summaryrefslogtreecommitdiff
blob: c660db766b26f2820678c75e59b287e69cd0c145 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
From b4fe6e48679084ca28c1192612c60599ae81808c Mon Sep 17 00:00:00 2001
From: Sergei Trofimovich <slyfox@gentoo.org>
Date: Sat, 25 Jan 2020 23:53:39 +0000
Subject: [PATCH 3/3] Merge.hs: avoid using isExtensionOf

`isExtensionOf` is not available in gcc-8.0.

Reported-by: Jeremy Stent
Bug: https://bugs.gentoo.org/704778
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
---
 Merge.hs | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Merge.hs b/Merge.hs
index 645817345..522a3739d 100644
--- a/Merge.hs
+++ b/Merge.hs
@@ -39,7 +39,8 @@ import System.Directory ( getCurrentDirectory
                         , listDirectory
                         )
 import System.Process (system)
-import System.FilePath ((</>), isExtensionOf)
+import System.FilePath ((</>))
+import qualified System.FilePath as SF
 import System.Exit
 
 import qualified Cabal2Ebuild as C2E
@@ -183,7 +184,7 @@ getPreviousPackageId pkgDir newPkgId = do
                . L.sortOn (Portage.pkgVersion)
                . filter (<newPkgId)
                $ Portage.filePathToPackageId newPkgId
-               <$> filter (\fp -> ".ebuild" `isExtensionOf` fp) pkgDir
+               <$> filter (\fp -> SF.takeExtension fp == ".ebuild") pkgDir
   case pkgIds of
     x:_ -> Just x
     _ -> Nothing
-- 
2.25.0