View | Details | Raw Unified | Return to bug 237867 | Differences between
and this patch

Collapse All | Expand All

(-)audio/libopenshot-audio/Makefile (-1 / +1 lines)
Lines 15-21 Link Here
15
RUN_DEPENDS=	${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:audio/alsa-plugins
15
RUN_DEPENDS=	${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:audio/alsa-plugins
16
LIB_DEPENDS=	libasound.so:audio/alsa-lib
16
LIB_DEPENDS=	libasound.so:audio/alsa-lib
17
17
18
USES=		cmake dos2unix
18
USES=		cmake compiler:c++11-lang dos2unix
19
USE_LDCONFIG=	yes
19
USE_LDCONFIG=	yes
20
USE_GITHUB=	yes
20
USE_GITHUB=	yes
21
GH_ACCOUNT=	OpenShot
21
GH_ACCOUNT=	OpenShot
(-)audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_files_juce__File.cpp (+20 lines)
Line 0 Link Here
1
--- JuceLibraryCode/modules/juce_core/files/juce_File.cpp.orig	2019-04-17 16:56:20 UTC
2
+++ JuceLibraryCode/modules/juce_core/files/juce_File.cpp
3
@@ -211,7 +211,7 @@ String File::addTrailingSeparator (const String& path)
4
 }
5
 
6
 //==============================================================================
7
-#if JUCE_LINUX
8
+#if JUCE_BSD || JUCE_LINUX
9
  #define NAMES_ARE_CASE_SENSITIVE 1
10
 #endif
11
 
12
@@ -953,7 +953,7 @@ bool File::createSymbolicLink (const File& linkFileToC
13
             linkFileToCreate.deleteFile();
14
     }
15
 
16
-   #if JUCE_MAC || JUCE_LINUX
17
+   #if JUCE_BSD || JUCE_MAC || JUCE_LINUX
18
     // one common reason for getting an error here is that the file already exists
19
     if (symlink (nativePathOfTarget.toRawUTF8(), linkFileToCreate.getFullPathName().toRawUTF8()) == -1)
20
     {
(-)audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_juce__core.h (+11 lines)
Line 0 Link Here
1
--- JuceLibraryCode/modules/juce_core/juce_core.h.orig	2019-04-17 16:56:20 UTC
2
+++ JuceLibraryCode/modules/juce_core/juce_core.h
3
@@ -137,7 +137,7 @@
4
     If you disable this then https/ssl support will not be available on linux.
5
 */
6
 #ifndef JUCE_USE_CURL
7
- #if JUCE_LINUX
8
+ #if JUCE_BSD || JUCE_LINUX
9
   #define JUCE_USE_CURL 1
10
  #else
11
   #define JUCE_USE_CURL 0
(-)audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_native_juce__BasicNativeHeaders.h (-1 / +2 lines)
Lines 1-9 Link Here
1
--- JuceLibraryCode/modules/juce_core/native/juce_BasicNativeHeaders.h.orig	2019-04-17 16:56:20 UTC
1
--- JuceLibraryCode/modules/juce_core/native/juce_BasicNativeHeaders.h.orig	2019-04-17 16:56:20 UTC
2
+++ JuceLibraryCode/modules/juce_core/native/juce_BasicNativeHeaders.h
2
+++ JuceLibraryCode/modules/juce_core/native/juce_BasicNativeHeaders.h
3
@@ -261,6 +261,7 @@
3
@@ -261,6 +261,8 @@
4
  #include <sys/types.h>
4
  #include <sys/types.h>
5
  #include <sys/wait.h>
5
  #include <sys/wait.h>
6
  #include <utime.h>
6
  #include <utime.h>
7
+ #include <pthread_np.h>
7
+ #include <net/if_dl.h>
8
+ #include <net/if_dl.h>
8
 
9
 
9
 //==============================================================================
10
 //==============================================================================
(-)audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_native_juce__linux__Files.cpp (-1 / +40 lines)
Lines 1-6 Link Here
1
--- JuceLibraryCode/modules/juce_core/native/juce_linux_Files.cpp.orig	2019-04-17 16:56:20 UTC
1
--- JuceLibraryCode/modules/juce_core/native/juce_linux_Files.cpp.orig	2019-04-17 16:56:20 UTC
2
+++ JuceLibraryCode/modules/juce_core/native/juce_linux_Files.cpp
2
+++ JuceLibraryCode/modules/juce_core/native/juce_linux_Files.cpp
3
@@ -216,7 +216,7 @@ bool Process::openDocument (const String& fileName, co
3
@@ -35,8 +35,16 @@ bool File::isOnCDRomDrive() const
4
 {
5
     struct statfs buf;
6
 
7
+#if JUCE_BSD
8
+	if (statfs(getFullPathName().toUTF8(), &buf) == 0) {
9
+		String s(buf.f_fstypename);
10
+		return s.compare("cd9660") == 0 || s.compare("udf") == 0;
11
+	}
12
+	return false;
13
+#else
14
     return statfs (getFullPathName().toUTF8(), &buf) == 0
15
              && buf.f_type == (short) U_ISOFS_SUPER_MAGIC;
16
+#endif
17
 }
18
 
19
 bool File::isOnHardDisk() const
20
@@ -45,6 +53,13 @@ bool File::isOnHardDisk() const
21
 
22
     if (statfs (getFullPathName().toUTF8(), &buf) == 0)
23
     {
24
+#if JUCE_BSD
25
+		String s(buf.f_fstypename);
26
+		if (s.compare("cd9660") == 0 || s.compare("udf") == 0 ||
27
+			s.compare("nfs") == 0 || s.compare("smbfs") == 0) {
28
+			return false;
29
+		}
30
+#else
31
         switch (buf.f_type)
32
         {
33
             case U_ISOFS_SUPER_MAGIC:   // CD-ROM
34
@@ -55,6 +70,7 @@ bool File::isOnHardDisk() const
35
 
36
             default: break;
37
         }
38
+#endif
39
     }
40
 
41
     // Assume so if this fails for some reason
42
@@ -216,7 +232,7 @@ bool Process::openDocument (const String& fileName, co
4
         setsid();
43
         setsid();
5
 
44
 
6
         // Child process
45
         // Child process
(-)audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_native_juce__posix__SharedCode.h (+42 lines)
Line 0 Link Here
1
--- JuceLibraryCode/modules/juce_core/native/juce_posix_SharedCode.h.orig	2019-04-17 16:56:20 UTC
2
+++ JuceLibraryCode/modules/juce_core/native/juce_posix_SharedCode.h
3
@@ -148,7 +148,7 @@ void JUCE_CALLTYPE Process::terminate()
4
 }
5
 
6
 
7
-#if JUCE_MAC || JUCE_LINUX
8
+#if JUCE_BSD || JUCE_MAC || JUCE_LINUX
9
 bool Process::setMaxNumberOfFileHandles (int newMaxNumber) noexcept
10
 {
11
     rlimit lim;
12
@@ -987,6 +987,8 @@ void JUCE_CALLTYPE Thread::setCurrentThreadName (const
13
     {
14
         [[NSThread currentThread] setName: juceStringToNS (name)];
15
     }
16
+   #elif JUCE_BSD
17
+	pthread_set_name_np(pthread_self(), name.toRawUTF8());
18
    #elif JUCE_LINUX || JUCE_ANDROID
19
     #if ((JUCE_LINUX && (__GLIBC__ * 1000 + __GLIBC_MINOR__) >= 2012) \
20
           || JUCE_ANDROID && __ANDROID_API__ >= 9)
21
@@ -1040,14 +1042,20 @@ void JUCE_CALLTYPE Thread::yield()
22
 void JUCE_CALLTYPE Thread::setCurrentThreadAffinityMask (uint32 affinityMask)
23
 {
24
    #if SUPPORT_AFFINITIES
25
+     #if JUCE_BSD
26
+    cpuset_t affinity;
27
+     #else
28
     cpu_set_t affinity;
29
+     #endif
30
     CPU_ZERO (&affinity);
31
 
32
     for (int i = 0; i < 32; ++i)
33
         if ((affinityMask & (1 << i)) != 0)
34
             CPU_SET (i, &affinity);
35
 
36
-   #if (! JUCE_ANDROID) && ((! JUCE_LINUX) || ((__GLIBC__ * 1000 + __GLIBC_MINOR__) >= 2004))
37
+   #if JUCE_BSD
38
+    pthread_setaffinity_np (pthread_self(), sizeof (cpuset_t), &affinity);
39
+   #elif (! JUCE_ANDROID) && ((! JUCE_LINUX) || ((__GLIBC__ * 1000 + __GLIBC_MINOR__) >= 2004))
40
     pthread_setaffinity_np (pthread_self(), sizeof (cpu_set_t), &affinity);
41
    #elif JUCE_ANDROID
42
     sched_setaffinity (gettid(), sizeof (cpu_set_t), &affinity);
(-)audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_system_juce__PlatformDefs.h (+11 lines)
Line 0 Link Here
1
--- JuceLibraryCode/modules/juce_core/system/juce_PlatformDefs.h.orig	2019-04-17 16:56:20 UTC
2
+++ JuceLibraryCode/modules/juce_core/system/juce_PlatformDefs.h
3
@@ -57,7 +57,7 @@ namespace juce
4
 #endif
5
 
6
 //==============================================================================
7
-#if JUCE_IOS || JUCE_LINUX
8
+#if JUCE_BSD || JUCE_IOS || JUCE_LINUX
9
   /** This will try to break into the debugger if the app is currently being debugged.
10
       If called by an app that's not being debugged, the behaviour isn't defined - it may
11
       crash or not, depending on the platform.
(-)audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_system_juce__StandardHeader.h (+11 lines)
Line 0 Link Here
1
--- JuceLibraryCode/modules/juce_core/system/juce_StandardHeader.h.orig	2019-04-17 16:56:20 UTC
2
+++ JuceLibraryCode/modules/juce_core/system/juce_StandardHeader.h
3
@@ -72,7 +72,7 @@
4
  #include <xlocale.h>
5
 #endif
6
 
7
-#if JUCE_LINUX
8
+#if JUCE_BSD || JUCE_LINUX
9
  #include <cstring>
10
  #include <signal.h>
11
 
(-)audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_text_juce__CharPointer__ASCII.h (+11 lines)
Line 0 Link Here
1
--- JuceLibraryCode/modules/juce_core/text/juce_CharPointer_ASCII.h.orig	2019-04-17 16:56:20 UTC
2
+++ JuceLibraryCode/modules/juce_core/text/juce_CharPointer_ASCII.h
3
@@ -335,7 +335,7 @@ class CharPointer_ASCII  final (public)
4
     /** Parses this string as a 64-bit integer. */
5
     int64 getIntValue64() const noexcept
6
     {
7
-       #if JUCE_LINUX || JUCE_ANDROID || JUCE_MINGW
8
+       #if JUCE_BSD || JUCE_LINUX || JUCE_ANDROID || JUCE_MINGW
9
         return atoll (data);
10
        #elif JUCE_WINDOWS
11
         return _atoi64 (data);
(-)audio/libopenshot-audio/files/patch-JuceLibraryCode_modules_juce__core_threads_juce__Process.h (+11 lines)
Line 0 Link Here
1
--- JuceLibraryCode/modules/juce_core/threads/juce_Process.h.orig	2019-04-17 16:56:20 UTC
2
+++ JuceLibraryCode/modules/juce_core/threads/juce_Process.h
3
@@ -139,7 +139,7 @@ class JUCE_API  Process (public)
4
     static void setDockIconVisible (bool isVisible);
5
    #endif
6
 
7
-   #if JUCE_MAC || JUCE_LINUX || DOXYGEN
8
+   #if JUCE_BSD || JUCE_MAC || JUCE_LINUX || DOXYGEN
9
     //==============================================================================
10
     /** UNIX ONLY - Attempts to use setrlimit to change the maximum number of file
11
         handles that the app can open. Pass 0 or less as the parameter to mean

Return to bug 237867