Files

66 lines
2.8 KiB
Diff
Raw Permalink Normal View History

2020-10-15 21:12:39 +03:00
--- setup.py.orig 2020-10-14 19:02:31.000000000 +0300
+++ setup.py 2020-10-15 21:00:31.000000000 +0300
@@ -433,60 +433,10 @@
2019-07-08 16:16:59 +03:00
)
2013-03-15 14:39:56 +00:00
elif sys.platform == "darwin":
- # attempt to make sure we pick freetype2 over other versions
- _add_directory(include_dirs, "/sw/include/freetype2")
- _add_directory(include_dirs, "/sw/lib/freetype2/include")
- # fink installation directories
- _add_directory(library_dirs, "/sw/lib")
- _add_directory(include_dirs, "/sw/include")
2020-10-15 21:12:39 +03:00
# darwin ports installation directories
2013-03-15 14:39:56 +00:00
- _add_directory(library_dirs, "/opt/local/lib")
- _add_directory(include_dirs, "/opt/local/include")
2014-07-04 23:04:28 +00:00
-
- # if Homebrew is installed, use its lib and include directories
2013-10-04 12:36:48 +00:00
- try:
2019-07-08 16:16:59 +03:00
- prefix = (
- subprocess.check_output(["brew", "--prefix"])
- .strip()
- .decode("latin1")
- )
2018-01-15 14:51:18 +03:00
- except Exception:
2014-07-04 23:04:28 +00:00
- # Homebrew not installed
- prefix = None
-
- ft_prefix = None
-
- if prefix:
- # add Homebrew's include and lib directories
2019-07-08 16:16:59 +03:00
- _add_directory(library_dirs, os.path.join(prefix, "lib"))
- _add_directory(include_dirs, os.path.join(prefix, "include"))
2020-10-15 21:12:39 +03:00
- _add_directory(
- include_dirs, os.path.join(prefix, "opt", "zlib", "include")
- )
2019-07-08 16:16:59 +03:00
- ft_prefix = os.path.join(prefix, "opt", "freetype")
2014-07-04 23:04:28 +00:00
-
- if ft_prefix and os.path.isdir(ft_prefix):
- # freetype might not be linked into Homebrew's prefix
2019-07-08 16:16:59 +03:00
- _add_directory(library_dirs, os.path.join(ft_prefix, "lib"))
- _add_directory(include_dirs, os.path.join(ft_prefix, "include"))
2014-07-04 23:04:28 +00:00
- else:
- # fall back to freetype from XQuartz if
- # Homebrew's freetype is missing
- _add_directory(library_dirs, "/usr/X11/lib")
- _add_directory(include_dirs, "/usr/X11/include")
2020-10-15 21:12:39 +03:00
+ _add_directory(library_dirs, "@prefix@/lib")
+ _add_directory(include_dirs, "@prefix@/include")
2014-01-01 23:24:54 +00:00
2020-10-15 21:12:39 +03:00
- # SDK install path
- try:
- sdk_path = (
- subprocess.check_output(["xcrun", "--show-sdk-path"])
- .strip()
- .decode("latin1")
- )
- except Exception:
- sdk_path = None
- if sdk_path:
- _add_directory(library_dirs, os.path.join(sdk_path, "usr", "lib"))
- _add_directory(include_dirs, os.path.join(sdk_path, "usr", "include"))
2019-07-08 16:16:59 +03:00
elif (
sys.platform.startswith("linux")
2020-10-15 21:12:39 +03:00
or sys.platform.startswith("gnu")