Mail archive
alpine-aports

[alpine-aports] [PATCH] main/nspr: fix build on mips* (sgidefs.h)

From: alpine-mips-patches <info_at_mobile-stream.com>
Date: Fri, 30 Nov 2018 10:36:50 +0000

Use sgidefs.h from linux-headers and replace _ABI64 references with non-GCC
counterpart (_ABI64 is only defined with -mabi=64 thus -Wundef errors arise
in some dependent projects with -mabi=32).
---
 main/nspr/APKBUILD                | 10 ++++----
 main/nspr/fix-sgidefs-usage.patch | 40 +++++++++++++++++++++++++++++++
 2 files changed, 46 insertions(+), 4 deletions(-)
 create mode 100644 main/nspr/fix-sgidefs-usage.patch
diff --git a/main/nspr/APKBUILD b/main/nspr/APKBUILD
index aed03922ca..5cee61d0d3 100644
--- a/main/nspr/APKBUILD
+++ b/main/nspr/APKBUILD
_at_@ -1,7 +1,7 @@
 # Maintainer: Natanael Copa <ncopa_at_alpinelinux.org>
 pkgname=nspr
 pkgver=4.19
-pkgrel=0
+pkgrel=1
 pkgdesc="Netscape Portable Runtime"
 url="http://www.mozilla.org/projects/nspr/"
 arch="all"
_at_@ -9,11 +9,12 @@ license="MPL-1.1 GPL-2.0 LGPL-2.1"
 options="!check"  # No test suite.
 depends=
 # -dev package does not ship any symlinks so dependency cannot be autodetected
-depends_dev="nspr"
-makedepends="autoconf automake"
+depends_dev="nspr linux-headers"
+makedepends="autoconf automake linux-headers"
 subpackages="$pkgname-dev"
 source="https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v$pkgver/src/nspr-$pkgver.tar.gz
 	fix-getproto.patch
+	fix-sgidefs-usage.patch
 	"
 
 prepare() {
_at_@ -61,4 +62,5 @@ package() {
 }
 
 sha512sums="45a48111d0f89db0649a5e1356719868ff81881f9cf48c22c1d13b0831978b103f19e9840d6a5359fcdc90d763c0a60f0a29f7840d756a5efbd53ce1afd36844  nspr-4.19.tar.gz
-ee654f609a90b9a95c1901ad1d56cdef7cce8bca9efc092198607944f142f8fec924b13219ca6663facd0f0d59b671b8b3de58ab3449c4c863d42e2937f02184  fix-getproto.patch"
+ee654f609a90b9a95c1901ad1d56cdef7cce8bca9efc092198607944f142f8fec924b13219ca6663facd0f0d59b671b8b3de58ab3449c4c863d42e2937f02184  fix-getproto.patch
+69e804907d1a8867912511818d9827e4d7fd36ff44253cb21f4a5527610076874ddf5aada87717ef6454162c21248c9f7c3395376c585129134950c12f90ac0f  fix-sgidefs-usage.patch"
diff --git a/main/nspr/fix-sgidefs-usage.patch b/main/nspr/fix-sgidefs-usage.patch
new file mode 100644
index 0000000000..3719d6452a
--- /dev/null
+++ b/main/nspr/fix-sgidefs-usage.patch
_at_@ -0,0 +1,40 @@
+--- a/nspr/pr/include/md/_linux.cfg
++++ b/nspr/pr/include/md/_linux.cfg
+_at_@ -498,8 +498,8 @@
+ 
+ #elif defined(__mips__)
+ 
+-/* For _ABI64 */
+-#include <sgidefs.h>
++/* For _MIPS_SIM_ABI64 */
++#include <asm/sgidefs.h>
+ 
+ #ifdef __MIPSEB__
+ #define IS_BIG_ENDIAN 1
+_at_@ -511,7 +511,7 @@
+ #error "Unknown MIPS endianness."
+ #endif
+ 
+-#if _MIPS_SIM == _ABI64
++#if _MIPS_SIM == _MIPS_SIM_ABI64
+ 
+ #define IS_64
+ 
+_at_@ -555,7 +555,7 @@
+ #define PR_BYTES_PER_WORD_LOG2   3
+ #define PR_BYTES_PER_DWORD_LOG2  3
+ 
+-#else /* _ABI64 */
++#else /* _MIPS_SIM_ABI64 */
+ 
+ #define PR_BYTES_PER_BYTE   1
+ #define PR_BYTES_PER_SHORT  2
+_at_@ -597,7 +597,7 @@
+ #define PR_BYTES_PER_WORD_LOG2   2
+ #define PR_BYTES_PER_DWORD_LOG2  3
+ 
+-#endif /* _ABI64 */
++#endif /* _MIPS_SIM_ABI64 */
+ 
+ #elif defined(__arm__)
+ 
-- 
2.19.2
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Fri Nov 30 2018 - 10:36:50 UTC