aboutsummaryrefslogtreecommitdiff
path: root/multimedia/plex-home-theater/fribidi.patch
blob: 3b135bdfc3ca3772ef8638832fe89b231f37e071 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
--- a/plex/CMakeModules/FindFriBiDi.cmake
+++ b/plex/CMakeModules/FindFriBiDi.cmake
@@ -10,43 +10,9 @@
 #  FRIBIDI_LIBRARY, where to find the FriBiDi library.
 
 include(CheckSymbolExists)
+include(FindPkgConfig)
+pkg_check_modules(FRIBIDI fribidi)
 
-SET(FRIBIDI_FOUND "NO")
-
-# Set variable in temp var, otherwise FIND_PATH might fail
-# unset isn't present in the required version of cmake.
-FIND_PATH(xFRIBIDI_INCLUDE_DIR fribidi.h
-  PATHS /usr/local/include
-  	/usr/include
-  PATH_SUFFIXES fribidi
-  )
-set(FRIBIDI_INCLUDE_DIR ${xFRIBIDI_INCLUDE_DIR})
-
-SET(FRIBIDI_NAMES ${FRIBIDI_NAMES} fribidi libfribidi)
-FIND_LIBRARY(FRIBIDI_LIBRARY
-  NAMES ${FRIBIDI_NAMES}
-  PATHS /usr/lib /usr/local/lib
-  )
-
-IF (FRIBIDI_LIBRARY AND FRIBIDI_INCLUDE_DIR)
-  SET(CMAKE_REQUIRED_INCLUDES ${FRIBIDI_INCLUDE_DIR})
-  SET(CMAKE_REQUIRED_LIBRARIES ${FRIBIDI_LIBRARY})
-  CHECK_SYMBOL_EXISTS(fribidi_utf8_to_unicode fribidi.h FOUND_fribidi_utf8_to_unicode)
-  CHECK_SYMBOL_EXISTS(fribidi_charset_to_unicode fribidi.h FOUND_fribidi_charset_to_unicode)
-  if(FOUND_fribidi_charset_to_unicode)
-    SET(FRIBIDI_LIBRARIES ${FRIBIDI_LIBRARY})
-    SET(FRIBIDI_FOUND "YES")
-  elseif(FOUND_fribidi_utf8_to_unicode)
-    SET(FRIBIDI_LIBRARIES ${FRIBIDI_LIBRARY})
-    SET(FRIBIDI_FOUND "YES")
-    add_definitions(-DOLD_FRIBIDI)
-    MESSAGE(STATUS "Legacy FriBiDi: ${FRIBIDI_LIBRARY}")
-  else()
-    SET(FRIBIDI_LIBRARIES "NOTFOUND")
-    SET(FRIBIDI_INCLUDE_DIR "NOTFOUND")
-    SET(FRIBIDI_FOUND "NO")
-  endif()
-ENDIF (FRIBIDI_LIBRARY AND FRIBIDI_INCLUDE_DIR)
 
 IF (FRIBIDI_FOUND)