Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 May 2013 20:32:28 +0000 (UTC)
From:      Thierry Thomas <thierry@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r318339 - in head/cad/opencascade: . files
Message-ID:  <201305162032.r4GKWSG8002588@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: thierry
Date: Thu May 16 20:32:27 2013
New Revision: 318339
URL: http://svnweb.freebsd.org/changeset/ports/318339

Log:
  Unbreak on FreeBSD-8.x.
  
  Reported by:	stephen

Added:
  head/cad/opencascade/files/patch-inc_Standard_CLocaleSentry.hxx   (contents, props changed)
  head/cad/opencascade/files/patch-src_Standard_Standard_CLocaleSentry.hxx   (contents, props changed)
  head/cad/opencascade/files/patch-src_Standard_Standard_CString.cxx   (contents, props changed)
Modified:
  head/cad/opencascade/Makefile

Modified: head/cad/opencascade/Makefile
==============================================================================
--- head/cad/opencascade/Makefile	Thu May 16 20:28:58 2013	(r318338)
+++ head/cad/opencascade/Makefile	Thu May 16 20:32:27 2013	(r318339)
@@ -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}

Added: head/cad/opencascade/files/patch-inc_Standard_CLocaleSentry.hxx
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/cad/opencascade/files/patch-inc_Standard_CLocaleSentry.hxx	Thu May 16 20:32:27 2013	(r318339)
@@ -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

Added: head/cad/opencascade/files/patch-src_Standard_Standard_CLocaleSentry.hxx
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/cad/opencascade/files/patch-src_Standard_Standard_CLocaleSentry.hxx	Thu May 16 20:32:27 2013	(r318339)
@@ -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

Added: head/cad/opencascade/files/patch-src_Standard_Standard_CString.cxx
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/cad/opencascade/files/patch-src_Standard_Standard_CString.cxx	Thu May 16 20:32:27 2013	(r318339)
@@ -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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305162032.r4GKWSG8002588>