Squash commits for public release
This commit is contained in:
11
libs/libfreetype/BUILD.gn
Normal file
11
libs/libfreetype/BUILD.gn
Normal file
@@ -0,0 +1,11 @@
|
||||
import("//build/third_party/PY_BRIDGE.gni")
|
||||
|
||||
gnstate = [ rebase_path("$root_out_dir/tmp/libs/libfreetype.a", root_build_dir) ] +
|
||||
py_bridging_args
|
||||
|
||||
action("libfreetype_build") {
|
||||
script = "//libs/libfreetype/package.py"
|
||||
outputs = [ "$root_out_dir/tmp/libs/libfreetype.a" ]
|
||||
args = gnstate
|
||||
deps = [ "//libs/libc:libc" ]
|
||||
}
|
||||
BIN
libs/libfreetype/bin/libfreetype_headers.zip
Normal file
BIN
libs/libfreetype/bin/libfreetype_headers.zip
Normal file
Binary file not shown.
25
libs/libfreetype/package.py
Normal file
25
libs/libfreetype/package.py
Normal file
@@ -0,0 +1,25 @@
|
||||
# fmt: off
|
||||
import zipfile
|
||||
import sys
|
||||
import os
|
||||
from os import path
|
||||
sys.path.append(path.dirname(path.dirname(path.dirname(path.abspath(__file__)))) + "/build/third_party/")
|
||||
from PortingTools import *
|
||||
from PyBridgingTools import *
|
||||
# fmt: on
|
||||
|
||||
VERSION = "2.10.0"
|
||||
|
||||
state = PyBridgingTools.build_descriptor()
|
||||
|
||||
lib_path = state["rootdir"] + "/libs/libfreetype"
|
||||
if not os.path.exists(lib_path + "/include/libfreetype"):
|
||||
with zipfile.ZipFile(lib_path + "/bin/libfreetype_headers.zip", "r") as zip_ref:
|
||||
zip_ref.extractall(lib_path + "/include/")
|
||||
|
||||
file_in_cache = state["rootdir"] + \
|
||||
"/libs/libfreetype/bin/libfreetype_{0}.a".format(state['target_arch'])
|
||||
|
||||
if os.path.exists(state["outpath"]) or os.path.islink(state["outpath"]):
|
||||
os.remove(state["outpath"])
|
||||
os.symlink(file_in_cache, state["outpath"])
|
||||
Reference in New Issue
Block a user