diff options
author | Alex Hirzel | 2022-06-02 20:36:14 -0400 |
---|---|---|
committer | Alex Hirzel | 2022-06-02 22:18:03 -0400 |
commit | 6b63edfec01b7e51288fbcda74b43a3fd83d1417 (patch) | |
tree | af79bbdadd415baaec7eb4dfcd55259d37e268c1 | |
parent | a4ae05e6635b4e01d07281c0bcd2efa6c3626365 (diff) | |
download | aur-6b63edfec01b7e51288fbcda74b43a3fd83d1417.tar.gz |
add .gitignore, check(), test and Makefile; bump pkgrel
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | .gitignore | 18 | ||||
-rw-r--r-- | Makefile | 27 | ||||
-rw-r--r-- | PKGBUILD | 8 | ||||
-rw-r--r-- | test_scene.xml | 53 |
5 files changed, 107 insertions, 1 deletions
@@ -27,6 +27,7 @@ pkgbase = mitsuba2-git source = swap_pugixml.patch source = swap_pybind_enoki.patch source = python_collections.patch + source = test_scene.xml source = git+https://github.com/mitsuba-renderer/mitsuba2.git source = git+https://github.com/wjakob/tbb.git source = git+https://github.com/mitsuba-renderer/asmjit.git @@ -38,6 +39,7 @@ pkgbase = mitsuba2-git md5sums = 617bd32eecbebd8c7036f738b8275e5f md5sums = eee8327568bbe7e0fa0a8d873eb2dea0 md5sums = fcd771afe770b24492938482d6facfed + md5sums = 1f848b2cc184f5662b4a16b7a9b67cdd md5sums = SKIP md5sums = SKIP md5sums = SKIP diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..64b1d4a54847 --- /dev/null +++ b/.gitignore @@ -0,0 +1,18 @@ +# AUR folders +pkg/ +src/ + +# test files +test_scene.exr + +# submodules +asmjit/ +enoki/ +mitsuba-data/ +mitsuba2/ +openexr/ +tbb/ +tinyformat/ + +# built files +mitsuba2-git-*.pkg.tar.zst diff --git a/Makefile b/Makefile new file mode 100644 index 000000000000..7c74715b5fa5 --- /dev/null +++ b/Makefile @@ -0,0 +1,27 @@ +MAKEFLAGS += --no-builtin-rules +OUTPUT = $(shell bash -c 'source PKGBUILD && echo mitsuba2-git-$pkgver-$pkgrel-x86_64.pkg.tar.zst') + +PKGREL = $(shell bash -c 'source PKGBUILD && echo $pkgver') + +.PHONY: check help clean distclean +.DEFAULT: help + +check:: .SRCINFO + +help:: ## show this help text + @egrep -h '\s##\s' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " %-13s - %s\n", $$1, $$2}' + +clean:: ## remove files associated with this build + rm -rf pkg src + +distclean:: clean ## remove all downloaded and built files + rm -f mitsuba2-git-*-x86_64.pkg.tar.zst + rm -rf asmjit enoki mitsuba-data mitsuba2 openexr tbb tinyformat + +.SRCINFO: PKGBUILD ## update the .SRCINFO file + makepkg --printsrcinfo > $@ + +build: ${OUTPUT} ## build package + +${OUTPUT}: PKGBUILD + makepkg -sf @@ -2,7 +2,7 @@ pkgname=mitsuba2-git pkgver=2.2.1.r38.g4e7628c6 -pkgrel=1 +pkgrel=2 pkgdesc="A Retargetable Forward and Inverse Renderer" arch=('x86_64') url="https://www.mitsuba-renderer.org/" @@ -16,6 +16,7 @@ source=('swap_pybind.patch' 'swap_pugixml.patch' 'swap_pybind_enoki.patch' 'python_collections.patch' + 'test_scene.xml' 'git+https://github.com/mitsuba-renderer/mitsuba2.git' 'git+https://github.com/wjakob/tbb.git' 'git+https://github.com/mitsuba-renderer/asmjit.git' @@ -27,6 +28,7 @@ md5sums=('e40fe4bf313d60b1eb7c3da60fb6d434' '617bd32eecbebd8c7036f738b8275e5f' 'eee8327568bbe7e0fa0a8d873eb2dea0' 'fcd771afe770b24492938482d6facfed' + '1f848b2cc184f5662b4a16b7a9b67cdd' 'SKIP' 'SKIP' 'SKIP' @@ -90,6 +92,10 @@ build() { ninja -C "$srcdir/build" mkdoc } +check() { + $srcdir/build/dist/mitsuba $srcdir/test_scene.xml +} + package() { cd "$srcdir/${pkgname%-git}" install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" diff --git a/test_scene.xml b/test_scene.xml new file mode 100644 index 000000000000..32c1291a5c38 --- /dev/null +++ b/test_scene.xml @@ -0,0 +1,53 @@ +<scene version="2.2.1"> + <shape type="sphere"> + <float name="radius" value="0.9" /> + <transform name="to_world"> + <translate x="1" y="1"/> + </transform> + <emitter type="area"> + <rgb name="radiance" value="100,0,0"/> + </emitter> + </shape> + <shape type="sphere"> + <float name="radius" value="0.9" /> + <transform name="to_world"> + <translate x="1" y="-1"/> + </transform> + <emitter type="area"> + <rgb name="radiance" value="0,100,0"/> + </emitter> + </shape> + <shape type="sphere"> + <float name="radius" value="0.9" /> + <transform name="to_world"> + <translate x="-1" y="1"/> + </transform> + <emitter type="area"> + <rgb name="radiance" value="0,0,100"/> + </emitter> + </shape> + <shape type="sphere"> + <float name="radius" value="0.9" /> + <transform name="to_world"> + <translate x="-1" y="-1"/> + </transform> + </shape> + <integrator type="direct"> + <integer name="shading_samples" value="8"/> + </integrator> + + <sensor type="perspective"> + <transform name="to_world"> + <translate z="-10" /> + </transform> + <float name="fov" value="45"/> + <sampler type="independent"> + <integer name="sample_count" value="128"/> + </sampler> + <film type="hdrfilm"> + <string name="pixel_format" value="rgba"/> + <integer name="width" value="512"/> + <integer name="height" value="512"/> + </film> + </sensor> +</scene> |