-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJinxfile
More file actions
48 lines (40 loc) · 1.55 KB
/
Jinxfile
File metadata and controls
48 lines (40 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#! /bin/sh
JINX_MAJOR_VER=0.6
TRIPLE="${JINX_ARCH}"-unknown-linux-gnu
post_package_strip() {
if [ -z "$strip_command" ]; then
strip_command="${TRIPLE}-strip"
fi
for f in $(find "${dest_dir}"); do
if file "$f" | grep 'not stripped' >/dev/null; then
echo "* stripping '$f'..."
stripped_file="$(mktemp)"
${strip_command} "$f" -o "$stripped_file"
chmod --reference="$f" "$stripped_file"
mv -f "$stripped_file" "$f"
fi
done
}
autotools_regen() {
ACLOCAL_INCLUDE=""
if [ -d "${sysroot_dir}/usr/share/aclocal" ]; then
ACLOCAL_INCLUDE="-I${sysroot_dir}/usr/share/aclocal"
fi
find . '(' -name configure.ac -o -name configure.in ')' -type f -print0 \
| sort -z | xargs -0 autoreconf -fvi "$@" $ACLOCAL_INCLUDE
}
autotools_configure() {
"${source_dir}/configure" \
--host="${TRIPLE}" \
--prefix="${prefix}" \
--sbindir="${prefix}/bin" \
"$@"
}
cmake_configure() {
cmake "${source_dir}" \
-GNinja \
-DCMAKE_TOOLCHAIN_FILE="${base_dir}/build-support/cmake-toolchain-${JINX_ARCH}.txt" \
-DCMAKE_INSTALL_PREFIX="${prefix}" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
"$@"
}