aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRene Ladan <rene@FreeBSD.org>2017-12-05 19:56:36 +0000
committerRene Ladan <rene@FreeBSD.org>2017-12-05 19:56:36 +0000
commit12673c438c1dc5208f79ebbe5625a2adc259b061 (patch)
treeb7fe9aad2bc3beb007a3f31ef61139378bf22283
parent11a5110d9c38bedca1e0e89bf87ed7c1042de6d7 (diff)
downloadports-12673c438c1dc5208f79ebbe5625a2adc259b061.tar.gz
ports-12673c438c1dc5208f79ebbe5625a2adc259b061.zip
Notes
-rw-r--r--games/opensurge/Makefile7
-rw-r--r--games/opensurge/files/patch-src_core_image.c41
-rw-r--r--games/opensurge/files/patch-src_core_image.h51
3 files changed, 94 insertions, 5 deletions
diff --git a/games/opensurge/Makefile b/games/opensurge/Makefile
index 664fd14d3a2b..1d73369aad39 100644
--- a/games/opensurge/Makefile
+++ b/games/opensurge/Makefile
@@ -18,14 +18,11 @@ LICENSE_COMB= multi
LICENSE_FILE_GPLv2+ = ${WRKSRC}/licenses/GPLv2.txt
LICENSE_FILE_CC-BY-SA-3.0= ${WRKSRC}/licenses/CC-BY-SA-3.0.txt
-BROKEN= Does not build
-DEPRECATED= Does not build
-EXPIRATION_DATE=2018-02-01
-
BUILD_DEPENDS= ${LOCALBASE}/lib/libaldmb.a:audio/dumb-allegro \
${LOCALBASE}/include/alfont.h:x11-fonts/alfont \
alureplay:audio/alure
-LIB_DEPENDS= liballeg.so:devel/allegro \
+LIB_DEPENDS= libalfont.so:x11-fonts/alfont \
+ liballeg.so:devel/allegro \
libogg.so:audio/libogg \
libvorbis.so:audio/libvorbis
RUN_DEPENDS= ${LOCALBASE}/lib/libaldmb.a:audio/dumb-allegro
diff --git a/games/opensurge/files/patch-src_core_image.c b/games/opensurge/files/patch-src_core_image.c
new file mode 100644
index 000000000000..8aa36be06946
--- /dev/null
+++ b/games/opensurge/files/patch-src_core_image.c
@@ -0,0 +1,41 @@
+--- src/core/image.c.orig 2017-11-14 12:17:25 UTC
++++ src/core/image.c
+@@ -34,12 +34,6 @@
+ #include "resourcemanager.h"
+ #include "util.h"
+
+-/* image structure */
+-struct image_t {
+- BITMAP *data; /* this must be the first field */
+- int w, h;
+-};
+-
+ /* useful stuff */
+ #define IS_PNG(path) (str_icmp((path)+strlen(path)-4, ".png") == 0)
+ typedef int (*fast_getpixel_funptr)(BITMAP*,int,int);
+@@ -233,25 +227,6 @@ image_t *image_create_shared(const image
+ return img;
+ }
+
+-/*
+- * image_width()
+- * The width of the image
+- */
+-inline int image_width(const image_t *img)
+-{
+- return img->w;
+-}
+-
+-
+-/*
+- * image_height()
+- * The height of the image
+- */
+-inline int image_height(const image_t *img)
+-{
+- return img->h;
+-}
+-
+
+ /*
+ * image_getpixel()
diff --git a/games/opensurge/files/patch-src_core_image.h b/games/opensurge/files/patch-src_core_image.h
new file mode 100644
index 000000000000..c4f744953db1
--- /dev/null
+++ b/games/opensurge/files/patch-src_core_image.h
@@ -0,0 +1,51 @@
+--- src/core/image.h.orig 2017-11-14 12:16:37 UTC
++++ src/core/image.h
+@@ -22,10 +22,15 @@
+ #ifndef _IMAGE_H
+ #define _IMAGE_H
+
++#include "allegro.h"
+ #include "global.h"
+ #include "v2d.h"
+
+-/* opaque image type */
++/* image structure */
++struct image_t {
++ BITMAP *data; /* this must be the first field */
++ int w, h;
++};
+ typedef struct image_t image_t;
+
+ /* image flags (bitwise OR) */
+@@ -42,13 +47,29 @@ void image_save(const image_t *img, cons
+ image_t *image_create_shared(const image_t *parent, int x, int y, int width, int height); /* creates a sub-image */
+
+ /* properties */
+-inline int image_width(const image_t *img);
+-inline int image_height(const image_t *img);
+ uint32 image_rgb(uint8 r, uint8 g, uint8 b);
+ void image_color2rgb(uint32 color, uint8 *r, uint8 *g, uint8 *b);
+ int image_pixelperfect_collision(const image_t *img1, const image_t *img2, int x1, int y1, int x2, int y2);
+ uint32 image_getpixel(const image_t *img, int x, int y);
+
++/*
++ * image_width()
++ * The width of the image
++ */
++inline int image_width(const image_t *img)
++{
++ return img->w;
++}
++
++/*
++ * image_height()
++ * The height of the image
++ */
++inline int image_height(const image_t *img)
++{
++ return img->h;
++}
++
+ /* drawing primitives */
+ void image_clear(image_t *img, uint32 color);
+ void image_putpixel(image_t *img, int x, int y, uint32 color);