openshadinglanguage: WIP changes

This commit is contained in:
Alexey Pavlov
2019-07-31 16:00:38 +03:00
parent 4a183af5b1
commit b880d7ca23
4 changed files with 45 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
--- OpenShadingLanguage-Release-1.8.9/src/liboslcomp/oslcomp.cpp.orig 2017-05-31 08:14:33.000000000 +0300
+++ OpenShadingLanguage-Release-1.8.9/src/liboslcomp/oslcomp.cpp 2017-06-19 11:08:15.725143800 +0300
@@ -202,8 +202,8 @@
@@ -159,8 +159,8 @@
std::string &result)
{
// Read file contents into a string
@@ -11,7 +11,7 @@
if (! instream.is_open()) {
error (ustring(filename), 0, "Could not open \"%s\"\n", filename.c_str());
return false;
@@ -558,8 +558,8 @@
@@ -590,8 +590,8 @@
if (m_output_filename.size() == 0)
m_output_filename = default_output_filename ();

View File

@@ -0,0 +1,11 @@
--- OpenShadingLanguage-Release-1.10.6/src/include/OSL/export.h.orig 2019-07-31 13:36:25.724820700 +0300
+++ OpenShadingLanguage-Release-1.10.6/src/include/OSL/export.h 2019-07-31 13:36:33.547314400 +0300
@@ -65,7 +65,7 @@
/// dependencies, and so what is exported for one may be imported for
/// another.
-#if defined(_MSC_VER) || defined(__CYGWIN__)
+#if defined(_WIN32) || defined(__CYGWIN__)
#if defined(OSL_STATIC_BUILD)
#define OSL_DLL_IMPORT
#define OSL_DLL_EXPORT

View File

@@ -0,0 +1,22 @@
--- OpenShadingLanguage-Release-1.10.6/src/liboslcomp/osllex.l.orig 2019-07-31 13:40:13.522982700 +0300
+++ OpenShadingLanguage-Release-1.10.6/src/liboslcomp/osllex.l 2019-07-31 13:40:31.481640300 +0300
@@ -112,7 +112,7 @@
#ifdef _WIN32
#define YY_NO_UNISTD_H
-#ifdef _MSC_VER
+#ifdef _WIN32
#define strtoll _strtoi64
#include <io.h>
#define isatty _isatty
--- OpenShadingLanguage-Release-1.10.6/src/liboslexec/osolex.l.orig 2019-07-31 13:40:13.522982700 +0300
+++ OpenShadingLanguage-Release-1.10.6/src/liboslexec/osolex.l 2019-07-31 13:40:31.481640300 +0300
@@ -112,7 +112,7 @@
#define YY_NO_UNISTD_H
#endif
-#ifdef _MSC_VER
+#ifdef _WIN32
#include <io.h>
#define isatty _isatty
#endif

View File

@@ -21,6 +21,7 @@ depends=("${MINGW_PACKAGE_PREFIX}-boost"
"${MINGW_PACKAGE_PREFIX}-libtiff"
"${MINGW_PACKAGE_PREFIX}-openexr"
"${MINGW_PACKAGE_PREFIX}-openimageio"
"${MINGW_PACKAGE_PREFIX}-partio"
"${MINGW_PACKAGE_PREFIX}-pugixml")
makedepends=("${MINGW_PACKAGE_PREFIX}-cmake"
"${MINGW_PACKAGE_PREFIX}-gcc"
@@ -36,7 +37,9 @@ source=(${_realname}-${pkgver}.tar.gz::https://github.com/imageworks/OpenShading
0007-Fix-bad-casts-with-intptr_t.patch
0008-openimageio-api-changes.patch
0009-find-pugixml.patch
0010-macros-undef-mingw.patch)
0010-macros-undef-mingw.patch
0011-fix-export-attributes.patch
0012-isatty-mingw.patch)
sha256sums=('6ce825e9f224e7cae460a19d2b926700c9db1789e3c765933b426dd0f9562160'
'e3f6ad09619d122ada129cbc77d7778751abfecef9ac7e0a60d9550c811df643'
'70d4ce3c69ed072eee0d2bb84cecea5ff9ff35e258a24a7a78ec94e4b626e493'
@@ -44,9 +47,11 @@ sha256sums=('6ce825e9f224e7cae460a19d2b926700c9db1789e3c765933b426dd0f9562160'
'bafdde92611252b061906453a58672245363c9ce2960b175ee27146347086f15'
'541cc1eb0c506e253de2f26af37dc6e35de891a940906c6e33a2f4774a4a844e'
'b6ac561e4f450324ff4d60f363de9f266dd4d01d43bc1ec0ee1190cfb7f35c2c'
'69abdeed520bd5ce354a7d0770847e54aa4704a24bc88c07fccc47b4500bf150'
'65c630a33fb77a64e52192813a2472dd5c7d1d38335f614369f27e475d733611'
'b65fecac8d338f506abf168154ec97baa7523497419f7fdb0a53442ae652adb3'
'd6fe2f65d219b124f9155a7c362cffb085134acd0882786870d72b519994f4cc')
'd6fe2f65d219b124f9155a7c362cffb085134acd0882786870d72b519994f4cc'
'87d5cff0c9b948f9e319ed07309066777628525050838638dc5d2f6aef2d5531'
'7d9de868949b83d20b1807a8eb6d21402a4fc141c85cd1ca6e74a326b79be284')
prepare() {
cd ${srcdir}/OpenShadingLanguage-Release-${pkgver}
@@ -59,6 +64,8 @@ prepare() {
patch -p1 -i ${srcdir}/0008-openimageio-api-changes.patch
patch -p1 -i ${srcdir}/0009-find-pugixml.patch
patch -p1 -i ${srcdir}/0010-macros-undef-mingw.patch
patch -p1 -i ${srcdir}/0011-fix-export-attributes.patch
patch -p1 -i ${srcdir}/0012-isatty-mingw.patch
}
build() {