This commit is contained in:
Tom Callaway 2013-05-15 15:11:19 -04:00
parent cef165d86c
commit 41757aac83
2 changed files with 107 additions and 2 deletions

View File

@ -0,0 +1,99 @@
diff -up graphviz-2.30.1/configure.ac.lua-52 graphviz-2.30.1/configure.ac
--- graphviz-2.30.1/configure.ac.lua-52 2013-05-15 14:55:05.523513480 -0400
+++ graphviz-2.30.1/configure.ac 2013-05-15 14:59:48.628517728 -0400
@@ -874,7 +874,7 @@ else
if test "x$PKGCONFIG" != "x"; then
AC_MSG_CHECKING(for Lua headers and libraries with pkg-config)
echo
- for l in "$lua_suffix" "" "51" "5.1" "50" "5.0" ; do
+ for l in "$lua_suffix" "" "52" "5.2" "51" "5.1" "50" "5.0" ; do
pkgconfig_lua_found=`$PKGCONFIG --exists lua$l 2>/dev/null`
if test "x$?" == "x0" ; then
LUA_VERSION=`$PKGCONFIG --modversion lua$l`
@@ -895,7 +895,7 @@ else
if test "x$LUA_INCLUDES" == "x" -o "x$LUA_LIBS" == "x" ; then
LUACONFIG=""
- AC_CHECK_PROGS(LUACONFIG, lua-config lua-config51 lua-config5.1 lua-config50 lua-config5.0)
+ AC_CHECK_PROGS(LUACONFIG, lua-config lua-config52 lua-config5.2 lua-config51 lua-config5.1 lua-config50 lua-config5.0)
if test "x$LUACONFIG" != "x" ; then
AC_MSG_CHECKING(for Lua headers and libraries with lua-config)
echo
@@ -914,39 +914,53 @@ else
if test "x$ac_found_lua_header" == "xyes" -a "x$ac_found_liblua_header" == "xyes"; then
LUA_INCLUDES="$CFLAGS"
fi
- for l in "$lua_suffix" "" "51" "5.1" "50" "5.0" ; do
- AC_CHECK_LIB(lua$l,lua_call,ac_found_lua_lib="yes",ac_found_lua_lib="no")
+ for l in "$lua_suffix" "" "52" "5.2" "51" "5.1" "50" "5.0" ; do
+ AC_CHECK_LIB(lua$l,lua_callk,ac_found_lua_lib="yes",ac_found_lua_lib="no")
if test "x$ac_found_lua_lib" == "xyes" ; then
- LUA_VERSION=">=5.1.0"
-
- LUA_LIBS="$LDFLAGS -llua$l -lm"
-
- ac2_save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS -llua$l -lm"
-
- if echo "$host_os" | grep "^linux" 1>/dev/null 2>&1 ; then
- LDFLAGS="$LDFLAGS -ldl"
- fi
+ LUA_VERSION=">=5.2.0"
+
+ LUA_LIBS="$LDFLAGS -llua$l -lm"
+
+ ac2_save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -llua$l -lm"
+
+ if echo "$host_os" | grep "^linux" 1>/dev/null 2>&1 ; then
+ LDFLAGS="$LDFLAGS -ldl"
+ fi
+
+ AC_CHECK_LIB(lua$l,lua_call,ac_found_lua_lib="yes",ac_found_lua_lib="no")
+ if test "x$ac_found_lua_lib" == "xyes" ; then
+ LUA_VERSION=">=5.1.0"
- AC_CHECK_LIB(lualib$l,luaL_openlib,ac_found_liblua_lib="yes",ac_found_liblua_lib="no")
- if test "x$ac_found_liblua_lib" == "xyes" ; then
- LUA_VERSION="5.0.x"
+ LUA_LIBS="$LDFLAGS -llua$l -lm"
- LUA_LIBS="$LUA_LFLAGS -llualib$l"
+ ac2_save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -llua$l -lm"
- if echo "$host_os" | grep "^linux" 1>/dev/null 2>&1 ; then
- LUA_LIBS="$LUA_LFLAGS -ldl"
- fi
- fi
+ if echo "$host_os" | grep "^linux" 1>/dev/null 2>&1 ; then
+ LDFLAGS="$LDFLAGS -ldl"
+ fi
- LDFLAGS="$ac2_save_LDFLAGS"
- break
- fi
+ AC_CHECK_LIB(lualib$l,luaL_openlib,ac_found_liblua_lib="yes",ac_found_liblua_lib="no")
+ if test "x$ac_found_liblua_lib" == "xyes" ; then
+ LUA_VERSION="5.0.x"
+
+ LUA_LIBS="$LUA_LFLAGS -llualib$l"
+
+ if echo "$host_os" | grep "^linux" 1>/dev/null 2>&1 ; then
+ LUA_LIBS="$LUA_LFLAGS -ldl"
+ fi
+ fi
+
+ LDFLAGS="$ac2_save_LDFLAGS"
+ break
+ fi
+ fi
done
fi
AC_MSG_CHECKING(for Lua compiling and linking)
- 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`
+ LUA_TEST=`LT=luatest.c ; echo "#include <lua.h>" > $LT; echo "#include <lualib.h>" >> $LT; echo "int main() { luaopen_base((lua_State *)luaL_newstate()); 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`
if test "x$LUA_TEST" != "x0" ; then
AC_MSG_RESULT(no)
AC_MSG_WARN([

View File

@ -48,7 +48,7 @@
Name: graphviz
Summary: Graph Visualization Tools
Version: 2.30.1
Release: 6%{?dist}
Release: 7%{?dist}
Group: Applications/Multimedia
License: EPL
URL: http://www.graphviz.org/
@ -60,6 +60,8 @@ Patch3: graphviz-2.26.0-testsuite-sigsegv-fix.patch
Patch4: graphviz-2.26.0-rtest-errout-fix.patch
# Now that libgraph is gone, reflect that in libgvc.pc
Patch5: graphviz-2.30.1-gvc.pc-no-libgraph.patch
# Lua 5.2
Patch6: graphviz-2.30.1-lua-5.2.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: zlib-devel, libpng-devel, libjpeg-devel, expat-devel, freetype-devel >= 2
BuildRequires: /bin/ksh, bison, m4, flex, tk-devel, tcl-devel >= 8.3, swig
@ -261,12 +263,13 @@ Various tcl packages (extensions) for the graphviz tools.
%patch3 -p1 -b .testsuite-sigsegv-fix
%patch4 -p1 -b .rtest-errout-fix
%patch5 -p1 -b .cgraph
%patch6 -p1 -b .lua-52
# Attempt to fix rpmlint warnings about executable sources
find -type f -regex '.*\.\(c\|h\)$' -exec chmod a-x {} ';'
%build
autoreconf -i
autoreconf -if
# Hack in the java includes we need
sed -i '/JavaVM.framework/!s/JAVA_INCLUDES=/JAVA_INCLUDES=\"_MY_JAVA_INCLUDES_\"/g' configure
sed -i 's|_MY_JAVA_INCLUDES_|-I%{java_home}/include/ -I%{java_home}/include/linux/|g' configure
@ -537,6 +540,9 @@ fi
%changelog
* Wed May 15 2013 Tom Callaway <spot@fedoraproject.org> - 2.30.1-7
- rebuild for lua 5.2
* Tue Apr 23 2013 Tom Callaway <spot@fedoraproject.org> - 2.30.1-6
- patch libgvc.pc.in to refer to -lcgraph (-lgraph is dead and gone)