aboutsummaryrefslogtreecommitdiff
path: root/audio/glame
diff options
context:
space:
mode:
authorJoe Marcus Clarke <marcus@FreeBSD.org>2008-03-02 19:13:35 +0000
committerJoe Marcus Clarke <marcus@FreeBSD.org>2008-03-02 19:13:35 +0000
commitde52b2e0af0f94c8033ce4643fe3aa69c230b5e6 (patch)
treef2fe00b39229d82c06e2e89bb75ff8e3dfc584df /audio/glame
parent22564fbf0a1c3c5596fa5b9ade01391b63aa9d01 (diff)
downloadports-de52b2e0af0f94c8033ce4643fe3aa69c230b5e6.tar.gz
ports-de52b2e0af0f94c8033ce4643fe3aa69c230b5e6.zip
Notes
Diffstat (limited to 'audio/glame')
-rw-r--r--audio/glame/Makefile2
-rw-r--r--audio/glame/files/patch-src_glmid_glconfig.c12
-rw-r--r--audio/glame/files/patch-src_glmid_glscript.h15
-rw-r--r--audio/glame/files/patch-src_glmid_glscript_swapfile.c30
-rw-r--r--audio/glame/files/patch-src_gui_glame_console.c11
-rw-r--r--audio/glame/files/patch-src_include_glame_guile_compat.h61
6 files changed, 130 insertions, 1 deletions
diff --git a/audio/glame/Makefile b/audio/glame/Makefile
index b986fcd6cf5c..9795f9aaee9c 100644
--- a/audio/glame/Makefile
+++ b/audio/glame/Makefile
@@ -7,7 +7,7 @@
PORTNAME= glame
PORTVERSION= 2.0.1
-PORTREVISION= 7
+PORTREVISION= 8
CATEGORIES= audio gnome
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
diff --git a/audio/glame/files/patch-src_glmid_glconfig.c b/audio/glame/files/patch-src_glmid_glconfig.c
new file mode 100644
index 000000000000..0b3d3632407b
--- /dev/null
+++ b/audio/glame/files/patch-src_glmid_glconfig.c
@@ -0,0 +1,12 @@
+--- src/glmid/glconfig.c.orig 2008-03-02 14:05:46.000000000 -0500
++++ src/glmid/glconfig.c 2008-03-02 14:06:23.000000000 -0500
+@@ -125,7 +125,8 @@ int glame_config_get_long(const char *ke
+ snprintf(cmd, 255, "(glame-config-get '%s)", key);
+ /* FIXME: execute with catch. */
+ s_res = glame_gh_safe_eval_str(cmd);
+- if (!gh_exact_p(s_res))
++ if (!gh_number_p(s_res)
++ || !gh_exact_p(s_res))
+ return -1;
+ *value = glame_scm2long(s_res);
+ return 0;
diff --git a/audio/glame/files/patch-src_glmid_glscript.h b/audio/glame/files/patch-src_glmid_glscript.h
new file mode 100644
index 000000000000..fd2642f6f3b4
--- /dev/null
+++ b/audio/glame/files/patch-src_glmid_glscript.h
@@ -0,0 +1,15 @@
+--- src/glmid/glscript.h.orig 2008-03-02 14:07:01.000000000 -0500
++++ src/glmid/glscript.h 2008-03-02 14:07:39.000000000 -0500
+@@ -32,6 +32,12 @@
+ #include "gpsm.h"
+ #include "swapfile.h"
+
++/* Check if we have guile of at least version 1.8 */
++#undef HAVE_GUILE18
++#if SCM_MAJOR_VERSION == 1 && SCM_MINOR_VERSION >= 8
++#define HAVE_GUILE18 1
++#endif
++
+
+ /* Initializes the guile scripting subsystem. Returns 0 on success,
+ * -1 on error. */
diff --git a/audio/glame/files/patch-src_glmid_glscript_swapfile.c b/audio/glame/files/patch-src_glmid_glscript_swapfile.c
new file mode 100644
index 000000000000..3f204dd49ea3
--- /dev/null
+++ b/audio/glame/files/patch-src_glmid_glscript_swapfile.c
@@ -0,0 +1,30 @@
+--- src/glmid/glscript_swapfile.c.orig 2008-03-02 14:08:24.000000000 -0500
++++ src/glmid/glscript_swapfile.c 2008-03-02 14:09:14.000000000 -0500
+@@ -374,6 +374,7 @@ int glscript_init_swapfile()
+ glame_reg_export ("swfd?", 1, 0, 0, gls_is_swfd);
+ glame_reg_export ("swdir?", 1, 0, 0, gls_is_swdir);
+
++#if ! HAVE_GUILE18
+ glame_def_export ("O_CREAT", scm_long2num(O_CREAT));
+ glame_def_export ("O_EXCL", scm_long2num(O_EXCL));
+ glame_def_export ("O_TRUNC", scm_long2num(O_TRUNC));
+@@ -381,14 +382,15 @@ int glscript_init_swapfile()
+ glame_def_export ("O_RDONLY", scm_long2num(O_RDONLY));
+ glame_def_export ("O_WRONLY", scm_long2num(O_WRONLY));
+
++ glame_def_export ("SEEK_SET", scm_long2num(SEEK_SET));
++ glame_def_export ("SEEK_CUR", scm_long2num(SEEK_CUR));
++ glame_def_export ("SEEK_END", scm_long2num(SEEK_END));
++#endif
++
+ glame_def_export ("SWSENDFILE_INSERT",
+ scm_long2num(SWSENDFILE_INSERT));
+ glame_def_export ("SWSENDFILE_CUT", scm_long2num(SWSENDFILE_CUT));
+ glame_def_export ("SW_NOFILE", swfd2scm(SW_NOFILE));
+
+- glame_def_export ("SEEK_SET", scm_long2num(SEEK_SET));
+- glame_def_export ("SEEK_CUR", scm_long2num(SEEK_CUR));
+- glame_def_export ("SEEK_END", scm_long2num(SEEK_END));
+-
+ return 0;
+ }
diff --git a/audio/glame/files/patch-src_gui_glame_console.c b/audio/glame/files/patch-src_gui_glame_console.c
new file mode 100644
index 000000000000..2e01702df7d0
--- /dev/null
+++ b/audio/glame/files/patch-src_gui_glame_console.c
@@ -0,0 +1,11 @@
+--- src/gui/glame_console.c.orig 2008-03-02 14:01:12.000000000 -0500
++++ src/gui/glame_console.c 2008-03-02 14:01:34.000000000 -0500
+@@ -60,7 +60,7 @@ static void port_register()
+ port = scm_make_port_type("glame-console", NULL, port_write);
+
+ /* Create new port - shamelessly copied from libguile/strports.c */
+- GLAME_NEWCELL(s_port);
++ SCM_NEWCELL(s_port);
+ SCM_DEFER_INTS;
+ pt = scm_add_to_port_table(s_port);
+ #ifdef SCM_SET_CELL_TYPE /* guile >= 1.4 */
diff --git a/audio/glame/files/patch-src_include_glame_guile_compat.h b/audio/glame/files/patch-src_include_glame_guile_compat.h
new file mode 100644
index 000000000000..90492f2bf474
--- /dev/null
+++ b/audio/glame/files/patch-src_include_glame_guile_compat.h
@@ -0,0 +1,61 @@
+--- src/include/glame_guile_compat.h.orig 2008-03-02 13:59:02.000000000 -0500
++++ src/include/glame_guile_compat.h 2008-03-02 13:59:41.000000000 -0500
+@@ -32,58 +32,10 @@
+
+ #include <libguile.h>
+
+-#ifdef SCM_MAJOR_VERSION
+-/* this works because Guile 1.4 doesn't define SCM_MAJOR_VERSION */
+-
+-#define NEW_GUILE 1
+-
+ /* Glame wrapper functions: */
+-#if (SCM_MINOR_VERSION < 7)
+-/* use GLAME_NEWCELL instead of SCM_NEWCELL */
+-#define GLAME_NEWCELL(z) SCM_NEWCELL(z)
+-#endif
+ #define glame_scm2newstr(obj, lenp) gh_scm2newstr (obj, lenp)
+ #define glame_scm2long(obj) scm_num2long (obj, SCM_ARG1, "somewhere")
+ #define glame_scm2double(obj) scm_num2dbl (obj, "somewhere")
+ #define scm_str2string(str) gh_str02scm (str)
+
+-#if (SCM_MINOR_VERSION == 7)
+-#define GLAME_NEWCELL(z) z = scm_cell (SCM_UNPACK(z), 0)
+-#endif
+-
+-#else /* Guile 1.4.x */
+-
+-#include <guile/gh.h>
+-
+-#define NEW_GUILE 0
+-#define SCM_MAJOR_VERSION 1
+-#define SCM_MINOR_VERSION 4
+-#define SCM_MICRO_VERSION 0
+-
+-/* Glame wrapper functions: */
+-#define GLAME_NEWCELL(z) SCM_NEWCELL(z)
+-#define glame_scm2newstr(obj, lenp) gh_scm2newstr (obj, lenp)
+-#define glame_scm2long(obj) gh_scm2long (obj)
+-#define glame_scm2double(obj) gh_scm2double (obj)
+-
+-/* 1.6 compat stuff: (make guile 1.4 use the 1.6 api) */
+-/* If a function cannot be easily defined in terms of a 1.4
+- function, then write a glame wrapper or reimplement the
+- version from Guile 1.6 using internal 1.4 stuff...
+- if stuff in here gets too large, maybe a glame_guile_compat.c
+- should be written
+-*/
+-
+-#define scm_c_define_gsubr(func_name, req, opt, rest, func) gh_new_procedure(func_name, func, req, opt, rest)
+-#define scm_c_export(sym, ...) /* nothing */
+-#define scm_c_define(sym, val) gh_define (sym, val)
+-#define scm_long2num(num) gh_long2scm (num)
+-#define scm_double2num(num) gh_double2scm (num)
+-#define scm_cons(a, b) gh_cons (a, b)
+-#define scm_makfrom0str(str) gh_str02scm (str)
+-#define scm_str2string(str) gh_str02scm (str)
+-
+-/* types */
+-#define scm_t_port scm_port
+-#endif /* defined SCM_MAJOR_VERSION */
+ #endif /* GLAME_GUILE_COMPAT_H */