Ticket #1451: patch-xmms

File patch-xmms, 3.0 KB (added by shadow@…, 21 years ago)

Patch for xmms on 10.3

Line 
1--- configure.orig      Fri Sep  5 06:00:38 2003
2+++ configure   Mon Dec  8 03:04:01 2003
3@@ -3918,7 +3918,7 @@
4     # FIXME: Relying on posixy $() will cause problems for
5     #        cross-compilation, but unfortunately the echo tests do not
6     #        yet detect zsh echo's removal of \ escapes.
7-    archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
8+    archive_cmds='$nonopt $(test x$module = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
9     # We need to add '_' to the symbols in $export_symbols first
10     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
11     hardcode_direct=yes
12@@ -13040,12 +13040,6 @@
13 
14                fi
15        ;;
16-       *-*-darwin*)
17-               cat >> confdefs.h <<\EOF
18-#define SYMBOL_PREFIX "_"
19-EOF
20-
21-       ;;
22        *-hpux-*)
23                ARCH_DEFINES="-DHPUX"
24        ;;
25--- libxmms/util.c.orig Wed Jan 15 00:09:18 2003
26+++ libxmms/util.c      Mon Dec  8 03:04:01 2003
27@@ -15,6 +15,13 @@
28 #include <sys/sysctl.h>
29 #endif
30 
31+#if defined (__APPLE__)
32+#include <mach/mach.h>
33+#include <mach/thread_policy.h>
34+#include <sys/param.h>
35+#include <sys/sysctl.h>
36+#endif
37+
38 #if TIME_WITH_SYS_TIME
39 # include <sys/time.h>
40 # include <time.h>
41@@ -73,6 +80,28 @@
42 
43 gboolean xmms_check_realtime_priority(void)
44 {
45+#if defined (__APPLE__)
46+       struct thread_time_constraint_policy ttcpolicy;
47+       int bus_speed, mib [2] = { CTL_HW, HW_BUS_FREQ };
48+       size_t len;
49+
50+       len = sizeof (bus_speed);
51+       sysctl (mib, 2, &bus_speed, &len, NULL, 0);
52+
53+       /* Is it enough? */
54+       ttcpolicy.period = bus_speed / 120;
55+       ttcpolicy.computation = bus_speed / 1000;
56+       ttcpolicy.constraint = bus_speed / 500;
57+       ttcpolicy.preemptible = 1;
58+
59+       thread_policy_set (mach_thread_self (),
60+                          THREAD_TIME_CONSTRAINT_POLICY,
61+                          (int*)&ttcpolicy,
62+                          THREAD_TIME_CONSTRAINT_POLICY_COUNT);
63+
64+       return TRUE;
65+#endif
66+
67 #ifdef HAVE_SCHED_SETSCHEDULER
68 #ifdef __FreeBSD__
69        /*
70--- ltmain.sh.orig      Wed Aug 13 21:59:04 2003
71+++ ltmain.sh   Mon Dec  8 04:11:26 2003
72@@ -4053,10 +4053,10 @@
73 
74 # Directory that this library needs to be installed in:
75 libdir='$install_libdir'"
76-         if test "$installed" = no && test $need_relink = yes; then
77-           $echo >> $output "\
78-relink_command=\"$relink_command\""
79-         fi
80+#        if test "$installed" = no && test $need_relink = yes; then
81+#          $echo >> $output "\
82+#relink_command=\"$relink_command\""
83+#        fi
84        done
85       fi
86 
87--- xmms/Makefile.in.orig       Fri Sep  5 06:01:20 2003
88+++ xmms/Makefile.in    Mon Dec  8 03:11:12 2003
89@@ -176,8 +176,8 @@
90 bin_PROGRAMS = xmms
91 
92 xmms_LDFLAGS = -export-dynamic
93-xmms_LDADD = @GTK_LIBS@ @PTHREAD_LIBS@ @SM_LIBS@ @VM_LIBS@ \
94-@POSIX_LIBS@ $(top_builddir)/libxmms/libxmms.la @LTLIBINTL@
95+xmms_LDADD = $(top_builddir)/libxmms/libxmms.la @GTK_LIBS@ \
96+@PTHREAD_LIBS@ @SM_LIBS@ @VM_LIBS@ @POSIX_LIBS@ @LTLIBINTL@
97 
98 
99 INCLUDES = @GTK_CFLAGS@ @XMMS_DEFINES@ @ARCH_DEFINES@ \