mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-05 14:38:51 +02:00
rubberband: add recipe for version 1.8.1.
* disabled mlock() and co.
This commit is contained in:
57
media-libs/rubberband/patches/rubberband-1.8.1.patchset
Normal file
57
media-libs/rubberband/patches/rubberband-1.8.1.patchset
Normal file
@@ -0,0 +1,57 @@
|
||||
From 441f6f21603ba14785ebd49bb51b446363592fd3 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Mon, 1 Aug 2016 23:49:39 +0000
|
||||
Subject: Haiku patch
|
||||
|
||||
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index 413d075..d92019f 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -2,7 +2,7 @@
|
||||
CXX := @CXX@
|
||||
CXXFLAGS := -DHAVE_LIBSAMPLERATE -DHAVE_FFTW3 -DFFTW_DOUBLE_ONLY -DNO_THREAD_CHECKS -DUSE_PTHREADS -DNO_TIMING -DNDEBUG @CXXFLAGS@ @SRC_CFLAGS@ @SNDFILE_CFLAGS@ @FFTW_CFLAGS@ @Vamp_CFLAGS@ -Irubberband -I. -Isrc $(OPTFLAGS)
|
||||
CFLAGS := @CFLAGS@ $(OPTFLAGS)
|
||||
-LDFLAGS := @LDFLAGS@ -lpthread $(LDFLAGS)
|
||||
+LDFLAGS := @LDFLAGS@ @LIBPTHREAD@ $(LDFLAGS)
|
||||
|
||||
LIBRARY_LIBS := @SRC_LIBS@ @FFTW_LIBS@
|
||||
PROGRAM_LIBS := @SNDFILE_LIBS@ $(LIBRARY_LIBS)
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 1339294..1dadebd 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -6,6 +6,10 @@ AC_PROG_CXX
|
||||
AC_HEADER_STDC
|
||||
AC_C_BIGENDIAN
|
||||
|
||||
+AC_CHECK_LIB([pthread], [pthread_create], [LIBPTHREAD="-lpthread"],
|
||||
+ [LIBPTHREAD=""])
|
||||
+AC_SUBST(LIBPTHREAD)
|
||||
+
|
||||
PKG_CHECK_MODULES([SRC],[samplerate])
|
||||
AC_SUBST(SRC_CFLAGS)
|
||||
AC_SUBST(SRC_LIBS)
|
||||
diff --git a/src/system/sysutils.h b/src/system/sysutils.h
|
||||
index 371736b..1c66999 100644
|
||||
--- a/src/system/sysutils.h
|
||||
+++ b/src/system/sysutils.h
|
||||
@@ -135,9 +135,15 @@ extern void system_memorybarrier();
|
||||
#include <dlfcn.h>
|
||||
#include <stdio.h>
|
||||
|
||||
+#ifdef __HAIKU__
|
||||
+#define MLOCK(a,b) (0)
|
||||
+#define MUNLOCK(a,b) (0)
|
||||
+#define MUNLOCK_SAMPLEBLOCK(a) do { ; } while(0);
|
||||
+#else
|
||||
#define MLOCK(a,b) ::mlock((char *)(a),(b))
|
||||
#define MUNLOCK(a,b) (::munlock((char *)(a),(b)) ? (::perror("munlock failed"), 0) : 0)
|
||||
#define MUNLOCK_SAMPLEBLOCK(a) do { if (!(a).empty()) { const float &b = *(a).begin(); MUNLOCK(&b, (a).capacity() * sizeof(float)); } } while(0);
|
||||
+#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <libkern/OSAtomic.h>
|
||||
--
|
||||
2.7.0
|
||||
|
||||
Reference in New Issue
Block a user