diff options
author | David Seifert <soap@gentoo.org> | 2016-09-14 23:36:05 +0200 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2016-09-14 23:36:28 +0200 |
commit | 088f74794a0d30c45cc084b032308caa18ddcff1 (patch) | |
tree | fb46097a79f3e1489bb644a9b192a0324425819e /media-libs | |
parent | dev-vcs/hg-fast-export: clean up (diff) | |
download | gentoo-088f74794a0d30c45cc084b032308caa18ddcff1.tar.gz gentoo-088f74794a0d30c45cc084b032308caa18ddcff1.tar.bz2 gentoo-088f74794a0d30c45cc084b032308caa18ddcff1.zip |
media-libs/libprojectm: Allow for compiling with GCC 6
Gentoo-bug: 582866
* EAPI=6
* Make PATCHES -p1 compliant
* Migrate away from 'base.eclass'
Package-Manager: portage-2.3.0
Diffstat (limited to 'media-libs')
4 files changed, 127 insertions, 5 deletions
diff --git a/media-libs/libprojectm/files/libprojectm-2.1.0-fix-c++14.patch b/media-libs/libprojectm/files/libprojectm-2.1.0-fix-c++14.patch new file mode 100644 index 000000000000..e3e156620935 --- /dev/null +++ b/media-libs/libprojectm/files/libprojectm-2.1.0-fix-c++14.patch @@ -0,0 +1,64 @@ +Properly call namespaced std::isnan and use implicit +conversion operators, such that they work in C++98 and C++14. +See also: +https://bugs.gentoo.org/show_bug.cgi?id=582866 +https://sourceforge.net/p/projectm/code/ci/92226e25192a69839b9ae3b66ea7173732c639b3 + +--- libprojectM/Common.hpp ++++ libprojectM/Common.hpp +@@ -63,7 +63,7 @@ + + #ifdef LINUX + #include <cstdlib> +-#define projectM_isnan isnan ++#define projectM_isnan std::isnan + + #endif + +--- libprojectM/MilkdropPresetFactory/Parser.cpp ++++ libprojectM/MilkdropPresetFactory/Parser.cpp +@@ -1406,7 +1406,7 @@ + PerFrameEqn * per_frame_eqn; + GenExpr * gen_expr; + +- if (fs == NULL) ++ if (fs.fail()) + return NULL; + if (param_string == NULL) + return NULL; +@@ -1561,7 +1561,7 @@ + + if (preset == NULL) + return NULL; +- if (fs == NULL) ++ if (fs.fail()) + return NULL; + + if ((token = parseToken(fs, name)) != tEq) +@@ -1875,7 +1875,7 @@ + /* Null argument checks */ + if (preset == NULL) + return PROJECTM_FAILURE; +- if (fs == NULL) ++ if (fs.fail()) + return PROJECTM_FAILURE; + if (token == NULL) + return PROJECTM_FAILURE; +@@ -2166,7 +2166,7 @@ + + if (token == NULL) + return PROJECTM_FAILURE; +- if (fs == NULL) ++ if (fs.fail()) + return PROJECTM_FAILURE; + if (preset == NULL) + return PROJECTM_FAILURE; +@@ -2348,7 +2348,7 @@ + if (token == NULL) + + return PROJECTM_FAILURE; +- if (fs == NULL) ++ if (fs.fail()) + return PROJECTM_FAILURE; + if (preset == NULL) + return PROJECTM_FAILURE; diff --git a/media-libs/libprojectm/files/libprojectm-2.1.0-multilib.patch b/media-libs/libprojectm/files/libprojectm-2.1.0-multilib.patch index 8477a270df89..aceee30e6278 100644 --- a/media-libs/libprojectm/files/libprojectm-2.1.0-multilib.patch +++ b/media-libs/libprojectm/files/libprojectm-2.1.0-multilib.patch @@ -1,6 +1,5 @@ -diff -urN projectM-complete-2.1.0-Source/src/libprojectM/CMakeLists.txt projectM-complete-2.1.0-Source.new/src/libprojectM/CMakeLists.txt ---- projectM-complete-2.1.0-Source/src/libprojectM/CMakeLists.txt 2012-05-20 05:43:26.000000000 +0200 -+++ projectM-complete-2.1.0-Source.new/src/libprojectM/CMakeLists.txt 2013-01-21 21:07:49.097541426 +0100 +--- libprojectM/CMakeLists.txt ++++ libprojectM/CMakeLists.txt @@ -35,7 +35,7 @@ ADD_DEFINITIONS(-DCMAKE_INSTALL_PREFIX="\\\"${CMAKE_INSTALL_PREFIX}\\\"") diff --git a/media-libs/libprojectm/files/libprojectm-2.1.0-path.patch b/media-libs/libprojectm/files/libprojectm-2.1.0-path.patch index 39fa7e35da38..bb780e8943ad 100644 --- a/media-libs/libprojectm/files/libprojectm-2.1.0-path.patch +++ b/media-libs/libprojectm/files/libprojectm-2.1.0-path.patch @@ -1,7 +1,7 @@ Index: projectM-complete-2.1.0-Source/src/libprojectM/CMakeLists.txt =================================================================== ---- projectM-complete-2.1.0-Source.orig/src/libprojectM/CMakeLists.txt -+++ projectM-complete-2.1.0-Source/src/libprojectM/CMakeLists.txt +--- libprojectM/CMakeLists.txt ++++ libprojectM/CMakeLists.txt @@ -33,7 +33,7 @@ set(PROJECTM_VERSION 2.1.0) set(PROJECTM_ABI_LEVEL 2) # diff --git a/media-libs/libprojectm/libprojectm-2.1.0-r2.ebuild b/media-libs/libprojectm/libprojectm-2.1.0-r2.ebuild new file mode 100644 index 000000000000..7c43321cafa7 --- /dev/null +++ b/media-libs/libprojectm/libprojectm-2.1.0-r2.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +inherit cmake-utils flag-o-matic toolchain-funcs + +MY_P=${PN/m/M}-complete-${PV}-Source +MY_P=${MY_P/lib} + +DESCRIPTION="A graphical music visualization plugin similar to milkdrop" +HOMEPAGE="http://projectm.sourceforge.net" +SRC_URI="mirror://sourceforge/projectm/${MY_P}.tar.gz" + +LICENSE="LGPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd" +IUSE="debug openmp video_cards_nvidia" + +RDEPEND="media-fonts/dejavu + >=media-libs/ftgl-2.1.3_rc5 + media-libs/freetype:2 + media-libs/mesa + media-libs/glew:= + sys-libs/zlib + video_cards_nvidia? ( media-gfx/nvidia-cg-toolkit )" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +S=${WORKDIR}/${MY_P}/src/libprojectM + +PATCHES=( + "${FILESDIR}"/${P}-multilib.patch + "${FILESDIR}"/${P}-path.patch + "${FILESDIR}"/${P}-fix-c++14.patch +) + +src_configure() { + if use video_cards_nvidia; then + append-ldflags -L/opt/nvidia-cg-toolkit/$(get_libdir) + append-ldflags -L/opt/nvidia-cg-toolkit/lib + append-cppflags -I/opt/nvidia-cg-toolkit/include + fi + + local mycmakeargs=( + -DUSE_CG=$(usex video_cards_nvidia) + -DprojectM_FONT_MENU="${EPREFIX}/usr/share/fonts/dejavu/DejaVuSans.ttf" + -DprojectM_FONT_TITLE="${EPREFIX}/usr/share/fonts/dejavu/DejaVuSansMono.ttf" + ) + + if use openmp && tc-has-openmp; then + mycmakeargs+=( -DUSE_OPENMP=ON ) + else + mycmakeargs+=( -DUSE_OPENMP=OFF ) + fi + + cmake-utils_src_configure +} |