aboutsummaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authorMikhail Teterin <mi@FreeBSD.org>2005-09-23 13:19:45 +0000
committerMikhail Teterin <mi@FreeBSD.org>2005-09-23 13:19:45 +0000
commitc9f6ab02b000ba65ad154b2d04f1712cef280981 (patch)
tree0758df3e05d00e269f5a1af8a71ae49fe3c1f01a /audio
parente166570ddbc29a9904d0b9af4b8c2e96dee80386 (diff)
downloadports-c9f6ab02b000ba65ad154b2d04f1712cef280981.tar.gz
ports-c9f6ab02b000ba65ad154b2d04f1712cef280981.zip
Patch timidity to read the descriptions of the optional modules directly
from the module's shared object instead of a gratuitous .txt file, that currently accompanies each module. This should fix pointhat's builds of the interfaces without adding cruft to their PLISTs. The patch is accepted by vendor. Fix one other place in configure to look for tcl8X instead of tcl8.X. The patch is accepted by vendor. Realy on archivers/libarc instead of building the version bundled with timidity. Set USE_GETOPT_LONG -- timidity uses it, if it can, resulting in a potentially omitted dependency. Bump PORTREVISION. Add links to the vendor's bug reports to each patch, where possible. Approved by: maintainer (blanket)
Notes
Notes: svn path=/head/; revision=143423
Diffstat (limited to 'audio')
-rw-r--r--audio/timidity++/Makefile13
-rw-r--r--audio/timidity++/files/patch-Makefile.in27
-rw-r--r--audio/timidity++/files/patch-configure26
-rw-r--r--audio/timidity++/files/patch-dynamic230
-rw-r--r--audio/timidity++/files/patch-playmidi2
5 files changed, 291 insertions, 7 deletions
diff --git a/audio/timidity++/Makefile b/audio/timidity++/Makefile
index 8e57877c4e40..764c0a217db0 100644
--- a/audio/timidity++/Makefile
+++ b/audio/timidity++/Makefile
@@ -7,7 +7,7 @@
PORTNAME= timidity++
PORTVERSION= 2.13.2
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= audio
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=timidity
@@ -16,20 +16,25 @@ DISTNAME= TiMidity++-${PORTVERSION}
MAINTAINER= nork@FreeBSD.org
COMMENT= Software MIDI player
-LIB_DEPENDS+= vorbis:${PORTSDIR}/audio/libvorbis
+LIB_DEPENDS+= vorbis:${PORTSDIR}/audio/libvorbis \
+ arc:${PORTSDIR}/archivers/libarc
RUN_DEPENDS= ${LOCALBASE}/share/timidity/timidity.cfg:${PORTSDIR}/audio/eawpats
CONFLICTS= timidity-0.*
# If you don't have X11, type "make -DWITHOUT_X11" or uncomment this.
#WITHOUT_X11= yes
-USE_GMAKE= yes
+#USE_GMAKE= yes
USE_BZIP2= yes
+USE_GETOPT_LONG=yes
WANT_GNOME= yes
GNU_CONFIGURE= yes
+EXTRACT_AFTER_ARGS=| ${TAR} -xpf - --exclude '*/libarc/*' \
+ --exclude '*/utils/mblock.h' --exclude '*/utils/memb.h'
CONFIGURE_ARGS?=--enable-interface=ncurses,vt100,server
CONFIGURE_ARGS+=--program-transform-name= --enable-network
+CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include/libarc"
PLIST_SUB= EUCJP_LOCALE=${EUCJP_LOCALE} TIMID_LIBDIR=${TIMID_LIBDIR} \
ELISPDIR=share/emacs/site-lisp
@@ -77,7 +82,7 @@ CONFIGURE_ARGS+=--enable-audio=oss,vorbis
.endif
.if ${PORTOBJFORMAT} == "elf"
-CONFIGURE_ENV= LDFLAGS=-export-dynamic
+CONFIGURE_ENV+= LDFLAGS=-export-dynamic
.endif
pre-install:
diff --git a/audio/timidity++/files/patch-Makefile.in b/audio/timidity++/files/patch-Makefile.in
index cb0212519bdc..8dbf06732a37 100644
--- a/audio/timidity++/files/patch-Makefile.in
+++ b/audio/timidity++/files/patch-Makefile.in
@@ -1,5 +1,28 @@
---- timidity/Makefile.in.orig Mon Mar 29 04:04:22 2004
-+++ timidity/Makefile.in Tue May 18 23:38:06 2004
+http://timidity-docs.sourceforge.jp/cgi-bin/kagemai-en/guest.cgi?project=timidity-bugs-en&action=view_report&id=56
+
+Plus another patch...
+
+--- timidity/Makefile.in Sun Oct 3 08:39:54 2004
++++ timidity/Makefile.in Thu Sep 22 03:11:09 2005
+@@ -478,5 +477,5 @@
+ @BORLANDC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(SYSEXTRAS:.c=.$(OBJEXT)) \
+ @BORLANDC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/interface/libinterface.a \
+-@BORLANDC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/libarc/libarc.a \
++@BORLANDC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ -larc \
+ @BORLANDC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/libunimod/libunimod.a \
+ @BORLANDC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/utils/libutils.a \
+@@ -509,5 +507,4 @@
+ @BORLANDC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@timidity_dep = $(SYSEXTRAS:.c=.$(OBJEXT)) \
+ @BORLANDC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/interface/libinterface.a \
+-@BORLANDC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/libarc/libarc.a \
+ @BORLANDC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/libunimod/libunimod.a \
+ @BORLANDC_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/utils/libutils.a \
+@@ -585,5 +583,4 @@
+ @BORLANDC_FALSE@@ENABLE_W32GUI_FALSE@@ENABLE_W32G_SYN_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(SYSEXTRAS:.c=.$(OBJEXT)) \
+ @BORLANDC_FALSE@@ENABLE_W32GUI_FALSE@@ENABLE_W32G_SYN_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/interface/libinterface.a \
+-@BORLANDC_FALSE@@ENABLE_W32GUI_FALSE@@ENABLE_W32G_SYN_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/libarc/libarc.a \
+ @BORLANDC_FALSE@@ENABLE_W32GUI_FALSE@@ENABLE_W32G_SYN_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/libunimod/libunimod.a \
+ @BORLANDC_FALSE@@ENABLE_W32GUI_FALSE@@ENABLE_W32G_SYN_FALSE@@VCPP_FALSE@@WATCOM_C_FALSE@ $(top_builddir)/utils/libutils.a
@@ -576,9 +576,8 @@
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \
diff --git a/audio/timidity++/files/patch-configure b/audio/timidity++/files/patch-configure
index 56fa5f6d0229..091ea5e8226e 100644
--- a/audio/timidity++/files/patch-configure
+++ b/audio/timidity++/files/patch-configure
@@ -1,5 +1,14 @@
+http://timidity-docs.sourceforge.jp/cgi-bin/kagemai-en/guest.cgi?project=timidity-bugs-en&action=view_report&id=58
+
--- configure Sun Oct 3 08:39:51 2004
-+++ configure Sat Sep 10 14:30:53 2005
++++ configure Thu Sep 22 02:49:01 2005
+@@ -16605,5 +16605,5 @@
+ tcl_lib=
+ tk_lib=
+- for l in tcl tcl8.4 tcl8.3 tcl8.0jp tcl7.6jp tcl80jp tcl76jp tcl8.0 tcl7.6 tcl80 tcl76; do
++ for l in tcl84 tcl83 tcl8.0jp tcl7.6jp tcl80jp tcl76jp tcl8.0 tcl7.6 tcl80 tcl76; do
+ case "x$tcl_lib" in x) as_ac_Lib=`echo "ac_cv_lib_$l''_Tcl_Init" | $as_tr_sh`
+ echo "$as_me:$LINENO: checking for Tcl_Init in -l$l" >&5
@@ -16677,5 +16677,5 @@
done
LIBS="$LIBS $tcl_lib"
@@ -7,3 +16,18 @@
+ for l in tk tk84 tk83 tk8.0jp tk4.2jp tk80jp tk42jp tk8.0 tk4.2 tk80 tk42; do
case "x$tk_lib" in x) as_ac_Lib=`echo "ac_cv_lib_$l''_Tk_Init" | $as_tr_sh`
echo "$as_me:$LINENO: checking for Tk_Init in -l$l" >&5
+@@ -19522,5 +19522,5 @@
+
+
+- ac_config_files="$ac_config_files Makefile autoconf/Makefile common.makefile configs/Makefile doc/Makefile doc/C/Makefile doc/ja_JP.eucJP/Makefile interface/Makefile interface/motif_bitmaps/Makefile interface/bitmaps/Makefile interface/pixmaps/Makefile libarc/Makefile libunimod/Makefile timidity/Makefile utils/Makefile script/Makefile TiMidity.ad TiMidity-uj.ad"
++ ac_config_files="$ac_config_files Makefile autoconf/Makefile common.makefile configs/Makefile doc/Makefile doc/C/Makefile doc/ja_JP.eucJP/Makefile interface/Makefile interface/motif_bitmaps/Makefile interface/bitmaps/Makefile interface/pixmaps/Makefile libunimod/Makefile timidity/Makefile utils/Makefile script/Makefile TiMidity.ad TiMidity-uj.ad"
+
+ cat >confcache <<\_ACEOF
+--- Makefile.in Wed Sep 22 13:23:32 2004
++++ Makefile.in Thu Sep 22 02:49:17 2005
+@@ -268,5 +268,4 @@
+ autoconf \
+ utils \
+- libarc \
+ libunimod \
+ interface \
diff --git a/audio/timidity++/files/patch-dynamic b/audio/timidity++/files/patch-dynamic
new file mode 100644
index 000000000000..1668d5015786
--- /dev/null
+++ b/audio/timidity++/files/patch-dynamic
@@ -0,0 +1,230 @@
+http://timidity-docs.sourceforge.jp/cgi-bin/kagemai-en/guest.cgi?project=timidity-bugs-en&action=view_report&id=54
+
+--- interface/Makefile.in Sun Oct 3 08:39:54 2004
++++ interface/Makefile.in Thu Sep 22 00:01:34 2005
+@@ -1240,5 +1240,5 @@
+ @NEEDDLOPEN_TRUE@install.dynamics: $(dynamic_targets)
+ @NEEDDLOPEN_TRUE@ test -d $(DESTDIR)$(SHLIB_DIR) || mkdir -p $(DESTDIR)$(SHLIB_DIR)
+-@NEEDDLOPEN_TRUE@ for f in $(dynamic_targets) ''; do case ".$$f" in .);; *) $(INSTALL_PROGRAM) $$f $(DESTDIR)$(SHLIB_DIR) ; $(INSTALL_DATA) $${f%%$(so)}txt $(DESTDIR)$(SHLIB_DIR);; esac; done
++@NEEDDLOPEN_TRUE@ for f in $(dynamic_targets) ''; do case ".$$f" in .);; *) $(INSTALL_PROGRAM) $$f $(DESTDIR)$(SHLIB_DIR);; esac; done
+
+ @NEEDDLOPEN_TRUE@.c.$(so):
+--- timidity/timidity.c Sat Oct 2 06:46:17 2004
++++ timidity/timidity.c Thu Sep 22 02:32:24 2005
+@@ -386,5 +386,5 @@
+ static inline int parse_opt_c(char *);
+ static inline int parse_opt_D(const char *);
+-static inline int parse_opt_d(const char *);
++static inline int parse_opt_d(char *);
+ static inline int parse_opt_E(char *);
+ static inline int parse_opt_mod_wheel(const char *);
+@@ -418,5 +418,5 @@
+ #ifdef IA_DYNAMIC
+ static inline void list_dyna_interface(FILE *, char *, char *);
+-static inline char *dynamic_interface_info(int);
++static inline const char *dynamic_interface_info(int);
+ char *dynamic_interface_module(int);
+ #endif
+@@ -501,4 +501,5 @@
+ #ifdef IA_DYNAMIC
+ MAIN_INTERFACE char dynamic_interface_id;
++ControlMode *ctl_load(int id);
+ #endif /* IA_DYNAMIC */
+
+@@ -2929,11 +2930,9 @@
+ }
+
+-static inline int parse_opt_d(const char *arg)
++static inline int parse_opt_d(char *arg)
+ {
+ /* dynamic lib root */
+ #ifdef IA_DYNAMIC
+- if (dynamic_lib_root)
+- free(dynamic_lib_root);
+- dynamic_lib_root = safe_strdup(arg);
++ dynamic_lib_root = arg;
+ return 0;
+ #else
+@@ -3935,5 +3934,6 @@
+ {
+ URL url;
+- char fname[BUFSIZ], *info;
++ char fname[63];
++ const char *info;
+ int id;
+
+@@ -3946,6 +3946,5 @@
+ continue;
+ mark[id] = 1;
+- if ((info = dynamic_interface_info(id)) == NULL)
+- info = dynamic_interface_module(id);
++ info = dynamic_interface_info(id);
+ if (info != NULL)
+ fprintf(fp, " -i%c %s" NLS, id, info);
+@@ -3954,39 +3953,27 @@
+ }
+
+-static inline char *dynamic_interface_info(int id)
++static inline const char *
++dynamic_interface_info(int id)
+ {
+- static char libinfo[MAXPATHLEN];
+- int fd, n;
+- char *nl;
+-
+- sprintf(libinfo, "%s" PATH_STRING "interface_%c.txt",
+- dynamic_lib_root, id);
+- if ((fd = open(libinfo, 0)) < 0)
+- return NULL;
+- n = read(fd, libinfo, sizeof(libinfo) - 1);
+- close(fd);
+- if (n <= 0)
+- return NULL;
+- libinfo[n] = '\0';
+- if ((nl = strchr(libinfo, '\n')) == libinfo)
++ ControlMode *actl;
++
++ actl = ctl_load(id);
++ if (actl == NULL)
+ return NULL;
+- if (nl != NULL) {
+- *nl = '\0';
+- if (*(nl - 1) == '\r')
+- *(nl - 1) = '\0';
+- }
+- return libinfo;
++
++ return actl->id_name;
+ }
+
+-char *dynamic_interface_module(int id)
++char *
++dynamic_interface_module(int id)
+ {
+- static char shared_library[MAXPATHLEN];
+- int fd;
++ char *shared_library;
+
++ shared_library = malloc(strlen(dynamic_lib_root) +
++ sizeof(PATH_STRING) - 1 + sizeof("interface_X") - 1 +
++ sizeof(SHARED_LIB_EXT) - 1 + 1);
+- sprintf(shared_library, "%s" PATH_STRING "interface_%c%s",
+- dynamic_lib_root, id, SHARED_LIB_EXT);
++ sprintf(shared_library, "%s" PATH_STRING "interface_%c" SHARED_LIB_EXT,
++ dynamic_lib_root, id);
+- if ((fd = open(shared_library, 0)) < 0)
+- return NULL;
+- close(fd);
++
+ return shared_library;
+ }
+@@ -4012,5 +3996,5 @@
+ #ifdef IA_DYNAMIC
+ if (cmp->id_character == dynamic_interface_id
+- && dynamic_interface_module(*arg)) {
++ && ctl_load(*arg)) {
+ /* Dynamic interface loader */
+ found = 1;
+--- interface/dynamic_c.c Tue Jan 15 05:53:20 2002
++++ interface/dynamic_c.c Thu Sep 22 01:17:11 2005
+@@ -80,40 +80,66 @@
+ }
+
+-static int ctl_open(int using_stdin, int using_stdout)
++ControlMode *
++ctl_load(int id)
+ {
+- ControlMode *(* inferface_loader)(void);
+- char *path;
+- char buff[256];
+- int id;
+-
+- if(dynamic_control_mode.opened)
+- return 0;
+- dynamic_control_mode.opened = 1;
+-
+- id = dynamic_control_mode.id_character;
+- path = dynamic_interface_module(id);
+- if(path == NULL)
+- {
+- fprintf(stderr, "FATAL ERROR: dynamic_c.c: ctl_open()\n");
+- exit(1);
+- }
+-
+- if((libhandle = dl_load_file(path)) == NULL)
+- return -1;
+-
+- sprintf(buff, "interface_%c_loader", id);
+- if((inferface_loader = (ControlMode *(*)(void))
+- dl_find_symbol(libhandle, buff)) == NULL)
+- return -1;
+-
+- ctl = inferface_loader();
+-
+- ctl->verbosity = dynamic_control_mode.verbosity;
+- ctl->trace_playing = dynamic_control_mode.trace_playing;
+- ctl->flags = dynamic_control_mode.flags;
+- ctl_close_hook = ctl->close;
+- ctl->close = dynamic_control_mode.close; /* ctl_close() */
++ static int last_id;
++ static ControlMode *last_ctl;
++ ControlMode *(* inferface_loader)(void);
++ char *path;
++ char buff[sizeof("interface_%_loader")];
++
++ if (last_id == id)
++ return last_ctl; /* success */
++ if (last_id) {
++ dl_free(libhandle);
++ last_ctl = NULL;
++ }
++
++ last_id = id;
++ path = dynamic_interface_module(id);
++ if(path == NULL) {
++ fprintf(stderr, "FATAL ERROR: dynamic_c.c: ctl_load()\n");
++ exit(1);
++ }
++
++ libhandle = dl_load_file(path);
++ free(path);
++ if (libhandle == NULL)
++ return NULL;
++
++ sprintf(buff, "interface_%c_loader", id);
++ if((inferface_loader = (ControlMode *(*)(void))
++ dl_find_symbol(libhandle, buff)) == NULL) {
++ dl_free(libhandle);
++ return NULL;
++ }
+
+- return ctl->open(using_stdin, using_stdout);
++ last_ctl = inferface_loader();
++
++ return last_ctl;
++}
++
++static int
++ctl_open(int using_stdin, int using_stdout)
++{
++ int id;
++ ControlMode *newctl;
++
++ if(dynamic_control_mode.opened)
++ return 0;
++ dynamic_control_mode.opened = 1;
++
++ id = dynamic_control_mode.id_character;
++ newctl = ctl_load(id);
++ if (newctl == NULL)
++ return 0;
++
++ ctl = newctl;
++ ctl->verbosity = dynamic_control_mode.verbosity;
++ ctl->trace_playing = dynamic_control_mode.trace_playing;
++ ctl->flags = dynamic_control_mode.flags;
++ ctl_close_hook = ctl->close;
++ ctl->close = dynamic_control_mode.close; /* ctl_close() */
++ return ctl->open(using_stdin, using_stdout);
+ }
+
diff --git a/audio/timidity++/files/patch-playmidi b/audio/timidity++/files/patch-playmidi
index 53b52405a316..653f1e26f9c9 100644
--- a/audio/timidity++/files/patch-playmidi
+++ b/audio/timidity++/files/patch-playmidi
@@ -1,3 +1,5 @@
+http://timidity-docs.sourceforge.jp/cgi-bin/kagemai-en/guest.cgi?project=timidity-bugs-en&action=view_report&id=55
+
--- timidity/playmidi.c Sat Aug 28 01:38:18 2004
+++ timidity/playmidi.c Sat Sep 10 17:07:45 2005
@@ -4160,5 +4162,5 @@