From 02ea9c540ed6c5f4b8c7f098563e95f383585606 Mon Sep 17 00:00:00 2001 From: miqlas <5569059+extrowerk@users.noreply.github.com> Date: Sun, 12 Nov 2017 13:58:48 +0100 Subject: [PATCH] POVRAY: new recipe (#1788) --- .../povray/patches/povray-3.7.0.4.patchset | 95 +++++++++++++++++ media-gfx/povray/povray-3.7.0.4.recipe | 100 ++++++++++++++++++ 2 files changed, 195 insertions(+) create mode 100644 media-gfx/povray/patches/povray-3.7.0.4.patchset create mode 100644 media-gfx/povray/povray-3.7.0.4.recipe diff --git a/media-gfx/povray/patches/povray-3.7.0.4.patchset b/media-gfx/povray/patches/povray-3.7.0.4.patchset new file mode 100644 index 000000000..05077b651 --- /dev/null +++ b/media-gfx/povray/patches/povray-3.7.0.4.patchset @@ -0,0 +1,95 @@ +From a64f8ff30796c2db712abea7b72034fa3cc19a9d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= +Date: Sun, 12 Nov 2017 11:00:37 +0100 +Subject: POVRAY: Haiku support + + +diff --git a/vfe/unix/syspovconfig.h b/vfe/unix/syspovconfig.h +index 42d8bb3..fdfcfb3 100644 +--- a/vfe/unix/syspovconfig.h ++++ b/vfe/unix/syspovconfig.h +@@ -149,6 +149,10 @@ const int NULL=0; + // Apple Mac OS X detected. + #include + #define lseek64(handle,offset,whence) lseek(handle,offset,whence) ++#elif defined(__HAIKU__) ++ // Haiku detected. ++ #include ++ #define lseek64(handle,offset,whence) lseek(handle,offset,whence) + #elif defined(__sun) && defined(__SVR4) + // Sun/Oracle Solaris detected. + // Not officially supported yet; comment-out the following line to try with default POSIX settings. +-- +2.15.0 + + +From 54f220b12f1086661066de6aa9cc96beb9c1b1a8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= +Date: Sun, 12 Nov 2017 11:11:58 +0100 +Subject: Haiku needs -lpthread + + +diff --git a/unix/config/ax_boost_thread.m4 b/unix/config/ax_boost_thread.m4 +index 79e12cd..64c207c 100644 +--- a/unix/config/ax_boost_thread.m4 ++++ b/unix/config/ax_boost_thread.m4 +@@ -72,6 +72,8 @@ AC_DEFUN([AX_BOOST_THREAD], + CXXFLAGS="-pthreads $CXXFLAGS" + elif test "x$host_os" = "xmingw32" ; then + CXXFLAGS="-mthreads $CXXFLAGS" ++ elif test "x$host_os" = "xhaiku" ; then ++ CXXFLAGS="-lpthread $CXXFLAGS" + else + CXXFLAGS="-pthread $CXXFLAGS" + fi +-- +2.15.0 + + +From 5a7db3b42bfc7b2c58fce659f4e8848732a37f3e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= +Date: Sun, 12 Nov 2017 11:34:59 +0100 +Subject: Haiku needs -lpthread (2. part) + + +diff --git a/unix/config/ax_boost_thread.m4 b/unix/config/ax_boost_thread.m4 +index 64c207c..a812ba9 100644 +--- a/unix/config/ax_boost_thread.m4 ++++ b/unix/config/ax_boost_thread.m4 +@@ -89,6 +89,8 @@ AC_DEFUN([AX_BOOST_THREAD], + BOOST_CPPFLAGS="-pthreads $BOOST_CPPFLAGS" + elif test "x$host_os" = "xmingw32" ; then + BOOST_CPPFLAGS="-mthreads $BOOST_CPPFLAGS" ++ elif test "x$host_os" = "xhaiku" ; then ++ BOOST_CPPFLAGS="-lpthread $BOOST_CPPFLAGS" + else + BOOST_CPPFLAGS="-pthread $BOOST_CPPFLAGS" + fi +-- +2.15.0 + + +From 7a7b736b634ec33e1e236dabd67b58aa0a7c22b7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= +Date: Sun, 12 Nov 2017 13:01:38 +0100 +Subject: Install fix + + +diff --git a/unix/configure.ac b/unix/configure.ac +index 29c65c6..79e5b6d 100644 +--- a/unix/configure.ac ++++ b/unix/configure.ac +@@ -1002,8 +1002,8 @@ AC_DEFINE_UNQUOTED([BUILTIN_XWIN_DISPLAY], ["$pov_xwin_msg"], [X Window display. + AC_DEFINE_UNQUOTED([BUILTIN_IMG_FORMATS], ["$pov_img_fmt_builtin $pov_img_fmt_enabled"], [Supported image formats.]) + AC_DEFINE_UNQUOTED([MISSING_IMG_FORMATS], ["$pov_img_fmt_disabled"], [Unsupported image formats.]) + +-povowner=`stat --format=%u ${HOME} || stat -f %u ${HOME}` +-povgroup=`stat --format=%g ${HOME} || stat -f %g ${HOME}` ++povowner=`echo user` ++povgroup=`echo root` + AC_SUBST([povowner]) + AC_SUBST([povgroup]) + +-- +2.15.0 + diff --git a/media-gfx/povray/povray-3.7.0.4.recipe b/media-gfx/povray/povray-3.7.0.4.recipe new file mode 100644 index 000000000..1aa410ecf --- /dev/null +++ b/media-gfx/povray/povray-3.7.0.4.recipe @@ -0,0 +1,100 @@ +SUMMARY="The Persistence of Vision Raytracer" +DESCRIPTION="The Persistence of Vision Ray Tracer, or POV-Ray, is a ray \ +tracing program which generates images from a text-based scene description, \ +and is available for a variety of computer platforms. It was originally based \ +on DKBTrace, written by David Kirk Buck and Aaron A. Collins for the Amiga \ +computers." +HOMEPAGE="http://www.povray.org/" +COPYRIGHT="1991-2013 Persistence of Vision Raytracer Pty. Ltd." +LICENSE="GNU GPL v3" +REVISION="1" +SOURCE_URI="https://github.com/POV-Ray/povray/archive/v$portVersion.tar.gz" +CHECKSUM_SHA256="408bb2f16eaad316be7ff6b4c867be04d8d57eb6e2642e168e992a51b82bb487" +PATCHES="povray-$portVersion.patchset" + +ARCHITECTURES="!x86_gcc2 x86 x86_64" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + povray$secondaryArchSuffix = $portVersion + cmd:povray = $portVersion + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libboost_system$secondaryArchSuffix + lib:libboost_thread$secondaryArchSuffix + lib:libiex_2_2$secondaryArchSuffix + lib:libiexmath_2_2$secondaryArchSuffix + lib:libHalf$secondaryArchSuffix + lib:libilmimf_2_2$secondaryArchSuffix + lib:libilmthread_2_2$secondaryArchSuffix + lib:libimath_2_2$secondaryArchSuffix + lib:libjpeg$secondaryArchSuffix + lib:libpng16$secondaryArchSuffix + lib:libsdl$secondaryArchSuffix + lib:libtiff$secondaryArchSuffix + lib:libz$secondaryArchSuffix + " + +GLOBAL_WRITABLE_FILES=" + settings/povray/3.7/povray.conf keep-old + settings/povray/3.7/povray.ini keep-old + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libboost_system$secondaryArchSuffix + devel:libboost_thread$secondaryArchSuffix + devel:libiex_2_2$secondaryArchSuffix + devel:libiexmath_2_2$secondaryArchSuffix + devel:libHalf$secondaryArchSuffix + devel:libilmimf_2_2$secondaryArchSuffix + devel:libilmthread_2_2$secondaryArchSuffix + devel:libimath_2_2$secondaryArchSuffix + devel:libjpeg$secondaryArchSuffix + devel:libpng16$secondaryArchSuffix + devel:libsdl$secondaryArchSuffix + devel:libtiff$secondaryArchSuffix + devel:libz$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:aclocal + cmd:autoconf + cmd:autoheader + cmd:automake + cmd:awk + cmd:find + cmd:gettext + cmd:gcc$secondaryArchSuffix + cmd:grep + cmd:libtoolize$secondaryArchSuffix + cmd:make + cmd:pkg_config$secondaryArchSuffix + cmd:sed + " + +BUILD() +{ + cd unix + ./prebuild.sh + cd .. + + export CXXFLAGS="-std=c++11 -DBOOST_NO_CXX11_CONSTEXPR -D_BSD_SOURCE" + export LDFLAGS="-lbsd -lnetwork" + + runConfigure ./configure \ + COMPILED_BY="HaikuPorts" \ + --with-boost-libdir=`finddir B_SYSTEM_LIB_DIRECTORY` + + make $jobArgs +} + +INSTALL() +{ + make install +} + +TEST() +{ + make check +}