Explorar o código

oolite: fixed ancious spidermonkey build

Sergei Ilinykh hai 9 meses
pai
achega
4e16b5330c

+ 40 - 0
games-action/oolite/files/oolite-recent-compiler-compat.patch

@@ -0,0 +1,40 @@
+diff --git a/configure b/configure
+index e82ad64..137989a 100755
+--- a/configure
++++ b/configure
+@@ -1617,7 +1617,7 @@ cat > conftest.$ac_ext << EOF
+ #line 1618 "configure"
+ #include "confdefs.h"
+ 
+-main(){return(0);}
++int main(){return(0);}
+ EOF
+ if { (eval echo configure:1623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   ac_cv_prog_cc_works=yes
+@@ -2313,7 +2313,7 @@ cat > conftest.$ac_ext << EOF
+ #line 2314 "configure"
+ #include "confdefs.h"
+ 
+-main(){return(0);}
++int main(){return(0);}
+ EOF
+ if { (eval echo configure:2319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   ac_cv_prog_cc_works=yes
+@@ -3573,7 +3573,7 @@ set dummy $CC; ac_cc="`echo $2 |
+ if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+-  echo 'foo(){}' > conftest.c
++  echo 'int foo(){}' > conftest.c
+ # Make sure it works both with $CC and with simple cc.
+ # We do the test twice because some compilers refuse to overwrite an
+ # existing .o file with -o, though they will create one.
+@@ -11149,7 +11149,7 @@ else
+ #line 11150 "configure"
+ #include "confdefs.h"
+ 
+-main()
++int main()
+ {
+   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
+   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);

+ 3 - 2
games-action/oolite/oolite-1.90.ebuild

@@ -17,6 +17,7 @@ SRC_URI="https://github.com/OoliteProject/oolite/archive/${OOLITE_REV}.tar.gz ->
 	https://github.com/OoliteProject/spidermonkey-ff4/archive/${SM_REV}.tar.gz -> oolite-spidermonkey-${PV}.tar.gz
 "
 S="${WORKDIR}/${PN}-${OOLITE_REV}"
+SPIDERMONKEY_SRC="${WORKDIR}/spidermonkey-ff4-${SM_REV}/js/src"
 OOLITE_VER_GITREV=6897 # git rev-list --count HEAD # depends on OOLITE_REV
 
 LICENSE="GPL-2"
@@ -53,12 +54,12 @@ src_prepare() {
 		"${S}"/GNUmakefile || die
 	sed "/void png_error/d" -i src/Core/Materials/OOPNGTextureLoader.m
 	rm -rf src/Core/MiniZip/
+	eapply -d $SPIDERMONKEY_SRC -- "${FILESDIR}/${PN}-recent-compiler-compat.patch"
 }
 
 src_compile() {
 	egnustep_env
-	local SM_SRC="${WORKDIR}/spidermonkey-ff4-${SM_REV}/js/src"
-	local LIBJS_DIR="${SM_SRC}/build"
+	local LIBJS_DIR="${SPIDERMONKEY_SRC}/build"
 	emake -f libjs.make \
 		debug=$(usex debug yes no) \
 		LIBJS_BUILD_DIR="${LIBJS_DIR}"