svn commit: r502935 - in head/audio/libopenshot-audio: . files
Piotr Kubaj
pkubaj at FreeBSD.org
Wed May 29 07:42:30 UTC 2019
Author: pkubaj
Date: Wed May 29 07:42:27 2019
New Revision: 502935
URL: https://svnweb.freebsd.org/changeset/ports/502935
Log:
audio/libopenshot-audio: fix build with GCC-based architectures
error:
CMake Error in CMakeLists.txt:
Target "openshot-audio" requires the language dialect "CXX11" , but CMake
does not know the compile flags to use to enable it.
PR: 237867
Submitted by: tatsuki_makino at hotmail.com (maintainer)
Approved by: linimon (mentor)
Added:
head/audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_files_juce__File.cpp (contents, props changed)
head/audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_juce__core.h (contents, props changed)
head/audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_native_juce__posix__SharedCode.h (contents, props changed)
head/audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_system_juce__PlatformDefs.h (contents, props changed)
head/audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_system_juce__StandardHeader.h (contents, props changed)
head/audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_text_juce__CharPointer__ASCII.h (contents, props changed)
head/audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_threads_juce__Process.h (contents, props changed)
Modified:
head/audio/libopenshot-audio/Makefile
head/audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_native_juce__BasicNativeHeaders.h
head/audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_native_juce__linux__Files.cpp
Modified: head/audio/libopenshot-audio/Makefile
==============================================================================
--- head/audio/libopenshot-audio/Makefile Wed May 29 07:35:44 2019 (r502934)
+++ head/audio/libopenshot-audio/Makefile Wed May 29 07:42:27 2019 (r502935)
@@ -15,7 +15,7 @@ LICENSE_FILE= ${WRKSRC}/COPYING
RUN_DEPENDS= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:audio/alsa-plugins
LIB_DEPENDS= libasound.so:audio/alsa-lib
-USES= cmake dos2unix
+USES= cmake compiler:c++11-lang dos2unix
USE_LDCONFIG= yes
USE_GITHUB= yes
GH_ACCOUNT= OpenShot
Added: head/audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_files_juce__File.cpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_files_juce__File.cpp Wed May 29 07:42:27 2019 (r502935)
@@ -0,0 +1,20 @@
+--- JuceLibraryCode/modules/juce_core/files/juce_File.cpp.orig 2019-04-17 16:56:20 UTC
++++ JuceLibraryCode/modules/juce_core/files/juce_File.cpp
+@@ -211,7 +211,7 @@ String File::addTrailingSeparator (const String& path)
+ }
+
+ //==============================================================================
+-#if JUCE_LINUX
++#if JUCE_BSD || JUCE_LINUX
+ #define NAMES_ARE_CASE_SENSITIVE 1
+ #endif
+
+@@ -953,7 +953,7 @@ bool File::createSymbolicLink (const File& linkFileToC
+ linkFileToCreate.deleteFile();
+ }
+
+- #if JUCE_MAC || JUCE_LINUX
++ #if JUCE_BSD || JUCE_MAC || JUCE_LINUX
+ // one common reason for getting an error here is that the file already exists
+ if (symlink (nativePathOfTarget.toRawUTF8(), linkFileToCreate.getFullPathName().toRawUTF8()) == -1)
+ {
Added: head/audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_juce__core.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_juce__core.h Wed May 29 07:42:27 2019 (r502935)
@@ -0,0 +1,11 @@
+--- JuceLibraryCode/modules/juce_core/juce_core.h.orig 2019-04-17 16:56:20 UTC
++++ JuceLibraryCode/modules/juce_core/juce_core.h
+@@ -137,7 +137,7 @@
+ If you disable this then https/ssl support will not be available on linux.
+ */
+ #ifndef JUCE_USE_CURL
+- #if JUCE_LINUX
++ #if JUCE_BSD || JUCE_LINUX
+ #define JUCE_USE_CURL 1
+ #else
+ #define JUCE_USE_CURL 0
Modified: head/audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_native_juce__BasicNativeHeaders.h
==============================================================================
--- head/audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_native_juce__BasicNativeHeaders.h Wed May 29 07:35:44 2019 (r502934)
+++ head/audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_native_juce__BasicNativeHeaders.h Wed May 29 07:42:27 2019 (r502935)
@@ -1,9 +1,10 @@
--- JuceLibraryCode/modules/juce_core/native/juce_BasicNativeHeaders.h.orig 2019-04-17 16:56:20 UTC
+++ JuceLibraryCode/modules/juce_core/native/juce_BasicNativeHeaders.h
-@@ -261,6 +261,7 @@
+@@ -261,6 +261,8 @@
#include <sys/types.h>
#include <sys/wait.h>
#include <utime.h>
++ #include <pthread_np.h>
+ #include <net/if_dl.h>
//==============================================================================
Modified: head/audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_native_juce__linux__Files.cpp
==============================================================================
--- head/audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_native_juce__linux__Files.cpp Wed May 29 07:35:44 2019 (r502934)
+++ head/audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_native_juce__linux__Files.cpp Wed May 29 07:42:27 2019 (r502935)
@@ -1,6 +1,45 @@
--- JuceLibraryCode/modules/juce_core/native/juce_linux_Files.cpp.orig 2019-04-17 16:56:20 UTC
+++ JuceLibraryCode/modules/juce_core/native/juce_linux_Files.cpp
-@@ -216,7 +216,7 @@ bool Process::openDocument (const String& fileName, co
+@@ -35,8 +35,16 @@ bool File::isOnCDRomDrive() const
+ {
+ struct statfs buf;
+
++#if JUCE_BSD
++ if (statfs(getFullPathName().toUTF8(), &buf) == 0) {
++ String s(buf.f_fstypename);
++ return s.compare("cd9660") == 0 || s.compare("udf") == 0;
++ }
++ return false;
++#else
+ return statfs (getFullPathName().toUTF8(), &buf) == 0
+ && buf.f_type == (short) U_ISOFS_SUPER_MAGIC;
++#endif
+ }
+
+ bool File::isOnHardDisk() const
+@@ -45,6 +53,13 @@ bool File::isOnHardDisk() const
+
+ if (statfs (getFullPathName().toUTF8(), &buf) == 0)
+ {
++#if JUCE_BSD
++ String s(buf.f_fstypename);
++ if (s.compare("cd9660") == 0 || s.compare("udf") == 0 ||
++ s.compare("nfs") == 0 || s.compare("smbfs") == 0) {
++ return false;
++ }
++#else
+ switch (buf.f_type)
+ {
+ case U_ISOFS_SUPER_MAGIC: // CD-ROM
+@@ -55,6 +70,7 @@ bool File::isOnHardDisk() const
+
+ default: break;
+ }
++#endif
+ }
+
+ // Assume so if this fails for some reason
+@@ -216,7 +232,7 @@ bool Process::openDocument (const String& fileName, co
setsid();
// Child process
Added: head/audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_native_juce__posix__SharedCode.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_native_juce__posix__SharedCode.h Wed May 29 07:42:27 2019 (r502935)
@@ -0,0 +1,42 @@
+--- JuceLibraryCode/modules/juce_core/native/juce_posix_SharedCode.h.orig 2019-04-17 16:56:20 UTC
++++ JuceLibraryCode/modules/juce_core/native/juce_posix_SharedCode.h
+@@ -148,7 +148,7 @@ void JUCE_CALLTYPE Process::terminate()
+ }
+
+
+-#if JUCE_MAC || JUCE_LINUX
++#if JUCE_BSD || JUCE_MAC || JUCE_LINUX
+ bool Process::setMaxNumberOfFileHandles (int newMaxNumber) noexcept
+ {
+ rlimit lim;
+@@ -987,6 +987,8 @@ void JUCE_CALLTYPE Thread::setCurrentThreadName (const
+ {
+ [[NSThread currentThread] setName: juceStringToNS (name)];
+ }
++ #elif JUCE_BSD
++ pthread_set_name_np(pthread_self(), name.toRawUTF8());
+ #elif JUCE_LINUX || JUCE_ANDROID
+ #if ((JUCE_LINUX && (__GLIBC__ * 1000 + __GLIBC_MINOR__) >= 2012) \
+ || JUCE_ANDROID && __ANDROID_API__ >= 9)
+@@ -1040,14 +1042,20 @@ void JUCE_CALLTYPE Thread::yield()
+ void JUCE_CALLTYPE Thread::setCurrentThreadAffinityMask (uint32 affinityMask)
+ {
+ #if SUPPORT_AFFINITIES
++ #if JUCE_BSD
++ cpuset_t affinity;
++ #else
+ cpu_set_t affinity;
++ #endif
+ CPU_ZERO (&affinity);
+
+ for (int i = 0; i < 32; ++i)
+ if ((affinityMask & (1 << i)) != 0)
+ CPU_SET (i, &affinity);
+
+- #if (! JUCE_ANDROID) && ((! JUCE_LINUX) || ((__GLIBC__ * 1000 + __GLIBC_MINOR__) >= 2004))
++ #if JUCE_BSD
++ pthread_setaffinity_np (pthread_self(), sizeof (cpuset_t), &affinity);
++ #elif (! JUCE_ANDROID) && ((! JUCE_LINUX) || ((__GLIBC__ * 1000 + __GLIBC_MINOR__) >= 2004))
+ pthread_setaffinity_np (pthread_self(), sizeof (cpu_set_t), &affinity);
+ #elif JUCE_ANDROID
+ sched_setaffinity (gettid(), sizeof (cpu_set_t), &affinity);
Added: head/audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_system_juce__PlatformDefs.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_system_juce__PlatformDefs.h Wed May 29 07:42:27 2019 (r502935)
@@ -0,0 +1,11 @@
+--- JuceLibraryCode/modules/juce_core/system/juce_PlatformDefs.h.orig 2019-04-17 16:56:20 UTC
++++ JuceLibraryCode/modules/juce_core/system/juce_PlatformDefs.h
+@@ -57,7 +57,7 @@ namespace juce
+ #endif
+
+ //==============================================================================
+-#if JUCE_IOS || JUCE_LINUX
++#if JUCE_BSD || JUCE_IOS || JUCE_LINUX
+ /** This will try to break into the debugger if the app is currently being debugged.
+ If called by an app that's not being debugged, the behaviour isn't defined - it may
+ crash or not, depending on the platform.
Added: head/audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_system_juce__StandardHeader.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_system_juce__StandardHeader.h Wed May 29 07:42:27 2019 (r502935)
@@ -0,0 +1,11 @@
+--- JuceLibraryCode/modules/juce_core/system/juce_StandardHeader.h.orig 2019-04-17 16:56:20 UTC
++++ JuceLibraryCode/modules/juce_core/system/juce_StandardHeader.h
+@@ -72,7 +72,7 @@
+ #include <xlocale.h>
+ #endif
+
+-#if JUCE_LINUX
++#if JUCE_BSD || JUCE_LINUX
+ #include <cstring>
+ #include <signal.h>
+
Added: head/audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_text_juce__CharPointer__ASCII.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_text_juce__CharPointer__ASCII.h Wed May 29 07:42:27 2019 (r502935)
@@ -0,0 +1,11 @@
+--- JuceLibraryCode/modules/juce_core/text/juce_CharPointer_ASCII.h.orig 2019-04-17 16:56:20 UTC
++++ JuceLibraryCode/modules/juce_core/text/juce_CharPointer_ASCII.h
+@@ -335,7 +335,7 @@ class CharPointer_ASCII final (public)
+ /** Parses this string as a 64-bit integer. */
+ int64 getIntValue64() const noexcept
+ {
+- #if JUCE_LINUX || JUCE_ANDROID || JUCE_MINGW
++ #if JUCE_BSD || JUCE_LINUX || JUCE_ANDROID || JUCE_MINGW
+ return atoll (data);
+ #elif JUCE_WINDOWS
+ return _atoi64 (data);
Added: head/audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_threads_juce__Process.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_threads_juce__Process.h Wed May 29 07:42:27 2019 (r502935)
@@ -0,0 +1,11 @@
+--- JuceLibraryCode/modules/juce_core/threads/juce_Process.h.orig 2019-04-17 16:56:20 UTC
++++ JuceLibraryCode/modules/juce_core/threads/juce_Process.h
+@@ -139,7 +139,7 @@ class JUCE_API Process (public)
+ static void setDockIconVisible (bool isVisible);
+ #endif
+
+- #if JUCE_MAC || JUCE_LINUX || DOXYGEN
++ #if JUCE_BSD || JUCE_MAC || JUCE_LINUX || DOXYGEN
+ //==============================================================================
+ /** UNIX ONLY - Attempts to use setrlimit to change the maximum number of file
+ handles that the app can open. Pass 0 or less as the parameter to mean
More information about the svn-ports-all
mailing list