aboutsummaryrefslogtreecommitdiffstats
path: root/community/openlibm
diff options
context:
space:
mode:
authorBreno Leitao <breno.leitao@gmail.com>2017-04-03 18:50:04 +0000
committerBreno Leitao <breno.leitao@gmail.com>2017-04-03 18:52:29 +0000
commit962fb9c8f8d8e47e70c8d409f636c723dda8146d (patch)
tree650a6ff2521eddb02f840a4c633faa4b667cc4c7 /community/openlibm
parentc80e424f4e7cdf60cc2b949d4139422ebed6783c (diff)
downloadaports-962fb9c8f8d8e47e70c8d409f636c723dda8146d.tar.bz2
aports-962fb9c8f8d8e47e70c8d409f636c723dda8146d.tar.xz
community/openlibm: Fix FTBFS on ppc64le
Current powerpc files on openlibm is quite old, and need some modernization. Now it builds on ppc64le.
Diffstat (limited to 'community/openlibm')
-rw-r--r--community/openlibm/APKBUILD8
-rw-r--r--community/openlibm/powerpc_fixes.patch57
2 files changed, 61 insertions, 4 deletions
diff --git a/community/openlibm/APKBUILD b/community/openlibm/APKBUILD
index 346e5ca314..bae6908528 100644
--- a/community/openlibm/APKBUILD
+++ b/community/openlibm/APKBUILD
@@ -10,7 +10,8 @@ license="MIT BSD public-domain"
depends=""
makedepends=""
subpackages="$pkgname-dev"
-source="$pkgname-$pkgver.tar.gz::https://github.com/JuliaLang/$pkgname/archive/v$pkgver.tar.gz"
+source="$pkgname-$pkgver.tar.gz::https://github.com/JuliaLang/$pkgname/archive/v$pkgver.tar.gz
+ powerpc_fixes.patch"
builddir="$srcdir/$pkgname-$pkgver"
build() {
@@ -23,6 +24,5 @@ package() {
make VERSION=$pkgver DESTDIR="$pkgdir" prefix=/usr install
}
-md5sums="3cb0e96d1fd4d2a4a3e680c23f11768a openlibm-0.5.4.tar.gz"
-sha256sums="9a8ae1d17825a4a6a4c013d36a7f4348b27c47eedb6549c521ecc9c79d021c13 openlibm-0.5.4.tar.gz"
-sha512sums="ca74936b9eb7a52566cc509ffb98dd9e1672cd4029ba0193162505e53fe671b8903c37ef4036c15d0872ca246079a792d1630f3a93024010ff0c232f78295192 openlibm-0.5.4.tar.gz"
+sha512sums="ca74936b9eb7a52566cc509ffb98dd9e1672cd4029ba0193162505e53fe671b8903c37ef4036c15d0872ca246079a792d1630f3a93024010ff0c232f78295192 openlibm-0.5.4.tar.gz
+76ee57a281275b2bd382f0485e4ca383566af47f3d89981b75ad764c629d82f7f0260fb41cc9eb50f0f175c88b64699aabcc732add321f4d730f38ba7a48238d powerpc_fixes.patch"
diff --git a/community/openlibm/powerpc_fixes.patch b/community/openlibm/powerpc_fixes.patch
new file mode 100644
index 0000000000..c9eb9c99cf
--- /dev/null
+++ b/community/openlibm/powerpc_fixes.patch
@@ -0,0 +1,57 @@
+commit f81e5b71ce78f33250347914dacc75c8463bf102
+Author: Breno Leitao <breno.leitao@gmail.com>
+Date: Wed Mar 29 15:22:38 2017 -0300
+
+ Fix the build on powerpc platform
+
+ openlibm is using some old definitions on the powerpc files.
+ Adjusting to use a modern set of types.
+
+ Signed-off-by: Breno Leitao <breno.leitao@gmail.com>
+
+--- a/include/openlibm_fenv_powerpc.h 2017-04-03 18:39:03.776367216 +0000
++++ b/include/openlibm_fenv_powerpc.h 2017-04-03 18:40:09.324368390 +0000
+@@ -30,13 +30,14 @@
+ #define _FENV_H_
+
+ #include <sys/types.h>
++#include <stdint.h>
+
+ #ifndef __fenv_static
+ #define __fenv_static static
+ #endif
+
+-typedef __uint32_t fenv_t;
+-typedef __uint32_t fexcept_t;
++typedef uint32_t fenv_t;
++typedef uint32_t fexcept_t;
+
+ /* Exception flags */
+ #define FE_INEXACT 0x02000000
+@@ -75,7 +76,6 @@ typedef __uint32_t fexcept_t;
+ #define _ROUND_MASK (FE_TONEAREST | FE_DOWNWARD | \
+ FE_UPWARD | FE_TOWARDZERO)
+
+-__BEGIN_DECLS
+
+ /* Default floating-point environment */
+ extern const fenv_t __fe_dfl_env;
+@@ -99,9 +99,9 @@ union __fpscr {
+ struct {
+ #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+ fenv_t __reg;
+- __uint32_t __junk;
++ uint32_t __junk;
+ #else
+- __uint32_t __junk;
++ uint32_t __junk;
+ fenv_t __reg;
+ #endif
+ } __bits;
+@@ -274,6 +274,5 @@ fegetexcept(void)
+
+ #endif /* __BSD_VISIBLE */
+
+-__END_DECLS
+
+ #endif /* !_FENV_H_ */