11
11
SOFTWARE=opus
12
12
13
13
make_directories () {
14
+ set -x
14
15
15
16
# start in working directory
16
17
cd " $2 "
@@ -20,38 +21,44 @@ make_directories() {
20
21
cd ${SOFTWARE}
21
22
checkStatus $? " change directory failed"
22
23
24
+ mkdir build-${SOFTWARE}
25
+ checkStatus $? " create directory failed"
26
+ cd build-${SOFTWARE}
27
+ checkStatus $? " change directory failed"
28
+
29
+
23
30
}
24
31
25
32
download_code () {
26
33
27
34
cd " $2 /${SOFTWARE} "
28
35
checkStatus $? " change directory failed"
36
+
29
37
# 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
31
39
checkStatus $? " download of ${SOFTWARE} failed"
32
40
33
- # unpack
34
- tar -zxf " opus-$5 .tar.gz"
35
- checkStatus $? " unpack opus failed"
36
- cd " opus-$5 /"
41
+ cd ${SOFTWARE}
37
42
checkStatus $? " change directory failed"
38
43
39
44
}
40
45
41
46
configure_build () {
42
47
43
- cd " $2 /${SOFTWARE} /opus- $5 /"
48
+ cd " $2 /${SOFTWARE} /build- ${SOFTWARE} /"
44
49
checkStatus $? " change directory failed"
45
50
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}
48
54
checkStatus $? " configuration of ${SOFTWARE} failed"
49
55
50
56
}
51
57
58
+
52
59
make_clean () {
53
60
54
- cd " $2 /${SOFTWARE} /opus- $5 /"
61
+ cd " $2 /${SOFTWARE} /build- ${SOFTWARE} /"
55
62
checkStatus $? " change directory failed"
56
63
make clean
57
64
checkStatus $? " make clean for $SOFTWARE failed"
@@ -61,7 +68,7 @@ make_clean() {
61
68
62
69
make_compile () {
63
70
64
- cd " $2 /${SOFTWARE} /opus- $5 /"
71
+ cd " $2 /${SOFTWARE} /build- ${SOFTWARE} /"
65
72
checkStatus $? " change directory failed"
66
73
67
74
# build
@@ -75,6 +82,7 @@ make_compile () {
75
82
}
76
83
77
84
build_main () {
85
+ set -x
78
86
79
87
if [[ -d " $2 /${SOFTWARE} " && " ${ACTION} " == " skip" ]]
80
88
then
0 commit comments