mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 03:30:05 +02:00
nspr: fixes recipe and x86_64 build
This commit is contained in:
@@ -11,12 +11,19 @@ MPL v2.0
|
||||
"
|
||||
COPYRIGHT="Mozilla Foundation"
|
||||
HOMEPAGE="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSPR"
|
||||
SRC_URI="ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v$portVersion/src/nspr-$portVersion.tar.gz"
|
||||
SRC_URI="https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v$portVersion/src/nspr-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="df69ac8b0126f11907792384468adf42712b1d6db9772f4aa20c6d471594644a"
|
||||
REVISION="1"
|
||||
ARCHITECTURES="!x86_gcc2 !x86 !x86_64"
|
||||
SECONDARY_ARCHITECTURES="!x86 !x86_gcc2"
|
||||
#SOURCE_DIR="nspr-$portVersion/nspr"
|
||||
ARCHITECTURES="x86 x86_64"
|
||||
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
|
||||
# x86_gcc2 is fine as primary target architecture as long as we're building
|
||||
# for a different secondary architecture.
|
||||
ARCHITECTURES="$ARCHITECTURES x86_gcc2"
|
||||
fi
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
SOURCE_DIR="nspr-$portVersion/nspr"
|
||||
|
||||
PATCHES="nspr-$portVersion.patchset"
|
||||
|
||||
PROVIDES="
|
||||
nspr$secondaryArchSuffix = $portVersion
|
||||
@@ -32,27 +39,27 @@ BUILD_REQUIRES="
|
||||
BUILD_PREREQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel >= $haikuVersion
|
||||
cmd:autoconf
|
||||
cmd:aclocal
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:awk
|
||||
cmd:perl
|
||||
"
|
||||
|
||||
PATCHES="nspr-$portVersion.patchset"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
# FIXME: SOURCE_DIR="nspr-$portVersion/nspr" doesn't work
|
||||
cd nspr
|
||||
autoconf
|
||||
runConfigure ./configure --disable-debug --enable-optimize
|
||||
if [ $effectiveTargetArchitecture == 'x86_64' ]; then
|
||||
use64bits="--enable-64bit"
|
||||
fi
|
||||
autoreconf -fi
|
||||
runConfigure ./configure --disable-debug --enable-optimize \
|
||||
$use64bits
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd nspr
|
||||
make install
|
||||
|
||||
# set up the develop directory correctly
|
||||
@@ -63,12 +70,14 @@ INSTALL()
|
||||
rm $binDir/prerr.properties
|
||||
|
||||
# devel package
|
||||
packageEntries devel $developDir $dataDir/aclocal $binDir/nspr-config
|
||||
packageEntries devel \
|
||||
$developDir \
|
||||
$dataDir/aclocal \
|
||||
$binDir/nspr-config
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
cd nspr
|
||||
autoconf
|
||||
runConfigure ./configure
|
||||
cd pr/tests
|
||||
@@ -80,6 +89,7 @@ TEST()
|
||||
|
||||
PROVIDES_devel="
|
||||
nspr${secondaryArchSuffix}_devel = $portVersion compat >= 4
|
||||
cmd:nspr_config$secondaryArchSuffix = $portVersion compat >= 4
|
||||
devel:libnspr4$secondaryArchSuffix = $portVersion compat >= 4
|
||||
devel:libplc4$secondaryArchSuffix = $portVersion compat >= 4
|
||||
devel:libplds4$secondaryArchSuffix = $portVersion compat >= 4
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
From 5eca23b7a963a57466e7f90024677190d39336bc Mon Sep 17 00:00:00 2001
|
||||
From 2cfaa6bb114a3b809f1b5438685e44d080bb6d26 Mon Sep 17 00:00:00 2001
|
||||
From: Kacper Kasper <kacperkasper@gmail.com>
|
||||
Date: Fri, 4 Jul 2014 11:56:24 +0200
|
||||
Subject: Haiku support
|
||||
|
||||
|
||||
diff --git a/nspr/configure.in b/nspr/configure.in
|
||||
diff --git a/configure.in b/configure.in
|
||||
index 9e9f1b1..5361a5b 100644
|
||||
--- a/nspr/configure.in
|
||||
+++ b/nspr/configure.in
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -1312,6 +1312,24 @@ case "$target" in
|
||||
;;
|
||||
esac
|
||||
@@ -51,10 +51,10 @@ index 9e9f1b1..5361a5b 100644
|
||||
_HAVE_PTHREADS=1
|
||||
;;
|
||||
*)
|
||||
diff --git a/nspr/pr/include/md/_linux.h b/nspr/pr/include/md/_linux.h
|
||||
diff --git a/pr/include/md/_linux.h b/pr/include/md/_linux.h
|
||||
index 278f90c..669fb42 100644
|
||||
--- a/nspr/pr/include/md/_linux.h
|
||||
+++ b/nspr/pr/include/md/_linux.h
|
||||
--- a/pr/include/md/_linux.h
|
||||
+++ b/pr/include/md/_linux.h
|
||||
@@ -261,7 +261,8 @@ static inline PRInt32 _MD_ATOMIC_SET(PRInt32 *ptr, PRInt32 nv)
|
||||
#endif /* __arm__ */
|
||||
|
||||
@@ -74,10 +74,10 @@ index 278f90c..669fb42 100644
|
||||
#define _PR_HAVE_SYSV_SEMAPHORES
|
||||
#define PR_HAVE_SYSV_NAMED_SHARED_MEMORY
|
||||
#endif
|
||||
diff --git a/nspr/pr/include/md/_pth.h b/nspr/pr/include/md/_pth.h
|
||||
diff --git a/pr/include/md/_pth.h b/pr/include/md/_pth.h
|
||||
index eeeef04..ef60438 100644
|
||||
--- a/nspr/pr/include/md/_pth.h
|
||||
+++ b/nspr/pr/include/md/_pth.h
|
||||
--- a/pr/include/md/_pth.h
|
||||
+++ b/pr/include/md/_pth.h
|
||||
@@ -117,7 +117,8 @@
|
||||
|| defined(HPUX) || defined(FREEBSD) \
|
||||
|| defined(NETBSD) || defined(OPENBSD) || defined(BSDI) \
|
||||
@@ -116,10 +116,10 @@ index eeeef04..ef60438 100644
|
||||
#define _PT_PTHREAD_YIELD() sched_yield()
|
||||
#else
|
||||
#error "Need to define _PT_PTHREAD_YIELD for this platform"
|
||||
diff --git a/nspr/pr/include/md/_unixos.h b/nspr/pr/include/md/_unixos.h
|
||||
diff --git a/pr/include/md/_unixos.h b/pr/include/md/_unixos.h
|
||||
index 04d9904..5c3aa45 100644
|
||||
--- a/nspr/pr/include/md/_unixos.h
|
||||
+++ b/nspr/pr/include/md/_unixos.h
|
||||
--- a/pr/include/md/_unixos.h
|
||||
+++ b/pr/include/md/_unixos.h
|
||||
@@ -15,7 +15,7 @@
|
||||
* not be redefined.
|
||||
*/
|
||||
@@ -138,10 +138,10 @@ index 04d9904..5c3aa45 100644
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
|
||||
diff --git a/nspr/pr/include/md/prosdep.h b/nspr/pr/include/md/prosdep.h
|
||||
diff --git a/pr/include/md/prosdep.h b/pr/include/md/prosdep.h
|
||||
index 94d8945..3cd48da 100644
|
||||
--- a/nspr/pr/include/md/prosdep.h
|
||||
+++ b/nspr/pr/include/md/prosdep.h
|
||||
--- a/pr/include/md/prosdep.h
|
||||
+++ b/pr/include/md/prosdep.h
|
||||
@@ -52,7 +52,7 @@ PR_BEGIN_EXTERN_C
|
||||
#elif defined(IRIX)
|
||||
#include "md/_irix.h"
|
||||
@@ -151,10 +151,10 @@ index 94d8945..3cd48da 100644
|
||||
#include "md/_linux.h"
|
||||
|
||||
#elif defined(OSF1)
|
||||
diff --git a/nspr/pr/src/io/prmapopt.c b/nspr/pr/src/io/prmapopt.c
|
||||
diff --git a/pr/src/io/prmapopt.c b/pr/src/io/prmapopt.c
|
||||
index f92a76b..d155e48 100644
|
||||
--- a/nspr/pr/src/io/prmapopt.c
|
||||
+++ b/nspr/pr/src/io/prmapopt.c
|
||||
--- a/pr/src/io/prmapopt.c
|
||||
+++ b/pr/src/io/prmapopt.c
|
||||
@@ -102,15 +102,15 @@ PRStatus PR_CALLBACK _PR_SocketGetSocketOption(PRFileDesc *fd, PRSocketOptionDat
|
||||
case PR_SockOpt_McastLoopback:
|
||||
{
|
||||
@@ -194,10 +194,10 @@ index f92a76b..d155e48 100644
|
||||
break;
|
||||
}
|
||||
case PR_SockOpt_RecvBufferSize:
|
||||
diff --git a/nspr/pr/src/md/unix/linux.c b/nspr/pr/src/md/unix/linux.c
|
||||
diff --git a/pr/src/md/unix/linux.c b/pr/src/md/unix/linux.c
|
||||
index 1b485a0..8a17e4e 100644
|
||||
--- a/nspr/pr/src/md/unix/linux.c
|
||||
+++ b/nspr/pr/src/md/unix/linux.c
|
||||
--- a/pr/src/md/unix/linux.c
|
||||
+++ b/pr/src/md/unix/linux.c
|
||||
@@ -25,12 +25,14 @@ PRWord *_MD_HomeGCRegisters(PRThread *t, int isCurrent, int *np)
|
||||
|
||||
#ifdef _PR_PTHREADS
|
||||
@@ -213,10 +213,10 @@ index 1b485a0..8a17e4e 100644
|
||||
|
||||
#else /* ! _PR_PTHREADS */
|
||||
|
||||
diff --git a/nspr/pr/src/md/unix/uxrng.c b/nspr/pr/src/md/unix/uxrng.c
|
||||
diff --git a/pr/src/md/unix/uxrng.c b/pr/src/md/unix/uxrng.c
|
||||
index da2f7e9..cbef872 100644
|
||||
--- a/nspr/pr/src/md/unix/uxrng.c
|
||||
+++ b/nspr/pr/src/md/unix/uxrng.c
|
||||
--- a/pr/src/md/unix/uxrng.c
|
||||
+++ b/pr/src/md/unix/uxrng.c
|
||||
@@ -86,7 +86,7 @@ GetHighResClock(void *buf, size_t maxbytes)
|
||||
|
||||
#elif (defined(LINUX) || defined(FREEBSD) || defined(__FreeBSD_kernel__) \
|
||||
@@ -226,10 +226,10 @@ index da2f7e9..cbef872 100644
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
diff --git a/nspr/pr/src/misc/prnetdb.c b/nspr/pr/src/misc/prnetdb.c
|
||||
diff --git a/pr/src/misc/prnetdb.c b/pr/src/misc/prnetdb.c
|
||||
index b86248f..0f07192 100644
|
||||
--- a/nspr/pr/src/misc/prnetdb.c
|
||||
+++ b/nspr/pr/src/misc/prnetdb.c
|
||||
--- a/pr/src/misc/prnetdb.c
|
||||
+++ b/pr/src/misc/prnetdb.c
|
||||
@@ -54,7 +54,7 @@ PRLock *_pr_dnsLock = NULL;
|
||||
* Some return a pointer to struct protoent, others return
|
||||
* an int, and glibc's flavor takes five arguments.
|
||||
@@ -239,10 +239,10 @@ index b86248f..0f07192 100644
|
||||
#include <arpa/inet.h> /* pick up define for inet_addr */
|
||||
#include <sys/socket.h>
|
||||
#define _PR_HAVE_GETPROTO_R
|
||||
diff --git a/nspr/pr/src/pthreads/ptio.c b/nspr/pr/src/pthreads/ptio.c
|
||||
diff --git a/pr/src/pthreads/ptio.c b/pr/src/pthreads/ptio.c
|
||||
index 125f1f9..fe51684 100644
|
||||
--- a/nspr/pr/src/pthreads/ptio.c
|
||||
+++ b/nspr/pr/src/pthreads/ptio.c
|
||||
--- a/pr/src/pthreads/ptio.c
|
||||
+++ b/pr/src/pthreads/ptio.c
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <sys/uio.h>
|
||||
#include <sys/file.h>
|
||||
@@ -271,10 +271,10 @@ index 125f1f9..fe51684 100644
|
||||
#define _PR_FCNTL_FLAGS O_NONBLOCK
|
||||
#else
|
||||
#error "Can't determine architecture"
|
||||
diff --git a/nspr/pr/src/pthreads/ptthread.c b/nspr/pr/src/pthreads/ptthread.c
|
||||
diff --git a/pr/src/pthreads/ptthread.c b/pr/src/pthreads/ptthread.c
|
||||
index 4ab564a..751454a 100644
|
||||
--- a/nspr/pr/src/pthreads/ptthread.c
|
||||
+++ b/nspr/pr/src/pthreads/ptthread.c
|
||||
--- a/pr/src/pthreads/ptthread.c
|
||||
+++ b/pr/src/pthreads/ptthread.c
|
||||
@@ -21,7 +21,7 @@
|
||||
#include <signal.h>
|
||||
#include <dlfcn.h>
|
||||
@@ -302,10 +302,10 @@ index 4ab564a..751454a 100644
|
||||
/* All signal group functions are not implemented in Symbian OS */
|
||||
rv = 0;
|
||||
#else
|
||||
diff --git a/nspr/pr/tests/Makefile.in b/nspr/pr/tests/Makefile.in
|
||||
diff --git a/pr/tests/Makefile.in b/pr/tests/Makefile.in
|
||||
index 9ebd923..5a3276e 100644
|
||||
--- a/nspr/pr/tests/Makefile.in
|
||||
+++ b/nspr/pr/tests/Makefile.in
|
||||
--- a/pr/tests/Makefile.in
|
||||
+++ b/pr/tests/Makefile.in
|
||||
@@ -369,7 +369,7 @@ LIBPTHREAD = -lpthread
|
||||
ifeq ($(OS_ARCH),AIX)
|
||||
LIBPTHREAD = -lpthreads
|
||||
@@ -334,3 +334,30 @@ index 9ebd923..5a3276e 100644
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
|
||||
From 597b244c8133d6d267eea39894f85ae8d9634acf Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Thu, 25 Sep 2014 13:18:12 +0000
|
||||
Subject: Haiku x86_64 support
|
||||
|
||||
|
||||
diff --git a/configure.in b/configure.in
|
||||
index 5361a5b..f0b85e4 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -1322,7 +1322,11 @@ case "$target" in
|
||||
USE_PTHREADS=1
|
||||
IMPL_STRATEGY=_PTH
|
||||
MDCPUCFG_H=_linux.cfg
|
||||
- PR_MD_ASFILES=os_Linux_x86.s
|
||||
+ if test -n "$USE_64"; then
|
||||
+ PR_MD_ASFILES=os_Linux_x86_64.s
|
||||
+ else
|
||||
+ PR_MD_ASFILES=os_Linux_x86.s
|
||||
+ fi
|
||||
PR_MD_CSRCS=linux.c
|
||||
MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
|
||||
DSO_CFLAGS=-fPIC
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
|
||||
Reference in New Issue
Block a user