Skip to content

Commit 21cd63b

Browse files
committed
fribidi use meson and support android
1 parent 9554ed7 commit 21cd63b

File tree

3 files changed

+30
-60
lines changed

3 files changed

+30
-60
lines changed

.github/workflows/fribidi.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,11 @@ jobs:
1616
steps:
1717
- name: Checkout code
1818
uses: actions/checkout@v4
19+
- uses: nttld/setup-ndk@v1
20+
id: setup-ndk
21+
with:
22+
ndk-version: r21e
23+
add-to-path: false
24+
local-cache: true
1925
- name: One Step
2026
run: .github/workflows/onestep.sh fribidi all

do-compile/android/fribidi.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#! /usr/bin/env bash
2+
#
3+
# Copyright (C) 2021 Matt Reach<[email protected]>
4+
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
18+
set -e
19+
20+
CFG_FLAGS="-Ddocs=false -Dbin=false -Dtests=false"
21+
22+
./meson-compatible.sh "$CFG_FLAGS"

do-compile/apple/fribidi.sh

Lines changed: 2 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -17,64 +17,6 @@
1717

1818
set -e
1919

20-
THIS_DIR=$(DIRNAME=$(dirname "$0"); cd "$DIRNAME"; pwd)
21-
cd "$THIS_DIR"
20+
CFG_FLAGS="-Ddocs=false -Dbin=false -Dtests=false"
2221

23-
echo "=== [$0] check env begin==="
24-
env_assert "MR_ARCH"
25-
env_assert "MR_BUILD_NAME"
26-
env_assert "MR_CC"
27-
env_assert "MR_BUILD_SOURCE"
28-
env_assert "MR_BUILD_PREFIX"
29-
env_assert "MR_SYS_ROOT"
30-
env_assert "MR_HOST_NPROC"
31-
echo "MR_DEBUG:$MR_DEBUG"
32-
echo "===check env end==="
33-
34-
CFG_FLAGS="--prefix=$MR_BUILD_PREFIX --enable-static --disable-shared --silent --enable-silent-rules --disable-dependency-tracking"
35-
CFLAGS="-arch $MR_ARCH $MR_OTHER_CFLAGS"
36-
37-
# for cross compile
38-
if [[ $(uname -m) != "$MR_ARCH" || "$MR_FORCE_CROSS" ]];then
39-
echo "[*] cross compile, on $(uname -m) compile $MR_PLAT $MR_ARCH."
40-
# https://www.gnu.org/software/automake/manual/html_node/Cross_002dCompilation.html
41-
CFLAGS="$CFLAGS -isysroot $MR_SYS_ROOT"
42-
CFG_FLAGS="$CFG_FLAGS --host=$MR_ARCH-apple-darwin --with-sysroot=$MR_SYS_ROOT"
43-
fi
44-
45-
if [[ "$MR_DEBUG" == "debug" ]]; then
46-
CFG_FLAGS="$CFG_FLAGS --enable-debug"
47-
fi
48-
49-
50-
cd $MR_BUILD_SOURCE
51-
52-
if [[ -f 'configure' ]]; then
53-
echo "reuse configure"
54-
else
55-
echo "auto generate configure"
56-
./autogen.sh
57-
fi
58-
59-
echo
60-
echo "CC: $MR_CC"
61-
echo "CFG_FLAGS: $CFG_FLAGS"
62-
echo "CFLAGS: $CFLAGS"
63-
echo
64-
65-
echo "----------------------"
66-
echo "[*] configurate $LIB_NAME"
67-
echo "----------------------"
68-
69-
./configure $CFG_FLAGS \
70-
CC="$MR_CC" \
71-
CFLAGS="$CFLAGS" \
72-
LDFLAGS="$CFLAGS"
73-
74-
#----------------------
75-
echo "----------------------"
76-
echo "[*] compile $LIB_NAME"
77-
echo "----------------------"
78-
79-
#not support -j8
80-
make install
22+
./meson-compatible.sh "$CFG_FLAGS"

0 commit comments

Comments
 (0)