1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-26 09:46:09 +00:00

Unbreak on FreeBSD-8.x.

Reported by:	stephen
This commit is contained in:
Thierry Thomas 2013-05-16 20:32:27 +00:00
parent 050331d96c
commit 3ddb85a7a3
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=318339
4 changed files with 38 additions and 5 deletions

View File

@ -50,10 +50,6 @@ PLIST_SUB= OCCROOT="${LOCCROOT}"
.include <bsd.port.options.mk>
.if ${OSVERSION} < 900506
BROKEN= does not build on FreeBSD-8.x (xlocale.h required)
.endif
.if ${PORT_OPTIONS:MTBB}
LIB_DEPENDS+= tbb:${PORTSDIR}/devel/tbb
CONFIGURE_ARGS+=--with-tbb-include=${LOCALBASE}/include \
@ -158,7 +154,8 @@ pre-configure:
post-install:
${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/include/OpenCASCADE
${RM} ${OCCROOT}/src/OS/*.orig ${OCCROOT}/src/DrawResources/*.orig
${RM} ${OCCROOT}/src/OS/*.orig ${OCCROOT}/src/DrawResources/*.orig \
${PREFIX}/include/OpenCASCADE/Standard_CLocaleSentry.hxx.orig
cd ${WRKSRC}/src && ${COPYTREE_SHARE} UnitsAPI ${OCCROOT}/src
.if ${PORT_OPTIONS:MDATA}
${MKDIR} ${DATADIR}

View File

@ -0,0 +1,11 @@
--- inc/Standard_CLocaleSentry.hxx.orig 2013-05-15 15:38:02.000000000 +0700
+++ inc/Standard_CLocaleSentry.hxx 2013-05-15 15:57:18.000000000 +0700
@@ -29,7 +29,7 @@
//! Notice that this is impossible to test (_POSIX_C_SOURCE >= 200809L)
//! since POSIX didn't declared such identifier.
//! We check _GNU_SOURCE for glibc extensions here and it is always defined by g++ compiler.
-#if defined(__APPLE__) || defined(_GNU_SOURCE) || defined(HAVE_XLOCALE_H)
+#if defined(__APPLE__) || (defined(_GNU_SOURCE) && !defined(__FreeBSD__)) || defined(HAVE_XLOCALE_H) || (defined(__FreeBSD__) && (__FreeBSD_version>=900506))
#include <xlocale.h>
#ifndef HAVE_XLOCALE_H
#define HAVE_XLOCALE_H

View File

@ -0,0 +1,14 @@
--- src/Standard/Standard_CLocaleSentry.hxx.orig 2013-04-18 17:20:16.000000000 +0200
+++ src/Standard/Standard_CLocaleSentry.hxx 2013-05-13 18:57:58.000000000 +0200
@@ -29,7 +29,10 @@
//! Notice that this is impossible to test (_POSIX_C_SOURCE >= 200809L)
//! since POSIX didn't declared such identifier.
//! We check _GNU_SOURCE for glibc extensions here and it is always defined by g++ compiler.
-#if defined(__APPLE__) || defined(_GNU_SOURCE) || defined(HAVE_XLOCALE_H)
+#ifdef __FreeBSD__
+ #include <sys/param.h>
+#endif
+#if defined(__APPLE__) || defined(_GNU_SOURCE) || defined(HAVE_XLOCALE_H) || (__FreeBSD_version >= 900506)
#include <xlocale.h>
#ifndef HAVE_XLOCALE_H
#define HAVE_XLOCALE_H

View File

@ -0,0 +1,11 @@
--- src/Standard/Standard_CString.cxx.orig 2013-05-15 15:59:21.000000000 +0700
+++ src/Standard/Standard_CString.cxx 2013-05-15 15:59:52.000000000 +0700
@@ -274,7 +274,7 @@
// So we switch to C locale temporarily
#define SAVE_TL() Standard_CLocaleSentry aLocaleSentry;
#ifndef HAVE_XLOCALE_H
- #error System does not support xlocale. Import/export could be broken if C locale did not specified by application.
+// #error System does not support xlocale. Import/export could be broken if C locale did not specified by application.
#define strtod_l(thePtr, theNextPtr, theLocale) strtod(thePtr, theNextPtr)
#endif
#define vprintf_l(theLocale, theFormat, theArgPtr) vprintf(theFormat, theArgPtr)