# HG changeset patch # User Michael Schloh von Bennewitz # Date 1231373639 -3600 # Node ID fa4856f209c2c6ab5cfb153fd9175dead475dc5f # Parent d5a681e1cbadd0a714528149d03ce5a43e976419 Correct many embarassing errors for a project claiming portability. diff -r d5a681e1cbad -r fa4856f209c2 stlport/stlport.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/stlport/stlport.patch Thu Jan 08 01:13:59 2009 +0100 @@ -0,0 +1,28 @@ +Index: build/Makefiles/gmake/targetdirs.mak +--- build/Makefiles/gmake/targetdirs.mak.orig 2009-01-07 23:43:14.257973250 +0100 ++++ build/Makefiles/gmake/targetdirs.mak 2009-01-07 23:43:20.537852206 +0100 +@@ -80,10 +80,7 @@ + + define createdirs + @for d in $@ ; do \ +- if [ -e $$d -a -f $$d ] ; then \ +- echo "ERROR: Regular file $$d present, directory instead expected" ; \ +- exit 1; \ +- elif [ ! -d $$d ] ; then \ ++ if [ ! -d $$d ] ; then \ + mkdir -p $$d ; \ + fi ; \ + done +Index: stlport/stl/config/host.h +--- stlport/stl/config/host.h.orig 2009-01-07 23:44:43.751377659 +0100 ++++ stlport/stl/config/host.h 2009-01-07 23:44:20.070524718 +0100 +@@ -316,9 +316,7 @@ + /* + #define __SunOS_5_9 + */ +-/* + #define __SunOS_5_10 +- */ + #endif + + #if defined(__sun) diff -r d5a681e1cbad -r fa4856f209c2 stlport/stlport.spec --- a/stlport/stlport.spec Thu Jan 08 01:12:39 2009 +0100 +++ b/stlport/stlport.spec Thu Jan 08 01:13:59 2009 +0100 @@ -31,14 +31,15 @@ Class: EVAL Group: Language License: STLport -Version: 5.0.2 -Release: 20080101 +Version: 5.2.1 +Release: 20090106 # package options %option with_debug yes # list of sources Source0: http://switch.dl.sourceforge.net/stlport/STLport-%{version}.tar.gz +Patch0: stlport.patch # build information Prefix: %{l_prefix} @@ -66,12 +67,19 @@ } %prep - %setup -q -n STLport + %setup -q -n STLport-%{version} + %patch -p0 %{l_shtool} subst \ - -e 's;\(define _STLP_NATIVE_INCLUDE_PATH\).*;\1 %{l_prefix}/include/g++;' \ - stlport/config/stl_gcc.h + -e 's;^\(# if defined (__QNXNTO__) || ( defined(__GNUC__)\) && defined(__APPLE__) );\1;' \ + src/num_put_float.cpp %{l_shtool} subst \ - -e 's;^\(# if defined (__QNXNTO__) || ( defined(__GNUC__)\) && defined(__APPLE__);\1;' \ + -e 's/__f->_file;/fileno((FILE *)__f);/g' \ + src/_stdio_file.h + %{l_shtool} subst \ + -e 's;\(_STLP_STATIC_ASSERT( sizeof(long double).*\);//\1;' \ + src/num_get_float.cpp + %{l_shtool} subst \ + -e 's;( \(defined(__GNUC__)\);\1;' \ src/num_put_float.cpp %build @@ -79,7 +87,7 @@ %if "%{with_debug}" == "yes" buildtargets="$buildtargets dbg-static stldbg-static" %endif - cd build/lib && %{l_make} %{l_mflags} -f gcc.mak $buildtargets + cd build/lib && %{l_make} %{l_mflags -O} -f gcc.mak $buildtargets %install rm -rf $RPM_BUILD_ROOT