Skip to content

Commit 40e6c32

Browse files
committed
Fix pkg-config compile issues due to clang changes. Update Opus version
1 parent 6305302 commit 40e6c32

File tree

3 files changed

+22
-13
lines changed

3 files changed

+22
-13
lines changed

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ echoDurationInSections $START_TIME
245245

246246
START_TIME=$(currentTimeInSeconds)
247247
echoSection "compile opus"
248-
$SCRIPT_DIR/build-opus.sh "$SCRIPT_DIR" "$WORKING_DIR" "$TOOL_DIR" "$CPUS" "1.3.1" > "$WORKING_DIR/build-opus.log" 2>&1
248+
$SCRIPT_DIR/build-opus.sh "$SCRIPT_DIR" "$WORKING_DIR" "$TOOL_DIR" "$CPUS" "v1.5.1" > "$WORKING_DIR/build-opus.log" 2>&1
249249
checkStatus $? "build opus"
250250
echoDurationInSections $START_TIME
251251

build/build-opus.sh

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
SOFTWARE=opus
1212

1313
make_directories() {
14+
set -x
1415

1516
# start in working directory
1617
cd "$2"
@@ -20,38 +21,44 @@ make_directories() {
2021
cd ${SOFTWARE}
2122
checkStatus $? "change directory failed"
2223

24+
mkdir build-${SOFTWARE}
25+
checkStatus $? "create directory failed"
26+
cd build-${SOFTWARE}
27+
checkStatus $? "change directory failed"
28+
29+
2330
}
2431

2532
download_code () {
2633

2734
cd "$2/${SOFTWARE}"
2835
checkStatus $? "change directory failed"
36+
2937
# download source
30-
curl -O -L https://archive.mozilla.org/pub/opus/opus-$5.tar.gz
38+
git clone --depth 1 https://gitlab.xiph.org/xiph/opus.git
3139
checkStatus $? "download of ${SOFTWARE} failed"
3240

33-
# unpack
34-
tar -zxf "opus-$5.tar.gz"
35-
checkStatus $? "unpack opus failed"
36-
cd "opus-$5/"
41+
cd ${SOFTWARE}
3742
checkStatus $? "change directory failed"
3843

3944
}
4045

4146
configure_build () {
4247

43-
cd "$2/${SOFTWARE}/opus-$5/"
48+
cd "$2/${SOFTWARE}/build-${SOFTWARE}/"
4449
checkStatus $? "change directory failed"
4550

46-
# prepare build
47-
./configure --prefix="$3" --enable-shared=no
51+
52+
#cmake -DCMAKE_INSTALL_PREFIX:PATH=$3 -DOPUS_ARM_ASM=TRUE -DOPUS_MAY_HAVE_NEON=FALSE -DOPUS_PRESUME_NEON=TRUE -DCOMPILER_SUPPORT_NEON=TRUE -DBUILD_SHARED_LIBS=OFF ../${SOFTWARE}
53+
cmake -DCMAKE_INSTALL_PREFIX:PATH=$3 -DBUILD_SHARED_LIBS=OFF ../${SOFTWARE}
4854
checkStatus $? "configuration of ${SOFTWARE} failed"
4955

5056
}
5157

58+
5259
make_clean() {
5360

54-
cd "$2/${SOFTWARE}/opus-$5/"
61+
cd "$2/${SOFTWARE}/build-${SOFTWARE}/"
5562
checkStatus $? "change directory failed"
5663
make clean
5764
checkStatus $? "make clean for $SOFTWARE failed"
@@ -61,7 +68,7 @@ make_clean() {
6168

6269
make_compile () {
6370

64-
cd "$2/${SOFTWARE}/opus-$5/"
71+
cd "$2/${SOFTWARE}/build-${SOFTWARE}/"
6572
checkStatus $? "change directory failed"
6673

6774
# build
@@ -75,6 +82,7 @@ make_compile () {
7582
}
7683

7784
build_main () {
85+
set -x
7886

7987
if [[ -d "$2/${SOFTWARE}" && "${ACTION}" == "skip" ]]
8088
then

build/build-pkg-config.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ configure_build() {
4646
checkStatus $? "change directory failed"
4747

4848
# prepare build
49-
./configure --prefix="$3" --with-pc-path="$3/lib/pkgconfig" --with-internal-glib
49+
CFLAGS="-Wno-int-conversion" CXXFLAGS="-Wno-int-conversion" ./configure --prefix="$3" --with-pc-path="$3/lib/pkgconfig" --with-internal-glib
5050
checkStatus $? "configuration of pkg-config failed"
5151

5252
}
@@ -68,7 +68,7 @@ make_compile() {
6868
checkStatus $? "change directory failed"
6969

7070
# build
71-
make
71+
make
7272
checkStatus $? "build of pkg-config failed"
7373

7474
# install
@@ -82,6 +82,7 @@ make_compile() {
8282
build_main () {
8383

8484

85+
8586
if [[ -d "$2/pkg-config" && "${ACTION}" == "skip" ]]
8687
then
8788
return 0

0 commit comments

Comments
 (0)