* espeak: fix issue on arm (#1680)
* ruby: move exception rule, build-package.sh -> build.sh
if [ "$TERMUX_PKG_CLANG" = "no" ]; then
CFLAGS+=" -Os"
else
if [ "$TERMUX_PKG_CLANG" = "no" ]; then
CFLAGS+=" -Os"
else
- if [ "$TERMUX_PKG_NAME" = "ruby" -a "$TERMUX_ARCH" = arm ]; then
- # This exception is to avoid a broken ruby on 32-bit arm
- # with NDK r15c and ruby 2.4.2 - see #1520.
- CFLAGS+=" -O1"
- else
- # -Oz seems good for clang, see https://github.com/android-ndk/ndk/issues/133
- CFLAGS+=" -Oz"
- fi
+ # -Oz seems good for clang, see https://github.com/android-ndk/ndk/issues/133
+ CFLAGS+=" -Oz"
# See https://github.com/espeak-ng/espeak-ng/issues/180
# about cross compilation of espeak-ng.
TERMUX_PKG_VERSION=1.49.2
# See https://github.com/espeak-ng/espeak-ng/issues/180
# about cross compilation of espeak-ng.
TERMUX_PKG_VERSION=1.49.2
TERMUX_PKG_SHA256=cf7ed86850b99bafe819548c73a6651a74300980dd15f319ff22e2bd72ea20b4
TERMUX_PKG_SRCURL=https://github.com/espeak-ng/espeak-ng/releases/download/${TERMUX_PKG_VERSION}/espeak-ng-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_BUILD_IN_SRC=yes
TERMUX_PKG_SHA256=cf7ed86850b99bafe819548c73a6651a74300980dd15f319ff22e2bd72ea20b4
TERMUX_PKG_SRCURL=https://github.com/espeak-ng/espeak-ng/releases/download/${TERMUX_PKG_VERSION}/espeak-ng-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_BUILD_IN_SRC=yes
+termux_step_pre_configure() {
+ # Oz flag causes problems. See https://github.com/termux/termux-packages/issues/1680:
+ CFLAGS=${CFLAGS/Oz/O2}
+}
+
termux_step_make() {
# Prevent caching of host build:
rm -Rf $TERMUX_PKG_HOSTBUILD_DIR
termux_step_make() {
# Prevent caching of host build:
rm -Rf $TERMUX_PKG_HOSTBUILD_DIR
# getresuid(2) does not work on ChromeOS - https://github.com/termux/termux-app/issues/147:
# TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" ac_cv_func_getresuid=no"
# getresuid(2) does not work on ChromeOS - https://github.com/termux/termux-app/issues/147:
# TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" ac_cv_func_getresuid=no"
+termux_step_pre_configure() {
+ # This exception is to avoid a broken ruby on 32-bit arm
+ # with NDK r15c and ruby 2.4.2 - see #1520.
+ if [ "$TERMUX_ARCH" = arm ]; then
+ CFLAGS=${CFLAGS/Oz/O1}
+ fi
+}
+
termux_step_make_install () {
make install
make uninstall # remove possible remains to get fresh timestamps
termux_step_make_install () {
make install
make uninstall # remove possible remains to get fresh timestamps