diff --git a/mingw-w64-openshadinglanguage/0001-cmake-config.patch b/mingw-w64-openshadinglanguage/0001-cmake-config.patch deleted file mode 100644 index 0609401464..0000000000 --- a/mingw-w64-openshadinglanguage/0001-cmake-config.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -urN OpenShadingLanguage-Release-1.11.17.0/src/cmake/Config.cmake.in.orig OpenShadingLanguage-Release-1.11.17.0/src/cmake/Config.cmake.in ---- OpenShadingLanguage-Release-1.11.17.0/src/cmake/Config.cmake.in.orig 2022-01-08 03:36:45.000000000 +0100 -+++ OpenShadingLanguage-Release-1.11.17.0/src/cmake/Config.cmake.in 2022-07-15 18:55:14.471238200 +0200 -@@ -19,9 +19,9 @@ - - find_dependency(OpenImageIO @OpenImageIO_VERSION@ REQUIRED) - --set_and_check (@PROJECT_NAME@_INCLUDE_DIR "@CMAKE_INSTALL_FULL_INCLUDEDIR@") --set_and_check (@PROJECT_NAME@_INCLUDES "@CMAKE_INSTALL_FULL_INCLUDEDIR@") --set_and_check (@PROJECT_NAME@_LIB_DIR "@CMAKE_INSTALL_FULL_LIBDIR@") -+set_and_check (@PROJECT_NAME@_INCLUDE_DIR "${PACKAGE_PREFIX_DIR}/@CMAKE_INSTALL_INCLUDEDIR@") -+set_and_check (@PROJECT_NAME@_INCLUDES "${PACKAGE_PREFIX_DIR}/@CMAKE_INSTALL_INCLUDEDIR@") -+set_and_check (@PROJECT_NAME@_LIB_DIR "${PACKAGE_PREFIX_DIR}/@CMAKE_INSTALL_LIBDIR@") - - #...logic to determine installedPrefix from the own location... - #set (@PROJECT_NAME@_CONFIG_DIR "${installedPrefix}/@CONFIG_INSTALL_DIR@") diff --git a/mingw-w64-openshadinglanguage/0002-dont-add-flex-include-dir.patch b/mingw-w64-openshadinglanguage/0002-dont-add-flex-include-dir.patch index b04e2be13a..d245b3dd5e 100644 --- a/mingw-w64-openshadinglanguage/0002-dont-add-flex-include-dir.patch +++ b/mingw-w64-openshadinglanguage/0002-dont-add-flex-include-dir.patch @@ -1,15 +1,15 @@ ---- OpenShadingLanguage-Release-1.4.0.orig/src/cmake/flexbison.cmake 2013-11-25 18:41:29.000000000 +0000 -+++ OpenShadingLanguage-Release-1.4.0/src/cmake/flexbison.cmake 2014-01-03 20:21:43.305332000 +0000 -@@ -29,6 +29,8 @@ - # MESSAGE (STATUS " src list now ${${srclist}}") - # MESSAGE (STATUS " compiler headers = ${${compiler_headers}}") +--- a/src/cmake/flexbison.cmake ++++ b/src/cmake/flexbison.cmake +@@ -49,6 +49,8 @@ + set ( flexoutputcxx "${CMAKE_CURRENT_BINARY_DIR}/${flexsrc_we}.cpp" ) + set ( ${srclist} ${${srclist}} ${bisonoutputcxx} ${flexoutputcxx} ) + # Do not do this as it adds C:/msys64/include to the search path + # for all compilation. # Be really sure that we prefer the FlexLexer.h that comes with # the flex binary we're using, not some other one in the system. - GET_FILENAME_COMPONENT ( FLEX_UP ${FLEX_EXECUTABLE} PATH ) -@@ -37,7 +39,10 @@ + get_filename_component ( FLEX_UP ${FLEX_EXECUTABLE} PATH ) +@@ -57,7 +59,10 @@ if (VERBOSE) message (STATUS "Flex include dir = ${FLEX_INCLUDE_DIR}") endif () diff --git a/mingw-w64-openshadinglanguage/0003-fix-OIIO-windows.patch b/mingw-w64-openshadinglanguage/0003-fix-OIIO-windows.patch deleted file mode 100644 index c3e10b6cd6..0000000000 --- a/mingw-w64-openshadinglanguage/0003-fix-OIIO-windows.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -Naur openshadinglanguage-orig/src/liboslexec/llvm_ops.cpp openshadinglanguage/src/liboslexec/llvm_ops.cpp ---- openshadinglanguage-orig/src/liboslexec/llvm_ops.cpp 2014-08-31 22:43:33.401600000 +0400 -+++ openshadinglanguage/src/liboslexec/llvm_ops.cpp 2014-08-31 23:11:06.558600000 +0400 -@@ -119,6 +119,12 @@ - using OIIO::logbf; - using OIIO::exp2f; - #endif -+ -+#ifdef __MINGW64_VERSION_MAJOR -+using OIIO::isnan; -+using OIIO::isinf; -+using OIIO::isfinite; -+#endif - - #if defined(__FreeBSD__) - #include -diff -Naur openshadinglanguage-orig/src/liboslexec/shadingsys.cpp openshadinglanguage/src/liboslexec/shadingsys.cpp ---- openshadinglanguage-orig/src/liboslexec/shadingsys.cpp 2014-08-31 21:12:36.587200000 +0400 -+++ openshadinglanguage/src/liboslexec/shadingsys.cpp 2014-08-31 21:31:52.245600000 +0400 -@@ -21,6 +21,10 @@ - #include - #include - #include -+ -+#ifdef __MINGW64_VERSION_MAJOR -+using OIIO::isfinite; -+#endif - - #include "opcolor.h" - diff --git a/mingw-w64-openshadinglanguage/0005-Fix-cast-from-void-ptr.patch b/mingw-w64-openshadinglanguage/0005-Fix-cast-from-void-ptr.patch deleted file mode 100644 index 5cf5ed4102..0000000000 --- a/mingw-w64-openshadinglanguage/0005-Fix-cast-from-void-ptr.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- openshadinglanguage/src/liboslexec/automata.cpp.orig 2014-01-08 02:50:41.861748000 +0000 -+++ openshadinglanguage/src/liboslexec/automata.cpp 2014-01-08 02:51:50.600679600 +0000 -@@ -113,7 +113,7 @@ - // and finally the rule if we have it - if (m_rule) { - s += " | "; -- s += Strutil::sprintf("%lx", (long unsigned int)m_rule); -+ s += Strutil::sprintf("%p", m_rule); - } - return s; - } -@@ -362,7 +362,7 @@ - for (RuleSet::const_iterator i = m_rules.begin(); i != m_rules.end(); ++i) { - if (s[s.size()-1] != '[') - s += ", "; -- s += Strutil::sprintf("%lx", (long unsigned int)*i); -+ s += Strutil::sprintf("%p", *i); - } - s += "]"; - } diff --git a/mingw-w64-openshadinglanguage/0007-Fix-bad-casts-with-intptr_t.patch b/mingw-w64-openshadinglanguage/0007-Fix-bad-casts-with-intptr_t.patch deleted file mode 100644 index 8ebf8ded6c..0000000000 --- a/mingw-w64-openshadinglanguage/0007-Fix-bad-casts-with-intptr_t.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- openshadinglanguage/src/liboslexec/accum_test.cpp.orig 2014-01-08 18:29:57.054742600 +0000 -+++ openshadinglanguage/src/liboslexec/accum_test.cpp 2014-01-08 18:38:57.404742600 +0000 -@@ -28,6 +28,7 @@ - #include - #include - #include -+#include - - using namespace OSL; - -@@ -67,7 +68,7 @@ - // our custom argument to write is the rule's number so we - // can check what. But you normally would pass information - // about the pixel. -- long int testno = (long int)flush_data; -+ long int testno = (intptr_t)flush_data; - if (has_color && color.x > 0) - // only mrk with true if there is a positive color present - m_received[testno] = true; -@@ -109,7 +110,7 @@ - accum.accum(Color3(1, 1, 1)); - // Restore state and flush - accum.popState(); -- accum.end((void *)(long int)testno); -+ accum.end((void *)(intptr_t)testno); - } - - int main() diff --git a/mingw-w64-openshadinglanguage/0010-macros-undef-mingw.patch b/mingw-w64-openshadinglanguage/0010-macros-undef-mingw.patch index 34b1728b1b..f42bac080a 100644 --- a/mingw-w64-openshadinglanguage/0010-macros-undef-mingw.patch +++ b/mingw-w64-openshadinglanguage/0010-macros-undef-mingw.patch @@ -1,14 +1,14 @@ ---- OpenShadingLanguage-Release-1.10.2/src/liboslexec/shadingsys.cpp.orig 2018-12-06 11:41:22.923584600 +0300 -+++ OpenShadingLanguage-Release-1.10.2/src/liboslexec/shadingsys.cpp 2018-12-06 11:41:42.863612500 +0300 -@@ -54,8 +54,10 @@ - using namespace OSL::pvt; +--- a/src/liboslexec/shadingsys.cpp ++++ b/src/liboslexec/shadingsys.cpp +@@ -34,8 +34,10 @@ + #include // Just for OPENEXR_VERSION_STRING // avoid naming conflicts with MSVC macros -#ifdef _MSC_VER +#ifdef _WIN32 - #undef RGB + # undef RGB +#endif +#ifdef _MSC_VER - // We use some of the iso646.h macro names later on in this file. For - // some compilers (MSVS, I'm looking at you) this is trouble. I don't know - // how or why that header would have been included here, but it did for at + // We use some of the iso646.h macro names later on in this file. For + // some compilers (MSVS, I'm looking at you) this is trouble. I don't know + // how or why that header would have been included here, but it did for at diff --git a/mingw-w64-openshadinglanguage/0013-disable-assert-partio.patch b/mingw-w64-openshadinglanguage/0013-disable-assert-partio.patch index 9c6c0a20cd..b99755f896 100644 --- a/mingw-w64-openshadinglanguage/0013-disable-assert-partio.patch +++ b/mingw-w64-openshadinglanguage/0013-disable-assert-partio.patch @@ -1,24 +1,20 @@ ---- OpenShadingLanguage-Release-1.10.6/src/liboslexec/pointcloud.cpp.orig 2019-07-31 23:15:48.917595100 +0300 -+++ OpenShadingLanguage-Release-1.10.6/src/liboslexec/pointcloud.cpp 2019-07-31 23:16:06.701626300 +0300 -@@ -244,8 +244,8 @@ - return 0; // No "position" attribute -- fail +--- a/src/liboslexec/pointcloud.cpp ++++ b/src/liboslexec/pointcloud.cpp +@@ -114,8 +114,6 @@ + return 0; // No "position" attribute -- fail } -- static_assert (sizeof(size_t) == sizeof(Partio::ParticleIndex), -- "Partio ParticleIndex should be the size of a size_t"); -+ // static_assert (sizeof(size_t) == sizeof(Partio::ParticleIndex), -+ // "Only will work if Partio ParticleIndex is the size of a size_t"); +- static_assert(sizeof(size_t) == sizeof(Partio::ParticleIndex), +- "Partio ParticleIndex should be the size of a size_t"); // FIXME -- if anybody cares about an architecture in which that is not // the case, we can easily allocate local space to retrieve the indices, // then copy them back to the caller's indices. -@@ -362,8 +362,8 @@ +@@ -246,8 +244,6 @@ count = maxn; } -- static_assert (sizeof(size_t) == sizeof(Partio::ParticleIndex), -- "Partio ParticleIndex should be the size of a size_t"); -+ // static_assert (sizeof(size_t) == sizeof(Partio::ParticleIndex), -+ // "Partio ParticleIndex should be the size of a size_t"); +- static_assert(sizeof(size_t) == sizeof(Partio::ParticleIndex), +- "Partio ParticleIndex should be the size of a size_t"); // FIXME -- if anybody cares about an architecture in which that is not // the case, we can easily allocate local space to retrieve the indices, // then copy them back to the caller's indices. diff --git a/mingw-w64-openshadinglanguage/0016-OIIO-API.patch b/mingw-w64-openshadinglanguage/0016-OIIO-API.patch deleted file mode 100644 index 21204848db..0000000000 --- a/mingw-w64-openshadinglanguage/0016-OIIO-API.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- OpenShadingLanguage-Release-1.11.8.0/src/liboslexec/shadingsys.cpp.orig 2020-10-08 11:06:00.929372700 +0300 -+++ OpenShadingLanguage-Release-1.11.8.0/src/liboslexec/shadingsys.cpp 2020-10-08 11:23:40.846943100 +0300 -@@ -3400,8 +3402,8 @@ - - bool ok = true; - std::string groupfilename = tmpdir + "/shadergroup"; -- std::ofstream groupfile; -- OIIO::Filesystem::open(groupfile, groupfilename); -+ OIIO::ofstream groupfile; -+ OIIO::Filesystem::open(groupfile, OIIO::string_view(groupfilename).c_str()); - if (groupfile.good()) { - groupfile << group.serialize(); - groupfile.close (); diff --git a/mingw-w64-openshadinglanguage/PKGBUILD b/mingw-w64-openshadinglanguage/PKGBUILD index 3987988143..6b16f58cc1 100644 --- a/mingw-w64-openshadinglanguage/PKGBUILD +++ b/mingw-w64-openshadinglanguage/PKGBUILD @@ -5,8 +5,8 @@ pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}-git") replaces=("${MINGW_PACKAGE_PREFIX}-${_realname}-git") -pkgver=1.11.17.0 -pkgrel=7 +pkgver=1.12.6.2 +pkgrel=1 pkgdesc="Advanced shading language for production GI renderers (mingw-w64)" arch=('any') mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32') @@ -14,50 +14,34 @@ url="https://github.com/imageworks/OpenShadingLanguage/" license=("custom") depends=("${MINGW_PACKAGE_PREFIX}-boost" "${MINGW_PACKAGE_PREFIX}-clang" - "${MINGW_PACKAGE_PREFIX}-freetype" - "${MINGW_PACKAGE_PREFIX}-glew" - "${MINGW_PACKAGE_PREFIX}-imath" - "${MINGW_PACKAGE_PREFIX}-tbb" - "${MINGW_PACKAGE_PREFIX}-libpng" - "${MINGW_PACKAGE_PREFIX}-libtiff" + "${MINGW_PACKAGE_PREFIX}-openexr" "${MINGW_PACKAGE_PREFIX}-openimageio" "${MINGW_PACKAGE_PREFIX}-partio" "${MINGW_PACKAGE_PREFIX}-pugixml" - "${MINGW_PACKAGE_PREFIX}-qt5-base") + "${MINGW_PACKAGE_PREFIX}-zlib") makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" "${MINGW_PACKAGE_PREFIX}-ninja" "${MINGW_PACKAGE_PREFIX}-python" "${MINGW_PACKAGE_PREFIX}-pybind11" "${MINGW_PACKAGE_PREFIX}-cc" -) + "${MINGW_PACKAGE_PREFIX}-qt5-base") +optdepends=("${MINGW_PACKAGE_PREFIX}-python: Python module" + "${MINGW_PACKAGE_PREFIX}-qt5-base: for osltoy") options=('staticlibs' '!emptydirs' 'strip' '!debug') -source=(${_realname}-${pkgver}.tar.gz::https://github.com/imageworks/OpenShadingLanguage/archive/Release-${pkgver}.tar.gz - 0001-cmake-config.patch +source=(${_realname}-${pkgver}.tar.gz::https://github.com/imageworks/OpenShadingLanguage/archive/v${pkgver}.tar.gz 0002-dont-add-flex-include-dir.patch - 0003-fix-OIIO-windows.patch - 0005-Fix-cast-from-void-ptr.patch - 0007-Fix-bad-casts-with-intptr_t.patch 0010-macros-undef-mingw.patch 0012-isatty-mingw.patch 0013-disable-assert-partio.patch 0014-fix-testshade-library-name.patch - 0015-llvm-linking.patch - 0016-OIIO-API.patch - # https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/pull/1492 - llvm14.patch) -sha256sums=('4d23cf742f7917ea534408a1a491da8cfa245eed66b32f32d1a2785cb6a95735' - 'ac91faa2507685d4cfca544905474d84b946c888e1e1823dc93b6036979db195' - '70d4ce3c69ed072eee0d2bb84cecea5ff9ff35e258a24a7a78ec94e4b626e493' - '6b1e4065292361c724a53f6961b72ff74dde9349a3c1e42a1ab8e883d902f5e4' - '8bc55ff08257d9482d32efe25a416b02acca345897acc46c09c71b6a496e55cc' - '756ed1e1bf3acad0766ac17be979ff84e51fac5cd6adab99e9118a872f3011bf' - 'd6fe2f65d219b124f9155a7c362cffb085134acd0882786870d72b519994f4cc' + 0015-llvm-linking.patch) +sha256sums=('0115a0a09ac9ef0ade88f2434e1472323b335c3f0ddcca0ffd062f9cc822e629' + '9a0b5597c6047917b9541192e0f71b28dcfd17ea3a5948892f68d38b5e1b4946' + '8b42553133e487077363a96520131f84453a81afdd9d198ef6827e0395ff1208' 'c7c125e6fed4650f9770d92ea24771e5518b344718dde291a6d5d4ad945c6222' - 'c0d66bd0c38fc3627d8bf17c7f9331ac66a2a02e22820208d81400f2ed01543b' + '5277727f3d03ea88f407c1092c28519f58772e89518487da7c55f1d24c1f3c79' '3146942267540de2a3146ef8222d59fdb265dc8fffa3f3a2207bbc851fc99ab8' - '1b2c1e7faae162078696049f63c2b55e8c111ffeff25abaa49d67877c81a71d1' - '01a9e6543159b8c966fa31755781f028b156fb799ae1c8eab94cd8d4c2ce48a6' - '6184b86ef9105d698e6fd0c5f00ca51ef07707db5acff507b124baef96266ab5') + '1b2c1e7faae162078696049f63c2b55e8c111ffeff25abaa49d67877c81a71d1') apply_patch_with_msg() { for _patch in "$@" @@ -68,21 +52,15 @@ apply_patch_with_msg() { } prepare() { - cd ${srcdir}/OpenShadingLanguage-Release-${pkgver} + cd ${srcdir}/OpenShadingLanguage-${pkgver} apply_patch_with_msg \ - 0001-cmake-config.patch \ 0002-dont-add-flex-include-dir.patch \ - 0003-fix-OIIO-windows.patch \ - 0005-Fix-cast-from-void-ptr.patch \ - 0007-Fix-bad-casts-with-intptr_t.patch \ 0010-macros-undef-mingw.patch \ 0012-isatty-mingw.patch \ 0013-disable-assert-partio.patch \ 0014-fix-testshade-library-name.patch \ - 0015-llvm-linking.patch \ - 0016-OIIO-API.patch \ - llvm14.patch + 0015-llvm-linking.patch } build() { @@ -101,18 +79,17 @@ build() { CFLAGS+=" -Wno-attributes -D_USE_MATH_DEFINES" CXXFLAGS+=" -Wno-attributes -DTINYFORMAT_ALLOW_WCHAR_STRINGS -D_USE_MATH_DEFINES" - unset CI - MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake.exe \ -G"Ninja" \ -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ + -DOSL_BUILD_TESTS=OFF \ -DSTOP_ON_WARNING=OFF \ -DLLVM_STATIC=0 \ + -DUSE_SIMD=sse2 \ -DPython_EXECUTABLE=${MINGW_PREFIX}/bin/python \ - -DCMAKE_CXX_STANDARD=14 \ ${extra_config} \ - ../OpenShadingLanguage-Release-${pkgver} + ../OpenShadingLanguage-${pkgver} # $PWD/src/liboslcomp PATH addition needed for running oslc.exe during the build (for liboslcomp.dll) # ${MINGW_PREFIX}/bin PATH addition needed for finding libboost_system-mt.dll when running oslc.exe. @@ -125,7 +102,7 @@ package() { DESTDIR=${pkgdir} cmake --install . mkdir -p "${pkgdir}${MINGW_PREFIX}"/share/licenses/${_realname} - install -Dm644 "${srcdir}/OpenShadingLanguage-Release-${pkgver}/LICENSE.md" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE.md" + install -Dm644 "${srcdir}/OpenShadingLanguage-${pkgver}/LICENSE.md" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE.md" local PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX}) for _f in "${pkgdir}${MINGW_PREFIX}"/lib/cmake/OSL/*.cmake; do diff --git a/mingw-w64-openshadinglanguage/llvm14.patch b/mingw-w64-openshadinglanguage/llvm14.patch deleted file mode 100644 index 3f8c3d8a4e..0000000000 --- a/mingw-w64-openshadinglanguage/llvm14.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/src/liboslexec/llvm_util.cpp -+++ b/src/liboslexec/llvm_util.cpp -@@ -45,7 +45,11 @@ - #include - #include - #include -+#if OSL_LLVM_VERSION < 140 - #include -+#else -+#include -+#endif - - #include - #include