summarylogtreecommitdiffstats
path: root/system-wide-libraries.patch
blob: f8c9e52d0dceed5981b9e38f8363c20d5173215f (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
diff --unified --recursive --text a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt	2022-11-09 13:37:21.000000000 +0100
+++ b/CMakeLists.txt	2026-06-08 16:16:59.083463389 +0200
@@ -49,8 +49,6 @@
 # The library is pre-built and located in src/simplification/
 find_library(RDP_LIBRARY
   NAMES rdp librdp
-  PATHS ${SIMPLIFICATION_SRC_DIR}
-  NO_DEFAULT_PATH
   REQUIRED
 )
 message(STATUS "Found RDP library: ${RDP_LIBRARY}")
@@ -72,21 +70,3 @@
 
 # Install the extension module
 install(TARGETS cutil DESTINATION ${SKBUILD_PROJECT_NAME})
-
-# Install the shared library
-if(APPLE)
-  set(RDP_LIB_NAME "librdp.dylib")
-elseif(UNIX)
-  set(RDP_LIB_NAME "librdp.so")
-elseif(WIN32)
-  set(RDP_LIB_NAME "rdp.dll")
-else()
-  message(FATAL_ERROR "Unsupported platform: cannot determine RDP library name")
-endif()
-
-install(FILES ${SIMPLIFICATION_SRC_DIR}/${RDP_LIB_NAME}
-        DESTINATION ${SKBUILD_PROJECT_NAME})
-
-# Install header file
-install(FILES ${SIMPLIFICATION_SRC_DIR}/header.h
-        DESTINATION ${SKBUILD_PROJECT_NAME})
Only in b: CMakeLists.txt.orig
diff --unified --recursive --text a/src/simplification/rdp_p.pxd b/src/simplification/rdp_p.pxd
--- a/src/simplification/rdp_p.pxd	2022-11-09 13:37:21.000000000 +0100
+++ b/src/simplification/rdp_p.pxd	2026-06-08 16:16:59.083602092 +0200
@@ -1,9 +1,9 @@
-cdef extern from "header.h":
+cdef extern from "/usr/include/librdp/header.h":
     struct ExternalArray:
         void* data
         size_t len
 
-cdef extern from "header.h":
+cdef extern from "/usr/include/librdp/header.h":
     struct InternalArray:
         void* data
         size_t len
diff --unified --recursive --text a/src/simplification/util.py b/src/simplification/util.py
--- a/src/simplification/util.py	2022-11-09 13:37:21.000000000 +0100
+++ b/src/simplification/util.py	2026-06-08 16:16:59.083708884 +0200
@@ -9,7 +9,6 @@
 
 import os
 from ctypes import POINTER, Structure, c_double, c_size_t, c_void_p, cast, cdll
-from subprocess import getoutput
 from sys import platform
 
 numpy_installed = True
@@ -25,12 +24,7 @@
 extension = {"darwin": ".dylib", "win32": ".dll"}.get(platform, ".so")
 fpath = {"darwin": "", "win32": ""}.get(platform, os.path.join(file_path, ".libs"))
 
-try:
-    lib = cdll.LoadLibrary(os.path.join(file_path, prefix + "rdp" + extension))
-except OSError:
-    # the Rust lib's been grafted by manylinux1
-    fname = getoutput("ls %s" % fpath).split()[0]
-    lib = cdll.LoadLibrary(os.path.join(file_path, ".libs", fname))
+lib = cdll.LoadLibrary("/usr/lib/librdp.so")
 
 
 class _FFIArray(Structure):