diff options
author | thierry <thierry@FreeBSD.org> | 2013-05-17 04:32:27 +0800 |
---|---|---|
committer | thierry <thierry@FreeBSD.org> | 2013-05-17 04:32:27 +0800 |
commit | 3abce3687975a51c19950210cd8c022d58777b5c (patch) | |
tree | 0e2a73459d97c42027da5a3b1f58d11463c68575 | |
parent | e3078e10bdbcda3af8aa4512dc933dd8264db71d (diff) | |
download | freebsd-ports-gnome-3abce3687975a51c19950210cd8c022d58777b5c.tar.gz freebsd-ports-gnome-3abce3687975a51c19950210cd8c022d58777b5c.tar.zst freebsd-ports-gnome-3abce3687975a51c19950210cd8c022d58777b5c.zip |
Unbreak on FreeBSD-8.x.
Reported by: stephen
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) |