Skip to content

Commit

Permalink
Fix pkg-config compile issues due to clang changes. Update Opus version
Browse files Browse the repository at this point in the history
  • Loading branch information
Vargol committed Mar 9, 2024
1 parent 6305302 commit 40e6c32
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 13 deletions.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ echoDurationInSections $START_TIME

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

Expand Down
28 changes: 18 additions & 10 deletions build/build-opus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
SOFTWARE=opus

make_directories() {
set -x

# start in working directory
cd "$2"
Expand All @@ -20,38 +21,44 @@ make_directories() {
cd ${SOFTWARE}
checkStatus $? "change directory failed"

mkdir build-${SOFTWARE}
checkStatus $? "create directory failed"
cd build-${SOFTWARE}
checkStatus $? "change directory failed"


}

download_code () {

cd "$2/${SOFTWARE}"
checkStatus $? "change directory failed"

# download source
curl -O -L https://archive.mozilla.org/pub/opus/opus-$5.tar.gz
git clone --depth 1 https://gitlab.xiph.org/xiph/opus.git
checkStatus $? "download of ${SOFTWARE} failed"

# unpack
tar -zxf "opus-$5.tar.gz"
checkStatus $? "unpack opus failed"
cd "opus-$5/"
cd ${SOFTWARE}
checkStatus $? "change directory failed"

}

configure_build () {

cd "$2/${SOFTWARE}/opus-$5/"
cd "$2/${SOFTWARE}/build-${SOFTWARE}/"
checkStatus $? "change directory failed"

# prepare build
./configure --prefix="$3" --enable-shared=no

#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}
cmake -DCMAKE_INSTALL_PREFIX:PATH=$3 -DBUILD_SHARED_LIBS=OFF ../${SOFTWARE}
checkStatus $? "configuration of ${SOFTWARE} failed"

}


make_clean() {

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

make_compile () {

cd "$2/${SOFTWARE}/opus-$5/"
cd "$2/${SOFTWARE}/build-${SOFTWARE}/"
checkStatus $? "change directory failed"

# build
Expand All @@ -75,6 +82,7 @@ make_compile () {
}

build_main () {
set -x

if [[ -d "$2/${SOFTWARE}" && "${ACTION}" == "skip" ]]
then
Expand Down
5 changes: 3 additions & 2 deletions build/build-pkg-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ configure_build() {
checkStatus $? "change directory failed"

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

}
Expand All @@ -68,7 +68,7 @@ make_compile() {
checkStatus $? "change directory failed"

# build
make
make
checkStatus $? "build of pkg-config failed"

# install
Expand All @@ -82,6 +82,7 @@ make_compile() {
build_main () {



if [[ -d "$2/pkg-config" && "${ACTION}" == "skip" ]]
then
return 0
Expand Down

0 comments on commit 40e6c32

Please sign in to comment.