aboutsummaryrefslogtreecommitdiff
path: root/lang/ghc
diff options
context:
space:
mode:
authorGabor Pali <pgj@FreeBSD.org>2014-01-09 21:29:39 +0000
committerGabor Pali <pgj@FreeBSD.org>2014-01-09 21:29:39 +0000
commitf27ca4d0f1e1df6ff92a7455ddea39730ec30f60 (patch)
tree576f82a7c3bb2104bf5e9aaaf018944bd9e09da9 /lang/ghc
parent212e23643b316cea6f53793ccf3339f3af14b57a (diff)
downloadports-f27ca4d0f1e1df6ff92a7455ddea39730ec30f60.tar.gz
ports-f27ca4d0f1e1df6ff92a7455ddea39730ec30f60.zip
Notes
Diffstat (limited to 'lang/ghc')
-rw-r--r--lang/ghc/Makefile2
-rw-r--r--lang/ghc/files/patch-libraries__base__cbits__iconv.c51
2 files changed, 52 insertions, 1 deletions
diff --git a/lang/ghc/Makefile b/lang/ghc/Makefile
index 2fe859d97ac6..721335016916 100644
--- a/lang/ghc/Makefile
+++ b/lang/ghc/Makefile
@@ -3,7 +3,7 @@
PORTNAME= ghc
PORTVERSION= 7.6.3
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= lang haskell
MASTER_SITES= http://www.haskell.org/ghc/dist/${PORTVERSION}/:source \
${MASTER_SITE_LOCAL:S/$/:boot/}
diff --git a/lang/ghc/files/patch-libraries__base__cbits__iconv.c b/lang/ghc/files/patch-libraries__base__cbits__iconv.c
new file mode 100644
index 000000000000..daee90381f02
--- /dev/null
+++ b/lang/ghc/files/patch-libraries__base__cbits__iconv.c
@@ -0,0 +1,51 @@
+--- libraries/base/cbits/iconv.c.orig 2013-04-18 23:30:14.000000000 +0200
++++ libraries/base/cbits/iconv.c 2013-12-15 22:08:45.995398103 +0100
+@@ -1,12 +1,28 @@
+ #ifndef __MINGW32__
+
++#ifdef __FreeBSD__
++#include <sys/param.h>
++#endif
++
+ #include <stdlib.h>
+ #include <iconv.h>
+
++#if __FreeBSD_version >= 1000502
++iconv_t __bsd_iconv_open(const char *, const char *);
++size_t __bsd_iconv(iconv_t, const char ** __restrict,
++ size_t * __restrict, char ** __restrict,
++ size_t * __restrict);
++int __bsd_iconv_close(iconv_t);
++#endif
++
+ iconv_t hs_iconv_open(const char* tocode,
+ const char* fromcode)
+ {
++#if __FreeBSD_version >= 1000502
++ return __bsd_iconv_open(tocode, fromcode);
++#else
+ return iconv_open(tocode, fromcode);
++#endif
+ }
+
+ size_t hs_iconv(iconv_t cd,
+@@ -15,11 +31,19 @@
+ {
+ // (void*) cast avoids a warning. Some iconvs use (const
+ // char**inbuf), other use (char **inbuf).
++#if __FreeBSD_version >= 1000502
++ return __bsd_iconv(cd, (void*)inbuf, inbytesleft, outbuf, outbytesleft);
++#else
+ return iconv(cd, (void*)inbuf, inbytesleft, outbuf, outbytesleft);
++#endif
+ }
+
+ int hs_iconv_close(iconv_t cd) {
++#if __FreeBSD_version >= 1000502
++ return __bsd_iconv_close(cd);
++#else
+ return iconv_close(cd);
++#endif
+ }
+
+ #endif