Skip to content

Commit 5e54f5d

Browse files
committed
fix apple paltform arch and PKG_CONFIG_LIBDIR are empty bug
1 parent 837d895 commit 5e54f5d

File tree

4 files changed

+48
-2
lines changed

4 files changed

+48
-2
lines changed

tools/export-android-build-env.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,6 @@ echo "MR_ANDROID_NDK_TOOLCHAIN: [$MR_TOOLCHAIN_ROOT]"
9999

100100
#
101101
THIS_DIR=$(DIRNAME=$(dirname "${BASH_SOURCE[0]}"); cd "${DIRNAME}"; pwd)
102-
source "$THIS_DIR/export-pkg-config-dir.sh"
102+
source "$THIS_DIR/export-android-pkg-config-dir.sh"
103103

104104
echo "PKG_CONFIG_LIBDIR:$PKG_CONFIG_LIBDIR"

tools/export-apple-build-env.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ export MR_SYS_ROOT=`xcrun -sdk $XCRUN_SDK --show-sdk-path`
9090

9191
# x86_64
9292
export MR_ARCH="${_MR_ARCH/_simulator/}"
93+
export MR_FF_ARCH="${MR_ARCH}"
94+
9395
# ffmpeg-x86_64
9496
export MR_BUILD_NAME="${LIB_NAME}-${_MR_ARCH}"
9597
# ios/ffmpeg-x86_64
@@ -106,6 +108,6 @@ echo "MR_BUILD_PREFIX: [$MR_BUILD_PREFIX]"
106108

107109
#
108110
THIS_DIR=$(DIRNAME=$(dirname "${BASH_SOURCE[0]}"); cd "${DIRNAME}"; pwd)
109-
source "$THIS_DIR/export-pkg-config-dir.sh"
111+
source "$THIS_DIR/export-apple-pkg-config-dir.sh"
110112

111113
echo "PKG_CONFIG_LIBDIR:$PKG_CONFIG_LIBDIR"
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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+
# disabling pkg-config-path
19+
# https://gstreamer-devel.narkive.com/TeNagSKN/gst-devel-disabling-pkg-config-path
20+
# export PKG_CONFIG_LIBDIR=${sysroot}/lib/pkgconfig
21+
22+
env_assert "MR_UNI_PROD_DIR"
23+
env_assert "MR_UNI_SIM_PROD_DIR"
24+
25+
pkg_cfg_dir=
26+
27+
if [[ "$MR_IS_SIMULATOR" == 1 ]];then
28+
uni_dir="${MR_UNI_SIM_PROD_DIR}"
29+
else
30+
uni_dir="${MR_UNI_PROD_DIR}"
31+
fi
32+
33+
for dir in `[ -d ${uni_dir} ] && find "${uni_dir}" -type f -name "*.pc" | xargs dirname | uniq` ;
34+
do
35+
if [[ $pkg_cfg_dir ]];then
36+
pkg_cfg_dir="${pkg_cfg_dir}:${dir}"
37+
else
38+
pkg_cfg_dir="${dir}"
39+
fi
40+
done
41+
42+
export PKG_CONFIG_LIBDIR="$pkg_cfg_dir"
43+
44+
unset pkg_cfg_dir uni_dir

0 commit comments

Comments
 (0)