summaryrefslogtreecommitdiff
path: root/extra/ocaml
diff options
context:
space:
mode:
Diffstat (limited to 'extra/ocaml')
-rw-r--r--extra/ocaml/PKGBUILD20
-rw-r--r--extra/ocaml/fix-caml_int64_float_of_bits-n32.patch12
2 files changed, 26 insertions, 6 deletions
diff --git a/extra/ocaml/PKGBUILD b/extra/ocaml/PKGBUILD
index 7ba798ba7..b431666a5 100644
--- a/extra/ocaml/PKGBUILD
+++ b/extra/ocaml/PKGBUILD
@@ -2,24 +2,32 @@
# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
pkgbase='ocaml'
-pkgname=('ocaml' 'ocaml-compiler-libs')
+pkgname=('ocaml')
+# Needs optimized build.
+[ "$CARCH" = "mips64el" ] || pkgname+=('ocaml-compiler-libs')
pkgver=3.12.1
pkgrel=3
pkgdesc="A functional language with OO extensions"
-arch=('i686' 'x86_64')
+arch=('i686' 'x86_64' 'mips64el')
license=('LGPL2' 'custom: QPL-1.0')
url="http://caml.inria.fr/"
depends=('gdbm')
makedepends=('tk' 'ncurses>=5.6-7' 'libx11')
optdepends=('ncurses: advanced ncurses features' 'tk: advanced tk features')
-source=(http://caml.inria.fr/distrib/ocaml-3.12/${pkgname}-${pkgver}.tar.gz)
-md5sums=('814a047085f0f901ab7d8e3a4b7a9e65')
-options=('!makeflags' '!emptydirs')
+source=(http://caml.inria.fr/distrib/ocaml-3.12/${pkgname}-${pkgver}.tar.gz
+ fix-caml_int64_float_of_bits-n32.patch)
+md5sums=('814a047085f0f901ab7d8e3a4b7a9e65'
+ 'e2c8bc316efe40532c5b9d7f9a1d8d62')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -Np1 -i "${srcdir}/fix-caml_int64_float_of_bits-n32.patch"
./configure -prefix /usr
- make world.opt
+ if [ "${CARCH}" == "mips64el" ] ; then
+ make world
+ else
+ make world.opt
+ fi
}
package_ocaml() {
diff --git a/extra/ocaml/fix-caml_int64_float_of_bits-n32.patch b/extra/ocaml/fix-caml_int64_float_of_bits-n32.patch
new file mode 100644
index 000000000..98755d30b
--- /dev/null
+++ b/extra/ocaml/fix-caml_int64_float_of_bits-n32.patch
@@ -0,0 +1,12 @@
+--- ocaml-3.12.0.orig/byterun/ints.c 2011-06-25 18:03:21.548733206 +0200
++++ ocaml-3.12.0/byterun/ints.c 2011-06-25 22:34:17.304788306 +0200
+@@ -585,6 +585,9 @@
+ return caml_copy_int64(u.i);
+ }
+
++#ifdef _ABIN32
++__attribute__((optimize(0)))
++#endif
+ CAMLprim value caml_int64_float_of_bits(value vi)
+ {
+ union { double d; int64 i; int32 h[2]; } u;