From 4f51476e2a85dc5acf309faaaba681dfccd4b682 Mon Sep 17 00:00:00 2001 From: Alexander Leidinger Date: Sun, 5 Oct 2003 08:29:55 +0000 Subject: [PATCH] Fix stlport: ---snip--- The patch is tested (and works) on FreeBSD/i386 -stable and -current with GCC. Although there are no ICC-specific changes I verified that it doesn't break lang/stlport-icc. On FreeBSD/alpha and FreeBSD/sparc64 -current lang/stlport compiles with this patch however the exception handling test fails. On alpha this looks like a GCC-bug, on sparc64 it could be also a bug in FreeBSD however GCC is known to have bugs there. The patch has also a small fix for the Makefile of the port to allow concurrent buils with `make -jX`. The wchar-related part of the patch (which is also needed to fix compilation on -current) is obtained from the STLport CVS repository. ---snip--- PR: 57267 Submitted by: Marius Strobl Approved by: maintainer --- devel/stlport/Makefile | 2 +- .../files/patch-stlport::config::stl_gcc.h | 35 +++++++++++++++++-- devel/stlport/files/patch-stlport::cwchar | 22 ------------ .../files/patch-stlport::stl::_bvector.h | 12 +++++++ 4 files changed, 45 insertions(+), 26 deletions(-) create mode 100644 devel/stlport/files/patch-stlport::stl::_bvector.h diff --git a/devel/stlport/Makefile b/devel/stlport/Makefile index 9bc8dfb0bec0..5dd7c2f5c875 100644 --- a/devel/stlport/Makefile +++ b/devel/stlport/Makefile @@ -72,7 +72,7 @@ post-install: post-build: test .endif -test: +test: do-build cd ${WRKSRC}/../test/eh && ${SETENV} CC=${CC} CXX=${CXX} \ ${GMAKE} -f ${MAKEFILE} PTHREAD_CFLAGS=${PTHREAD_CFLAGS} \ PTHREAD_LIBS=${PTHREAD_LIBS} PTHREAD_CFLAGS=${PTHREAD_CFLAGS} \ diff --git a/devel/stlport/files/patch-stlport::config::stl_gcc.h b/devel/stlport/files/patch-stlport::config::stl_gcc.h index 234f2315262b..15f2b6db3eb5 100644 --- a/devel/stlport/files/patch-stlport::config::stl_gcc.h +++ b/devel/stlport/files/patch-stlport::config::stl_gcc.h @@ -1,12 +1,41 @@ --- stlport/config/stl_gcc.h.orig Thu Jan 10 19:41:58 2002 +++ stlport/config/stl_gcc.h Thu Jun 6 23:15:40 2002 -@@ -250,8 +250,13 @@ +@@ -9,8 +9,14 @@ + + # define _STLP_NO_MEMBER_TEMPLATE_KEYWORD + +-# if defined(__FreeBSD__) || defined (__hpux) || defined(__amigaos__) ++# if defined (__hpux) || defined(__amigaos__) + # define _STLP_NO_WCHAR_T ++# elif defined(__FreeBSD__) ++# if (__FreeBSD_cc_version < 500005) ++# define _STLP_NO_WCHAR_T ++# else ++# define _STLP_FREEBSD_HAS_WFUNCS ++# endif /* __FreeBSD_cc_version < 500005 */ + # endif + + # if defined (__sun) +@@ -77,7 +83,7 @@ + + # endif + +-#if defined (__CYGWIN__) || defined (__MINGW32__) || !(defined (_STLP_USE_GLIBC) || defined (__sun)) ++#if defined (__CYGWIN__) || defined (__MINGW32__) || !(defined (_STLP_USE_GLIBC) || defined (_STLP_FREEBSD_HAS_WFUNCS) || defined (__sun)) + #ifndef __MINGW32__ + # define _STLP_NO_NATIVE_MBSTATE_T 1 + #endif +@@ -250,8 +256,17 @@ # if (__GNUC__ >= 3) +#ifdef __FreeBSD__ -+# define _STLP_NATIVE_INCLUDE_PATH ../g++ -+# define _STLP_NATIVE_OLD_STREAMS_INCLUDE_PATH ../g++/backward ++# if (__FreeBSD_cc_version > 500005) ++# define _STLP_NATIVE_INCLUDE_PATH ../__GNUC__.__GNUC_MINOR__ ++# else ++# define _STLP_NATIVE_INCLUDE_PATH ../g++ ++# define _STLP_NATIVE_OLD_STREAMS_INCLUDE_PATH ../g++/backward ++# endif +#else # define _STLP_NATIVE_INCLUDE_PATH ../g++-v3 # define _STLP_NATIVE_OLD_STREAMS_INCLUDE_PATH ../g++-v3/backward diff --git a/devel/stlport/files/patch-stlport::cwchar b/devel/stlport/files/patch-stlport::cwchar index 4df0e93ede50..e69de29bb2d1 100644 --- a/devel/stlport/files/patch-stlport::cwchar +++ b/devel/stlport/files/patch-stlport::cwchar @@ -1,22 +0,0 @@ ---- stlport/cwchar.orig Thu Jan 10 19:41:56 2002 -+++ stlport/cwchar Thu Jun 6 23:24:28 2002 -@@ -21,6 +21,10 @@ - # include - # endif - -+#if defined (__FreeBSD__) && defined (__GNUC__) -+# include <../wchar.h> -+#endif -+ - # ifdef __GNUC__ - # include - # endif -@@ -36,7 +40,7 @@ - # elif defined (__MRC__) || defined (__SC__) || defined (__BORLANDC__) || defined(__FreeBSD__) || (defined (__GNUC__) && defined (__APPLE__) || defined( __Lynx__ )) || defined (_STLP_NO_WCHAR_T) - - # include _STLP_NATIVE_C_HEADER(stddef.h) --# if defined (__FreeBSD__) || defined (__Lynx__) -+# if defined (__Lynx__) - # ifndef _WINT_T - typedef long int wint_t; - # define _WINT_T diff --git a/devel/stlport/files/patch-stlport::stl::_bvector.h b/devel/stlport/files/patch-stlport::stl::_bvector.h new file mode 100644 index 000000000000..7fa2212e8298 --- /dev/null +++ b/devel/stlport/files/patch-stlport::stl::_bvector.h @@ -0,0 +1,12 @@ +--- stlport/stl/_bvector.h.orig Fri Oct 3 23:22:06 2003 ++++ stlport/stl/_bvector.h Fri Oct 3 23:22:38 2003 +@@ -34,7 +34,9 @@ + # include + # endif + ++#ifndef __WORD_BIT + #define __WORD_BIT (int(CHAR_BIT*sizeof(unsigned int))) ++#endif + + _STLP_BEGIN_NAMESPACE +