From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E618713835B for ; Sun, 21 Feb 2021 16:32:28 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 30AA0E086F; Sun, 21 Feb 2021 16:32:28 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 07963E086F for ; Sun, 21 Feb 2021 16:32:27 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 83803341013 for ; Sun, 21 Feb 2021 16:32:26 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B8EFA2A9 for ; Sun, 21 Feb 2021 16:32:24 +0000 (UTC) From: "David Seifert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "David Seifert" Message-ID: <1613925114.0ea1c6d466de8412a60fc576c6f3140104367323.soap@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: x11-misc/rss-glx/files/, x11-misc/rss-glx/ X-VCS-Repository: repo/gentoo X-VCS-Files: x11-misc/rss-glx/files/rss-glx-0.9.1-c++11-narrowing.patch x11-misc/rss-glx/rss-glx-0.9.1-r2.ebuild X-VCS-Directories: x11-misc/rss-glx/files/ x11-misc/rss-glx/ X-VCS-Committer: soap X-VCS-Committer-Name: David Seifert X-VCS-Revision: 0ea1c6d466de8412a60fc576c6f3140104367323 X-VCS-Branch: master Date: Sun, 21 Feb 2021 16:32:24 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 1fd8ac10-16da-4f68-af33-2a0479d2135e X-Archives-Hash: 55ba4e2f20ae9472990661bd2092b2e2 commit: 0ea1c6d466de8412a60fc576c6f3140104367323 Author: Alexander Miller gmx de> AuthorDate: Sun Feb 21 16:31:54 2021 +0000 Commit: David Seifert gentoo org> CommitDate: Sun Feb 21 16:31:54 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0ea1c6d4 x11-misc/rss-glx: Fix C++11 narrowing issues This fixes building with clang. Thanks to Malcolm Lashley for the patch. Closes: https://bugs.gentoo.org/742755 Signed-off-by: Alexander Miller gmx.de> Package-Manager: Portage-3.0.13, Repoman-3.0.2 Signed-off-by: David Seifert gentoo.org> .../files/rss-glx-0.9.1-c++11-narrowing.patch | 22 ++++ x11-misc/rss-glx/rss-glx-0.9.1-r2.ebuild | 129 +++++++++++++++++++++ 2 files changed, 151 insertions(+) diff --git a/x11-misc/rss-glx/files/rss-glx-0.9.1-c++11-narrowing.patch b/x11-misc/rss-glx/files/rss-glx-0.9.1-c++11-narrowing.patch new file mode 100644 index 00000000000..c92f1162dd3 --- /dev/null +++ b/x11-misc/rss-glx/files/rss-glx-0.9.1-c++11-narrowing.patch @@ -0,0 +1,22 @@ +--- rss-glx_0.9.1/src/hyperspace.cpp 2009-05-16 23:41:52.000000000 +0100 ++++ rss-glx_0.9.1/src/hyperspace.cpp 2021-01-22 22:54:20.297572792 +0000 +@@ -376,7 +376,7 @@ + double flarepos[3] = {0.0f, 2.0f, 0.0f}; + glBindTexture(GL_TEXTURE_2D, flaretex[0]); + sunStar->draw(camPos); +- float diff[3] = {flarepos[0] - camPos[0], flarepos[1] - camPos[1], flarepos[2] - camPos[2]}; ++ float diff[3] = {(float)flarepos[0] - camPos[0], (float)flarepos[1] - camPos[1], (float)flarepos[2] - camPos[2]}; + float alpha = 0.5f - 0.005f * sqrtf(diff[0] * diff[0] + diff[1] * diff[1] + diff[2] * diff[2]); + if(alpha > 0.0f) + flare(flarepos, 1.0f, 1.0f, 1.0f, alpha); +--- rss-glx_0.9.1/src/flare.cpp 2009-04-21 17:54:42.000000000 +0100 ++++ rss-glx_0.9.1/src/flare.cpp 2021-01-22 22:54:57.808305771 +0000 +@@ -193,7 +193,7 @@ + &winx, &winy, &winz); + x = (float(winx) / float(xsize)) * aspectRatio; + y = float(winy) / float(ysize); +- float diff[3] = {pos[0] - camPos[0], pos[1] - camPos[1], pos[2] - camPos[2]}; ++ float diff[3] = {(float)pos[0] - camPos[0], (float)pos[1] - camPos[1], (float)pos[2] - camPos[2]}; + if(diff[0] * billboardMat[8] + diff[1] * billboardMat[9] + diff[2] * billboardMat[10] > 0.0f) + return; + diff --git a/x11-misc/rss-glx/rss-glx-0.9.1-r2.ebuild b/x11-misc/rss-glx/rss-glx-0.9.1-r2.ebuild new file mode 100644 index 00000000000..46625edcea1 --- /dev/null +++ b/x11-misc/rss-glx/rss-glx-0.9.1-r2.ebuild @@ -0,0 +1,129 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit autotools eutils multilib + +MY_P=${PN}_${PV} + +DESCRIPTION="Really Slick OpenGL Screensavers for XScreenSaver" +HOMEPAGE="http://rss-glx.sourceforge.net" +SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="+bzip2 openal quesoglc" + +RDEPEND=" + x11-libs/libX11 + x11-libs/libXext + >=media-libs/glew-1.5.1:= + media-libs/mesa[X(+)] + >=media-gfx/imagemagick-6.4:= + >=x11-misc/xscreensaver-5.08-r2 + bzip2? ( app-arch/bzip2 ) + openal? ( >=media-libs/freealut-1.1.0-r1 ) + quesoglc? ( media-libs/quesoglc ) +" +DEPEND=" + ${RDEPEND} + x11-base/xorg-proto + virtual/pkgconfig + sys-apps/sed +" + +DOCS="ChangeLog README*" +S=${WORKDIR}/${MY_P} +PATCHES=( + "${FILESDIR}"/${P}-quesoglc.patch + "${FILESDIR}"/${P}-asneeded.patch + "${FILESDIR}"/${P}-imagemagick-7.patch + "${FILESDIR}"/${P}-c++11-narrowing.patch +) + +src_prepare() { + default + + sed -i \ + -e '/CFLAGS=/s:-O2:${CFLAGS}:' \ + -e '/CXXFLAGS=/s:-O2:${CXXFLAGS}:' \ + -e 's|AM_CONFIG_HEADER|AC_CONFIG_HEADERS|g' \ + configure.in || die + + eautoreconf +} + +src_configure() { + econf \ + $(use_enable bzip2) \ + $(use_enable openal sound) \ + $(use_with quesoglc) \ + --bindir=/usr/$(get_libdir)/misc/xscreensaver \ + --enable-shared \ + --with-configdir=/usr/share/xscreensaver/config +} + +pkg_postinst() { + local xssconf="${ROOT}usr/share/X11/app-defaults/XScreenSaver" + + if [ -f ${xssconf} ]; then + sed -e '/*programs:/a\ + GL: \"Cyclone\" cyclone --root \\n\\\ + GL: \"Euphoria\" euphoria --root \\n\\\ + GL: \"Fieldlines\" fieldlines --root \\n\\\ + GL: \"Flocks\" flocks --root \\n\\\ + GL: \"Flux\" flux --root \\n\\\ + GL: \"Helios\" helios --root \\n\\\ + GL: \"Hyperspace\" hyperspace --root \\n\\\ + GL: \"Lattice\" lattice --root \\n\\\ + GL: \"Plasma\" plasma --root \\n\\\ + GL: \"Pixelcity\" pixelcity --root \\n\\\ + GL: \"Skyrocket\" skyrocket --root \\n\\\ + GL: \"Solarwinds\" solarwinds --root \\n\\\ + GL: \"Colorfire\" colorfire --root \\n\\\ + GL: \"Hufos Smoke\" hufo_smoke --root \\n\\\ + GL: \"Hufos Tunnel\" hufo_tunnel --root \\n\\\ + GL: \"Sundancer2\" sundancer2 --root \\n\\\ + GL: \"BioF\" biof --root \\n\\\ + GL: \"BusySpheres\" busyspheres --root \\n\\\ + GL: \"SpirographX\" spirographx --root \\n\\\ + GL: \"MatrixView\" matrixview --root \\n\\\ + GL: \"Lorenz\" lorenz --root \\n\\\ + GL: \"Drempels\" drempels --root \\n\\\ + GL: \"Feedback\" feedback --root \\n\\' \ + -i ${xssconf} || die + fi +} + +pkg_postrm() { + local xssconf="${ROOT}usr/share/X11/app-defaults/XScreenSaver" + + if [ -f ${xssconf} ]; then + sed \ + -e '/\"Cyclone\" cyclone/d' \ + -e '/\"Euphoria\" euphoria/d' \ + -e '/\"Fieldlines\" fieldlines/d' \ + -e '/\"Flocks\" flocks/d' \ + -e '/\"Flux\" flux/d' \ + -e '/\"Helios\" helios/d' \ + -e '/\"Hyperspace\" hyperspace/d' \ + -e '/\"Lattice\" lattice/d' \ + -e '/\"Plasma\" plasma/d' \ + -e '/\"Pixelcity\" pixelcity/d' \ + -e '/\"Skyrocket\" skyrocket/d' \ + -e '/\"Solarwinds\" solarwinds/d' \ + -e '/\"Colorfire\" colorfire/d' \ + -e '/\"Hufos Smoke\" hufo_smoke/d' \ + -e '/\"Hufos Tunnel\" hufo_tunnel/d' \ + -e '/\"Sundancer2\" sundancer2/d' \ + -e '/\"BioF\" biof/d' \ + -e '/\"BusySpheres\" busyspheres/d' \ + -e '/\"SpirographX\" spirographx/d' \ + -e '/\"MatrixView\" matrixview/d' \ + -e '/\"Lorenz\" lorenz/d' \ + -e '/\"Drempels\" drempels/d' \ + -e '/\"Feedback\" feedback/d' \ + -i ${xssconf} || die + fi +}