Ticket #43781: pianod.diff

File pianod.diff, 4.2 KB (added by ryandesign (Ryan Carsten Schmidt), 10 years ago)
  • Portfile

     
    55
    66name                pianod
    77version             158
     8revision            1
    89categories          audio
    910platforms           darwin
    1011license             MIT
     
    3233                    port:faad2 \
    3334                    port:libmad
    3435
     36patchfiles          patch-json-c-0.12.diff
     37
     38use_autoreconf      yes
     39
    3540startupitem.create      yes
    3641startupitem.logfile     ${prefix}/var/log/pianod.log
    3742startupitem.executable  "${prefix}/bin/pianod"
  • files/patch-json-c-0.12.diff

     
     1Fix build with json-c 0.12+
     2http://lists.deviousfish.com/pipermail/pianod-deviousfish.com/2014q2/000590.html
     3--- configure.ac.orig   2014-04-20 05:41:25.000000000 -0500
     4+++ configure.ac        2014-06-01 04:18:33.000000000 -0500
     5@@ -37,7 +37,7 @@
     6        [AC_MSG_WARN([No pkg-config for libao])])
     7 PKG_CHECK_MODULES([mad], [mad],,
     8        [AC_MSG_WARN([No pkg-config for libmad])])
     9-PKG_CHECK_MODULES([json], [json],,
     10+PKG_CHECK_MODULES([json], [json-c],,
     11        [AC_MSG_WARN([No pkg-config for libjson (aka libjson0, json-c)])])
     12 
     13 # Network communication stuff:
     14@@ -46,12 +46,8 @@
     15 AC_CHECK_LIB([gnutls], [gnutls_record_recv],,
     16        [AC_MSG_ERROR([Cannot find required library: libgnutls (aka gnutls)],1)])
     17 
     18-# Bloody json library may be linked via -ljson, or -ljson-c depending on
     19-# the platform.  Try both.
     20-AC_CHECK_LIB([json], [json_object_new_string],,
     21-       [AC_CHECK_LIB([json-c], [json_object_new_string],,
     22-               [AC_MSG_ERROR([Cannot find required library: libjson (aka libjson0, json-c)])])
     23-       ])
     24+AC_CHECK_LIB([json-c], [json_object_new_string],,
     25+       [AC_MSG_ERROR([Cannot find required library: libjson-c],1)])
     26 
     27 
     28 # Audio-related libraries:
     29@@ -130,12 +126,9 @@
     30 
     31 
     32 # Checks for header files.
     33-AC_CHECK_HEADERS([arpa/inet.h fcntl.h crypt.h gcrypt.h limits.h netdb.h netinet/in.h stdint.h stdlib.h string.h strings.h sys/socket.h unistd.h json/json.h json.h])
     34+AC_CHECK_HEADERS([arpa/inet.h fcntl.h crypt.h gcrypt.h limits.h netdb.h netinet/in.h stdint.h stdlib.h string.h strings.h sys/socket.h unistd.h json-c/json.h])
     35 
     36 
     37-AM_CONDITIONAL([HAVE_JSON_JSON_H],[test "$ac_cv_header_json_json_h" = 'yes'])
     38-AM_CONDITIONAL([HAVE_JSON_H],[test "$ac_cv_header_json_h" = 'yes'])
     39-
     40 # Checks for typedefs, structures, and compiler characteristics.
     41 AC_HEADER_STDBOOL
     42 AC_C_INLINE
     43--- src/libpiano/Makefile.am.orig       2013-09-17 22:49:05.000000000 -0500
     44+++ src/libpiano/Makefile.am    2014-06-01 04:22:33.000000000 -0500
     45@@ -8,17 +8,7 @@
     46 request_assert          = -DNDEBUG
     47 endif
     48 
     49-# This contortion is necessary to minimize library customizations.
     50-# Add defines to the command line since the library reads its
     51-# private config.h, not the main one from configure.
     52-if HAVE_JSON_JSON_H
     53-have_json_json_h       = -DHAVE_JSON_JSON_H=1
     54-endif
     55-if HAVE_JSON_H
     56-have_json_h            = -DHAVE_JSON_H=1
     57-endif
     58-
     59-libpiano_a_CPPFLAGS    = $(json_CFLAGS) -I../include -DGCRYPT_NO_DEPRECATED $(request_assert) $(have_json_json_h) $(have_json_h)
     60+libpiano_a_CPPFLAGS    = $(json_CFLAGS) -I../include -DGCRYPT_NO_DEPRECATED $(request_assert)
     61 libpiano_a_SOURCES     = crypt.c piano.c request.c response.c list.c \
     62                          config.h piano.h crypt.h piano_private.h
     63 
     64--- src/libpiano/request.c.orig 2014-03-17 18:54:27.000000000 -0500
     65+++ src/libpiano/request.c      2014-06-01 04:12:38.000000000 -0500
     66@@ -26,14 +26,7 @@
     67 #define _DARWIN_C_SOURCE /* strdup() on OS X */
     68 #endif
     69 
     70-#ifdef HAVE_JSON_JSON_H
     71-#include <json/json.h>
     72-#elif defined (HAVE_JSON_H)
     73 #include <json.h>
     74-#else
     75-#error json library not found.
     76-#endif
     77-
     78 #include <assert.h>
     79 #include <stdio.h>
     80 #include <string.h>
     81--- src/libpiano/response.c.orig        2013-11-12 14:16:57.000000000 -0600
     82+++ src/libpiano/response.c     2014-06-01 04:13:00.000000000 -0500
     83@@ -26,14 +26,7 @@
     84 #define _DARWIN_C_SOURCE /* strdup() on OS X */
     85 #endif
     86 
     87-#ifdef HAVE_JSON_JSON_H
     88-#include <json/json.h>
     89-#elif defined (HAVE_JSON_H)
     90 #include <json.h>
     91-#else
     92-#error json library not found.
     93-#endif
     94-
     95 #include <string.h>
     96 #include <assert.h>
     97 #include <time.h>