You've already forked macports-ports
mirror of
https://github.com/encounter/macports-ports.git
synced 2026-07-10 12:19:27 -07:00
50 lines
2.1 KiB
Diff
50 lines
2.1 KiB
Diff
--- setup.py.orig 2019-07-08 16:10:56.000000000 +0300
|
|
+++ setup.py 2019-07-08 16:13:09.000000000 +0300
|
|
@@ -425,44 +425,8 @@
|
|
)
|
|
|
|
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")
|
|
- # darwin ports installation directories
|
|
- _add_directory(library_dirs, "/opt/local/lib")
|
|
- _add_directory(include_dirs, "/opt/local/include")
|
|
-
|
|
- # if Homebrew is installed, use its lib and include directories
|
|
- try:
|
|
- prefix = (
|
|
- subprocess.check_output(["brew", "--prefix"])
|
|
- .strip()
|
|
- .decode("latin1")
|
|
- )
|
|
- except Exception:
|
|
- # Homebrew not installed
|
|
- prefix = None
|
|
-
|
|
- ft_prefix = None
|
|
-
|
|
- if prefix:
|
|
- # add Homebrew's include and lib directories
|
|
- _add_directory(library_dirs, os.path.join(prefix, "lib"))
|
|
- _add_directory(include_dirs, os.path.join(prefix, "include"))
|
|
- ft_prefix = os.path.join(prefix, "opt", "freetype")
|
|
-
|
|
- if ft_prefix and os.path.isdir(ft_prefix):
|
|
- # freetype might not be linked into Homebrew's prefix
|
|
- _add_directory(library_dirs, os.path.join(ft_prefix, "lib"))
|
|
- _add_directory(include_dirs, os.path.join(ft_prefix, "include"))
|
|
- 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")
|
|
+ _add_directory(library_dirs, "/@prefix@/lib")
|
|
+ _add_directory(include_dirs, "/@prefix@/include")
|
|
|
|
elif (
|
|
sys.platform.startswith("linux")
|