Mercurial > hgrepos > Python2 > PyMuPDF
comparison 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 | 1d09e1dec1d9 |
| children | dd663470c57c |
comparison
equal
deleted
inserted
replaced
| 13:d6cbc8049ab0 | 14:59f1bd90b2a0 |
|---|---|
| 2315 return platform.system() == 'Linux' | 2315 return platform.system() == 'Linux' |
| 2316 | 2316 |
| 2317 def openbsd(): | 2317 def openbsd(): |
| 2318 return platform.system() == 'OpenBSD' | 2318 return platform.system() == 'OpenBSD' |
| 2319 | 2319 |
| 2320 def freebsd(): | |
| 2321 return platform.system() == 'FreeBSD' | |
| 2322 | |
| 2320 | 2323 |
| 2321 def show_system(): | 2324 def show_system(): |
| 2322 ''' | 2325 ''' |
| 2323 Show useful information about the system plus argv and environ. | 2326 Show useful information about the system plus argv and environ. |
| 2324 ''' | 2327 ''' |
| 2861 If we are on Linux and `path` is softlink and points to a shared library | 2864 If we are on Linux and `path` is softlink and points to a shared library |
| 2862 for which `objdump -p` contains 'SONAME', return the pointee. Otherwise | 2865 for which `objdump -p` contains 'SONAME', return the pointee. Otherwise |
| 2863 return `path`. Useful if Linux shared libraries have been created with | 2866 return `path`. Useful if Linux shared libraries have been created with |
| 2864 `-Wl,-soname,...`, where we need to embed the versioned library. | 2867 `-Wl,-soname,...`, where we need to embed the versioned library. |
| 2865 ''' | 2868 ''' |
| 2866 if linux() and os.path.islink(path): | 2869 if (linux() or freebsd()) and os.path.islink(path): |
| 2867 path2 = os.path.realpath(path) | 2870 path2 = os.path.realpath(path) |
| 2868 if subprocess.run(f'objdump -p {path2}|grep SONAME', shell=1, check=0).returncode == 0: | 2871 if subprocess.run(f'objdump -p {path2}|grep SONAME', shell=1, check=0).returncode == 0: |
| 2869 return path2 | 2872 return path2 |
| 2870 elif openbsd(): | 2873 elif openbsd(): |
| 2871 # Return newest .so with version suffix. | 2874 # Return newest .so with version suffix. |
