diff mupdf-source/scripts/pipcl.py @ 14:59f1bd90b2a0

Use "soname" on FreeBSD also. FreeBSD and Linux are now handled identical with regard to soname and library naming and packaging.
author Franz Glasner <fzglas.hg@dom66.de>
date Wed, 17 Sep 2025 20:35:45 +0200
parents b50eed0cc0ef
children dd663470c57c
line wrap: on
line diff
--- a/mupdf-source/scripts/pipcl.py	Wed Sep 17 20:31:46 2025 +0200
+++ b/mupdf-source/scripts/pipcl.py	Wed Sep 17 20:35:45 2025 +0200
@@ -1860,6 +1860,10 @@
 def openbsd():
     return platform.system() == 'OpenBSD'
 
+def freebsd():
+    return platform.system() == 'FreeBSD'
+
+
 class PythonFlags:
     '''
     Compile/link flags for the current python, for example the include path
@@ -2309,7 +2313,7 @@
     return `path`. Useful if Linux shared libraries have been created with
     `-Wl,-soname,...`, where we need to embed the versioned library.
     '''
-    if linux() and os.path.islink(path):
+    if (linux() or freebsd()) and os.path.islink(path):
         path2 = os.path.realpath(path)
         if subprocess.run(f'objdump -p {path2}|grep SONAME', shell=1, check=0).returncode == 0:
             return path2