aboutsummaryrefslogtreecommitdiff
path: root/games/adonthell
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2007-11-22 08:37:10 +0000
committerMartin Wilke <miwi@FreeBSD.org>2007-11-22 08:37:10 +0000
commitde06319d755f4fd33e404b77ecde3b5ce65d693d (patch)
tree3c826ae7bc76433112ef5916892f95a9ab666129 /games/adonthell
parentf63311415c95894de3b0842b03b078607e614729 (diff)
downloadports-de06319d755f4fd33e404b77ecde3b5ce65d693d.tar.gz
ports-de06319d755f4fd33e404b77ecde3b5ce65d693d.zip
Notes
Diffstat (limited to 'games/adonthell')
-rw-r--r--games/adonthell/Makefile8
-rw-r--r--games/adonthell/files/patch-src_dialog.cc41
-rw-r--r--games/adonthell/files/patch-src_drawing_area.h11
-rw-r--r--games/adonthell/files/patch-src_music.c20
-rw-r--r--games/adonthell/files/patch-src_prefs.cc11
-rw-r--r--games/adonthell/files/patch-src_py_callback.cc40
6 files changed, 125 insertions, 6 deletions
diff --git a/games/adonthell/Makefile b/games/adonthell/Makefile
index ef100a64d6ea..a292083a6fb4 100644
--- a/games/adonthell/Makefile
+++ b/games/adonthell/Makefile
@@ -22,10 +22,10 @@ BUILD_DEPENDS= swig:${PORTSDIR}/devel/swig13 \
LIB_DEPENDS= vorbis.4:${PORTSDIR}/audio/libvorbis
USE_SDL= mixer sdl
-USE_PYTHON= -2.4
+USE_PYTHON= -2.5
USE_GETTEXT= yes
-USE_GMAKE= yes
GNU_CONFIGURE= yes
+USE_GMAKE= yes
CONFIGURE_ARGS+= --disable-py-debug
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ENV= LDFLAGS=-L${LOCALBASE}/lib \
@@ -33,10 +33,6 @@ CONFIGURE_ENV= LDFLAGS=-L${LOCALBASE}/lib \
.include <bsd.port.pre.mk>
-.if ${OSVERSION} >= 700042
-BROKEN= Broken with gcc 4.2
-.endif
-
.if ${ARCH} == "sparc64"
BROKEN= Does not build on sparc64
.endif
diff --git a/games/adonthell/files/patch-src_dialog.cc b/games/adonthell/files/patch-src_dialog.cc
new file mode 100644
index 000000000000..037425aae94f
--- /dev/null
+++ b/games/adonthell/files/patch-src_dialog.cc
@@ -0,0 +1,41 @@
+--- src/dialog.cc.orig 2007-11-21 17:49:38.000000000 +0100
++++ src/dialog.cc 2007-11-21 17:52:11.000000000 +0100
+@@ -90,7 +90,7 @@
+ {
+ s = PyList_GetItem (list, i);
+ if (s && PyString_Check (s)) strings[i] = PyString_AsString (s);
+- else strings[i] = "*** Error";
++ else strings[i] = (char *)"*** Error";
+ }
+
+ Py_DECREF (list);
+@@ -157,7 +157,7 @@
+ do
+ {
+ // Execute the next part of the dialogue
+- arg = Py_BuildValue ("(i)", answer);
++ arg = Py_BuildValue ((char *)"(i)", answer);
+
+ // run next part of dialogue
+ dialogue.run (arg);
+@@ -222,7 +222,7 @@
+ }
+
+ // check whether we shall continue or not
+- arg = Py_BuildValue ("(i)", answer);
++ arg = Py_BuildValue ((char *)"(i)", answer);
+ result = dialogue.call_method_ret ("stop", arg);
+ stop = PyInt_AsLong (result);
+ Py_XDECREF (result);
+@@ -298,9 +298,9 @@
+ strncpy (str, start+3, end);
+
+ if (the_player->storage::get_val ("gender") == FEMALE)
+- mid = get_substr (str, "{", "/");
++ mid = get_substr (str, (char *)"{", (char *)"/");
+ else
+- mid = get_substr (str, "/", "}");
++ mid = get_substr (str, (char *)"/", (char *)"}");
+
+ begin = newstr.length () - strlen(start);
+ tmp = new char[newstr.length () - end + strlen (mid)];
diff --git a/games/adonthell/files/patch-src_drawing_area.h b/games/adonthell/files/patch-src_drawing_area.h
new file mode 100644
index 000000000000..d28af444fbd9
--- /dev/null
+++ b/games/adonthell/files/patch-src_drawing_area.h
@@ -0,0 +1,11 @@
+--- src/drawing_area.h.orig 2007-11-21 17:48:25.000000000 +0100
++++ src/drawing_area.h 2007-11-21 17:48:50.000000000 +0100
+@@ -156,7 +156,7 @@
+ *
+ * @return drawing_area which has the same dimensions and location as r.
+ */
+- drawing_area& drawing_area::operator = (SDL_Rect& r);
++ drawing_area& operator = (SDL_Rect& r);
+ #endif
+
+ /**
diff --git a/games/adonthell/files/patch-src_music.c b/games/adonthell/files/patch-src_music.c
new file mode 100644
index 000000000000..3fa55211e3c0
--- /dev/null
+++ b/games/adonthell/files/patch-src_music.c
@@ -0,0 +1,20 @@
+--- src/music.c.orig 2007-11-21 18:01:48.000000000 +0100
++++ src/music.c 2007-11-21 18:02:31.000000000 +0100
+@@ -393,7 +393,7 @@
+ #endif
+ #ifdef MID_MUSIC
+ /* MIDI files have the magic four bytes "MThd" */
+- if ( strcmp(magic, "MThd") == 0 ) {
++ if ( strcmp((char *)magic, "MThd") == 0 ) {
+ music->type = MUS_MID;
+ if ( timidity_ok ) {
+ music->data.midi = Timidity_LoadSong((char *)file);
+@@ -410,7 +410,7 @@
+ #endif
+ #ifdef OGG_MUSIC
+ /* Ogg Vorbis files have the magic four bytes "OggS" */
+- if ( strcmp(magic, "OggS") == 0 ) {
++ if ( strcmp((char *)magic, "OggS") == 0 ) {
+ music->type = MUS_OGG;
+ music->data.ogg = OGG_new(file);
+ if ( music->data.ogg == NULL ) {
diff --git a/games/adonthell/files/patch-src_prefs.cc b/games/adonthell/files/patch-src_prefs.cc
new file mode 100644
index 000000000000..e8f30b09b846
--- /dev/null
+++ b/games/adonthell/files/patch-src_prefs.cc
@@ -0,0 +1,11 @@
+--- src/prefs.cc.orig 2007-11-21 17:58:31.000000000 +0100
++++ src/prefs.cc 2007-11-21 17:58:43.000000000 +0100
+@@ -144,7 +144,7 @@
+ case 'c':
+ {
+ python::init ();
+- python::exec_string ("import compileall; compileall.compile_dir (\".\", 0);");
++ python::exec_string ((char *)"import compileall; compileall.compile_dir (\".\", 0);");
+ python::cleanup ();
+ exit (0);
+ break;
diff --git a/games/adonthell/files/patch-src_py_callback.cc b/games/adonthell/files/patch-src_py_callback.cc
new file mode 100644
index 000000000000..9d9766fe9862
--- /dev/null
+++ b/games/adonthell/files/patch-src_py_callback.cc
@@ -0,0 +1,40 @@
+--- src/py_callback.cc.orig 2007-11-21 17:53:00.000000000 +0100
++++ src/py_callback.cc 2007-11-21 17:54:03.000000000 +0100
+@@ -55,7 +55,7 @@
+ // calls the python function without argument
+ void py_callback::callback_func0 ()
+ {
+- PyObject *py_arg = arguments ? Py_BuildValue ("(O)",arguments) : NULL;
++ PyObject *py_arg = arguments ? Py_BuildValue ((char *)"(O)",arguments) : NULL;
+ PyObject* val = make_call (py_arg);
+ Py_XDECREF (val);
+ }
+@@ -65,7 +65,7 @@
+ {
+ int retval = 1;
+
+- PyObject *py_arg = arguments ? Py_BuildValue ("(O)",arguments) : NULL;
++ PyObject *py_arg = arguments ? Py_BuildValue ((char *)"(O)",arguments) : NULL;
+ PyObject* val = make_call (py_arg);
+
+ if (val) retval = PyInt_AsLong (val);
+@@ -79,8 +79,8 @@
+ {
+ PyObject *py_arg;
+
+- if (arguments) py_arg = Py_BuildValue ("(i,O)", arg, arguments);
+- else py_arg = Py_BuildValue ("(i)", arg);
++ if (arguments) py_arg = Py_BuildValue ((char *)"(i,O)", arg, arguments);
++ else py_arg = Py_BuildValue ((char *)"(i)", arg);
+
+ PyObject * val = make_call (py_arg);
+ Py_XDECREF (val);
+@@ -93,7 +93,7 @@
+
+ // get name of callback function
+ if (function) {
+- PyObject *p_name = PyObject_GetAttrString (function, "__name__");
++ PyObject *p_name = PyObject_GetAttrString (function, (char *)"__name__");
+ if (PyString_Check (p_name)) name = PyString_AsString (p_name);
+ else fprintf (stderr, "*** error: py_callback::put_state: Failed to retrieve callback name!");
+