ports/print/hplip/files/patch-installer_dcheck.py
Tijl Coosemans 982e968ef6 print/hplip(-plugin): update to 3.22.2
- Convert post-patch to real patches because they are easier to
  maintain.
- Fix a NULL dereference in the scanner backend when D-Bus isn't
  running.
- Depend on sysutils/py-distro to make hp-toolbox (Device Manager) work
  again.
- Upstream switched to Avahi for mDNS support.  Rename the SNMP option
  to NETWORK because it's not just SNMP now.
- Don't install some programs related to uninstalling and upgrading of
  HPLIP and the installation of firmware plugins because they circumvent
  the package system.
- Install icons in share/icons so desktops can choose an appropriate
  resolution.

Portions taken from a patch by Oleg Sidorkin <osidorkin@gmail.com>.

PR:		255586, 257034, 257512
2022-03-11 15:49:48 +01:00

24 lines
994 B
Python

--- installer/dcheck.py.orig 2022-02-23 07:41:04 UTC
+++ installer/dcheck.py
@@ -48,7 +48,11 @@ mod_output = ''
def update_ld_output():
# For library checks
global ld_output
- status, ld_output = utils.run('%s -p' % os.path.join(utils.which('ldconfig'), 'ldconfig'), log_output=False)
+ if sys.platform.startswith('freebsd'):
+ ld_cmd = '%s -r'
+ else: # linux
+ ld_cmd = '%s -p'
+ status, ld_output = utils.run(ld_cmd % os.path.join(utils.which('ldconfig'), 'ldconfig'), log_output=False)
if status != 0:
log.debug("ldconfig failed.")
@@ -380,6 +384,8 @@ def get_libpthread_version():
except ImportError:
return '-'
else:
+ if sys.platform.startswith('freebsd'):
+ return '-'
# LIBC = ctypes.CDLL(ctypes.util.find_library('c'), use_errno=True)
LIBC = ctypes.CDLL(ctypes.util.find_library('c'),ctypes.DEFAULT_MODE,None, True)
LIBC.gnu_get_libc_version.restype = ctypes.c_char_p