diff options
Diffstat (limited to 'dev-haskell/glade')
-rw-r--r-- | dev-haskell/glade/Manifest | 1 | ||||
-rw-r--r-- | dev-haskell/glade/files/Setup.hs | 8 | ||||
-rw-r--r-- | dev-haskell/glade/files/glade-0.12.5.0-ghc-7.10.patch | 182 | ||||
-rw-r--r-- | dev-haskell/glade/glade-0.12.5.0-r100.ebuild | 42 |
4 files changed, 0 insertions, 233 deletions
diff --git a/dev-haskell/glade/Manifest b/dev-haskell/glade/Manifest index 7fd0594752c4..73929f4f6f72 100644 --- a/dev-haskell/glade/Manifest +++ b/dev-haskell/glade/Manifest @@ -1,2 +1 @@ -DIST glade-0.12.5.0.tar.gz 152942 BLAKE2B ddcdaf5b74feff1992e754f11367cdccddb19c7e08c89d86af337c90c5cb0b450f04a0a45568b4f0837033d297a7b636fea09097462497b6abcef959a6fd1121 SHA512 5ea6ac03e919b881b53649c340d23eacc4c7e7055d9425b581c38bbc08192ad65e009b9bf03e9f224cee69ee2301354b2e42f4c7c845349b2b34fcdf8994c865 DIST glade-0.13.1.tar.gz 145648 BLAKE2B 31d650bdbe848b2e14efadc90f074664775cfa040def9328c084871efbd708a1bd03d34047d83f9a76cfe4069f14f787c50bde419abb0539597be2ea4a806032 SHA512 3e4282c4a8170351a6c82bf346685da7dd192d9e0139d8ef3f104f085b10686d1b89a77f01f1edc500f5d9584c1c31a63d1f89dc48a1a9a3f100207ae425ddce diff --git a/dev-haskell/glade/files/Setup.hs b/dev-haskell/glade/files/Setup.hs deleted file mode 100644 index 5fbe833309e9..000000000000 --- a/dev-haskell/glade/files/Setup.hs +++ /dev/null @@ -1,8 +0,0 @@ --- Adjustments specific to this package, --- all Gtk2Hs-specific boilerplate is kept in --- gtk2hs-buildtools:Gtk2HsSetup --- -import Gtk2HsSetup ( gtk2hsUserHooks ) -import Distribution.Simple ( defaultMainWithHooks ) - -main = defaultMainWithHooks gtk2hsUserHooks diff --git a/dev-haskell/glade/files/glade-0.12.5.0-ghc-7.10.patch b/dev-haskell/glade/files/glade-0.12.5.0-ghc-7.10.patch deleted file mode 100644 index 3e5d673661d3..000000000000 --- a/dev-haskell/glade/files/glade-0.12.5.0-ghc-7.10.patch +++ /dev/null @@ -1,182 +0,0 @@ -diff --git a/Gtk2HsSetup.hs b/Gtk2HsSetup.hs -index 371090a..8c60eec 100644 ---- a/Gtk2HsSetup.hs -+++ b/Gtk2HsSetup.hs -@@ -8,5 +8,5 @@ - -- --module Gtk2HsSetup ( -- gtk2hsUserHooks, -- getPkgConfigPackages, -+module Gtk2HsSetup ( -+ gtk2hsUserHooks, -+ getPkgConfigPackages, - checkGtk2hsBuildtools, -@@ -57,4 +57,5 @@ import Distribution.Verbosity - import Control.Monad (when, unless, filterM, liftM, forM, forM_) --import Data.Maybe ( isJust, isNothing, fromMaybe, maybeToList ) --import Data.List (isPrefixOf, isSuffixOf, stripPrefix, nub) -+import Data.Maybe ( isJust, isNothing, fromMaybe, maybeToList, catMaybes ) -+import Data.List (isPrefixOf, isSuffixOf, nub, minimumBy, stripPrefix, tails ) -+import Data.Ord as Ord (comparing) - import Data.Char (isAlpha, isNumber) -@@ -115,5 +116,12 @@ fixLibs dlls = concatMap $ \ lib -> - case filter (isLib lib) dlls of -- dll:_ -> [dropExtension dll] -- _ -> if lib == "z" then [] else [lib] -+ dlls@(_:_) -> [dropExtension (pickDll dlls)] -+ _ -> if lib == "z" then [] else [lib] - where -+ -- If there are several .dll files matching the one we're after then we -+ -- just have to guess. For example for recent Windows cairo builds we get -+ -- libcairo-2.dll libcairo-gobject-2.dll libcairo-script-interpreter-2.dll -+ -- Our heuristic is to pick the one with the shortest name. -+ -- Yes this is a hack but the proper solution is hard: we would need to -+ -- parse the .a file and see which .dll file(s) it needed to link to. -+ pickDll = minimumBy (Ord.comparing length) - isLib lib dll = -@@ -123,3 +131,3 @@ fixLibs dlls = concatMap $ \ lib -> - _ -> False -- -+ - -- The following code is a big copy-and-paste job from the sources of -@@ -156,8 +164,12 @@ register :: PackageDescription -> LocalBuildInfo - -> IO () --register pkg@(library -> Just lib ) -- lbi@(libraryConfig -> Just clbi) regFlags -+register pkg@PackageDescription { library = Just lib } lbi regFlags - = do -+ let clbi = LBI.getComponentLocalBuildInfo lbi LBI.CLibName - - installedPkgInfoRaw <- generateRegistrationInfo -+#if CABAL_VERSION_CHECK(1,22,0) -+ verbosity pkg lib lbi clbi inplace False distPref packageDb -+#else - verbosity pkg lib lbi clbi inplace distPref -+#endif - -@@ -170,3 +182,3 @@ register pkg@(library -> Just lib ) - case () of -- _ | modeGenerateRegFile -> die "Generate Reg File not supported" -+ _ | modeGenerateRegFile -> writeRegistrationFile installedPkgInfo - | modeGenerateRegScript -> die "Generate Reg Script not supported" -@@ -182,2 +194,4 @@ register pkg@(library -> Just lib ) - modeGenerateRegFile = isJust (flagToMaybe (regGenPkgConf regFlags)) -+ regFile = fromMaybe (display (packageId pkg) <.> "conf") -+ (fromFlag (regGenPkgConf regFlags)) - modeGenerateRegScript = fromFlag (regGenScript regFlags) -@@ -190,2 +204,6 @@ register pkg@(library -> Just lib ) - -+ writeRegistrationFile installedPkgInfo = do -+ notice verbosity ("Creating package registration file: " ++ regFile) -+ writeUTF8File regFile (showInstalledPackageInfo installedPkgInfo) -+ - register _ _ regFlags = notice verbosity "No package to register" -@@ -249,3 +267,3 @@ getCppOptions bi lbi - ++ [opt | opt@('-':c:_) <- PD.cppOptions bi ++ PD.ccOptions bi, c `elem` "DIU"] -- ++ ["-D__GLASGOW_HASKELL__="++show (ghcDefine . versionBranch . compilerVersion $ LBI.compiler lbi)] -+ ++ ["-D__GLASGOW_HASKELL__="++show (ghcDefine . ghcVersion . compilerId $ LBI.compiler lbi)] - where -@@ -254,2 +272,15 @@ getCppOptions bi lbi - -+ ghcVersion :: CompilerId -> [Int] -+-- This version is nicer, but we need to know the Cabal version that includes the new CompilerId -+-- #if CABAL_VERSION_CHECK(1,19,2) -+-- ghcVersion (CompilerId GHC v _) = versionBranch v -+-- ghcVersion (CompilerId _ _ (Just c)) = ghcVersion c -+-- #else -+-- ghcVersion (CompilerId GHC v) = versionBranch v -+-- #endif -+-- ghcVersion _ = [] -+-- This version should work fine for now -+ ghcVersion = concat . take 1 . map (read . (++"]") . takeWhile (/=']')) . catMaybes -+ . map (stripPrefix "CompilerId GHC (Version {versionBranch = ") . tails . show -+ - installCHI :: PackageDescription -- ^information from the .cabal file -@@ -264,3 +295,3 @@ installCHI pkg@PD.PackageDescription { library = Just lib } lbi verbosity copyde - (PD.libModules lib) -- -+ - let files = [ f | Just f <- mFiles ] -@@ -268,3 +299,3 @@ installCHI pkg@PD.PackageDescription { library = Just lib } lbi verbosity copyde - -- -+ - installCHI _ _ _ _ = return () -@@ -294,3 +325,2 @@ genSynthezisedFiles :: Verbosity -> PackageDescription -> LocalBuildInfo -> IO ( - genSynthezisedFiles verb pd lbi = do -- - cPkgs <- getPkgConfigPackages verb lbi pd -@@ -300,3 +330,3 @@ genSynthezisedFiles verb pd lbi = do - typeOpts :: String -> [ProgArg] -- typeOpts tag = concat [ map (\val -> '-':'-':drop (length tag) field++'=':val) (words content) -+ typeOpts tag = concat [ map (\val -> '-':'-':drop (length tag) field ++ '=':val) (words content) - | (field,content) <- xList, -@@ -308,4 +338,5 @@ genSynthezisedFiles verb pd lbi = do - , tag <- name' -- : [ name' ++ "-" ++ show major ++ "." ++ show digit -- | digit <- [0,2..minor] ] -+ :[ name' ++ "-" ++ show maj ++ "." ++ show d2 -+ | (maj, d2) <- [(maj, d2) | maj <- [0..(major-1)], d2 <- [0,2..20]] -+ ++ [(major, d2) | d2 <- [0,2..minor]] ] - ] -@@ -400,11 +431,6 @@ fixDeps pd@PD.PackageDescription { - modDeps <- mapM extractDeps modDeps -- let (expMods, othMods) = span mdExposed $ sortTopological modDeps -- badOther = map (fromMaybe "<no file>" . mdLocation) $ -- filter (not . mdExposed) expMods -- unless (null badOther) $ -- die ("internal chs modules "++intercalate "," badOther++ -- " depend on exposed chs modules; cabal needs to build internal modules first") -+ let (othMods, expMods) = span (not . mdExposed) $ reverse $ sortTopological modDeps - return pd { PD.library = Just lib { -- PD.exposedModules = map mdOriginal expMods, -- PD.libBuildInfo = bi { PD.otherModules = map mdOriginal othMods } -+ PD.exposedModules = map mdOriginal (reverse expMods), -+ PD.libBuildInfo = bi { PD.otherModules = map mdOriginal (reverse othMods) } - }} -@@ -428,3 +454,3 @@ instance Ord ModDep where - -- ignores CPP conditionals. We just require everything which means that the ---- existance of a .chs module may not depend on some CPP condition. -+-- existance of a .chs module may not depend on some CPP condition. - extractDeps :: ModDep -> IO ModDep -@@ -435,3 +461,3 @@ extractDeps md@ModDep { mdLocation = Just f } = withUTF8FileContents f $ \con -> - case simpleParse (takeWhile ('#' /=) ys) of -- Just m -> findImports (m:acc) xxs -+ Just m -> findImports (m:acc) xxs - Nothing -> die ("cannot parse chs import in "++f++":\n"++ -@@ -469,3 +495,3 @@ checkGtk2hsBuildtools programs = do - let printError name = do -- putStrLn $ "Cannot find " ++ name ++ "\n" -+ putStrLn $ "Cannot find " ++ name ++ "\n" - ++ "Please install `gtk2hs-buildtools` first and check that the install directory is in your PATH (e.g. HOME/.cabal/bin)." -@@ -473,2 +499,2 @@ checkGtk2hsBuildtools programs = do - forM_ programInfos $ \ (name, location) -> -- when (isNothing location) (printError name) -+ when (isNothing location) (printError name) -diff --git a/SetupMain.hs b/SetupMain.hs -index 201ee8f..2d1a782 100644 ---- a/SetupMain.hs -+++ b/SetupMain.hs -@@ -12,2 +12,2 @@ main = do - defaultMainWithHooks gtk2hsUserHooks -- -+ -diff --git a/SetupWrapper.hs b/SetupWrapper.hs -index aa825ec..44a20f8 100644 ---- a/SetupWrapper.hs -+++ b/SetupWrapper.hs -@@ -11,3 +11,3 @@ import Distribution.Simple.Compiler - import Distribution.Simple.BuildPaths (exeExtension) --import Distribution.Simple.Configure (configCompiler) -+import Distribution.Simple.Configure (configCompilerEx) - import Distribution.Simple.GHC (getInstalledPackages) -@@ -20,3 +20,3 @@ import System.Environment - import System.Process --import System.Exit -+import System.Exit (ExitCode(..), exitWith) - import System.FilePath -@@ -117,3 +117,3 @@ setupWrapper setupHsFile = do - -- (comp, conf) <- configCompiler (Just GHC) Nothing Nothing -+ (comp, _, conf) <- configCompilerEx (Just GHC) Nothing Nothing - defaultProgramConfiguration verbosity diff --git a/dev-haskell/glade/glade-0.12.5.0-r100.ebuild b/dev-haskell/glade/glade-0.12.5.0-r100.ebuild deleted file mode 100644 index 786bb0925788..000000000000 --- a/dev-haskell/glade/glade-0.12.5.0-r100.ebuild +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 - -# ebuild generated by hackport 0.3.5.9999 - -CABAL_FEATURES="lib profile haddock hoogle hscolour" -inherit haskell-cabal - -DESCRIPTION="Binding to the glade library" -HOMEPAGE="http://projects.haskell.org/gtk2hs/" -SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz" - -LICENSE="LGPL-2.1" -SLOT="2/${PV}" -KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" -IUSE="" - -RDEPEND=">=dev-haskell/glib-0.12.5.0:0=[profile?] - >=dev-haskell/gtk-0.12.5.0:2=[profile?] - >=dev-lang/ghc-6.10.4:= - gnome-base/libglade:2.0 -" -DEPEND="${RDEPEND} - >=dev-haskell/gtk2hs-buildtools-0.12.5.1-r1:0= - >=dev-haskell/cabal-1.24 - virtual/pkgconfig -" - -src_prepare() { - epatch "${FILESDIR}"/${P}-ghc-7.10.patch - - # update to latest gtk2hs-buildtools - rm Setup.hs || die - rm Gtk2HsSetup.hs || die - cp "${FILESDIR}"/Setup.hs ./ || die - - cabal_chdeps \ - 'glib >= 0.12.5.0 && < 0.13' 'glib >= 0.12.5.0' \ - 'gtk >= 0.12.5.0 && < 0.13' 'gtk >= 0.12.5.0' -} |