Initial bep and patch files for mediatomb, note that it only builds with gcc4 so far. This is still untested on

Haiku.
This commit is contained in:
Scott McCreary
2011-02-07 03:43:35 +00:00
parent 0e26db9ce9
commit a10129aa30
2 changed files with 123 additions and 0 deletions

View File

@@ -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"

View File

@@ -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 <string.h>
#include "config_manager.h"
-#ifndef SOLARIS
+#if !defined SOLARIS && !defined __HAIKU__
#include <net/if.h>
#else
#include <fcntl.h>
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 <netinet/in.h>
#include <arpa/inet.h>
- #ifndef SOLARIS
+ #if !defined SOLARIS && !defined __HAIKU__
// #include <linux/if.h>
#include <net/if.h>
#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,