mirror of
https://github.com/ivabus/pantry
synced 2024-11-26 18:25:08 +03:00
+openexr and fix(imath) (#781)
* fix(imath) * add openexr * add openexr and fix imath
This commit is contained in:
parent
4fbf7189c5
commit
20550d213c
2 changed files with 72 additions and 28 deletions
48
projects/openexr.com/imath/package.yml
Normal file
48
projects/openexr.com/imath/package.yml
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
distributable:
|
||||||
|
url: https://github.com/AcademySoftwareFoundation/Imath/archive/refs/tags/v{{version}}.tar.gz
|
||||||
|
strip-components: 1
|
||||||
|
|
||||||
|
# if there’s a github then we can parse the versions
|
||||||
|
versions:
|
||||||
|
github: AcademySoftwareFoundation/Imath/tags # reads github tags from github
|
||||||
|
strip: /^v/
|
||||||
|
|
||||||
|
build:
|
||||||
|
dependencies:
|
||||||
|
tea.xyz/gx/cc: c99
|
||||||
|
tea.xyz/gx/make: '*'
|
||||||
|
cmake.org: '*'
|
||||||
|
script: |
|
||||||
|
cmake -S . -B build $ARGS
|
||||||
|
cmake --build build
|
||||||
|
cmake --install build
|
||||||
|
|
||||||
|
mv {{ prefix}}/include/Imath/* {{prefix}}/include
|
||||||
|
rmdir {{ prefix}}/include/Imath
|
||||||
|
ln -s . {{ prefix }}/include/Imath
|
||||||
|
env:
|
||||||
|
# add any environment variables here
|
||||||
|
ARGS:
|
||||||
|
- -DCMAKE_INSTALL_PREFIX={{prefix}}
|
||||||
|
- -DCMAKE_BUILD_TYPE=Release
|
||||||
|
|
||||||
|
|
||||||
|
test:
|
||||||
|
fixture: |
|
||||||
|
#include <ImathRoots.h>
|
||||||
|
#include <algorithm>
|
||||||
|
#include <iostream>
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
double x[2] = {0.0, 0.0};
|
||||||
|
int n = IMATH_NAMESPACE::solveQuadratic(1.0, 3.0, 2.0, x);
|
||||||
|
if (x[0] > x[1])
|
||||||
|
std::swap(x[0], x[1]);
|
||||||
|
std::cout << n << ", " << x[0] << ", " << x[1] << "\n";
|
||||||
|
}
|
||||||
|
dependencies:
|
||||||
|
tea.xyz/gx/cc: c99
|
||||||
|
script: |
|
||||||
|
mv $FIXTURE foo.cc
|
||||||
|
g++ -std=c++11 -lImath foo.cc
|
||||||
|
./a.out
|
|
@ -1,48 +1,44 @@
|
||||||
distributable:
|
distributable:
|
||||||
url: https://github.com/AcademySoftwareFoundation/Imath/archive/refs/tags/v{{version}}.tar.gz
|
url: https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v{{version}}.tar.gz
|
||||||
strip-components: 1
|
strip-components: 1
|
||||||
|
|
||||||
# if there’s a github then we can parse the versions
|
|
||||||
versions:
|
versions:
|
||||||
github: AcademySoftwareFoundation/Imath/tags # reads github tags from github
|
github: AcademySoftwareFoundation/openexr/tags
|
||||||
strip: /^v/
|
strip: /^v/
|
||||||
|
|
||||||
|
dependencies:
|
||||||
|
zlib.net: ^1
|
||||||
|
openexr.com/imath: '*'
|
||||||
|
|
||||||
build:
|
build:
|
||||||
dependencies:
|
dependencies:
|
||||||
tea.xyz/gx/cc: c99
|
tea.xyz/gx/cc: c99
|
||||||
tea.xyz/gx/make: '*'
|
tea.xyz/gx/make: '*'
|
||||||
cmake.org: '*'
|
cmake.org: '*'
|
||||||
|
freedesktop.org/pkg-config: '*'
|
||||||
|
working-directory: build
|
||||||
script: |
|
script: |
|
||||||
cmake -S . -B build $ARGS
|
cmake .. $ARGS
|
||||||
cmake --build build
|
make install
|
||||||
cmake --install build
|
|
||||||
|
|
||||||
mv {{ prefix}}/include/Imath/* {{prefix}}/include
|
|
||||||
rmdir {{ prefix}}/include/Imath
|
|
||||||
ln -s . {{ prefix }}/include/Imath
|
|
||||||
env:
|
env:
|
||||||
# add any environment variables here
|
|
||||||
ARGS:
|
ARGS:
|
||||||
- -DCMAKE_INSTALL_PREFIX={{prefix}}
|
- -DCMAKE_INSTALL_PREFIX="{{prefix}}"
|
||||||
- -DCMAKE_BUILD_TYPE=Release
|
- -DCMAKE_BUILD_TYPE=Release
|
||||||
|
|
||||||
|
provides:
|
||||||
|
- bin/exr2aces
|
||||||
|
- bin/exrenvmap
|
||||||
|
- bin/exrheader
|
||||||
|
- bin/exrinfo
|
||||||
|
- bin/exrmakepreview
|
||||||
|
- bin/exrmaketiled
|
||||||
|
- bin/exrmultipart
|
||||||
|
- bin/exrmultiview
|
||||||
|
- bin/exrstdattr
|
||||||
|
|
||||||
test:
|
test:
|
||||||
fixture: |
|
|
||||||
#include <ImathRoots.h>
|
|
||||||
#include <algorithm>
|
|
||||||
#include <iostream>
|
|
||||||
int main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
double x[2] = {0.0, 0.0};
|
|
||||||
int n = IMATH_NAMESPACE::solveQuadratic(1.0, 3.0, 2.0, x);
|
|
||||||
if (x[0] > x[1])
|
|
||||||
std::swap(x[0], x[1]);
|
|
||||||
std::cout << n << ", " << x[0] << ", " << x[1] << "\n";
|
|
||||||
}
|
|
||||||
dependencies:
|
dependencies:
|
||||||
tea.xyz/gx/cc: c99
|
gnu.org/wget: '*'
|
||||||
script: |
|
script: |
|
||||||
mv $FIXTURE foo.cc
|
wget https://github.com/AcademySoftwareFoundation/openexr-images/raw/main/TestImages/AllHalfValues.exr
|
||||||
g++ -std=c++11 -lImath foo.cc
|
exrheader AllHalfValues.exr
|
||||||
./a.out
|
|
||||||
|
|
Loading…
Reference in a new issue