diff --git a/net-misc/mediatomb/mediatomb-0.12.1.bep b/net-misc/mediatomb/mediatomb-0.12.1.bep new file mode 100644 index 000000000..a69c2a5e5 --- /dev/null +++ b/net-misc/mediatomb/mediatomb-0.12.1.bep @@ -0,0 +1,35 @@ +DESCRIPTION="MediaTomb is an open source UPnP MediaServer" +HOMEPAGE="http://mediatomb.cc/" +SRC_URI="http://downloads.sourceforge.net/project/mediatomb/MediaTomb/0.12.1/mediatomb-0.12.1.tar.gz" +REVISION="1" +STATUS_HAIKU="stable" +DEPEND="" +MESSAGE="This port only builds with gcc4. Use 'setgcc gcc4' before building." +CHECKSUM_MD5="e927dd5dc52d3cfcebd8ca1af6f0d3c2" +BUILD { + cd mediatomb-0.12.1 + libtoolize --force --copy --install + aclocal + autoconf + automake + ./configure --prefix=`finddir B_COMMON_DIRECTORY` \ + --with-iconv-libs=`finddir B_COMMON_LIB_DIRECTORY` \ + --with-sqlite3-libs=`finddir B_COMMON_LIB_DIRECTORY` \ + --with-expat-libs=`finddir B_COMMON_LIB_DIRECTORY` + make +} + +INSTALL { + cd mediatomb-0.12.1 + make install +} + +TEST { + cd generic-1.2.3 +# make test +# make check +} + +LICENSE="2005 Gena Batyan, Sergey 'Jin' Bostandzhyan + 2006-2010 Gena Batyan, Sergey 'Jin' Bostandzhyan, Leonhard Wimmer" +COPYRIGHT="GNU GPL v2" diff --git a/net-misc/mediatomb/patches/mediatomb-0.12.1.patch b/net-misc/mediatomb/patches/mediatomb-0.12.1.patch new file mode 100644 index 000000000..0346a8482 --- /dev/null +++ b/net-misc/mediatomb/patches/mediatomb-0.12.1.patch @@ -0,0 +1,88 @@ +diff -urN mediatomb-0.12.1/configure.ac mediatomb-0.12.1-haiku/configure.ac +--- mediatomb-0.12.1/configure.ac 2010-04-07 22:38:51.058982400 +0000 ++++ mediatomb-0.12.1-haiku/configure.ac 2011-02-06 23:56:23.000000000 +0000 +@@ -45,6 +45,7 @@ + CYGWIN_OS=0 + FREEBSD_OS=0 + OPENBSD_OS=0 ++HAIKU_OS=0 + + LIBS_SAVE="$LIBS" + +@@ -67,6 +68,11 @@ + *-*-openbsd*) + OPENBSD_OS=1 + ;; ++ *-*-haiku*) ++ HAIKU_OS=1 ++ SEARCH_DIR="/boot/common" ++ LIBS="$LIBS -lnetwork" ++ ;; + esac + + MT_SET_SEARCHPATH +@@ -721,7 +727,7 @@ + AC_SUBST(NSL_LIBS) + ], + [ +- if test $CYGWIN_OS -eq 0; then ++ if ((test $CYGWIN_OS -eq 0) && (test $HAIKU_OS -eq 0)); then + AC_MSG_ERROR(required library function not found) + fi + ] +diff -urN mediatomb-0.12.1/src/tools.cc mediatomb-0.12.1-haiku/src/tools.cc +--- mediatomb-0.12.1/src/tools.cc 2010-03-25 14:58:11.015466496 +0000 ++++ mediatomb-0.12.1-haiku/src/tools.cc 2011-02-07 01:45:18.225968128 +0000 +@@ -46,7 +46,7 @@ + #include + #include "config_manager.h" + +-#ifndef SOLARIS ++#if !defined SOLARIS && !defined __HAIKU__ + #include + #else + #include +diff -urN mediatomb-0.12.1/tombupnp/threadutil/src/ThreadPool.c mediatomb-0.12.1-haiku/tombupnp/threadutil/src/ThreadPool.c +--- mediatomb-0.12.1/tombupnp/threadutil/src/ThreadPool.c 2010-03-25 14:58:13.043515904 +0000 ++++ mediatomb-0.12.1-haiku/tombupnp/threadutil/src/ThreadPool.c 2011-02-07 01:07:38.354156544 +0000 +@@ -372,7 +372,7 @@ + gettimeofday( &t, NULL ); + #if defined(WIN32) + srand( ( unsigned int )(t.tv_usec/1000) + (unsigned int)ithread_get_current_thread_id( ).p ); +-#elif defined(__FreeBSD__) || defined (__APPLE__) || defined(__OpenBSD__) || defined(__NetBSD__) ++#elif defined(__FreeBSD__) || defined (__APPLE__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__HAIKU__) + srand( ( unsigned int )(t.tv_usec/1000) + (unsigned int)ithread_get_current_thread_id( ) ); + #else + srand( ( unsigned int )(t.tv_usec/1000) + ithread_get_current_thread_id( ) ); +diff -urN mediatomb-0.12.1/tombupnp/upnp/src/api/upnpapi.c mediatomb-0.12.1-haiku/tombupnp/upnp/src/api/upnpapi.c +--- mediatomb-0.12.1/tombupnp/upnp/src/api/upnpapi.c 2010-03-25 14:58:12.049283072 +0000 ++++ mediatomb-0.12.1-haiku/tombupnp/upnp/src/api/upnpapi.c 2011-02-07 01:25:10.416546816 +0000 +@@ -66,7 +66,7 @@ + #include + #include + +- #ifndef SOLARIS ++ #if !defined SOLARIS && !defined __HAIKU__ + // #include + #include + #else +diff -urN mediatomb-0.12.1/tombupnp/upnp/src/genlib/net/uri/uri.c mediatomb-0.12.1-haiku/tombupnp/upnp/src/genlib/net/uri/uri.c +--- mediatomb-0.12.1/tombupnp/upnp/src/genlib/net/uri/uri.c 2010-03-25 14:58:12.046661632 +0000 ++++ mediatomb-0.12.1-haiku/tombupnp/upnp/src/genlib/net/uri/uri.c 2011-02-07 01:39:58.739770368 +0000 +@@ -71,7 +71,6 @@ + #include "inet_pton.h" + #endif + +- + /************************************************************************ + * Function : is_reserved + * +@@ -639,7 +638,7 @@ + int errCode = 0; + + //call gethostbyname_r (reentrant form of gethostbyname) +-#if defined(WIN32) || defined(__APPLE__) || defined(__CYGWIN__) || defined(__OpenBSD__) ++#if defined(WIN32) || defined(__APPLE__) || defined(__CYGWIN__) || defined(__OpenBSD__) || defined(__HAIKU__) + h=gethostbyname(temp_host_name); + #elif defined(SOLARIS) + h = gethostbyname_r( temp_host_name,