components/graphviz/patches/configure-lua.patch
author david.comay@oracle.com
Fri, 09 Sep 2016 16:31:02 -0700
changeset 6878 252671ed151a
parent 1028 30d7999e80d9
permissions -rw-r--r--
24617715 'mysql_storage_engine' option's help message could be improved
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
457
aa27b836c528 PSARC/2011/269 Graphviz
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     1
We would normally patch configure.ac instead, but when running autoreconf or
aa27b836c528 PSARC/2011/269 Graphviz
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     2
autogen.sh, it blows up in various places, depending on how hard we try.  Simply
aa27b836c528 PSARC/2011/269 Graphviz
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     3
patching configure is far simpler.
aa27b836c528 PSARC/2011/269 Graphviz
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     4
1028
30d7999e80d9 7203970 lua update breaks things
Rich Burridge <rich.burridge@oracle.com>
parents: 457
diff changeset
     5
--- graphviz-2.28.0/configure.orig	2012-10-22 05:49:36.151525827 -0700
30d7999e80d9 7203970 lua update breaks things
Rich Burridge <rich.burridge@oracle.com>
parents: 457
diff changeset
     6
+++ graphviz-2.28.0/configure	2012-10-22 05:55:46.475647464 -0700
30d7999e80d9 7203970 lua update breaks things
Rich Burridge <rich.burridge@oracle.com>
parents: 457
diff changeset
     7
@@ -20679,7 +20679,17 @@
457
aa27b836c528 PSARC/2011/269 Graphviz
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     8
 
aa27b836c528 PSARC/2011/269 Graphviz
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
     9
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Lua compiling and linking" >&5
aa27b836c528 PSARC/2011/269 Graphviz
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    10
 $as_echo_n "checking for Lua compiling and linking... " >&6; }
aa27b836c528 PSARC/2011/269 Graphviz
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    11
-        LUA_TEST=`LT=luatest.c ; echo "#include <lua.h>" > $LT;  echo "#include <lualib.h>" >> $LT; echo "int main() { luaopen_base((lua_State *)lua_open()); return 0; }" >> $LT ; $CC -Wall $LT -o $LT.out $LUA_INCLUDES $LUA_LIBS $CFLAGS $LDFLAGS 1>/dev/null 2>&1 ; echo $?; rm -f $LT $LT.out 1>/dev/null 2>&1`
1028
30d7999e80d9 7203970 lua update breaks things
Rich Burridge <rich.burridge@oracle.com>
parents: 457
diff changeset
    12
+        LUA_TEST=`LT=luatest.c ; \
30d7999e80d9 7203970 lua update breaks things
Rich Burridge <rich.burridge@oracle.com>
parents: 457
diff changeset
    13
+	    echo "#include <lua.h>" > $LT; \
30d7999e80d9 7203970 lua update breaks things
Rich Burridge <rich.burridge@oracle.com>
parents: 457
diff changeset
    14
+	    echo "#include <lualib.h>" >> $LT; \
30d7999e80d9 7203970 lua update breaks things
Rich Burridge <rich.burridge@oracle.com>
parents: 457
diff changeset
    15
+	    echo "#if LUA_VERSION_NUM >= 502" >> $LT; \
30d7999e80d9 7203970 lua update breaks things
Rich Burridge <rich.burridge@oracle.com>
parents: 457
diff changeset
    16
+	    echo "#include <lauxlib.h>" >> $LT; \
30d7999e80d9 7203970 lua update breaks things
Rich Burridge <rich.burridge@oracle.com>
parents: 457
diff changeset
    17
+	    echo "int main() { luaopen_base((lua_State *)luaL_newstate());" >> $LT; \
30d7999e80d9 7203970 lua update breaks things
Rich Burridge <rich.burridge@oracle.com>
parents: 457
diff changeset
    18
+	    echo "#else" >> $LT; \
30d7999e80d9 7203970 lua update breaks things
Rich Burridge <rich.burridge@oracle.com>
parents: 457
diff changeset
    19
+            echo "int main() { luaopen_base((lua_State *)lua_open());" >> $LT; \
30d7999e80d9 7203970 lua update breaks things
Rich Burridge <rich.burridge@oracle.com>
parents: 457
diff changeset
    20
+	    echo "#endif" >> $LT; \
30d7999e80d9 7203970 lua update breaks things
Rich Burridge <rich.burridge@oracle.com>
parents: 457
diff changeset
    21
+	    echo "return 0; }" >> $LT ; \
30d7999e80d9 7203970 lua update breaks things
Rich Burridge <rich.burridge@oracle.com>
parents: 457
diff changeset
    22
+	    $CC $LT -o $LT.out $LUA_INCLUDES $LUA_LIBS $CFLAGS $LDFLAGS 1>/dev/null 2>&1 ; echo $?; rm -f $LT $LT.out 1>/dev/null 2>&1`
457
aa27b836c528 PSARC/2011/269 Graphviz
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    23
         if test "x$LUA_TEST" != "x0" ; then
aa27b836c528 PSARC/2011/269 Graphviz
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    24
           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
aa27b836c528 PSARC/2011/269 Graphviz
Danek Duvall <danek.duvall@oracle.com>
parents:
diff changeset
    25
 $as_echo "no" >&6; }