Some patches for cabal2arch

Enjoy.
/M
--
Magnus Therning (OpenPGP: 0xAB4DFBA4)
magnus@therning.org Jabber: magnus@therning.org
http://therning.org/magnus identi.ca|twitter: magthe
Sat May 30 10:13:23 BST 2009 magnus@therning.org
* Replacing all occurances of $startdir/{pkg,src}
$startdir should never be used in PKGBUILD, instead $pkgdir and
$srcdir should be used instead. Apparently there is no guarantee that
$startdir/{pkg,src}==${pkg,src}dir.
Sat May 30 10:33:51 BST 2009 magnus@therning.org
* Use Control.OldException explicitly
Thu Jun 4 22:42:14 BST 2009 magnus@therning.org
* Clean up depends/makedepends
No package should ever be listed in both depends and makedepends.
For packages with only executables:
makedepends = buildDepends
depends = ['gmp'] ++ clibs
For packages with only libs:
makedepends = []
depends = buildDepends
For packages with both executables and libs:
makedepends = []
depends = buildDepends ++ ['gmp'] ++ clibs
New patches:
[Replacing all occurances of $startdir/{pkg,src}
magnus@therning.org**20090530091323
Ignore-this: aa69185376663346b3710c7a80a8d388
$startdir should never be used in PKGBUILD, instead $pkgdir and
$srcdir should be used instead. Apparently there is no guarantee that
$startdir/{pkg,src}==${pkg,src}dir.
] {
hunk ./Main.hs 525
++ (display name > display vers > display name <-> display vers <.> "tar.gz")
, arch_build =
- [ "cd $startdir/src/" > display name <-> display vers
+ [ "cd ${srcdir}/" > display name <-> display vers
, "runhaskell Setup configure --prefix=/usr || return 1"
, "runhaskell Setup build || return 1"
] ++
hunk ./Main.hs 535
then
["runhaskell Setup register --gen-script || return 1"
,"runhaskell Setup unregister --gen-script || return 1"
- ,"install -D -m744 register.sh $startdir/pkg/usr/share/haskell/$pkgname/register.sh"
- , "install -m744 unregister.sh $startdir/pkg/usr/share/haskell/$pkgname/unregister.sh"
+ ,"install -D -m744 register.sh ${pkgdir}/usr/share/haskell/$pkgname/register.sh"
+ , "install -m744 unregister.sh ${pkgdir}/usr/share/haskell/$pkgname/unregister.sh"
]
else [])
++
hunk ./Main.hs 540
- ["runhaskell Setup copy --destdir=$startdir/pkg || return 1"]
+ ["runhaskell Setup copy --destdir=${pkgdir} || return 1"]
++
(if not (null (licenseFile cabal)) && license cabal `notElem` [GPL,LGPL]
then ["install -D -m644 " ++ licenseFile cabal ++
hunk ./Main.hs 544
- " $startdir/pkg/usr/share/licenses/$pkgname/LICENSE || return 1" ]
+ " ${pkgdir}/usr/share/licenses/$pkgname/LICENSE || return 1" ]
else [])
-- if its a library:
}
[Use Control.OldException explicitly
magnus@therning.org**20090530093351
Ignore-this: 89ac5a923e7bb3d072adc8f39bfad4c9
] {
hunk ./Main.hs 41
import Control.Monad
import Control.Concurrent
-import Control.Exception
-import qualified Control.Exception as C
+import qualified Control.OldException as C
import Data.List
import Data.Maybe
hunk ./Main.hs 64
main :: IO ()
main =
- bracket
+ C.bracket
-- We do all our work in a temp directory
(do cwd <- getCurrentDirectory
etmp <- myReadProcess "mktemp" ["-d"] []
hunk ./Main.hs 868
-- Safe wrapper for getEnv
getEnvMaybe :: String -> IO (Maybe String)
-getEnvMaybe name = handle (const $ return Nothing) (Just `fmap` getEnv name)
+getEnvMaybe name = C.handle (const $ return Nothing) (Just `fmap` getEnv name)
------------------------------------------------------------------------
hunk ./cabal2arch.cabal 23
if flag(small_base)
build-depends:
- base < 4,
+ base,
pretty,
process,
directory,
}
[Clean up depends/makedepends
magnus@therning.org**20090604214214
Ignore-this: 3781e18ed593d5b31a927b22e8755168
No package should ever be listed in both depends and makedepends.
For packages with only executables:
makedepends = buildDepends
depends = ['gmp'] ++ clibs
For packages with only libs:
makedepends = []
depends = buildDepends
For packages with both executables and libs:
makedepends = []
depends = buildDepends ++ ['gmp'] ++ clibs
] hunk ./Main.hs 500
-- All Hackage packages depend on GHC at build time
-- All Haskell libraries are prefixed with "haskell-"
- , arch_makedepends = my_makedepends
+ , arch_makedepends = if hasLibrary
+ then ArchList []
+ else my_makedepends
, arch_depends =
(if not (isLibrary)
Context:
[Update versions for 6.10.2
Don Stewart
participants (1)
-
Magnus Therning