Blob Blame Raw
From ee5c28ea8cd17cbc04d5a9b79d5ce1326df93466 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Fri, 30 Mar 2018 03:15:51 -0400
Subject: [PATCH] Force using system qhull.

Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
 setupext.py | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/setupext.py b/setupext.py
index 3e8b382cc..66a278b0c 100644
--- a/setupext.py
+++ b/setupext.py
@@ -838,14 +838,12 @@ class Png(SetupPackage):
 class Qhull(SetupPackage):
     name = "qhull"
 
+    def check(self):
+        self.__class__.found_external = True
+        return ' Using system copy.'
+
     def add_flags(self, ext):
-        # Qhull doesn't distribute pkg-config info, so we have no way of
-        # knowing whether a system install is recent enough.  Thus, always use
-        # the vendored version.
-        ext.include_dirs.insert(0, 'extern')
-        ext.sources.extend(sorted(glob.glob('extern/libqhull/*.c')))
-        if sysconfig.get_config_var('LIBM') == '-lm':
-            ext.libraries.extend('m')
+        ext.libraries.append('qhull')
 
 
 class TTConv(SetupPackage):
-- 
2.21.0