Update to v1.3.3 Fix: Patch attached with submission follows:
Responsible Changed From-To: freebsd-ports-bugs->miwi I'll take it.
This patch replaces the previous one. Following on from ports/180190 I found that devel/llvm v3.2 doesn't play with clang v3.3 (at least not llvm-as). Changing to use devel/llvm33 is a workable solution that I have tested on 8.4 and 9.2-BETA1 (compile) and 9.1 (run) - 10-CURRENT not tested yet. I have also added a patch that needs to be applied to graphics/blender to work with llvm33.
Author: miwi Date: Sat Jul 20 20:36:42 2013 New Revision: 323359 URL: http://svnweb.freebsd.org/changeset/ports/323359 Log: - Update to 1.3.3 PR: 180650 Added: head/graphics/openshadinglanguage/files/patch-cmake_platform.cmake (contents, props changed) Modified: head/graphics/openshadinglanguage/Makefile head/graphics/openshadinglanguage/distinfo Modified: head/graphics/openshadinglanguage/Makefile ============================================================================== --- head/graphics/openshadinglanguage/Makefile Sat Jul 20 20:35:56 2013 (r323358) +++ head/graphics/openshadinglanguage/Makefile Sat Jul 20 20:36:42 2013 (r323359) @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= openshadinglanguage -PORTVERSION= 1.3.1 +PORTVERSION= 1.3.3 CATEGORIES= graphics devel MAINTAINER= FreeBSD@Shaneware.biz @@ -21,7 +21,7 @@ USE_GITHUB= yes GH_ACCOUNT= imageworks GH_PROJECT= OpenShadingLanguage GH_TAGNAME= Release-${PORTVERSION} -GH_COMMIT= 0ae2fe3 +GH_COMMIT= 18671dc WRKSRC= ${WRKDIR}/imageworks-OpenShadingLanguage-${GH_COMMIT}/src Modified: head/graphics/openshadinglanguage/distinfo ============================================================================== --- head/graphics/openshadinglanguage/distinfo Sat Jul 20 20:35:56 2013 (r323358) +++ head/graphics/openshadinglanguage/distinfo Sat Jul 20 20:36:42 2013 (r323359) @@ -1,2 +1,2 @@ -SHA256 (openshadinglanguage-1.3.1.tar.gz) = 34b179693da43c889eb2a36cd474c7802c03087d6068328b7a3b3e8143d9ce3d -SIZE (openshadinglanguage-1.3.1.tar.gz) = 10317059 +SHA256 (openshadinglanguage-1.3.3.tar.gz) = 55c62a3eeedbf7dea5a672e0bdd73cc0fbf9c60e89d72d77bff5eb9cccca7578 +SIZE (openshadinglanguage-1.3.3.tar.gz) = 10316937 Added: head/graphics/openshadinglanguage/files/patch-cmake_platform.cmake ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/openshadinglanguage/files/patch-cmake_platform.cmake Sat Jul 20 20:36:42 2013 (r323359) @@ -0,0 +1,12 @@ +--- ./cmake/platform.cmake.orig 2013-07-19 15:08:25.918110424 +0930 ++++ ./cmake/platform.cmake 2013-07-19 15:11:10.254109449 +0930 +@@ -32,6 +32,9 @@ + elseif (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") + set (platform "FreeBSD") + set (CXXFLAGS "${CXXFLAGS} -DFREEBSD") ++ if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "i386") ++ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=i586") ++ endif() + else () + string (TOLOWER ${CMAKE_SYSTEM_NAME} platform) + endif () _______________________________________________ svn-ports-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-ports-all To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Some notes. If LLVM 3.3 is requisite for graphics/openshadinglanguage and port devel/llvm refers invaraint to LLVM 3.2, then this should be reflected by the Makefile of graphics/openshadinglanguage, shouldn't it? It installs by default devel/llvm, which definitely doesn't work. Regards, Oliver
Trying to simply apply the patchfile (last one in line, latest) via root@thor:/usr/ports/graphics/ #: patch \ < /tmp/openshadinglanguage.patch.txt doesn't work properly for me! The patched files belonging to the subfolder "files" in openshadinglanguage are created in /usr/ports/graphics, Makefile is "rejected". Obviously, the port has been patched with the first patchset proposed. oh
This patch brings the current svn up to the previous patch. This update fixes 9.2 and current to compile using clang 3.3 For consistency 8.x is changed to use clang33 as well. The blender patch has also been updated.
Patch for openshadinglanguage helped by an update, but for the blender - did not help ... Scanning dependencies of target bf_imbuf_dds [ 54%] Building CXX object source/blender/imbuf/intern/dds/CMakeFiles/bf_imbuf_dds.dir/BlockDXT.cpp.o [ 54%] Building CXX object source/blender/imbuf/intern/dds/CMakeFiles/bf_imbuf_dds.dir/DirectDrawSurface.cpp.o [ 54%] Building CXX object source/blender/imbuf/intern/dds/CMakeFiles/bf_imbuf_dds.dir/FlipDXT.cpp.o [ 54%] Building CXX object source/blender/imbuf/intern/dds/CMakeFiles/bf_imbuf_dds.dir/ColorBlock.cpp.o [ 54%] Building CXX object source/blender/imbuf/intern/dds/CMakeFiles/bf_imbuf_dds.dir/Image.cpp.o [ 54%] Building CXX object source/blender/imbuf/intern/dds/CMakeFiles/bf_imbuf_dds.dir/Stream.cpp.o [ 55%] Building CXX object source/blender/imbuf/intern/dds/CMakeFiles/bf_imbuf_dds.dir/dds_api.cpp.o Linking CXX static library ../../../../../lib/libbf_imbuf_dds.a [ 55%] Built target bf_imbuf_dds Scanning dependencies of target bf_imbuf_cineon [ 55%] Building C object source/blender/imbuf/intern/cineon/CMakeFiles/bf_imbuf_cineon.dir/cineon_dpx.c.o [ 55%] Building C object source/blender/imbuf/intern/cineon/CMakeFiles/bf_imbuf_cineon.dir/cineonlib.c.o [ 55%] Building C object source/blender/imbuf/intern/cineon/CMakeFiles/bf_imbuf_cineon.dir/dpxlib.c.o [ 55%] Building C object source/blender/imbuf/intern/cineon/CMakeFiles/bf_imbuf_cineon.dir/logImageCore.c.o /usr/ports_build/usr/ports/graphics/blender/work/blender-2.68/source/blender/imbuf/intern/cineon/cineonlib.c:280:70: error: controlling expression type 'unsigned int' not compatible with any generic association type if (cineon->element[i].refLowData == CINEON_UNDEFINED_U32 || isnan(cineon->element[i].refLowData)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/math.h:118:19: note: expanded from macro 'isnan' __fp_type_select(x, __inline_isnanf, __inline_isnan, __inline_isnanl) ^ /usr/include/math.h:86:49: note: expanded from macro '__fp_type_select' #define __fp_type_select(x, f, d, ld) _Generic((x), \ ^ /usr/ports_build/usr/ports/graphics/blender/work/blender-2.68/source/blender/imbuf/intern/cineon/dpxlib.c:303:66: error: controlling expression type 'unsigned int' not compatible with any generic association type if (dpx->element[i].refLowData == DPX_UNDEFINED_U32 || isnan(dpx->element[i].refLowData)) ^~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/math.h:118:19: note: expanded from macro 'isnan' __fp_type_select(x, __inline_isnanf, __inline_isnan, __inline_isnanl) ^ /usr/include/math.h:86:49: note: expanded from macro '__fp_type_select' #define __fp_type_select(x, f, d, ld) _Generic((x), \ ^ /usr/ports_build/usr/ports/graphics/blender/work/blender-2.68/source/blender/imbuf/intern/cineon/cineonlib.c:283:71: error: controlling expression type 'unsigned int' not compatible with any generic association type if (cineon->element[i].refHighData == CINEON_UNDEFINED_U32 || isnan(cineon->element[i].refHighData)) /usr/ports_build/usr/ports/graphics/blender/work/blender-2.68/source/blender/imbuf/intern/cineon/dpxlib.c:306:67: error: controlling expression type 'unsigned int' not compatible with any generic association type if (dpx->element[i].refHighData == DPX_UNDEFINED_U32 || isnan(dpx->element[i].refHighData)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/math.h:118:19: note: expanded from macro 'isnan' __fp_type_select(x, __inline_isnanf, __inline_isnan, __inline_isnanl) ^ /usr/include/math.h:86:49: note: expanded from macro '__fp_type_select' #define __fp_type_select(x, f, d, ld) _Generic((x), \ ^ 2 errors generated. /usr/include/math.h:118:19: note: expanded from macro 'isnan' __fp_type_select(x, __inline_isnanf, __inline_isnan, __inline_isnanl) ^ /usr/include/math.h:86:49: note: expanded from macro '__fp_type_select' #define __fp_type_select(x, f, d, ld) _Generic((x), \ ^ /usr/ports_build/usr/ports/graphics/blender/work/blender-2.68/source/blender/imbuf/intern/cineon/dpxlib.c:327:66: error: controlling expression type 'unsigned int' not compatible with any generic association type if (dpx->element[i].refLowData == DPX_UNDEFINED_U32 || isnan(dpx->element[i].refLowData)) ^~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/math.h:118:19: note: expanded from macro 'isnan' __fp_type_select(x, __inline_isnanf, __inline_isnan, __inline_isnanl) ^ /usr/include/math.h:86:49: note: expanded from macro '__fp_type_select' #define __fp_type_select(x, f, d, ld) _Generic((x), \ ^ /usr/ports_build/usr/ports/graphics/blender/work/blender-2.68/source/blender/imbuf/intern/cineon/dpxlib.c:330:67: error: controlling expression type 'unsigned int' not compatible with any generic association type if (dpx->element[i].refHighData == DPX_UNDEFINED_U32 || isnan(dpx->element[i].refHighData)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/math.h:118:19: note: expanded from macro 'isnan' __fp_type_select(x, __inline_isnanf, __inline_isnan, __inline_isnanl) ^ /usr/include/math.h:86:49: note: expanded from macro '__fp_type_select' #define __fp_type_select(x, f, d, ld) _Generic((x), \ ^ --- source/blender/imbuf/intern/cineon/CMakeFiles/bf_imbuf_cineon.dir/cineonlib.c.o --- *** [source/blender/imbuf/intern/cineon/CMakeFiles/bf_imbuf_cineon.dir/cineonlib.c.o] Error code 1 make[4]: stopped in /usr/ports_build/usr/ports/graphics/blender/work/.build 4 errors generated. --- source/blender/imbuf/intern/cineon/CMakeFiles/bf_imbuf_cineon.dir/dpxlib.c.o --- *** [source/blender/imbuf/intern/cineon/CMakeFiles/bf_imbuf_cineon.dir/dpxlib.c.o] Error code 1 make[4]: stopped in /usr/ports_build/usr/ports/graphics/blender/work/.build 2 errors make[4]: stopped in /usr/ports_build/usr/ports/graphics/blender/work/.build *** Error code 2 Stop. make[3]: stopped in /usr/ports_build/usr/ports/graphics/blender/work/.build --- all --- *** [all] Error code 1 make[2]: stopped in /usr/ports_build/usr/ports/graphics/blender/work/.build 1 error make[2]: stopped in /usr/ports_build/usr/ports/graphics/blender/work/.build ===> Compilation failed unexpectedly. Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to the maintainer. *** Error code 1 Stop. make[1]: stopped in /usr/ports/graphics/blender *** Error code 1 Stop. make: stopped in /usr/ports/graphics/blender ===>>> make failed for graphics/blender ===>>> Aborting update ===>>> Killing background jobs Terminated
That issue compiling blender is related to math.h/cmath changes for c++11 and not to the openshadinglanguage libs. O.Hartmann has sent this issue to freebsd-ports mailing list earlier.
Responsible Changed From-To: miwi->freebsd-ports-bugs Back to the heap due to timeout
Responsible Changed From-To: freebsd-ports-bugs->tijl Take.
Author: tijl Date: Thu Nov 7 14:00:44 2013 New Revision: 333100 URL: http://svnweb.freebsd.org/changeset/ports/333100 Log: - Import patches from upstream to fix build on FreeBSD 10 (clang, libc++) - Depend on llvm33 and clang33. - New LIB_DEPENDS syntax. - Staging. - Replace some patches with Makefile magic. PR: ports/180190, ports/180650 Submitted by: Shane Ambler <FreeBSD@ShaneWare.Biz> (maintainer) Added: head/graphics/openshadinglanguage/files/patch-CMakeLists.txt (contents, props changed) head/graphics/openshadinglanguage/files/patch-liboslcomp__CMakeLists.txt (contents, props changed) head/graphics/openshadinglanguage/files/patch-liboslcomp__oslcomp.cpp (contents, props changed) head/graphics/openshadinglanguage/files/patch-liboslexec__constfold.cpp (contents, props changed) head/graphics/openshadinglanguage/files/patch-liboslexec__dictionary.cpp (contents, props changed) head/graphics/openshadinglanguage/files/patch-liboslexec__llvm_gen.cpp (contents, props changed) head/graphics/openshadinglanguage/files/patch-liboslexec__llvm_instance.cpp (contents, props changed) head/graphics/openshadinglanguage/files/patch-liboslexec__runtimeoptimize.h (contents, props changed) Deleted: head/graphics/openshadinglanguage/files/patch-cmake_platform.cmake head/graphics/openshadinglanguage/files/patch-liboslexec__CMakeLists.txt head/graphics/openshadinglanguage/files/patch-liboslexec__llvm_ops.cpp Modified: head/graphics/openshadinglanguage/Makefile Modified: head/graphics/openshadinglanguage/Makefile ============================================================================== --- head/graphics/openshadinglanguage/Makefile Thu Nov 7 13:55:25 2013 (r333099) +++ head/graphics/openshadinglanguage/Makefile Thu Nov 7 14:00:44 2013 (r333100) @@ -3,7 +3,7 @@ PORTNAME= openshadinglanguage PORTVERSION= 1.3.3 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= graphics devel MAINTAINER= FreeBSD@Shaneware.biz @@ -11,12 +11,12 @@ COMMENT= Advanced shading language for p LICENSE= BSD -BUILD_DEPENDS= llvm>=3.1:${PORTSDIR}/devel/llvm \ - flex>=2.5.37:${PORTSDIR}/textproc/flex -LIB_DEPENDS= boost_thread:${PORTSDIR}/devel/boost-libs \ - IlmImf:${PORTSDIR}/graphics/OpenEXR \ - OpenImageIO:${PORTSDIR}/graphics/openimageio -RUN_DEPENDS= llvm>=3.1:${PORTSDIR}/devel/llvm +BUILD_DEPENDS= llvm-config33:${PORTSDIR}/devel/llvm33 \ + clang33>=3.3_3:${PORTSDIR}/lang/clang33 +LIB_DEPENDS= libboost_thread.so:${PORTSDIR}/devel/boost-libs \ + libIlmImf.so:${PORTSDIR}/graphics/OpenEXR \ + libOpenImageIO.so:${PORTSDIR}/graphics/openimageio +RUN_DEPENDS= llvm-config33:${PORTSDIR}/devel/llvm33 USE_GITHUB= yes GH_ACCOUNT= imageworks @@ -26,27 +26,30 @@ GH_COMMIT= 18671dc WRKSRC= ${WRKDIR}/imageworks-OpenShadingLanguage-${GH_COMMIT}/src -CMAKE_ARGS= -DFLEX_EXECUTABLE:STRING=${LOCALBASE}/bin/flex \ - -DUSE_TBB:BOOL=OFF -CXXFLAGS+= -I${LOCALBASE}/include/flex +CMAKE_ARGS= -DLLVM_CONFIG:STRING="${LOCALBASE}/bin/llvm-config33" USE_LDCONFIG= yes USES= bison cmake:outsource -NO_STAGE= yes -.include <bsd.port.pre.mk> +.include <bsd.port.options.mk> -.if ${OSVERSION} < 900000 -BUILD_DEPENDS+= clang:${PORTSDIR}/lang/clang +.if ${ARCH} == i386 && ! ${MACHINE_CPU:Mi586} +IGNORE= CPUTYPE must be i586 or higher in /etc/make.conf .endif -.if ${ARCH} == i386 -CFLAGS+= -march=i586 +.if ${OSVERSION} < 1000033 +BUILD_DEPENDS+= flex>=2.5.37:${PORTSDIR}/textproc/flex +CMAKE_ARGS+= -DFLEX_EXECUTABLE:STRING=${LOCALBASE}/bin/flex +CXXFLAGS+= -I${LOCALBASE}/include/flex .endif +post-patch: + @${REINPLACE_CMD} -e 's,/bin/bash,/bin/sh,' \ + ${WRKSRC}/liboslexec/serialize-bc.bash + post-install: .for LNAME in oslcomp oslexec oslquery testshade - cd ${PREFIX}/lib && ${MV} -f lib${LNAME}.so lib${LNAME}.so.1 - cd ${PREFIX}/lib && ${LN} -sf lib${LNAME}.so.1 lib${LNAME}.so + ${MV} ${STAGEDIR}${PREFIX}/lib/lib${LNAME}.so ${STAGEDIR}${PREFIX}/lib/lib${LNAME}.so.1 + ${LN} -s lib${LNAME}.so.1 ${STAGEDIR}${PREFIX}/lib/lib${LNAME}.so .endfor -.include <bsd.port.post.mk> +.include <bsd.port.mk> Added: head/graphics/openshadinglanguage/files/patch-CMakeLists.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/openshadinglanguage/files/patch-CMakeLists.txt Thu Nov 7 14:00:44 2013 (r333100) @@ -0,0 +1,86 @@ +--- CMakeLists.txt.orig 2013-07-12 01:01:18.000000000 +0200 ++++ CMakeLists.txt 2013-11-05 21:12:26.000000000 +0100 +@@ -9,10 +9,8 @@ + set (OSO_FILE_VERSION_MAJOR 1) + set (OSO_FILE_VERSION_MINOR 0) + +-cmake_minimum_required (VERSION 2.6) +-if (NOT CMAKE_VERSION VERSION_LESS 2.8.4) +- cmake_policy (SET CMP0017 NEW) +-endif () ++cmake_minimum_required (VERSION 2.8.7) ++cmake_policy (SET CMP0017 NEW) + set (CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE) + message (STATUS "Project source dir = ${PROJECT_SOURCE_DIR}") + message (STATUS "Project build dir = ${CMAKE_BINARY_DIR}") +@@ -21,6 +19,8 @@ + message (FATAL_ERROR "Not allowed to run in-source build!") + endif () + ++include (CheckCXXSymbolExists) ++ + if (NOT CMAKE_BUILD_TYPE) + set (CMAKE_BUILD_TYPE "Release") + endif () +@@ -42,12 +42,11 @@ + OUTPUT_STRIP_TRAILING_WHITESPACE) + message (STATUS "Using gcc ${GCC_VERSION} as the compiler") + endif () +-if (NOT CMAKE_COMPILER_IS_CLANG) +- string (REGEX MATCH clang CMAKE_COMPILER_IS_CLANG ${CMAKE_CXX_COMPILER}) +- if (CMAKE_COMPILER_IS_CLANG) +- set (CMAKE_COMPILER_IS_CLANG 1) +- message (STATUS "Using clang as the compiler") +- endif () ++ ++message (STATUS "CMAKE_CXX_COMPILER_ID is ${CMAKE_CXX_COMPILER_ID}") ++if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") ++ set (CMAKE_COMPILER_IS_CLANG 1) ++ message (STATUS "Using clang as the compiler") + endif () + + ## turn on more detailed warnings and consider warnings as errors +@@ -121,6 +120,10 @@ + endif () + endif () + ++# Try to detect libc++, in which case we should force use of Boost ++# Wave (because that avoids a nonstandard g++ extension in the other ++# code path). ++check_cxx_symbol_exists(_LIBCPP_VERSION string OSL_SYSTEM_HAS_LIBCPP) + + set (VERBOSE OFF CACHE BOOL "Print lots of messages while compiling") + set (BUILDSTATIC OFF CACHE BOOL "Build static library instead of shared") +@@ -129,12 +132,16 @@ + "Use an externally built shared library version of the pugixml library") + set (PUGIXML_HOME "" CACHE STRING "Hint about where to find external PugiXML library") + if (WIN32) +- set (USE_BOOST_WAVE ON CACHE BOOL "Use Boost Wave as preprocessor") + set (USE_LLVM_BITCODE OFF CACHE BOOL "Generate embedded LLVM bitcode") + else () +- set (USE_BOOST_WAVE OFF CACHE BOOL "Use Boost Wave as preprocessor") + set (USE_LLVM_BITCODE ON CACHE BOOL "Generated embedded LLVM bitcode") + endif () ++if (WIN32 OR OSL_SYSTEM_HAS_LIBCPP) ++ set (USE_BOOST_WAVE ON CACHE BOOL "Use Boost Wave as preprocessor") ++else () ++ set (USE_BOOST_WAVE OFF CACHE BOOL "Use Boost Wave as preprocessor") ++endif () ++ + set (USE_PARTIO ON CACHE BOOL "Use Partio if found") + + if (LLVM_NAMESPACE) +@@ -149,6 +156,13 @@ + add_definitions ("${EXTRA_CPP_DEFINITIONS}") + endif() + ++if (USE_BOOST_WAVE) ++ add_definitions ("-DUSE_BOOST_WAVE") ++endif () ++ ++if (CMAKE_COMPILER_IS_CLANG AND OSL_SYSTEM_HAS_LIBCPP) ++ message (STATUS "Using libc++") ++endif () + + set (CMAKE_MODULE_PATH + "${PROJECT_SOURCE_DIR}/cmake/modules" Added: head/graphics/openshadinglanguage/files/patch-liboslcomp__CMakeLists.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/openshadinglanguage/files/patch-liboslcomp__CMakeLists.txt Thu Nov 7 14:00:44 2013 (r333100) @@ -0,0 +1,9 @@ +--- ./liboslcomp/CMakeLists.txt.orig 2013-07-12 08:31:18.000000000 +0930 ++++ ./liboslcomp/CMakeLists.txt 2013-11-03 18:07:25.644118883 +1030 +@@ -29,6 +29,3 @@ + INSTALL ( TARGETS oslcomp LIBRARY DESTINATION lib ) + endif () + +-IF ( USE_BOOST_WAVE ) +- ADD_DEFINITIONS ( -DUSE_BOOST_WAVE ) +-ENDIF () Added: head/graphics/openshadinglanguage/files/patch-liboslcomp__oslcomp.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/openshadinglanguage/files/patch-liboslcomp__oslcomp.cpp Thu Nov 7 14:00:44 2013 (r333100) @@ -0,0 +1,20 @@ +--- ./liboslcomp/oslcomp.cpp.orig 2013-07-12 08:31:18.000000000 +0930 ++++ ./liboslcomp/oslcomp.cpp 2013-11-03 18:07:25.646119281 +1030 +@@ -32,7 +32,7 @@ + #include <fstream> + #include <cstdio> + #include <streambuf> +-#ifdef __GNUC__ ++#if defined(__GNUC__) && !defined(_LIBCPP_VERSION) && !defined(USE_BOOST_WAVE) + # include <ext/stdio_filebuf.h> + #endif + #include <cstdio> +@@ -268,7 +268,7 @@ + // std::cout << "cpp command:\n>" << cppcommand << "<\n"; + FILE *cpppipe = popen (cppcommand.c_str(), "r"); + +-#ifdef __GNUC__ ++#if defined(__GNUC__) && !defined(_LIBCPP_VERSION) + __gnu_cxx::stdio_filebuf<char> fb (cpppipe, std::ios::in); + #else + std::filebuf fb (cpppipe); Added: head/graphics/openshadinglanguage/files/patch-liboslexec__constfold.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/openshadinglanguage/files/patch-liboslexec__constfold.cpp Thu Nov 7 14:00:44 2013 (r333100) @@ -0,0 +1,42 @@ +--- ./liboslexec/constfold.cpp.orig 2013-07-12 08:31:18.000000000 +0930 ++++ ./liboslexec/constfold.cpp 2013-11-03 18:07:25.648118961 +1030 +@@ -882,19 +882,22 @@ + { + Opcode &op (rop.inst()->ops()[opnum]); + // Symbol &R (*rop.inst()->argsymbol(op.firstarg()+0)); +- Symbol &Str (*rop.inst()->argsymbol(op.firstarg()+1)); +- Symbol &Results (*rop.inst()->argsymbol(op.firstarg()+2)); +- Symbol &Sep (*rop.inst()->argsymbol(op.firstarg()+3)); +- Symbol &Maxsplit (*rop.inst()->argsymbol(op.firstarg()+4)); +- if (Str.is_constant() && Sep.is_constant() && Maxsplit.is_constant()) { ++ Symbol &Str (*rop.opargsym (op, 1)); ++ Symbol &Results (*rop.opargsym (op, 2)); ++ Symbol *Sep (rop.opargsym (op, 3)); ++ Symbol *Maxsplit (rop.opargsym (op, 4)); ++ if (Str.is_constant() && (!Sep || Sep->is_constant()) && ++ (!Maxsplit || Maxsplit->is_constant())) { + // The split string, separator string, and maxsplit are all constants. + // Compute the results with Strutil::split. + int resultslen = Results.typespec().arraylength(); +- int maxsplit = Imath::clamp (*(int *)Maxsplit.data(), 0, resultslen); ++ int maxsplit = Maxsplit ? *(int *)Maxsplit->data() : resultslen; ++ maxsplit = std::min (maxsplit, resultslen); + std::vector<std::string> splits; ++ ustring sep = Sep ? (*(ustring *)Sep->data()) : ustring(""); + Strutil::split ((*(ustring *)Str.data()).string(), splits, +- (*(ustring *)Sep.data()).string(), maxsplit); +- int n = std::min (maxsplit, (int)splits.size()); ++ sep.string(), maxsplit); ++ int n = std::min (std::max(0,maxsplit), (int)splits.size()); + // Temporarily stash the index of the symbol holding results + int resultsarg = rop.inst()->args()[op.firstarg()+2]; + // Turn the 'split' into a straight assignment of the return value... +@@ -1337,7 +1340,7 @@ + *(const float *)Y.data() == 2.0f) { + // Turn x^2 into x*x, even if x is not constant + static ustring kmul("mul"); +- op.reset (kmul, 2); ++ op.reset (kmul, 3); + rop.inst()->args()[op.firstarg()+2] = rop.inst()->args()[op.firstarg()+1]; + return 1; + } Added: head/graphics/openshadinglanguage/files/patch-liboslexec__dictionary.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/openshadinglanguage/files/patch-liboslexec__dictionary.cpp Thu Nov 7 14:00:44 2013 (r333100) @@ -0,0 +1,11 @@ +--- ./liboslexec/dictionary.cpp.orig 2013-07-12 08:31:18.000000000 +0930 ++++ ./liboslexec/dictionary.cpp 2013-11-03 18:07:25.650119434 +1030 +@@ -50,7 +50,7 @@ + namespace pvt { // OSL::pvt + + +-#ifndef USE_EXTERNAL_PUGIXML ++#ifdef USING_OIIO_PUGI + namespace pugi = OIIO::pugi; + #endif + Added: head/graphics/openshadinglanguage/files/patch-liboslexec__llvm_gen.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/openshadinglanguage/files/patch-liboslexec__llvm_gen.cpp Thu Nov 7 14:00:44 2013 (r333100) @@ -0,0 +1,11 @@ +--- ./liboslexec/llvm_gen.cpp.orig 2013-07-12 08:31:18.000000000 +0930 ++++ ./liboslexec/llvm_gen.cpp 2013-11-03 18:07:25.652119256 +1030 +@@ -3310,7 +3310,7 @@ + Symbol& Results = *rop.opargsym (op, 2); + DASSERT (R.typespec().is_int() && Str.typespec().is_string() && + Results.typespec().is_array() && +- Results.typespec().simpletype() == TypeDesc::TypeString); ++ Results.typespec().is_string_based()); + + llvm::Value *args[5]; + args[0] = rop.llvm_load_value (Str); Added: head/graphics/openshadinglanguage/files/patch-liboslexec__llvm_instance.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/openshadinglanguage/files/patch-liboslexec__llvm_instance.cpp Thu Nov 7 14:00:44 2013 (r333100) @@ -0,0 +1,11 @@ +--- ./liboslexec/llvm_instance.cpp.orig 2013-07-12 08:31:18.000000000 +0930 ++++ ./liboslexec/llvm_instance.cpp 2013-11-03 18:07:25.654119237 +1030 +@@ -809,7 +809,7 @@ + { + // Make a layer function: void layer_func(ShaderGlobals*, GroupData*) + // Note that the GroupData* is passed as a void*. +- std::string unique_layer_name = Strutil::format ("%s_%d", inst()->layername().c_str(), inst()->id()); ++ std::string unique_layer_name = Strutil::format ("%s_%d", inst()->layername(), inst()->id()); + + m_layer_func = llvm::cast<llvm::Function>(m_llvm_module->getOrInsertFunction(unique_layer_name, + llvm_type_void(), llvm_type_sg_ptr(), Added: head/graphics/openshadinglanguage/files/patch-liboslexec__runtimeoptimize.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/openshadinglanguage/files/patch-liboslexec__runtimeoptimize.h Thu Nov 7 14:00:44 2013 (r333100) @@ -0,0 +1,32 @@ +--- ./liboslexec/runtimeoptimize.h.orig 2013-07-12 08:31:18.000000000 +0930 ++++ ./liboslexec/runtimeoptimize.h 2013-11-03 18:07:25.656119123 +1030 +@@ -345,7 +345,8 @@ + /// Helper: return the ptr to the symbol that is the argnum-th + /// argument to the given op. + Symbol *opargsym (const Opcode &op, int argnum) { +- return inst()->argsymbol (op.firstarg()+argnum); ++ return (argnum < op.nargs()) ? ++ inst()->argsymbol (op.firstarg()+argnum) : NULL; + } + + /// Create an llvm function for the whole shader group, JIT it, +@@ -826,7 +827,7 @@ + /// + llvm::BasicBlock *llvm_exit_instance_block () { + if (! m_exit_instance_block) { +- std::string name = Strutil::format ("%s_%d_exit_", inst()->layername().c_str(), inst()->id()); ++ std::string name = Strutil::format ("%s_%d_exit_", inst()->layername(), inst()->id()); + m_exit_instance_block = llvm_new_basic_block (name); + } + return m_exit_instance_block; +@@ -887,8 +888,8 @@ + int m_local_unknown_message_sent; ///< Non-const setmessage in this inst + std::vector<ustring> m_local_messages_sent; ///< Messages set in this inst + std::vector<int> m_bblockids; ///< Basic block IDs for each op +- std::vector<bool> m_in_conditional; ///< Whether each op is in a cond +- std::vector<bool> m_in_loop; ///< Whether each op is in a loop ++ std::vector<char> m_in_conditional; ///< Whether each op is in a cond ++ std::vector<char> m_in_loop; ///< Whether each op is in a loop + std::vector<int> m_layer_remap; ///< Remapping of layer ordering + std::set<int> m_layers_already_run; ///< List of layers run + int m_num_used_layers; ///< Number of layers actually used _______________________________________________ svn-ports-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-ports-all To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
State Changed From-To: open->closed Fixed in r333100.