yate: fix build with musl
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
parent
04527e08b8
commit
5eebac5572
3 changed files with 52 additions and 3 deletions
|
@ -7,13 +7,12 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
include $(INCLUDE_DIR)/uclibc++.mk
|
|
||||||
|
|
||||||
RELEASEVER:=5.4.2
|
RELEASEVER:=5.4.2
|
||||||
|
|
||||||
PKG_NAME:=yate
|
PKG_NAME:=yate
|
||||||
PKG_VERSION:=$(RELEASEVER)-1
|
PKG_VERSION:=$(RELEASEVER)-1
|
||||||
PKG_RELEASE:=4
|
PKG_RELEASE:=5
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=http://yate.null.ro/tarballs/yate5/
|
PKG_SOURCE_URL:=http://yate.null.ro/tarballs/yate5/
|
||||||
|
@ -24,8 +23,11 @@ PKG_LICENSE:=GPL-2.0
|
||||||
PKG_LICENSE_FILES:=COPYING
|
PKG_LICENSE_FILES:=COPYING
|
||||||
PKG_MAINTAINER:=Jiri Slachta <slachta@cesnet.cz>
|
PKG_MAINTAINER:=Jiri Slachta <slachta@cesnet.cz>
|
||||||
|
|
||||||
|
PKG_FIXUP:=autoreconf
|
||||||
|
|
||||||
PKG_INSTALL:=1
|
PKG_INSTALL:=1
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/uclibc++.mk
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
define Package/$(PKG_NAME)/Default
|
define Package/$(PKG_NAME)/Default
|
||||||
|
@ -78,7 +80,13 @@ define Package/$(PKG_NAME)-collection-basic
|
||||||
TITLE := Basic Yate Server
|
TITLE := Basic Yate Server
|
||||||
endef
|
endef
|
||||||
|
|
||||||
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include $(if $(CONFIG_BIG_ENDIAN),-DBIGENDIAN,)
|
ifneq ($(CONFIG_USE_MUSL),)
|
||||||
|
LIBNSL:=
|
||||||
|
else
|
||||||
|
LIBNSL:=-lnsl
|
||||||
|
endif
|
||||||
|
|
||||||
|
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include $(if $(CONFIG_BIG_ENDIAN),-DBIGENDIAN,) $(LIBNSL)
|
||||||
|
|
||||||
CONFIGURE_ARGS+= \
|
CONFIGURE_ARGS+= \
|
||||||
--enable-strings \
|
--enable-strings \
|
||||||
|
|
28
net/yate/patches/100-non-gnu-mutex-type.patch
Normal file
28
net/yate/patches/100-non-gnu-mutex-type.patch
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
Index: yate/engine/Mutex.cpp
|
||||||
|
===================================================================
|
||||||
|
--- yate.orig/engine/Mutex.cpp
|
||||||
|
+++ yate/engine/Mutex.cpp
|
||||||
|
@@ -30,6 +30,10 @@ typedef HANDLE HSEMAPHORE;
|
||||||
|
#include <semaphore.h>
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
|
+#ifndef PTHREAD_MUTEX_RECURSIVE_NP
|
||||||
|
+#define PTHREAD_MUTEX_RECURSIVE_NP PTHREAD_MUTEX_RECURSIVE
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#ifdef MUTEX_HACK
|
||||||
|
extern "C" {
|
||||||
|
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__)
|
||||||
|
Index: yate/configure.ac
|
||||||
|
===================================================================
|
||||||
|
--- yate.orig/configure.ac
|
||||||
|
+++ yate/configure.ac
|
||||||
|
@@ -257,7 +257,7 @@ AC_TRY_COMPILE([
|
||||||
|
#include <pthread.h>
|
||||||
|
],[
|
||||||
|
pthread_mutexattr_t attr;
|
||||||
|
-pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_RECURSIVE_NP);
|
||||||
|
+pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_RECURSIVE);
|
||||||
|
],
|
||||||
|
have_mutex_settype="yes",
|
||||||
|
have_mutex_settype="no"
|
13
net/yate/patches/110-no-libnsl.patch
Normal file
13
net/yate/patches/110-no-libnsl.patch
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
Index: yate/configure.ac
|
||||||
|
===================================================================
|
||||||
|
--- yate.orig/configure.ac
|
||||||
|
+++ yate/configure.ac
|
||||||
|
@@ -689,7 +689,7 @@ if [[ "x$local_lib" != "xlib" -a ! -d "$
|
||||||
|
fi
|
||||||
|
if [[ -f "$ac_cv_use_mysql/include/mysql/mysql.h" -a -d "$ac_cv_use_mysql/$local_lib/mysql" ]]; then
|
||||||
|
MYSQL_INC="-I$ac_cv_use_mysql/include/mysql"
|
||||||
|
-MYSQL_LIB="-L$ac_cv_use_mysql/$local_lib/mysql -lmysqlclient_r -lpthread -lz -lcrypt -lnsl -lm"
|
||||||
|
+MYSQL_LIB="-L$ac_cv_use_mysql/$local_lib/mysql -lmysqlclient_r -lpthread -lz -lcrypt -lm"
|
||||||
|
MYSQL_VER=`sed -n 's/^.*MYSQL_SERVER_VERSION[[^"]]*"\([[^"]]*\).*$/\1/p' "$ac_cv_use_mysql/include/mysql/mysql_version.h"`
|
||||||
|
HAVE_MYSQL=yes
|
||||||
|
fi
|
Loading…
Reference in a new issue