Package: puredata
Severity: important
Tags: patch

Hi,

currently your package FTBFS on GNU/kFreeBSD with the following error:
> make -C src
> make[2]: Entering directory 
> `/build/buildd/puredata-0.40.2/build-tree/pd-0.40-2/src'
> cc  -M g_canvas.c g_graph.c g_text.c g_rtext.c g_array.c g_template.c g_io.c 
> g_scalar.c g_traversal.c g_guiconnect.c g_readwrite.c g_editor.c g_all_guis.c 
> g_bang.c g_hdial.c g_hslider.c g_mycanvas.c g_numbox.c g_toggle.c g_vdial.c 
> g_vslider.c g_vumeter.c m_pd.c m_class.c m_obj.c m_atom.c m_memory.c 
> m_binbuf.c m_conf.c m_glob.c m_sched.c s_main.c s_inter.c s_file.c s_print.c 
> s_loader.c s_path.c s_entry.c s_audio.c s_midi.c d_ugen.c d_ctl.c 
> d_arithmetic.c d_osc.c d_filter.c d_dac.c d_misc.c d_math.c d_fft.c d_array.c 
> d_global.c d_delay.c d_resample.c x_arithmetic.c x_connective.c x_interface.c 
> x_midi.c x_misc.c x_time.c x_acoustics.c x_net.c x_qlist.c x_gui.c x_list.c 
> d_soundfile.c s_audio_jack.c d_fft_mayer.c d_fftroutine.c > 
> makefile.dependencies
> d_osc.c:39:2: error: #error No byte order defined
> d_array.c:527:2: error: #error No byte order defined
> make[2]: *** [makefile.dependencies] Error 1
> make[2]: Leaving directory 
> `/build/buildd/puredata-0.40.2/build-tree/pd-0.40-2/src'
> make[1]: *** [all] Error 2
> make[1]: Leaving directory 
> `/build/buildd/puredata-0.40.2/build-tree/pd-0.40-2'
> make: *** [debian/stamp-makefile-build] Error 2


Full build logs are available at
<http://experimental.ftbfs.de/build.php?arch=kfreebsd-i386&pkg=puredata>.


Please find attached a patch to fix this.

Cheers,

-- 
Cyril Brulebois
--- puredata-0.40.2/build-tree/pd-0.40-2/src/configure	2006-11-03 21:24:08.000000000 +0100
+++ puredata-0.40.2/build-tree/pd-0.40-2/src/configure	2007-03-11 18:54:57.000000000 +0100
@@ -6684,7 +6684,7 @@
 
 
 
-if test `uname -s` = Linux;
+if test `uname -s` = Linux -o `uname -s` = "GNU/kFreeBSD";
 then
         echo .................... alsa= $alsa
     if test x$alsa == xyes; then
--- puredata-0.40.2/build-tree/pd-0.40-2/src/configure.in	2006-10-28 21:13:24.000000000 +0200
+++ puredata-0.40.2/build-tree/pd-0.40-2/src/configure.in	2007-03-11 18:54:57.000000000 +0100
@@ -149,7 +149,7 @@
         		AC_CHECK_LIB(tk8.0, main,,echo no tk library found || exit 1)))))))
 
 
-if test `uname -s` = Linux;
+if test `uname -s` = Linux -o `uname -s` = "GNU/kFreeBSD";
 then
     dnl Ckecking for ALSA
     echo .................... alsa= $alsa
--- puredata-0.40.2/build-tree/pd-0.40-2/src/s_stuff.h	2006-08-12 06:47:42.000000000 +0200
+++ puredata-0.40.2/build-tree/pd-0.40-2/src/s_stuff.h	2007-03-11 18:54:57.000000000 +0100
@@ -175,7 +175,7 @@
 #define API_JACK 5
 #define API_SGI 6
 
-#ifdef __linux__
+#if defined(__linux__) || defined(__FreeBSD_kernel__)
 #define API_DEFAULT API_OSS
 #define API_DEFSTRING "OSS"
 #endif
--- puredata-0.40.2/build-tree/pd-0.40-2/src/d_array.c	2007-03-11 18:54:46.000000000 +0100
+++ puredata-0.40.2/build-tree/pd-0.40-2/src/d_array.c	2007-03-11 18:54:57.000000000 +0100
@@ -514,7 +514,7 @@
 #define int32 long
 #endif
 
-#if defined(__FreeBSD__) || defined(__APPLE__)
+#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__FreeBSD_kernel__)
 #include <machine/endian.h>
 #endif
 
--- puredata-0.40.2/build-tree/pd-0.40-2/src/d_osc.c	2006-11-03 17:44:59.000000000 +0100
+++ puredata-0.40.2/build-tree/pd-0.40-2/src/d_osc.c	2007-03-11 18:54:57.000000000 +0100
@@ -26,7 +26,7 @@
 #define int32 long
 #endif
 
-#if defined(__FreeBSD__) || defined(__APPLE__)
+#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__FreeBSD_kernel__)
 #include <machine/endian.h>
 #endif
 
--- puredata-0.40.2/build-tree/pd-0.40-2/src/m_sched.c	2005-05-18 04:49:44.000000000 +0200
+++ puredata-0.40.2/build-tree/pd-0.40-2/src/m_sched.c	2007-03-11 18:54:57.000000000 +0100
@@ -263,7 +263,7 @@
 
         /* if there's no GUI but we're running in "realtime", here is
         where we arrange to ping the watchdog every 2 seconds. */
-#ifdef __linux__
+#if defined(__linux__) || defined(__FreeBSD__)
     if (sys_nogui && sys_hipriority && (sched_diddsp - sched_nextpingtime > 0))
     {
         glob_watchdog(0);
--- puredata-0.40.2/build-tree/pd-0.40-2/src/s_audio_oss.c	2004-11-14 21:52:36.000000000 +0100
+++ puredata-0.40.2/build-tree/pd-0.40-2/src/s_audio_oss.c	2007-03-11 18:54:57.000000000 +0100
@@ -5,7 +5,11 @@
 
 /* this file inputs and outputs audio using the OSS API available on linux. */
 
+#if defined(__FreeBSD_kernel__)
+#include <sys/soundcard.h>
+#else
 #include <linux/soundcard.h>
+#endif
 
 #include "m_pd.h"
 #include "s_stuff.h"
--- puredata-0.40.2/build-tree/pd-0.40-2/src/s_inter.c	2006-08-15 07:03:09.000000000 +0200
+++ puredata-0.40.2/build-tree/pd-0.40-2/src/s_inter.c	2007-03-11 18:54:57.000000000 +0100
@@ -59,7 +59,7 @@
 #define WISHAPP "wish84.exe"
 #endif
 
-#ifdef __linux__
+#if defined(__linux__) || defined(__FreeBSD_kernel__)
 #define LOCALHOST "127.0.0.1"
 #else
 #define LOCALHOST "localhost"
@@ -261,7 +261,7 @@
 
 #endif
 
-#ifdef __linux
+#if defined(__linux) || defined(__FreeBSD_kernel__)
 
 #if defined(_POSIX_PRIORITY_SCHEDULING) || defined(_POSIX_MEMLOCK)
 #include <sched.h>
@@ -831,7 +831,7 @@
 
 static int sys_watchfd;
 
-#ifdef __linux__
+#if defined(__linux__) || defined(__FreeBSD_kernel__)
 void glob_watchdog(t_pd *dummy)
 {
     if (write(sys_watchfd, "\n", 1) < 1)
@@ -1132,7 +1132,7 @@
 #endif /* MSW */
     }
 
-#if defined(__linux__) || defined(IRIX)
+#if defined(__linux__) || defined(IRIX) || defined(__FreeBSD_kernel__)
         /* now that we've spun off the child process we can promote
         our process's priority, if we can and want to.  If not specfied
         (-1), we check root status.  This misses the case where we might
@@ -1242,7 +1242,7 @@
              sys_socketreceiver);
 
             /* here is where we start the pinging. */
-#if defined(__linux__) || defined(IRIX)
+#if defined(__linux__) || defined(IRIX) || defined(__FreeBSD_kernel__)
          if (sys_hipriority)
              sys_gui("pdtk_watchdog\n");
 #endif
@@ -1266,7 +1266,7 @@
     if (!reentered)
     {
         reentered = 1;
-#ifndef __linux__  /* sys_close_audio() hangs if you're in a signal? */
+#if !defined(__linux__) && !defined(__FreeBSD_kernel__)  /* sys_close_audio() hangs if you're in a signal? */
         fprintf(stderr, "closing audio...\n");
         sys_close_audio();
         fprintf(stderr, "closing MIDI...\n");
--- puredata-0.40.2/build-tree/pd-0.40-2/src/s_loader.c	2006-10-25 21:06:37.000000000 +0200
+++ puredata-0.40.2/build-tree/pd-0.40-2/src/s_loader.c	2007-03-11 18:54:57.000000000 +0100
@@ -34,7 +34,7 @@
 #ifdef __FreeBSD__
 static char sys_dllextent[] = ".b_i386", sys_dllextent2[] = ".pd_freebsd";
 #endif
-#ifdef __linux__
+#if defined(__linux__) || defined(__FreeBSD_kernel__)
 #ifdef __ia64__
 static char sys_dllextent[] = ".l_ia64", sys_dllextent2[] = ".pd_linux";
 #else
--- puredata-0.40.2/build-tree/pd-0.40-2/src/x_misc.c	2005-12-31 21:08:38.000000000 +0100
+++ puredata-0.40.2/build-tree/pd-0.40-2/src/x_misc.c	2007-03-11 18:54:57.000000000 +0100
@@ -25,6 +25,11 @@
 #define HZ CLK_TCK
 #endif
 
+#if defined (__FreeBSD_kernel__)
+#include <time.h>
+#define HZ CLOCKS_PER_SEC
+#endif
+
 /* -------------------------- random ------------------------------ */
 /* this is strictly homebrew and untested. */
 
--- puredata-0.40.2/build-tree/pd-0.40-2/src/t_tkcmd.c	2005-12-31 21:08:37.000000000 +0100
+++ puredata-0.40.2/build-tree/pd-0.40-2/src/t_tkcmd.c	2007-03-11 18:54:57.000000000 +0100
@@ -46,7 +46,7 @@
 #define STARTGUI
 #endif
 
-#ifdef __linux__
+#if defined(__linux__) || defined(__FreeBSD_kernel__)
 #define STARTGUI
 #endif
 
@@ -67,7 +67,7 @@
         the loopback address; NT, on the other hand, can't understand the
         hostname "127.0.0.1". */
 char hostname[100] =
-#ifdef __linux__
+#if defined(__linux__) || defined(__FreeBSD_kernel__)
     "127.0.0.1";
 #else
     "localhost";

Reply via email to