diff options
author | Thierry Thomas <thierry@FreeBSD.org> | 2013-05-17 04:32:27 +0800 |
---|---|---|
committer | Thierry Thomas <thierry@FreeBSD.org> | 2013-05-17 04:32:27 +0800 |
commit | 3ddb85a7a3aae8e232c826b32e685198f1f22c4c (patch) | |
tree | 0e2a73459d97c42027da5a3b1f58d11463c68575 /cad/opencascade | |
parent | 050331d96c893b8464fb322b9b4fbef1ed5830bc (diff) | |
download | freebsd-ports-gnome-3ddb85a7a3aae8e232c826b32e685198f1f22c4c.tar.gz freebsd-ports-gnome-3ddb85a7a3aae8e232c826b32e685198f1f22c4c.tar.zst freebsd-ports-gnome-3ddb85a7a3aae8e232c826b32e685198f1f22c4c.zip |
Unbreak on FreeBSD-8.x.
Reported by: stephen
Diffstat (limited to 'cad/opencascade')
4 files changed, 38 insertions, 5 deletions
diff --git a/cad/opencascade/Makefile b/cad/opencascade/Makefile index 28b783c5de02..e4ed22f43883 100644 --- a/cad/opencascade/Makefile +++ b/cad/opencascade/Makefile @@ -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} diff --git a/cad/opencascade/files/patch-inc_Standard_CLocaleSentry.hxx b/cad/opencascade/files/patch-inc_Standard_CLocaleSentry.hxx new file mode 100644 index 000000000000..4dbab817d988 --- /dev/null +++ b/cad/opencascade/files/patch-inc_Standard_CLocaleSentry.hxx @@ -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 diff --git a/cad/opencascade/files/patch-src_Standard_Standard_CLocaleSentry.hxx b/cad/opencascade/files/patch-src_Standard_Standard_CLocaleSentry.hxx new file mode 100644 index 000000000000..ccc3a37aacb2 --- /dev/null +++ b/cad/opencascade/files/patch-src_Standard_Standard_CLocaleSentry.hxx @@ -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 diff --git a/cad/opencascade/files/patch-src_Standard_Standard_CString.cxx b/cad/opencascade/files/patch-src_Standard_Standard_CString.cxx new file mode 100644 index 000000000000..0721f110fc46 --- /dev/null +++ b/cad/opencascade/files/patch-src_Standard_Standard_CString.cxx @@ -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) |