summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Flament2016-11-15 00:48:07 +0100
committerDamien Flament2016-11-15 00:48:07 +0100
commit8c2ac251ff0fb81e84b5f3fb2258b0dc81bdd4ee (patch)
tree4f436e7c53cd6b645420552f15b6f9c40e1152f2
parentc1f0af017aba4f7235e658994700c4e3231e03cc (diff)
downloadaur-8c2ac251ff0fb81e84b5f3fb2258b0dc81bdd4ee.tar.gz
[PATC] Make build pass.
-rw-r--r--.SRCINFO6
-rw-r--r--Make_build_pass.patch41
-rw-r--r--PKGBUILD14
3 files changed, 56 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index eb24d5f0e54f..3f46d677d244 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = cabal2arch
pkgdesc = Create Arch Linux packages from Cabal packages.
pkgver = 1.2
- pkgrel = 2
+ pkgrel = 3
url = http://github.com/archhaskell/
arch = i686
arch = x86_64
@@ -13,7 +13,9 @@ pkgbase = cabal2arch
options = strip
options = staticlibs
source = https://github.com/archhaskell/cabal2arch/archive/v1.2.tar.gz
- sha1sums = 18936e2bafb6059f56b4814216ac5874ab54fe56
+ source = Make_build_pass.patch
+ md5sums = 68f08d55400a31927e63942f0ca5e462
+ md5sums = b22ef0e1bcc21f81b4dbd34e9599d441
pkgname = cabal2arch
diff --git a/Make_build_pass.patch b/Make_build_pass.patch
new file mode 100644
index 000000000000..b75e3076de47
--- /dev/null
+++ b/Make_build_pass.patch
@@ -0,0 +1,41 @@
+From b821b83c819aaee40eada56e77df536bf48c7d7e Mon Sep 17 00:00:00 2001
+From: Damien Flament <damien.flament@gmx.com>
+Date: Tue, 15 Nov 2016 00:34:01 +0100
+Subject: [PATCH] Make build pass.
+
+---
+ Main.hs | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/Main.hs b/Main.hs
+index 2a74b30..85fdd7e 100644
+--- a/Main.hs
++++ b/Main.hs
+@@ -37,7 +37,7 @@ import Paths_cabal2arch
+ import Data.Version (showVersion)
+
+ import System.Directory
+-import System.Exit
++import System.Exit hiding (die)
+ import System.FilePath
+ import System.IO
+ import System.Process hiding(cwd)
+@@ -205,7 +205,7 @@ findCabalFile file _cwd tmp = do
+ Left (_,s,_) -> do
+ hPutStrLn stderr s
+ die $ "Couldn't download .cabal file: " ++ show url
+- Right _ -> findPackageDesc tmp -- tmp dir
++ Right _ -> tryFindPackageDesc tmp -- tmp dir
+
+ -- it might be a .cabal file
+ Right f | ".cabal" `isSuffixOf` f -> do
+@@ -219,5 +219,5 @@ findCabalFile file _cwd tmp = do
+ b <- doesDirectoryExist dir
+ if not b
+ then die $ "directory doesn't exist: " ++ show dir
+- else findPackageDesc dir
++ else tryFindPackageDesc dir
+
+--
+2.10.2
+
diff --git a/PKGBUILD b/PKGBUILD
index a657ae181804..574b68278063 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,7 +8,7 @@ _licensefile=LICENSE
# PKGBUILD options/directives
pkgname=cabal2arch
pkgver=1.2
-pkgrel=2
+pkgrel=3
pkgdesc="Create Arch Linux packages from Cabal packages."
url="http://github.com/archhaskell/"
license=("BSD3")
@@ -16,11 +16,19 @@ arch=('i686' 'x86_64')
makedepends=("ghc" "haskell-archlinux" "haskell-cmdargs" "haskell-mtl")
depends=()
options=('strip' 'staticlibs' )
-source=("https://github.com/archhaskell/cabal2arch/archive/v1.2.tar.gz")
+source=("https://github.com/archhaskell/cabal2arch/archive/v1.2.tar.gz"
+ 'Make_build_pass.patch')
-sha1sums=('18936e2bafb6059f56b4814216ac5874ab54fe56')
+md5sums=('68f08d55400a31927e63942f0ca5e462'
+ 'b22ef0e1bcc21f81b4dbd34e9599d441')
# PKGBUILD functions
+prepare() {
+ cd ${_hkgname}-${pkgver}
+
+ patch -Np1 -i "${srcdir}/Make_build_pass.patch"
+}
+
build() {
cd ${srcdir}/${_hkgname}-${pkgver}
runhaskell Setup configure -O --prefix=/usr --docdir=/usr/share/doc/${pkgname}