diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2012-11-09 18:24:49 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2012-11-09 18:24:49 +0000 |
commit | fb7597b3927b8dde1b414e553ba22a537841cfac (patch) | |
tree | 8fe459824be4f49edc75073e4f03d661e28891f5 /media-gfx/povray | |
parent | Version bump (bug #442428, thanks to Samuli Suominen). Update license. (diff) | |
download | gentoo-2-fb7597b3927b8dde1b414e553ba22a537841cfac.tar.gz gentoo-2-fb7597b3927b8dde1b414e553ba22a537841cfac.tar.bz2 gentoo-2-fb7597b3927b8dde1b414e553ba22a537841cfac.zip |
Fix building with boost 1.50, thanks to Iván in bug #425450; use boost-m4 to find boost as that solves the linking issue as well; fix an automagic dependency on mkl.
(Portage version: 2.2.0_alpha142/cvs/Linux x86_64, signed Manifest commit with key 1CD13C8AD4301342)
Diffstat (limited to 'media-gfx/povray')
-rw-r--r-- | media-gfx/povray/ChangeLog | 12 | ||||
-rw-r--r-- | media-gfx/povray/files/povray-3.7.0_rc5+boost-1.50.patch | 176 | ||||
-rw-r--r-- | media-gfx/povray/files/povray-3.7.0_rc5-automagic.patch | 17 | ||||
-rw-r--r-- | media-gfx/povray/povray-3.7.0_rc5-r1.ebuild | 124 |
4 files changed, 327 insertions, 2 deletions
diff --git a/media-gfx/povray/ChangeLog b/media-gfx/povray/ChangeLog index 9e9426c57ea9..23cba2f07cd0 100644 --- a/media-gfx/povray/ChangeLog +++ b/media-gfx/povray/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for media-gfx/povray # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-gfx/povray/ChangeLog,v 1.129 2012/06/17 20:53:46 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-gfx/povray/ChangeLog,v 1.130 2012/11/09 18:24:49 flameeyes Exp $ + +*povray-3.7.0_rc5-r1 (09 Nov 2012) + + 09 Nov 2012; Diego E. Pettenò <flameeyes@gentoo.org> + +files/povray-3.7.0_rc5+boost-1.50.patch, + +files/povray-3.7.0_rc5-automagic.patch, +povray-3.7.0_rc5-r1.ebuild: + Fix building with boost 1.50, thanks to Iván in bug #425450; use boost-m4 to + find boost as that solves the linking issue as well; fix an automagic + dependency on mkl. 17 Jun 2012; Justin Lecher <jlec@gentoo.org> povray-3.7.0_rc5.ebuild: Use CCPFLAGS instead of CFLAGS @@ -533,4 +542,3 @@ *povray-3.1g-r1 (31 Mar 2002) 31 Mar 2002; Spider <spider@gentoo.org> Initial ebuild + patch now adheres to USE flags for svgalib X and tty versions. - diff --git a/media-gfx/povray/files/povray-3.7.0_rc5+boost-1.50.patch b/media-gfx/povray/files/povray-3.7.0_rc5+boost-1.50.patch new file mode 100644 index 000000000000..bbce866a5d50 --- /dev/null +++ b/media-gfx/povray/files/povray-3.7.0_rc5+boost-1.50.patch @@ -0,0 +1,176 @@ +Index: povray-3.7.0.RC5/configure.ac +=================================================================== +--- povray-3.7.0.RC5.orig/configure.ac ++++ povray-3.7.0.RC5/configure.ac +@@ -54,8 +54,6 @@ AC_CONFIG_SRCDIR([unix/disp_text.cpp]) + m4_include([unix/config/acx_pthread.m4]) + m4_include([unix/config/ax_arg_enable.m4]) + m4_include([unix/config/ax_arg_with.m4]) +-m4_include([unix/config/ax_boost_base.m4]) +-m4_include([unix/config/ax_boost_thread.m4]) + m4_include([unix/config/ax_test_compiler_flags.m4]) + m4_include([unix/config/ax_check_lib.m4]) + m4_include([unix/config/ax_check_libjpeg.m4]) +@@ -165,6 +163,7 @@ AC_CANONICAL_HOST + + AM_INIT_AUTOMAKE([1.9 dist-bzip2]) + AM_MAINTAINER_MODE ++LT_INIT + + AX_FIX_INCORRECT_PATH(C_INCLUDE_PATH, ".", [pov_warn_path="$pov_warn_path C_INCLUDE_PATH"]) + AX_FIX_INCORRECT_PATH(CPLUS_INCLUDE_PATH, ".", [pov_warn_path="$pov_warn_path CPLUS_INCLUDE_PATH"]) +@@ -295,28 +294,15 @@ LIBS="$LIBS $PTHREAD_CFLAGS $PTHREAD_LIB + + # Boost; required library + # the following macro stops with error when boost is not found +-AX_BOOST_BASE([$required_libboost_version]) +-AX_BOOST_THREAD +-if test x"$ax_cv_boost_thread" != x"yes"; then ++BOOST_REQUIRE([$required_libboost_version]) ++BOOST_THREADS ++if test x"$boost_cv_lib_thread" != x"yes"; then + AC_MSG_ERROR([cannot find a suitable boost thread library]) + else + CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" # append +- LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" # append +- LIBS="$BOOST_THREAD_LIB $LIBS" ++ LDFLAGS="$LDFLAGS -L$BOOST_LDPATH" # append ++ LIBS="$BOOST_THREAD_LIBS $LIBS" + fi +-AC_MSG_CHECKING([whether the boost thread library is usable]) +-AC_RUN_IFELSE( +- [AC_LANG_PROGRAM([[ +-#include <boost/thread/thread.hpp> +- ]], +- [[boost::defer_lock_t(); return 0;]])], +- [AC_MSG_RESULT([yes])], +- [ +- AC_MSG_RESULT([no]) +- AC_MSG_FAILURE([cannot link with the boost thread library]) +- ], +- [AC_MSG_RESULT([cross-compiling])] # FIXME +-) + AC_DEFINE([USE_OFFICIAL_BOOST], [], [Use the official Boost libraries.]) + + # Intel Math Kernel library +Index: povray-3.7.0.RC5/source/backend/scene/view.cpp +=================================================================== +--- povray-3.7.0.RC5.orig/source/backend/scene/view.cpp ++++ povray-3.7.0.RC5/source/backend/scene/view.cpp +@@ -1547,7 +1547,7 @@ const Camera *RTRData::CompletedFrame() + } + + boost::xtime t; +- boost::xtime_get (&t, boost::TIME_UTC); ++ boost::xtime_get (&t, boost::TIME_UTC_); + t.sec += 3; + + // this will cause us to wait until the other threads are done. +Index: povray-3.7.0.RC5/source/base/timer.cpp +=================================================================== +--- povray-3.7.0.RC5.orig/source/base/timer.cpp ++++ povray-3.7.0.RC5/source/base/timer.cpp +@@ -117,7 +117,7 @@ TimerDefault::~TimerDefault() + POV_LONG TimerDefault::ElapsedRealTime() const + { + boost::xtime t; +- boost::xtime_get(&t, boost::TIME_UTC); ++ boost::xtime_get(&t, boost::TIME_UTC_); + POV_LONG tt = (POV_LONG)(t.sec) * (POV_LONG)(1000000000) + (POV_LONG)(t.nsec); + POV_LONG st = (POV_LONG)(realTimeStart.sec) * (POV_LONG)(1000000000) + (POV_LONG)(realTimeStart.nsec); + return ((tt - st) / (POV_LONG)(1000000)); +@@ -126,7 +126,7 @@ POV_LONG TimerDefault::ElapsedRealTime() + POV_LONG TimerDefault::ElapsedCPUTime() const + { + boost::xtime t; +- boost::xtime_get(&t, boost::TIME_UTC); ++ boost::xtime_get(&t, boost::TIME_UTC_); + POV_LONG tt = (POV_LONG)(t.sec) * (POV_LONG)(1000000000) + (POV_LONG)(t.nsec); + POV_LONG st = (POV_LONG)(cpuTimeStart.sec) * (POV_LONG)(1000000000) + (POV_LONG)(cpuTimeStart.nsec); + return ((tt - st) / (POV_LONG)(1000000)); +@@ -139,8 +139,8 @@ bool TimerDefault::HasValidCPUTime() con + + void TimerDefault::Reset() + { +- boost::xtime_get(&realTimeStart, boost::TIME_UTC); +- boost::xtime_get(&cpuTimeStart, boost::TIME_UTC); ++ boost::xtime_get(&realTimeStart, boost::TIME_UTC_); ++ boost::xtime_get(&cpuTimeStart, boost::TIME_UTC_); + } + + } +@@ -155,7 +155,7 @@ namespace pov_base + void Delay(unsigned int msec) + { + boost::xtime t; +- boost::xtime_get(&t, boost::TIME_UTC); ++ boost::xtime_get(&t, boost::TIME_UTC_); + POV_ULONG ns = (POV_ULONG)(t.sec) * (POV_ULONG)(1000000000) + (POV_ULONG)(t.nsec) + (POV_ULONG)(msec) * (POV_ULONG)(1000000); + t.sec = (boost::xtime::xtime_sec_t)(ns / (POV_ULONG)(1000000000)); + t.nsec = (boost::xtime::xtime_nsec_t)(ns % (POV_ULONG)(1000000000)); +Index: povray-3.7.0.RC5/vfe/unix/platformbase.cpp +=================================================================== +--- povray-3.7.0.RC5.orig/vfe/unix/platformbase.cpp ++++ povray-3.7.0.RC5/vfe/unix/platformbase.cpp +@@ -126,7 +126,7 @@ namespace pov_base + #else + // taken from source/base/timer.cpp + boost::xtime t; +- boost::xtime_get(&t, boost::TIME_UTC); ++ boost::xtime_get(&t, boost::TIME_UTC_); + POV_ULONG ns = (POV_ULONG)(t.sec) * (POV_ULONG)(1000000000) + (POV_ULONG)(t.nsec) + (POV_ULONG)(msec) * (POV_ULONG)(1000000); + t.sec = (boost::xtime::xtime_sec_t)(ns / (POV_ULONG)(1000000000)); + t.nsec = (boost::xtime::xtime_nsec_t)(ns % (POV_ULONG)(1000000000)); +Index: povray-3.7.0.RC5/vfe/vfepovms.cpp +=================================================================== +--- povray-3.7.0.RC5.orig/vfe/vfepovms.cpp ++++ povray-3.7.0.RC5/vfe/vfepovms.cpp +@@ -247,7 +247,7 @@ void *SysQNode::Receive (int *pLen, bool + + // TODO: have a shorter wait but loop, and check for system shutdown + boost::xtime t; +- boost::xtime_get (&t, boost::TIME_UTC); ++ boost::xtime_get (&t, boost::TIME_UTC_); + t.nsec += 50000000 ; + m_Event.timed_wait (lock, t); + +Index: povray-3.7.0.RC5/vfe/vfesession.cpp +=================================================================== +--- povray-3.7.0.RC5.orig/vfe/vfesession.cpp ++++ povray-3.7.0.RC5/vfe/vfesession.cpp +@@ -967,7 +967,7 @@ vfeStatusFlags vfeSession::GetStatus(boo + if (WaitTime > 0) + { + boost::xtime t; +- boost::xtime_get (&t, boost::TIME_UTC); ++ boost::xtime_get (&t, boost::TIME_UTC_); + t.sec += WaitTime / 1000 ; + t.nsec += (WaitTime % 1000) * 1000000 ; + m_SessionEvent.timed_wait (lock, t); +@@ -1034,7 +1034,7 @@ bool vfeSession::Pause() + // we can't call pause directly since it will result in a thread context + // error. pause must be called from the context of the worker thread. + boost::xtime t; +- boost::xtime_get (&t, boost::TIME_UTC); ++ boost::xtime_get (&t, boost::TIME_UTC_); + t.sec += 3 ; + m_RequestFlag = rqPauseRequest; + if (m_RequestEvent.timed_wait(lock, t) == false) +@@ -1057,7 +1057,7 @@ bool vfeSession::Resume() + // we can't call resume directly since it will result in a thread context + // error. it must be called from the context of the worker thread. + boost::xtime t; +- boost::xtime_get (&t, boost::TIME_UTC); ++ boost::xtime_get (&t, boost::TIME_UTC_); + t.sec += 3 ; + m_RequestFlag = rqResumeRequest; + if (m_RequestEvent.timed_wait(lock, t) == false) +@@ -1123,7 +1123,7 @@ int vfeSession::Initialize(vfeDestInfo * + m_LastError = vfeNoError; + + boost::xtime t; +- boost::xtime_get (&t, boost::TIME_UTC); ++ boost::xtime_get (&t, boost::TIME_UTC_); + t.sec += 3 ; + #ifdef _DEBUG + t.sec += 120; diff --git a/media-gfx/povray/files/povray-3.7.0_rc5-automagic.patch b/media-gfx/povray/files/povray-3.7.0_rc5-automagic.patch new file mode 100644 index 000000000000..31955c93393f --- /dev/null +++ b/media-gfx/povray/files/povray-3.7.0_rc5-automagic.patch @@ -0,0 +1,17 @@ +Index: povray-3.7.0.RC5/configure.ac +=================================================================== +--- povray-3.7.0.RC5.orig/configure.ac ++++ povray-3.7.0.RC5/configure.ac +@@ -306,10 +306,12 @@ fi + AC_DEFINE([USE_OFFICIAL_BOOST], [], [Use the official Boost libraries.]) + + # Intel Math Kernel library ++AS_IF([x"$with_libmkl" != x"no"], [ + pov_save_ldflags="$LDFLAGS" + test x"$with_libmkl" != x"" && LDFLAGS="-L$with_libmkl $LDFLAGS" + AC_CHECK_LIB([mkl], [sin]) + test x"ac_cv_lib_mkl_sin" = x"no" && LDFLAGS="$pov_save_ldflags" ++]) + + # libm + AC_CHECK_LIB([m], [sin]) diff --git a/media-gfx/povray/povray-3.7.0_rc5-r1.ebuild b/media-gfx/povray/povray-3.7.0_rc5-r1.ebuild new file mode 100644 index 000000000000..03b51406fdc9 --- /dev/null +++ b/media-gfx/povray/povray-3.7.0_rc5-r1.ebuild @@ -0,0 +1,124 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-gfx/povray/povray-3.7.0_rc5-r1.ebuild,v 1.1 2012/11/09 18:24:49 flameeyes Exp $ + +EAPI=4 + +inherit autotools eutils flag-o-matic versionator + +POVRAY_MAJOR_VER=$(get_version_component_range 1-3) +POVRAY_MINOR_VER=$(get_version_component_range 4) +if [ -n "$POVRAY_MINOR_VER" ]; then + POVRAY_MINOR_VER=${POVRAY_MINOR_VER/rc/RC} + MY_PV="${POVRAY_MAJOR_VER}.${POVRAY_MINOR_VER}" +else + MY_PV=${POVRAY_MAJOR_VER} +fi + +DESCRIPTION="The Persistence of Vision Raytracer" +HOMEPAGE="http://www.povray.org/" +SRC_URI="http://www.povray.org/redirect/www.povray.org/beta/source/${PN}-${MY_PV}.tar.gz" + +LICENSE="povlegal-3.6" +SLOT="0" +KEYWORDS="~amd64 ~mips ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" +IUSE="debug mkl openexr tiff X" + +DEPEND=" + >=dev-libs/boost-1.50.0[threads(+)] + media-libs/libpng:0 + sys-libs/zlib + virtual/jpeg + openexr? ( + media-libs/ilmbase + media-libs/openexr ) + mkl? ( sci-libs/mkl ) + tiff? ( media-libs/tiff:0 ) + X? ( media-libs/libsdl )" +RDEPEND="${DEPEND}" +DEPEND="${DEPEND} + sys-devel/boost-m4" + +S=${WORKDIR}/${PN}-${MY_PV} + +src_prepare() { + epatch "${FILESDIR}"/3.7.0_rc3-user-conf.patch + epatch "${FILESDIR}"/${P}+boost-1.50.patch + epatch "${FILESDIR}"/${P}-automagic.patch + + # Change some destination directories that cannot be adjusted via configure + sed \ + -e 's:${povsysconfdir}/$PACKAGE/$VERSION_BASE:${povsysconfdir}/'${PN}':g' \ + -e 's:${povdatadir}/$PACKAGE-$VERSION_BASE:${povdatadir}/'${PN}':g' \ + -e 's:${povdatadir}/doc/$PACKAGE-$VERSION_BASE:${povdatadir}/doc/'${PF}':g' \ + -i configure.ac || die + + sed \ + -e "s:^povlibdir = .*:povlibdir = @datadir@/${PN}:" \ + -e "s:^povdocdir = .*:povdocdir = @datadir@/doc/${PF}:" \ + -e "s:^povconfdir = .*:povconfdir = @sysconfdir@/${PN}:" \ + -e 's:mkdir_p:MKDIR_P:g' \ + -i Makefile.am || die + + # The "+p" option on the test command line causes a pause and + # prompts the user to interact, so remove it. + sed -i -e "s:biscuit.pov -f +d +p:biscuit.pov -f +d:" Makefile.am || die + + eautoreconf +} + +src_configure() { + local non_redist_conf + + # Fixes bug 71255 + if [[ $(get-flag march) == k6-2 ]]; then + filter-flags -fomit-frame-pointer + fi + + # The config files are installed correctly (e.g. povray.conf), + # but the code compiles using incorrect [default] paths + # (based on /usr/local...), so povray will not find the system + # config files without the following fix: + append-cppflags -DPOVLIBDIR=\\\"${EROOT}usr/share/${PN}\\\" -DPOVCONFDIR=\\\"${EROOT}etc/${PN}\\\" + + if ! use tiff ; then + non_redist_conf="NON_REDISTRIBUTABLE_BUILD=yes" + else + non_redist_conf="" + fi + + econf \ + ${non_redist_conf} \ + COMPILED_BY="Portage (Gentoo `uname`) on `hostname -f`" \ + $(use_enable debug) \ + $(use_with openexr) \ + $(use_with mkl libmkl) \ + $(use_with tiff libtiff) \ + $(use_with X libsdl) \ + $(use_with X x) \ + --disable-strip \ + --disable-optimiz \ + --disable-optimiz-arch +} + +src_test() { + # For the beta releases, we generate a license extension in case needed + POVRAY_BETA=`./unix/povray --betacode 2>&1` emake check +} + +pkg_preinst() { + # Copy the old config files if they are in the old location + # but do not yet exist in the new location. + # This way, they can be treated by CONFIG_PROTECT as normal. + for conf_file in $(ls "${ED}/etc/${PN}"); do + if [ ! -e "${EROOT}etc/${PN}/${conf_file}" ]; then + for version_dir in $(ls "${EROOT}etc/${PN}" | grep "^[0-9]" | sort -rn); do + if [ -e "${EROOT}etc/${PN}/${version_dir}/${conf_file}" ]; then + mv "${EROOT}etc/${PN}/${version_dir}/${conf_file}" "${EROOT}etc/${PN}" + elog "Note: ${conf_file} moved from ${EROOT}etc/povray/${version_dir}/ to ${EROOT}etc/povray/" + break + fi + done + fi + done +} |