summaryrefslogtreecommitdiffstats
path: root/desktop/rss-glx
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/rss-glx')
-rw-r--r--desktop/rss-glx/patches/pixelcity-cpp.patch15
-rw-r--r--desktop/rss-glx/patches/rss-glx-0.9.1-imagemagick-7.patch178
-rw-r--r--desktop/rss-glx/rss-glx.SlackBuild2
3 files changed, 195 insertions, 0 deletions
diff --git a/desktop/rss-glx/patches/pixelcity-cpp.patch b/desktop/rss-glx/patches/pixelcity-cpp.patch
new file mode 100644
index 0000000000..1c56e61050
--- /dev/null
+++ b/desktop/rss-glx/patches/pixelcity-cpp.patch
@@ -0,0 +1,15 @@
+Index: rss-glx-0.9.1/src/Makefile.am
+===================================================================
+--- rss-glx-0.9.1.orig/src/Makefile.am
++++ rss-glx-0.9.1/src/Makefile.am
+@@ -38,7 +38,9 @@ matrixview_CFLAGS = @Wand_CFLAGS@
+ matrixview_LDADD = @BZIP2@ @PTHREAD_LIBS@ @Wand_LIBS@
+ plasma_SOURCES = driver.c plasma.cpp rsDefines.h rsRand.h
+ pixelcity_SOURCES = driver.c
+-pixelcity_LDADD = @quesoglc_LIBS@ -LPixelCity -lPixelCity
++pixelcity_LDADD = -LPixelCity -lPixelCity @quesoglc_LIBS@
++# Dummy file, not built. Forces g++ linking
++nodist_EXTRA_pixelcity_SOURCES = dummy.cpp
+ skyrocket_SOURCES = driver.c skyrocket.cpp skyrocket_flare.cpp skyrocket_particle.cpp skyrocket_shockwave.cpp skyrocket_smoke.cpp skyrocket_sound.cpp skyrocket_world.cpp skyrocket_textures.cpp rsDefines.h rsRand.h
+ solarwinds_SOURCES = driver.c solarwinds.cpp rsDefines.h rsRand.h
+ spirographx_SOURCES = driver.c spirographx.c
diff --git a/desktop/rss-glx/patches/rss-glx-0.9.1-imagemagick-7.patch b/desktop/rss-glx/patches/rss-glx-0.9.1-imagemagick-7.patch
new file mode 100644
index 0000000000..c92eb1e1d3
--- /dev/null
+++ b/desktop/rss-glx/patches/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/desktop/rss-glx/rss-glx.SlackBuild b/desktop/rss-glx/rss-glx.SlackBuild
index 45b8891604..5f55e74f89 100644
--- a/desktop/rss-glx/rss-glx.SlackBuild
+++ b/desktop/rss-glx/rss-glx.SlackBuild
@@ -69,6 +69,8 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+for i in $CWD/patches/* ; do patch -p1 < $i ; done
+
# Magick Wand detection is broken.
./autogen.sh
Wand_CFLAGS=$(pkg-config --cflags "Wand >= 6.2") \