@@ -435,10 +435,6 @@ def _check_for_pkg_config(self, package, include_file, min_version=None,
435435 "pkg-config information for '%s' could not be found." %
436436 package )
437437
438- if min_version == 'PATCH' :
439- raise CheckFailed (
440- "Requires patches that have not been merged upstream." )
441-
442438 if min_version and version != 'unknown' :
443439 if not is_min_version (version , min_version ):
444440 raise CheckFailed (
@@ -799,33 +795,23 @@ def get_install_requires(self):
799795class LibAgg (SetupPackage ):
800796 name = 'libagg'
801797
802- def check (self ):
803- self .__class__ .found_external = True
804- try :
805- return self ._check_for_pkg_config (
806- 'libagg' , 'agg2/agg_basics.h' , min_version = 'PATCH' )
807- except CheckFailed as e :
808- self .__class__ .found_external = False
809- return str (e ) + ' Using local copy.'
810-
811798 def add_flags (self , ext , add_sources = True ):
812- if self .found_external :
813- pkg_config .setup_extension (ext , 'libagg' )
814- else :
815- ext .include_dirs .insert (0 , 'extern/agg24-svn/include' )
816- if add_sources :
817- agg_sources = [
818- 'agg_bezier_arc.cpp' ,
819- 'agg_curves.cpp' ,
820- 'agg_image_filters.cpp' ,
821- 'agg_trans_affine.cpp' ,
822- 'agg_vcgen_contour.cpp' ,
823- 'agg_vcgen_dash.cpp' ,
824- 'agg_vcgen_stroke.cpp' ,
825- 'agg_vpgen_segmentator.cpp'
826- ]
827- ext .sources .extend (
828- os .path .join ('extern' , 'agg24-svn' , 'src' , x ) for x in agg_sources )
799+ # We need a patched Agg not available elsewhere, so always use the
800+ # vendored version.
801+ ext .include_dirs .insert (0 , 'extern/agg24-svn/include' )
802+ if add_sources :
803+ agg_sources = [
804+ 'agg_bezier_arc.cpp' ,
805+ 'agg_curves.cpp' ,
806+ 'agg_image_filters.cpp' ,
807+ 'agg_trans_affine.cpp' ,
808+ 'agg_vcgen_contour.cpp' ,
809+ 'agg_vcgen_dash.cpp' ,
810+ 'agg_vcgen_stroke.cpp' ,
811+ 'agg_vpgen_segmentator.cpp'
812+ ]
813+ ext .sources .extend (os .path .join ('extern' , 'agg24-svn' , 'src' , x )
814+ for x in agg_sources )
829815
830816
831817class FreeType (SetupPackage ):
@@ -1108,25 +1094,14 @@ def get_extension(self):
11081094class Qhull (SetupPackage ):
11091095 name = "qhull"
11101096
1111- def check (self ):
1112- self .__class__ .found_external = True
1113- try :
1114- return self ._check_for_pkg_config (
1115- 'libqhull' , 'libqhull/qhull_a.h' , min_version = '2015.2' )
1116- except CheckFailed as e :
1117- self .__class__ .found_pkgconfig = False
1118- self .__class__ .found_external = False
1119- return str (e ) + ' Using local copy.'
1120-
11211097 def add_flags (self , ext ):
1122- if self .found_external :
1123- pkg_config .setup_extension (ext , 'qhull' ,
1124- default_libraries = ['qhull' ])
1125- else :
1126- ext .include_dirs .insert (0 , 'extern' )
1127- ext .sources .extend (sorted (glob .glob ('extern/libqhull/*.c' )))
1128- if sysconfig .get_config_var ('LIBM' ) == '-lm' :
1129- ext .libraries .extend ('m' )
1098+ # Qhull doesn't distribute pkg-config info, so we have no way of
1099+ # knowing whether a system install is recent enough. Thus, always use
1100+ # the vendored version.
1101+ ext .include_dirs .insert (0 , 'extern' )
1102+ ext .sources .extend (sorted (glob .glob ('extern/libqhull/*.c' )))
1103+ if sysconfig .get_config_var ('LIBM' ) == '-lm' :
1104+ ext .libraries .extend ('m' )
11301105
11311106
11321107class TTConv (SetupPackage ):
0 commit comments