From 5e755e44b4a2f02f2cd2ae78f7e70e58757a6211 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Tue, 23 Jun 2015 04:18:26 +0200 Subject: [PATCH] New package: luxmark-3.0 --- srcpkgs/luxmark/patches/system_scenes.diff | 21 ++++++++++++++++++ srcpkgs/luxmark/template | 25 ++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 srcpkgs/luxmark/patches/system_scenes.diff create mode 100644 srcpkgs/luxmark/template diff --git a/srcpkgs/luxmark/patches/system_scenes.diff b/srcpkgs/luxmark/patches/system_scenes.diff new file mode 100644 index 00000000000..3e12dc12ecd --- /dev/null +++ b/srcpkgs/luxmark/patches/system_scenes.diff @@ -0,0 +1,21 @@ +diff -rup src/main.cpp src/main.cpp +--- src/main.cpp 2015-02-25 10:46:48.000000000 +0100 ++++ src/main.cpp 2015-03-12 23:01:53.971856726 +0100 +@@ -125,16 +125,7 @@ int main(int argc, char **argv) { + return EXIT_SUCCESS; + else { + app.Init(mode, scnName, singleRun); +- +- // If current directory doesn't have the "scenes" directory, move +- // to where the executable is +- if (!boost::filesystem::exists("./scenes")) { +- // Look for the directory where LuxMark executable is installed +- boost::filesystem::path exePath(boost::filesystem::initial_path()); +- exePath = boost::filesystem::system_complete(boost::filesystem::path(argv[0])).parent_path(); +- // Set the current directory to where the binary is +- boost::filesystem::current_path(exePath); +- } ++ boost::filesystem::current_path("/usr/share/luxmark"); + + // Force C locale + setlocale(LC_NUMERIC, "C"); diff --git a/srcpkgs/luxmark/template b/srcpkgs/luxmark/template new file mode 100644 index 00000000000..7f4fc31d984 --- /dev/null +++ b/srcpkgs/luxmark/template @@ -0,0 +1,25 @@ +# Template file for 'luxmark' +pkgname=luxmark +version=3.0 +revision=1 +build_style=cmake +hostmakedepends="cmake" +makedepends="openimageio-devel tiff-devel libpng-devel libgomp-devel libopenexr-devel MesaLib-devel opencl-headers boost-devel python-devel luxrays-devel glew-devel libfreeglut-devel qt-devel" +short_desc="OpenCL benchmark based on LuxCore" +maintainer="Andrea Brancaleoni " +license="GPL-3" +homepage="http://www.luxrender.net/wiki/LuxMark" +distfiles="https://bitbucket.org/luxrender/luxmark/get/${pkgname}_v${version}.tar.gz" +checksum=17f2300dbfe9eca571e4475db51635f01d4bced3a6447c620abb8b900be02f99 + +configure_args=" -DCMAKE_SKIP_RPATH=ON" + +post_extract() { + mv $XBPS_BUILDDIR/luxrender-luxmark* $wrksrc +} + +do_install() { + vbin build/bin/luxmark + vmkdir usr/share/luxmark + vcopy scenes usr/share/luxmark +}