From 062c545c2b6fe813bc950e68099e835671f91e77 Mon Sep 17 00:00:00 2001 From: Timo Gurr Date: Wed, 18 Feb 2015 17:43:36 +0100 Subject: [PATCH] OpenSceneGraph: use slots, build with giflib5, restrict jpeg dep Change-Id: Ica7f63bc2d6e97130d36817d57c198a331c97a4c --- ...es-0 => OpenSceneGraph-3.2.1-r1.exheres-0} | 13 +++++--- .../files/OpenSceneGraph-3.2.0-libav.patch | 17 ----------- .../OpenSceneGraph-3.2.1-giflib5-part1.patch | 30 +++++++++++++++++++ .../OpenSceneGraph-3.2.1-giflib5-part2.patch | 27 +++++++++++++++++ 4 files changed, 66 insertions(+), 21 deletions(-) rename packages/dev-games/OpenSceneGraph/{OpenSceneGraph-3.2.1.exheres-0 => OpenSceneGraph-3.2.1-r1.exheres-0} (86%) delete mode 100644 packages/dev-games/OpenSceneGraph/files/OpenSceneGraph-3.2.0-libav.patch create mode 100644 packages/dev-games/OpenSceneGraph/files/OpenSceneGraph-3.2.1-giflib5-part1.patch create mode 100644 packages/dev-games/OpenSceneGraph/files/OpenSceneGraph-3.2.1-giflib5-part2.patch diff --git a/packages/dev-games/OpenSceneGraph/OpenSceneGraph-3.2.1.exheres-0 b/packages/dev-games/OpenSceneGraph/OpenSceneGraph-3.2.1-r1.exheres-0 similarity index 86% rename from packages/dev-games/OpenSceneGraph/OpenSceneGraph-3.2.1.exheres-0 rename to packages/dev-games/OpenSceneGraph/OpenSceneGraph-3.2.1-r1.exheres-0 index 82778eae..2592563c 100644 --- a/packages/dev-games/OpenSceneGraph/OpenSceneGraph-3.2.1.exheres-0 +++ b/packages/dev-games/OpenSceneGraph/OpenSceneGraph-3.2.1-r1.exheres-0 @@ -17,6 +17,8 @@ industries. HOMEPAGE="http://${PN}.org" DOWNLOADS="${HOMEPAGE}/downloads/developer_releases/${PNV}.zip" +BUGS_TO="pyromaniac@exherbo.org" + LICENCES="OpenSceneGraph" SLOT="0" PLATFORMS="~amd64" @@ -33,9 +35,9 @@ DEPENDENCIES=" dev-libs/libxml2:* gnome-desktop/librsvg:* media-libs/freetype:* - media-libs/giflib - media-libs/jpeg - media-libs/libpng + media-libs/giflib:= + media-libs/jpeg:=[<9] + media-libs/libpng:= media-libs/tiff net-misc/curl sys-libs/zlib @@ -44,5 +46,8 @@ DEPENDENCIES=" x11-libs/qt:4[opengl] " -BUGS_TO="pyromaniac@exherbo.org" +DEFAULT_SRC_PREPARE_PATCHES=( + "${FILES}"/${PNV}-giflib5-part1.patch + "${FILES}"/${PNV}-giflib5-part2.patch +) diff --git a/packages/dev-games/OpenSceneGraph/files/OpenSceneGraph-3.2.0-libav.patch b/packages/dev-games/OpenSceneGraph/files/OpenSceneGraph-3.2.0-libav.patch deleted file mode 100644 index 63d970b6..00000000 --- a/packages/dev-games/OpenSceneGraph/files/OpenSceneGraph-3.2.0-libav.patch +++ /dev/null @@ -1,17 +0,0 @@ -Author: Thomas Witt -Upstream: pending -Reason: compile fails due to deprecated symbol - - -diff -ur a/OpenSceneGraph-3.2.0/src/osgPlugins/ffmpeg/FFmpegDecoder.cpp b/OpenSceneGraph-3.2.0/src/osgPlugins/ffmpeg/FFmpegDecoder.cpp ---- a/OpenSceneGraph-3.2.0/src/osgPlugins/ffmpeg/FFmpegDecoder.cpp 2013-02-06 13:46:03.000000000 +0100 -+++ b/OpenSceneGraph-3.2.0/src/osgPlugins/ffmpeg/FFmpegDecoder.cpp 2013-08-27 19:58:41.802656964 +0200 -@@ -279,7 +279,7 @@ - int error = av_read_frame(m_format_context.get(), &packet); - if (error < 0) - { -- if (error == AVERROR_EOF || url_feof(m_format_context.get()->pb)) -+ if (error == AVERROR_EOF || m_format_context.get()->pb->eof_reached) - end_of_stream = true; - else { - OSG_FATAL << "av_read_frame() returned " << AvStrError(error) << std::endl; diff --git a/packages/dev-games/OpenSceneGraph/files/OpenSceneGraph-3.2.1-giflib5-part1.patch b/packages/dev-games/OpenSceneGraph/files/OpenSceneGraph-3.2.1-giflib5-part1.patch new file mode 100644 index 00000000..0af7eb4b --- /dev/null +++ b/packages/dev-games/OpenSceneGraph/files/OpenSceneGraph-3.2.1-giflib5-part1.patch @@ -0,0 +1,30 @@ +Source: https://github.com/openscenegraph/osg/commit/afb442fccd182cfe8608f43394af016f6723f97a +Upstream: Fixed in trunk +Reason: Fix build with giflib 5.0 + +From afb442fccd182cfe8608f43394af016f6723f97a Mon Sep 17 00:00:00 2001 +From: Robert OSFIELD +Date: Wed, 19 Nov 2014 17:10:21 +0000 +Subject: [PATCH] From Clement Boesch, "Fix remaining bit of Giflib5 usage" + +git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14485 16af8721-9629-0410-8352-f15c8da7e697 +--- + src/osgPlugins/gif/ReaderWriterGIF.cpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/osgPlugins/gif/ReaderWriterGIF.cpp b/src/osgPlugins/gif/ReaderWriterGIF.cpp +index 4b5cd22..12f46e1 100644 +--- a/src/osgPlugins/gif/ReaderWriterGIF.cpp ++++ b/src/osgPlugins/gif/ReaderWriterGIF.cpp +@@ -560,7 +560,11 @@ GifImageStream** obj) + *width_ret = giffile->SWidth; + *height_ret = giffile->SHeight; + *numComponents_ret = 4; ++#if (GIFLIB_MAJOR >= 5) ++ DGifCloseFile(giffile, &Error); ++#else + DGifCloseFile(giffile); ++#endif + return buffer; + } + diff --git a/packages/dev-games/OpenSceneGraph/files/OpenSceneGraph-3.2.1-giflib5-part2.patch b/packages/dev-games/OpenSceneGraph/files/OpenSceneGraph-3.2.1-giflib5-part2.patch new file mode 100644 index 00000000..3ed1df21 --- /dev/null +++ b/packages/dev-games/OpenSceneGraph/files/OpenSceneGraph-3.2.1-giflib5-part2.patch @@ -0,0 +1,27 @@ +Source: https://github.com/openscenegraph/osg/commit/18213bfb67d464715af618fd8c73549f749625b9 +Upstream: Fixed in trunk +Reason: Fix build with giflib 5.0 + +From 18213bfb67d464715af618fd8c73549f749625b9 Mon Sep 17 00:00:00 2001 +From: Robert OSFIELD +Date: Thu, 20 Nov 2014 09:21:52 +0000 +Subject: [PATCH] From Pjotr Svetachov, fix for build breakage with giflib 5.0. + +git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14493 16af8721-9629-0410-8352-f15c8da7e697 +--- + src/osgPlugins/gif/ReaderWriterGIF.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/osgPlugins/gif/ReaderWriterGIF.cpp b/src/osgPlugins/gif/ReaderWriterGIF.cpp +index 12f46e1..6778894 100644 +--- a/src/osgPlugins/gif/ReaderWriterGIF.cpp ++++ b/src/osgPlugins/gif/ReaderWriterGIF.cpp +@@ -560,7 +560,7 @@ GifImageStream** obj) + *width_ret = giffile->SWidth; + *height_ret = giffile->SHeight; + *numComponents_ret = 4; +-#if (GIFLIB_MAJOR >= 5) ++#if (GIFLIB_MAJOR >= 5&& !(GIFLIB_MAJOR == 5 && GIFLIB_MINOR == 0)) + DGifCloseFile(giffile, &Error); + #else + DGifCloseFile(giffile);