public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: x11-misc/rss-glx/files/, x11-misc/rss-glx/
@ 2017-05-25 13:32 Jeroen Roovers
  0 siblings, 0 replies; 6+ messages in thread
From: Jeroen Roovers @ 2017-05-25 13:32 UTC (permalink / raw
  To: gentoo-commits

commit:     e7f3bbcdda467e41ccc2c15ab6b99541246bbbbb
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Thu May 25 13:31:32 2017 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Thu May 25 13:32:00 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e7f3bbcd

app-arch/dpkg: Fix building against >=media-gfx/imagemagick-7 (bug #619456).

Package-Manager: Portage-2.3.6, Repoman-2.3.2

 .../files/rss-glx-0.9.1-imagemagick-7.patch        | 178 +++++++++++++++++++++
 x11-misc/rss-glx/rss-glx-0.9.1-r1.ebuild           | 129 +++++++++++++++
 2 files changed, 307 insertions(+)

diff --git a/x11-misc/rss-glx/files/rss-glx-0.9.1-imagemagick-7.patch b/x11-misc/rss-glx/files/rss-glx-0.9.1-imagemagick-7.patch
new file mode 100644
index 00000000000..c92eb1e1d3c
--- /dev/null
+++ b/x11-misc/rss-glx/files/rss-glx-0.9.1-imagemagick-7.patch
@@ -0,0 +1,178 @@
+--- a/configure.in
++++ b/configure.in
+@@ -38,6 +38,8 @@
+ AC_PROG_LIBTOOL
+ AC_PROG_LN_S
+ 
++PKG_PROG_PKG_CONFIG
++
+ # Checks for libraries.
+ AC_CHECK_LIB([m], [pow],,AC_MSG_ERROR(-lm was not found but required.))
+ 
+@@ -81,7 +83,15 @@
+ AC_CHECK_FUNCS(random_r nrand48)
+ 
+ # Check for ImageMagick.
+-PKG_CHECK_MODULES(Wand, Wand >= 6.4)
++PKG_CHECK_MODULES(Wand, [Wand >= 6.4],,
++	[PKG_CHECK_MODULES(Wand, MagickWand >= 6.4)]
++)
++
++old_CPPFLAGS="$CPPFLAGS"; CPPFLAGS="$Wand_CFLAGS"
++AC_CHECK_HEADERS([magick/api.h] [wand/magick-wand.h],,
++	AC_CHECK_HEADERS([MagickCore/MagickCore.h] [MagickWand/MagickWand.h])
++)
++CPPFLAGS="$old_CPPFLAGS"
+ 
+ if test -d src/skyrocket_sounds ; then
+ 	AC_ARG_ENABLE(sound, [  --disable-sound         Don't compile with sound.])
+--- a/src/TexMgr.cpp
++++ b/src/TexMgr.cpp
+@@ -25,8 +25,19 @@
+ #endif
+ #include <cstdlib>
+ 
++#ifdef HAVE_MAGICK_API_H
++#ifdef HAVE_WAND_MAGICK_WAND_H
+ #include <magick/api.h>
+ #include <wand/magick-wand.h>
++#endif /* HAVE_WAND_MAGICK_WAND_H */
++#endif /* HAVE_MAGICK_API_H */
++#ifdef HAVE_MAGICKCORE_MAGICKCORE_H
++#ifdef HAVE_MAGICKWAND_MAGICKWAND_H
++#include <MagickCore/MagickCore.h>
++#include <MagickWand/MagickWand.h>
++#endif /* HAVE_MAGICKWAND_MAGICKWAND_H */
++#endif /* HAVE_MAGICKCORE_MAGICKCORE_H */
++
+ #include <dirent.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+@@ -255,10 +266,18 @@
+ // Directory scanning + image loading code in a separate function callable either from loadNextImage or another thread if pthreads is available.
+ void TexMgr::loadNextImageFromDisk() {
+ 	MagickWand *magick_wand = NewMagickWand();
++#ifdef HAVE_MAGICKCORE_MAGICKCORE_H
++	ExceptionInfo *exception;
++#else
+ 	ExceptionInfo exception;
++#endif
+ 	int dirLoop = 0;
+ 
++#ifdef HAVE_MAGICKCORE_MAGICKCORE_H
++	exception = AcquireExceptionInfo ();
++#else
+ 	GetExceptionInfo (&exception);
++#endif
+ 
+ 	int imageLoaded = 0;
+ 	do {
+@@ -317,7 +336,11 @@
+ 		nextH = ohh;
+ 	}
+ 
++#ifdef HAVE_MAGICKCORE_MAGICKCORE_H
++	ExportImagePixels (GetImageFromMagickWand(magick_wand), 0, 0, oww, ohh, "RGBA", CharPixel, nextTex, exception);
++#else
+ 	ExportImagePixels (GetImageFromMagickWand(magick_wand), 0, 0, oww, ohh, "RGBA", CharPixel, nextTex, &exception);
++#endif
+ 
+ 	magick_wand = DestroyMagickWand (magick_wand);
+ 
+--- a/src/matrixview.c
++++ b/src/matrixview.c
+@@ -84,8 +84,19 @@
+ float *texcoords;
+ unsigned char *colors;
+ 
++#ifdef HAVE_MAGICK_API_H
++#ifdef HAVE_WAND_MAGICK_WAND_H
+ #include <magick/api.h>
+ #include <wand/magick-wand.h>
++#endif /* HAVE_WAND_MAGICK_WAND_H */
++#endif /* HAVE_MAGICK_API_H */
++#ifdef HAVE_MAGICKCORE_MAGICKCORE_H
++#ifdef HAVE_MAGICKWAND_MAGICKWAND_H
++#include <MagickCore/MagickCore.h>
++#include <MagickWand/MagickWand.h>
++#endif /* HAVE_MAGICKWAND_MAGICKWAND_H */
++#endif /* HAVE_MAGICKCORE_MAGICKCORE_H */
++
+ #include <dirent.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+@@ -99,10 +110,18 @@
+ // Directory scanning + image loading code in a separate function callable either from loadNextImage or another thread if pthreads is available.
+ void loadNextImageFromDisk() {
+ 	MagickWand *magick_wand = NewMagickWand();
++#ifdef HAVE_MAGICKCORE_MAGICKCORE_H
++	ExceptionInfo *exception;
++#else
+ 	ExceptionInfo exception;
++#endif
+ 	int dirLoop = 0;
+ 
++#ifdef HAVE_MAGICKCORE_MAGICKCORE_H
++	exception = AcquireExceptionInfo ();
++#else
+ 	GetExceptionInfo (&exception);
++#endif
+ 
+ 	int imageLoaded = 0;
+ 	do {
+@@ -159,7 +178,11 @@
+ 	if (!next_pic)
+ 		next_pic = (unsigned char *)malloc (text_x * text_y);
+ 
++#ifdef HAVE_MAGICKCORE_MAGICKCORE_H
++	ExportImagePixels (GetImageFromMagickWand(magick_wand), 0, 0, text_x, text_y, "I", CharPixel, next_pic, exception);
++#else
+ 	ExportImagePixels (GetImageFromMagickWand(magick_wand), 0, 0, text_x, text_y, "I", CharPixel, next_pic, &exception);
++#endif
+ 
+ 	magick_wand = DestroyMagickWand (magick_wand);
+ }
+@@ -211,11 +234,19 @@
+ 			pthread_cond_signal(next_pic_cond);
+ 		}
+ 	} else {
++#ifdef HAVE_MAGICKCORE_MAGICKCORE_H
++		ExceptionInfo *exception;
++#else
+ 		ExceptionInfo exception;
++#endif
+ 		Image *image = NULL, *scaled_image;
+ 		ImageInfo *image_info;
+ 
++#ifdef HAVE_MAGICKCORE_MAGICKCORE_H
++		exception = AcquireExceptionInfo ();
++#else
+ 		GetExceptionInfo (&exception);
++#endif
+ 
+ 		if (!pics)
+ 			LOAD_TEXTURE (pics, cpics, cpics_compressedsize, cpics_size)
+@@ -227,6 +258,15 @@
+ 			image_info = CloneImageInfo ((ImageInfo *) NULL);
+ 			image_info->size = AcquireMagickMemory(sizeof("90x70"));
+ 			strcpy(image_info->size, "90x70");
++#ifdef HAVE_MAGICKCORE_MAGICKCORE_H
++			image = AcquireImage(image_info, exception);
++
++			ImportImagePixels(image, 0, 0, 90, 70, "I", CharPixel, (unsigned char *)(pics + ((random () & 15) * (90 * 70))), exception);
++
++			scaled_image = ScaleImage (image, text_x, text_y, exception);
++
++			ExportImagePixels (scaled_image, 0, 0, text_x, text_y, "I", CharPixel, pic, exception);
++#else
+ 			image = AcquireImage(image_info);
+ 
+ 			ImportImagePixels(image, 0, 0, 90, 70, "I", CharPixel, (unsigned char *)(pics + ((random () & 15) * (90 * 70))));
+@@ -234,6 +274,7 @@
+ 			scaled_image = ScaleImage (image, text_x, text_y, &exception);
+ 
+ 			ExportImagePixels (scaled_image, 0, 0, text_x, text_y, "I", CharPixel, pic, &exception);
++#endif
+ 
+ 			DestroyImage (image);
+ 			DestroyImage (scaled_image);

diff --git a/x11-misc/rss-glx/rss-glx-0.9.1-r1.ebuild b/x11-misc/rss-glx/rss-glx-0.9.1-r1.ebuild
new file mode 100644
index 00000000000..c48ad9fefc1
--- /dev/null
+++ b/x11-misc/rss-glx/rss-glx-0.9.1-r1.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2017 Gentoo Foundation
+# 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
+	>=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-proto/xextproto
+	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
+)
+
+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 \
+		--disable-dependency-tracking \
+		--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
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: x11-misc/rss-glx/files/, x11-misc/rss-glx/
@ 2021-02-21 16:32 David Seifert
  0 siblings, 0 replies; 6+ messages in thread
From: David Seifert @ 2021-02-21 16:32 UTC (permalink / raw
  To: gentoo-commits

commit:     0ea1c6d466de8412a60fc576c6f3140104367323
Author:     Alexander Miller <alex.miller <AT> gmx <DOT> de>
AuthorDate: Sun Feb 21 16:31:54 2021 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> 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 <alex.miller <AT> gmx.de>
Package-Manager: Portage-3.0.13, Repoman-3.0.2
Signed-off-by: David Seifert <soap <AT> 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
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: x11-misc/rss-glx/files/, x11-misc/rss-glx/
@ 2021-03-26  6:44 Joonas Niilola
  0 siblings, 0 replies; 6+ messages in thread
From: Joonas Niilola @ 2021-03-26  6:44 UTC (permalink / raw
  To: gentoo-commits

commit:     ce727418b3384636b59ead4086330e7bd2415925
Author:     Alexander Miller <alex.miller <AT> gmx <DOT> de>
AuthorDate: Mon Mar 22 14:51:10 2021 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Fri Mar 26 06:44:21 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ce727418

x11-misc/rss-glx: Fix matrixview segmentation faults with USE=-bzip2

Patch by Edward Sheldrake taken from the linked sourceforge bug.
https://sourceforge.net/p/rss-glx/bugs/12/

Signed-off-by: Alexander Miller <alex.miller <AT> gmx.de>
Closes: https://github.com/gentoo/gentoo/pull/20061
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 .../files/rss-glx-0.9.1-matrixview-copy-font.patch | 27 ++++++++++++++++++++++
 x11-misc/rss-glx/rss-glx-0.9.1-r3.ebuild           |  1 +
 2 files changed, 28 insertions(+)

diff --git a/x11-misc/rss-glx/files/rss-glx-0.9.1-matrixview-copy-font.patch b/x11-misc/rss-glx/files/rss-glx-0.9.1-matrixview-copy-font.patch
new file mode 100644
index 00000000000..cb9f5e9a500
--- /dev/null
+++ b/x11-misc/rss-glx/files/rss-glx-0.9.1-matrixview-copy-font.patch
@@ -0,0 +1,27 @@
+--- a/src/matrixview.c
++++ b/src/matrixview.c
+@@ -537,7 +537,12 @@ void load_texture ()
+ {
+ 	long a;
+ 
++#ifdef HAVE_LIBBZ2
+ 	LOAD_TEXTURE (font, cfont, cfont_compressedsize, cfont_size)
++#else
++	font = (unsigned char*) malloc (cfont_size);
++	memcpy (font, cfont, cfont_size);
++#endif
+ 
+ 	for (a = 0; a < 131072; a++) {
+ 		if ((a >> 9) & 2)
+@@ -579,7 +584,11 @@ void ourBuildTextures ()
+ 		exit (-1);
+ 	}
+ 
++#ifdef HAVE_LIBBZ2
+ 	FREE_TEXTURE (font)
++#else
++	free (font);
++#endif
+ 
+ 	glBindTexture (GL_TEXTURE_2D, 3);
+ 

diff --git a/x11-misc/rss-glx/rss-glx-0.9.1-r3.ebuild b/x11-misc/rss-glx/rss-glx-0.9.1-r3.ebuild
index 7dba5284904..1af7c945fa9 100644
--- a/x11-misc/rss-glx/rss-glx-0.9.1-r3.ebuild
+++ b/x11-misc/rss-glx/rss-glx-0.9.1-r3.ebuild
@@ -41,6 +41,7 @@ PATCHES=(
 	"${FILESDIR}"/${P}-imagemagick-7.patch
 	"${FILESDIR}"/${P}-c++11-narrowing.patch
 	"${FILESDIR}"/${P}-hang.patch
+	"${FILESDIR}"/${P}-matrixview-copy-font.patch
 )
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: x11-misc/rss-glx/files/, x11-misc/rss-glx/
@ 2021-03-26  6:44 Joonas Niilola
  0 siblings, 0 replies; 6+ messages in thread
From: Joonas Niilola @ 2021-03-26  6:44 UTC (permalink / raw
  To: gentoo-commits

commit:     ad43009390d80e169286a6ec696b700318bdb6a2
Author:     Alexander Miller <alex.miller <AT> gmx <DOT> de>
AuthorDate: Sun Feb 21 14:50:47 2021 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Fri Mar 26 06:44:21 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ad430093

x11-misc/rss-glx: Workaround hanging processes

Add a patch that ensures a signalled process doesn't hang
indefinitely if the GL driver got stuck.

Closes: https://bugs.gentoo.org/478074
Signed-off-by: Alexander Miller <alex.miller <AT> gmx.de>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 x11-misc/rss-glx/files/rss-glx-0.9.1-hang.patch            | 14 ++++++++++++++
 .../{rss-glx-0.9.1-r2.ebuild => rss-glx-0.9.1-r3.ebuild}   |  1 +
 2 files changed, 15 insertions(+)

diff --git a/x11-misc/rss-glx/files/rss-glx-0.9.1-hang.patch b/x11-misc/rss-glx/files/rss-glx-0.9.1-hang.patch
new file mode 100644
index 00000000000..60f2b326ec4
--- /dev/null
+++ b/x11-misc/rss-glx/files/rss-glx-0.9.1-hang.patch
@@ -0,0 +1,14 @@
+Ensure a signalled process exits even if the GL driver hangs.
+
+https://bugs.gentoo.org/478074
+
+--- a/src/driver.c
++++ b/src/driver.c
+@@ -397,6 +397,7 @@
+ void signalHandler (int sig)
+ {
+ 	signalled = 1;
++	alarm(3);	/* Self-destruct if something goes wrong */
+ }
+ 
+ int main (int argc, char *argv[])

diff --git a/x11-misc/rss-glx/rss-glx-0.9.1-r2.ebuild b/x11-misc/rss-glx/rss-glx-0.9.1-r3.ebuild
similarity index 99%
rename from x11-misc/rss-glx/rss-glx-0.9.1-r2.ebuild
rename to x11-misc/rss-glx/rss-glx-0.9.1-r3.ebuild
index 61300f4958c..7dba5284904 100644
--- a/x11-misc/rss-glx/rss-glx-0.9.1-r2.ebuild
+++ b/x11-misc/rss-glx/rss-glx-0.9.1-r3.ebuild
@@ -40,6 +40,7 @@ PATCHES=(
 	"${FILESDIR}"/${P}-asneeded.patch
 	"${FILESDIR}"/${P}-imagemagick-7.patch
 	"${FILESDIR}"/${P}-c++11-narrowing.patch
+	"${FILESDIR}"/${P}-hang.patch
 )
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: x11-misc/rss-glx/files/, x11-misc/rss-glx/
@ 2024-05-09 13:18 Joonas Niilola
  0 siblings, 0 replies; 6+ messages in thread
From: Joonas Niilola @ 2024-05-09 13:18 UTC (permalink / raw
  To: gentoo-commits

commit:     67dc6a60f1db5b26e4bbe0552f80827e33be66c1
Author:     Alexander Miller <alex.miller <AT> gmx <DOT> de>
AuthorDate: Sun Mar 31 02:12:40 2024 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Thu May  9 13:18:22 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=67dc6a60

x11-misc/rss-glx: Fix strict aliasing issue and type mismatch

Bug: https://bugs.gentoo.org/928251
Signed-off-by: Alexander Miller <alex.miller <AT> gmx.de>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 .../files/rss-glx-0.9.1-strict-aliasing.patch      |  36 ++++
 .../files/rss-glx-0.9.1-variable-mismatch.patch    | 192 +++++++++++++++++++++
 x11-misc/rss-glx/rss-glx-0.9.1-r4.ebuild           | 145 ++++++++++++++++
 3 files changed, 373 insertions(+)

diff --git a/x11-misc/rss-glx/files/rss-glx-0.9.1-strict-aliasing.patch b/x11-misc/rss-glx/files/rss-glx-0.9.1-strict-aliasing.patch
new file mode 100644
index 000000000000..e95b1f6a1a7d
--- /dev/null
+++ b/x11-misc/rss-glx/files/rss-glx-0.9.1-strict-aliasing.patch
@@ -0,0 +1,36 @@
+Fix strict aliasing violation in FMotion.cpp
+
+Bug: https://bugs.gentoo.org/928251
+
+--- a/src/FMotion.cpp
++++ b/src/FMotion.cpp
+@@ -22,6 +22,7 @@
+  */
+ 
+ #include <stdio.h>
++#include <string.h>
+ #include <cmath>
+ 
+ // In case cmath doesn't pull in all the usual suspects from math.h
+@@ -54,15 +55,19 @@
+ #define FLOATTOINTCONST2 (((65536.0*16)))
+ inline int f2int2 (float f)
+ {
++	int i;
+ 	f += FLOATTOINTCONST2;
+-	return ((*((int *)(void *)&f)) & 0x007fffff) - 0x00400000;
++	memcpy(&i, &f, sizeof(i));
++	return (i & 0x007fffff) - 0x00400000;
+ }
+ 
+ #define FLOATTOINTCONST (((1.5*65536*256)))
+ inline int f2int (float f)
+ {
++	int i;
+ 	f += FLOATTOINTCONST;
+-	return ((*((int *)(void *)&f)) & 0x007fffff) - 0x00400000;
++	memcpy(&i, &f, sizeof(i));
++	return (i & 0x007fffff) - 0x00400000;
+ }
+ 
+ #define Float2Int(f) (f2int(f))

diff --git a/x11-misc/rss-glx/files/rss-glx-0.9.1-variable-mismatch.patch b/x11-misc/rss-glx/files/rss-glx-0.9.1-variable-mismatch.patch
new file mode 100644
index 000000000000..19da515feff9
--- /dev/null
+++ b/x11-misc/rss-glx/files/rss-glx-0.9.1-variable-mismatch.patch
@@ -0,0 +1,192 @@
+Subject: [PATCH] Fix variable type mismatch in hyperspace
+From: Alexander Miller <alex.miller@gmx.de>
+Date: Sun, 31 Mar 2024 2024-03-31 03:08:04 +0200
+
+Some source files of hyperspace (flare.cpp, goo.cpp, starBurst.cpp)
+were referring to a variable "extern float frameTime" which doesn't
+exist in hyperspace (it's only a parameter of hack_draw() nowadays).
+
+It got mixed up with the driver.c variable "int frameTime".
+
+Remove the mismatched declaration from the 3 files and pass the value
+from hack_draw() to the functions using it by adding a new parameter.
+Also make frameTime (and most other variables) in driver.c static.
+
+Bug: https://bugs.gentoo.org/928251
+Signed-off-by: Alexander Miller <alex.miller@gmx.de>
+--- a/src/driver.c
++++ b/src/driver.c
+@@ -49,24 +49,24 @@
+ 
+ #include "vroot.h"
+ 
+-xstuff_t *XStuff;
++static xstuff_t *XStuff;
+ 
+ extern const char *hack_name;
+ 
+ /*
+  * display parameters
+  */
+-int rootWindow = False;
++static int rootWindow = False;
+ int glewInitialized = False;
+ #ifdef HAVE_GLEW
+-int frameTime = 10000;
+-int vsync = 1;
++static int frameTime = 10000;
++static int vsync = 1;
+ #else
+-int frameTime = 33333;
+-int vsync = 0;
++static int frameTime = 33333;
++static int vsync = 0;
+ #endif
+-int idleOnDPMS = 1;
+-int signalled = 0;
++static int idleOnDPMS = 1;
++static volatile int signalled = 0;
+ 
+ void createWindow (int argc, char **argv)
+ {
+--- a/src/flare.cpp
++++ b/src/flare.cpp
+@@ -45,7 +45,6 @@ extern double modelMat[16];
+ extern double projMat[16];
+ extern int viewport[4];
+ // Calculated in main draw routine each frame
+-extern float frameTime;
+ extern float camPos[3];
+ 
+ 
+@@ -182,7 +181,7 @@ void initFlares(){
+ // Draw a flare at a specified (x,y) location on the screen
+ // Screen corners are at (0,0) and (1,1)
+ // alpha = 0.0 for lowest intensity; alpha = 1.0 for highest intensity
+-void flare(double *pos, float red, float green, float blue, float alpha){
++void flare(double *pos, float red, float green, float blue, float alpha, float frameTime){
+ 	double winx, winy, winz;  // in screen coordinates
+ 	float x, y, dx, dy;
+ 	float fadewidth, temp;
+--- a/src/flare.h
++++ b/src/flare.h
+@@ -36,7 +36,7 @@ void initFlares();
+ // Draw a flare at a specified (x,y) location on the screen
+ // Screen corners are at (0,0) and (1,1)
+ // alpha = 0.0 for lowest intensity; alpha = 1.0 for highest intensity
+-void flare(double *pos, float red, float green, float blue, float alpha);
++void flare(double *pos, float red, float green, float blue, float alpha, float frameTime);
+ 
+ 
+ #endif  // FLARE_H
+--- a/src/goo.cpp
++++ b/src/goo.cpp
+@@ -25,9 +25,7 @@
+ #include "goo.h"
+ 
+ 
+-extern float frameTime, simulationTime;
+ extern float shiftx, shiftz;
+-extern float dFov;
+ 
+ 
+ goo::goo(int res, float rad, float (*func)(float* position)){
+--- a/src/hyperspace.cpp
++++ b/src/hyperspace.cpp
+@@ -340,10 +340,10 @@ void hack_draw (xstuff_t * XStuff, doubl
+ 	}
+ #ifdef HAVE_GLEW
+ 	if (dShaders)
+-		theStarBurst->draw(lerp);
++		theStarBurst->draw(frameTime, lerp);
+ 	else
+ #endif
+-		theStarBurst->draw();
++		theStarBurst->draw(frameTime);
+ 
+ 	// draw tunnel
+ 	theTunnel->make(frameTime);
+@@ -379,7 +379,7 @@ void hack_draw (xstuff_t * XStuff, doubl
+ 	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);
++		flare(flarepos, 1.0f, 1.0f, 1.0f, alpha, frameTime);
+ 	glEnable(GL_FOG);
+ }
+ 
+--- a/src/starBurst.cpp
++++ b/src/starBurst.cpp
+@@ -38,7 +38,6 @@
+ 
+ extern int xsize, ysize;
+ extern float aspectRatio;
+-extern float frameTime;
+ extern float camPos[3];
+ extern int numAnimTexFrames;
+ extern wavyNormalCubeMaps* theWNCM;
+@@ -136,7 +135,7 @@ void starBurst::restart(float* position)
+ }
+ 
+ 
+-void starBurst::drawStars(){
++void starBurst::drawStars(float frameTime){
+ 	int i;
+ 	float distance;
+ 
+@@ -158,8 +157,8 @@ void starBurst::drawStars(){
+ }
+ 
+ 
+-void starBurst::draw(){
+-	drawStars();
++void starBurst::draw(float frameTime){
++	drawStars(frameTime);
+ 	
+ 	size += frameTime * 0.5f;
+ 	if(size >= 3.0f)
+@@ -172,7 +171,7 @@ void starBurst::draw(float frameTime){
+ 		p[0] = pos[0];
+ 		p[1] = pos[1];
+ 		p[2] = pos[2];
+-		flare(p, 1.0f, 1.0f, 1.0f, brightness);
++		flare(p, 1.0f, 1.0f, 1.0f, brightness, frameTime);
+ 	}
+ 
+ 	glMatrixMode(GL_MODELVIEW);
+@@ -201,8 +200,8 @@ void starBurst::draw(){
+ 
+ 
+ #ifdef HAVE_GLEW
+-void starBurst::draw(float lerp){
+-	drawStars();
++void starBurst::draw(float frameTime, float lerp){
++	drawStars(frameTime);
+ 	
+ 	size += frameTime * 0.5f;
+ 	if(size >= 3.0f)
+@@ -215,7 +214,7 @@ void starBurst::draw(float frameTime, fl
+ 		p[0] = pos[0];
+ 		p[1] = pos[1];
+ 		p[2] = pos[2];
+-		flare(p, 1.0f, 1.0f, 1.0f, brightness);
++		flare(p, 1.0f, 1.0f, 1.0f, brightness, frameTime);
+ 	}
+ 
+ 	glMatrixMode(GL_MODELVIEW);
+--- a/src/starBurst.h
++++ b/src/starBurst.h
+@@ -43,10 +43,10 @@ public:
+ 	starBurst();
+ 	~starBurst();
+ 	void restart(float* position);
+-	void drawStars();
+-	void draw();  // draw regular
++	void drawStars(float frameTime);
++	void draw(float frameTime);  // draw regular
+ #ifdef HAVE_GLEW
+-	void draw(float lerp);  // draw with shaders
++	void draw(float frameTime, float lerp);  // draw with shaders
+ #endif
+ };
+ 

diff --git a/x11-misc/rss-glx/rss-glx-0.9.1-r4.ebuild b/x11-misc/rss-glx/rss-glx-0.9.1-r4.ebuild
new file mode 100644
index 000000000000..0bbbaa643911
--- /dev/null
+++ b/x11-misc/rss-glx/rss-glx-0.9.1-r4.ebuild
@@ -0,0 +1,145 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+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
+"
+BDEPEND="
+	virtual/pkgconfig
+	bzip2? ( app-arch/bzip2 )
+"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-quesoglc.patch
+	"${FILESDIR}"/${P}-asneeded.patch
+	"${FILESDIR}"/${P}-imagemagick-7.patch
+	"${FILESDIR}"/${P}-c++11-narrowing.patch
+	"${FILESDIR}"/${P}-hang.patch
+	"${FILESDIR}"/${P}-matrixview-copy-font.patch
+	"${FILESDIR}"/${P}-missing-include.patch
+	"${FILESDIR}"/${P}-bashism.patch
+	"${FILESDIR}"/${P}-strict-aliasing.patch
+	"${FILESDIR}"/${P}-variable-mismatch.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
+	mv configure.{in,ac} || die
+
+	eautoreconf
+}
+
+src_configure() {
+	econf \
+		--disable-static \
+		--enable-shared \
+		$(use_enable bzip2) \
+		$(use_enable openal sound) \
+		$(use_with quesoglc) \
+		--bindir="${EPREFIX}"/usr/$(get_libdir)/misc/xscreensaver \
+		--with-configdir="${EPREFIX}"/usr/share/xscreensaver/config
+}
+
+src_install() {
+	default
+	find "${ED}" -name '*.la' -delete || die
+}
+
+pkg_postinst() {
+	local xssconf="${EROOT}"/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:  \"Hufo\x27s Smoke\"  hufo_smoke --root  \\n\\\
+		GL: \"Hufo\x27s 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="${EROOT}"/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 '/\"Hufo.*Smoke\"  hufo_smoke/d' \
+			-e '/\"Hufo.*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
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: x11-misc/rss-glx/files/, x11-misc/rss-glx/
@ 2024-05-09 13:18 Joonas Niilola
  0 siblings, 0 replies; 6+ messages in thread
From: Joonas Niilola @ 2024-05-09 13:18 UTC (permalink / raw
  To: gentoo-commits

commit:     3f7db6a36ad6a02fff711cfdeebeffc718d68ab4
Author:     Alexander Miller <alex.miller <AT> gmx <DOT> de>
AuthorDate: Sun Mar 31 02:45:25 2024 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Thu May  9 13:18:22 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f7db6a3

x11-misc/rss-glx: Fix if statements partially guarding multistatement macro

Amazingly, this mess didn't cause serious problems; fixing anyway.

Signed-off-by: Alexander Miller <alex.miller <AT> gmx.de>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 .../files/rss-glx-0.9.1-macro-if-scope.patch       | 29 ++++++++++++++++++++++
 x11-misc/rss-glx/rss-glx-0.9.1-r4.ebuild           |  1 +
 2 files changed, 30 insertions(+)

diff --git a/x11-misc/rss-glx/files/rss-glx-0.9.1-macro-if-scope.patch b/x11-misc/rss-glx/files/rss-glx-0.9.1-macro-if-scope.patch
new file mode 100644
index 000000000000..5044aae31918
--- /dev/null
+++ b/x11-misc/rss-glx/files/rss-glx-0.9.1-macro-if-scope.patch
@@ -0,0 +1,29 @@
+Fix multistatement macro partially guarded by if
+
+The code still works correctly by chance, but it performs redundant
+calls to BZ2_bzBuffToBuffDecompress() and it's a horrible mess.
+
+--- a/src/matrixview.c
++++ b/src/matrixview.c
+@@ -248,8 +248,9 @@ void loadNextImage ()
+ 		GetExceptionInfo (&exception);
+ #endif
+ 
+-		if (!pics)
++		if (!pics) {
+ 			LOAD_TEXTURE (pics, cpics, cpics_compressedsize, cpics_size)
++		}
+ 
+ 		if ((text_x != 90) || (text_y != 70)) {
+ 			if (!pic)
+@@ -279,8 +280,9 @@ void loadNextImage ()
+ 			DestroyImage (image);
+ 			DestroyImage (scaled_image);
+ 		} else {
+-			if (!pics)
++			if (!pics) {
+ 				LOAD_TEXTURE (pics, cpics, cpics_compressedsize, cpics_size)
++			}
+ 
+ 			pic = (unsigned char *)(pics + ((random () & 15) * (text_x * text_y)));
+ 		}

diff --git a/x11-misc/rss-glx/rss-glx-0.9.1-r4.ebuild b/x11-misc/rss-glx/rss-glx-0.9.1-r4.ebuild
index 0bbbaa643911..a38286dc8927 100644
--- a/x11-misc/rss-glx/rss-glx-0.9.1-r4.ebuild
+++ b/x11-misc/rss-glx/rss-glx-0.9.1-r4.ebuild
@@ -49,6 +49,7 @@ PATCHES=(
 	"${FILESDIR}"/${P}-bashism.patch
 	"${FILESDIR}"/${P}-strict-aliasing.patch
 	"${FILESDIR}"/${P}-variable-mismatch.patch
+	"${FILESDIR}"/${P}-macro-if-scope.patch
 )
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-05-09 13:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-25 13:32 [gentoo-commits] repo/gentoo:master commit in: x11-misc/rss-glx/files/, x11-misc/rss-glx/ Jeroen Roovers
  -- strict thread matches above, loose matches on Subject: below --
2021-02-21 16:32 David Seifert
2021-03-26  6:44 Joonas Niilola
2021-03-26  6:44 Joonas Niilola
2024-05-09 13:18 Joonas Niilola
2024-05-09 13:18 Joonas Niilola

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox