Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
bf9e9676
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
1 年多 前同步成功
通知
0
Star
18
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Harfbuzz
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
bf9e9676
编写于
7月 09, 2018
作者:
C
Cosimo Lupo
提交者:
GitHub
7月 09, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1091 from anthrotype/fix-gen-def-py
gen-def.py: pass headers as arguments so that msys2 can convert posix paths
上级
46d8f0d5
53f73409
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
14 addition
and
9 deletion
+14
-9
CMakeLists.txt
CMakeLists.txt
+1
-2
src/Makefile.am
src/Makefile.am
+4
-4
src/gen-def.py
src/gen-def.py
+9
-3
未找到文件。
CMakeLists.txt
浏览文件 @
bf9e9676
...
...
@@ -834,9 +834,8 @@ set_target_properties(hb-ot-tag PROPERTIES COMPILE_FLAGS "-DMAIN")
if
(
UNIX OR MINGW
)
if
(
BUILD_SHARED_LIBS
)
# generate harfbuzz.def after build completion
string
(
REPLACE
";"
" "
space_separated_headers
"
${
project_headers
}
"
)
add_custom_command
(
TARGET harfbuzz POST_BUILD
COMMAND
${
CMAKE_COMMAND
}
-E env
"headers=
${
space_separated_headers
}
"
python
${
PROJECT_SOURCE_DIR
}
/src/gen-def.py
${
PROJECT_BINARY_DIR
}
/harfbuzz.def
COMMAND
"
${
PYTHON_EXECUTABLE
}
"
${
PROJECT_SOURCE_DIR
}
/src/gen-def.py
${
PROJECT_BINARY_DIR
}
/harfbuzz.def
${
project_headers
}
WORKING_DIRECTORY
${
PROJECT_SOURCE_DIR
}
/src
)
add_test
(
NAME check-static-inits.sh
...
...
src/Makefile.am
浏览文件 @
bf9e9676
...
...
@@ -277,13 +277,13 @@ endif
check
:
$(DEF_FILES)
#
For check-symbols.sh
CLEANFILES
+=
$(DEF_FILES)
harfbuzz.def
:
$(HBHEADERS) $(HBNODISTHEADERS)
$(AM_V_GEN)
headers
=
"
$^
"
$(srcdir)
/gen-def.py
"
$@
"
$(AM_V_GEN)
$(srcdir)
/gen-def.py
"
$@
"
$^
harfbuzz-subset.def
:
$(HB_SUBSET_headers)
$(AM_V_GEN)
headers
=
"
$^
"
$(srcdir)
/gen-def.py
"
$@
"
$(AM_V_GEN)
$(srcdir)
/gen-def.py
"
$@
"
$^
harfbuzz-icu.def
:
$(HB_ICU_headers)
$(AM_V_GEN)
headers
=
"
$^
"
$(srcdir)
/gen-def.py
"
$@
"
$(AM_V_GEN)
$(srcdir)
/gen-def.py
"
$@
"
$^
harfbuzz-gobject.def
:
$(HB_GOBJECT_headers)
$(AM_V_GEN)
headers
=
"
$^
"
$(srcdir)
/gen-def.py
"
$@
"
$(AM_V_GEN)
$(srcdir)
/gen-def.py
"
$@
"
$^
GENERATORS
=
\
...
...
src/gen-def.py
浏览文件 @
bf9e9676
...
...
@@ -4,8 +4,14 @@ from __future__ import print_function, division, absolute_import
import
io
,
os
,
re
,
sys
if
len
(
sys
.
argv
)
<
3
:
sys
.
exit
(
"usage: gen-def.py harfbuzz.def hb.h [hb-blob.h hb-buffer.h ...]"
)
output_file
=
sys
.
argv
[
1
]
header_paths
=
sys
.
argv
[
2
:]
headers_content
=
[]
for
h
in
os
.
environ
[
"headers"
].
split
(
' '
)
:
for
h
in
header_paths
:
if
h
.
endswith
(
".h"
):
with
io
.
open
(
h
,
encoding
=
'utf-8'
)
as
f
:
headers_content
.
append
(
f
.
read
())
...
...
@@ -13,7 +19,7 @@ result = """EXPORTS
%s
LIBRARY lib%s-0.dll"""
%
(
"
\n
"
.
join
(
sorted
(
re
.
findall
(
r
"^hb_\w+(?= \()"
,
"
\n
"
.
join
(
headers_content
),
re
.
M
))),
sys
.
argv
[
1
]
.
replace
(
'.def'
,
''
)
output_file
.
replace
(
'.def'
,
''
)
)
with
open
(
sys
.
argv
[
1
]
,
"w"
)
as
f
:
f
.
write
(
result
)
with
open
(
output_file
,
"w"
)
as
f
:
f
.
write
(
result
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录