mirror of
https://github.com/ValveSoftware/Proton.git
synced 2024-12-28 15:45:50 +03:00
configure.sh: Look for AFDKO.
Debian-like distributions install AFDKO's executables into libexec and provide an `afdko` helper to call them. Python's pip installs the executables in bin. Let's support both.
This commit is contained in:
parent
f55d7adcb1
commit
33814e973d
@ -841,11 +841,11 @@ $(FONTS_OBJ)/%.sfd: $(LIBERATION_SRCDIR)/%.sfd | $(FONTS_OBJ)
|
|||||||
#The use of "YaHei" for compatibility with programs that require that exact string. This font is not Microsoft YaHei.
|
#The use of "YaHei" for compatibility with programs that require that exact string. This font is not Microsoft YaHei.
|
||||||
$(SOURCE_HAN_SANS_REGULAR_OTF): $(SOURCE_HAN_SANS_REGULAR_CIDFONTINFO) $(SOURCE_HAN_SANS_REGULAR_CIDFONT) \
|
$(SOURCE_HAN_SANS_REGULAR_OTF): $(SOURCE_HAN_SANS_REGULAR_CIDFONTINFO) $(SOURCE_HAN_SANS_REGULAR_CIDFONT) \
|
||||||
$(SOURCE_HAN_SANS_REGULAR_FEATURES) $(SOURCE_HAN_SANS_REGULAR_SEQUENCES) $(SOURCE_HAN_SANS_REGULAR_UNISOURCE) $(YAHEI_MENUNAMEDB)
|
$(SOURCE_HAN_SANS_REGULAR_FEATURES) $(SOURCE_HAN_SANS_REGULAR_SEQUENCES) $(SOURCE_HAN_SANS_REGULAR_UNISOURCE) $(YAHEI_MENUNAMEDB)
|
||||||
makeotf -f $(SOURCE_HAN_SANS_REGULAR_CIDFONT) -omitMacNames -ff $(SOURCE_HAN_SANS_REGULAR_FEATURES) \
|
$(AFDKO_VERB) makeotf -f $(SOURCE_HAN_SANS_REGULAR_CIDFONT) -omitMacNames -ff $(SOURCE_HAN_SANS_REGULAR_FEATURES) \
|
||||||
-fi $(SOURCE_HAN_SANS_REGULAR_CIDFONTINFO) -mf $(YAHEI_MENUNAMEDB) -r -nS -cs 25 -ch $(SOURCE_HAN_SANS_REGULAR_UNISOURCE) \
|
-fi $(SOURCE_HAN_SANS_REGULAR_CIDFONTINFO) -mf $(YAHEI_MENUNAMEDB) -r -nS -cs 25 -ch $(SOURCE_HAN_SANS_REGULAR_UNISOURCE) \
|
||||||
-ci $(SOURCE_HAN_SANS_REGULAR_SEQUENCES) -o $(SOURCE_HAN_SANS_REGULAR_OTF)
|
-ci $(SOURCE_HAN_SANS_REGULAR_SEQUENCES) -o $(SOURCE_HAN_SANS_REGULAR_OTF)
|
||||||
tx -cff +S -no_futile $(SOURCE_HAN_SANS_REGULAR_CIDFONT) $(FONTS_OBJ)/CFF.OTC.SC
|
$(AFDKO_VERB) tx -cff +S -no_futile $(SOURCE_HAN_SANS_REGULAR_CIDFONT) $(FONTS_OBJ)/CFF.OTC.SC
|
||||||
sfntedit -a CFF=$(FONTS_OBJ)/CFF.OTC.SC $(SOURCE_HAN_SANS_REGULAR_OTF)
|
$(AFDKO_VERB) sfntedit -a CFF=$(FONTS_OBJ)/CFF.OTC.SC $(SOURCE_HAN_SANS_REGULAR_OTF)
|
||||||
|
|
||||||
fonts: $(FONTS_OBJ)/LiberationSans-Regular.ttf
|
fonts: $(FONTS_OBJ)/LiberationSans-Regular.ttf
|
||||||
fonts: $(FONTS_OBJ)/LiberationSans-Bold.ttf
|
fonts: $(FONTS_OBJ)/LiberationSans-Bold.ttf
|
||||||
|
15
configure.sh
15
configure.sh
@ -46,6 +46,17 @@ dependency_command() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dependency_afdko() {
|
||||||
|
if command -v makeotf &> /dev/null; then
|
||||||
|
AFDKO_VERB=
|
||||||
|
elif command -v afdko &> /dev/null; then
|
||||||
|
AFDKO_VERB=afdko
|
||||||
|
else
|
||||||
|
err "Couldn't find 'afdko'. Install it and make sure that 'makeotf' is in your PATH or 'afdko makeotf' works."
|
||||||
|
MISSING_DEPENDENCIES=1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Configure
|
# Configure
|
||||||
#
|
#
|
||||||
@ -90,6 +101,8 @@ function configure() {
|
|||||||
dependency_command git
|
dependency_command git
|
||||||
dependency_command python3
|
dependency_command python3
|
||||||
|
|
||||||
|
dependency_afdko
|
||||||
|
|
||||||
if [ "$MISSING_DEPENDENCIES" -ne 0 ]; then
|
if [ "$MISSING_DEPENDENCIES" -ne 0 ]; then
|
||||||
die "Missing dependencies, cannot continue."
|
die "Missing dependencies, cannot continue."
|
||||||
fi
|
fi
|
||||||
@ -113,6 +126,8 @@ function configure() {
|
|||||||
echo "DOCKER_OPTS := $arg_docker_opts"
|
echo "DOCKER_OPTS := $arg_docker_opts"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "AFDKO_VERB := $AFDKO_VERB"
|
||||||
|
|
||||||
# Include base
|
# Include base
|
||||||
echo ""
|
echo ""
|
||||||
echo "include \$(SRCDIR)/build/makefile_base.mak"
|
echo "include \$(SRCDIR)/build/makefile_base.mak"
|
||||||
|
Loading…
Reference in New Issue
Block a user