1010#
1111
1212rp_module_id=" etlegacy"
13- rp_module_desc=" etlegacy - ET: Legacy - A Fully compatable Wolfenstein: Enemy Territory 2.81.0 Client and Server"
13+ rp_module_desc=" etlegacy - ET: Legacy - A Fully compatable Wolfenstein: Enemy Territory Client and Server"
1414rp_module_licence=" GPL3 https://raw.githubusercontent.com/etlegacy/etlegacy/master/COPYING.txt"
1515rp_module_help=" Fix Me!"
1616rp_module_section=" exp"
17- rp_module_repo=" git https://github.com/etlegacy/etlegacy.git v2.81.0"
18- rp_module_flags=" "
17+ rp_module_repo=" git https://github.com/etlegacy/etlegacy.git master :_get_branch_etlegacy"
18+ rp_module_flags=" !64bit"
19+
20+ function _get_branch_etlegacy() {
21+ # Tested tag was 2.82.1 commit 0a24c70
22+ # manual:
23+ # 'curl https://api.github.com/repos/etlegacy/etlegacy/tags | grep -m 1 sha | cut -d\" -f4 | cut -dv -f2'
24+
25+ download https://api.github.com/repos/etlegacy/etlegacy/tags - | grep -m 1 sha | cut -d\" -f4 | cut -dv -f2
26+ }
1927
2028function _arch_etlegacy() {
2129 # exact parsing from Makefile
@@ -33,9 +41,7 @@ function sources_etlegacy() {
3341function build_etlegacy() {
3442 local params=(-DCMAKE_BUILD_TYPE=Release)
3543
36- if [[ " ${md_id} " == " etlegacy_64" ]]; then
37- params+=(-DCROSS_COMPILE32=0)
38- else
44+ if isPlatform " 64bit" ; then
3945 params+=(-DCROSS_COMPILE32=1)
4046 git submodule init
4147 git submodule update
@@ -48,12 +54,11 @@ function build_etlegacy() {
4854 mkdir " $md_build /build"
4955 cd " $md_build /build"
5056
51- if [[ " ${md_id} " == " etlegacy_64" ]]; then
52- cmake " ${params[@]} " ..
57+ if isPlatform " 64bit" ; then
58+ # The added CC= and CXX= is to ensure that 64 bit libraries are not used during
59+ # compilation of the 32 bit version
60+ CC=" gcc -m32" CXX=" g++ -m32" cmake " ${params[@]} " ..
5361 else
54- # The added CC= and CXX= is to ensure that 64 bit libraries are not used during compilation of the
55- # 32 bit version
56- # CC="gcc -m32" CXX="g++ -m32" cmake "${params[@]}" ..
5762 cmake " ${params[@]} " ..
5863 fi
5964 make clean
0 commit comments