changeset 74:d78c80be335f qt5

Update for Qt5
author Chris Cannam
date Tue, 30 Apr 2013 16:13:56 +0100
parents b9b145d3013c
children 2633976fbef5
files .hgsub .hgsubstate acinclude.m4 configure configure.ac platform-dataquay.pri runner.pro sonic-annotator.pro tests/test.sh
diffstat 9 files changed, 56 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- a/.hgsub	Thu Mar 28 14:53:24 2013 +0000
+++ b/.hgsub	Tue Apr 30 16:13:56 2013 +0100
@@ -1,1 +1,2 @@
 svcore = https://code.soundsoftware.ac.uk/hg/svcore
+dataquay = https://bitbucket.org/breakfastquay/dataquay
--- a/.hgsubstate	Thu Mar 28 14:53:24 2013 +0000
+++ b/.hgsubstate	Tue Apr 30 16:13:56 2013 +0100
@@ -1,1 +1,2 @@
-459235dccff6d4d5f2190131b6f5826a77b3cde7 svcore
+7a82d73984709a4daee16afda7b9b4fd4c04919d dataquay
+cefc9763dc0c29d4a66f3dbd81abf2fd5bd3fbcc svcore
--- a/acinclude.m4	Thu Mar 28 14:53:24 2013 +0000
+++ b/acinclude.m4	Tue Apr 30 16:13:56 2013 +0100
@@ -66,7 +66,7 @@
 AC_REQUIRE([AC_PROG_CXX])
 
 if test x$QMAKE = x ; then
-   	AC_CHECK_PROG(QMAKE, qmake-qt4, $QTDIR/bin/qmake-qt4,,$QTDIR/bin/)
+   	AC_CHECK_PROG(QMAKE, qmake-qt5, $QTDIR/bin/qmake-qt5,,$QTDIR/bin/)
 fi
 if test x$QMAKE = x ; then
    	AC_CHECK_PROG(QMAKE, qmake, $QTDIR/bin/qmake,,$QTDIR/bin/)
@@ -75,16 +75,16 @@
 	AC_CHECK_PROG(QMAKE, qmake.exe, $QTDIR/bin/qmake.exe,,$QTDIR/bin/)
 fi
 if test x$QMAKE = x ; then
-   	AC_CHECK_PROG(QMAKE, qmake-qt4, qmake-qt4,,$PATH)
+   	AC_CHECK_PROG(QMAKE, qmake-qt5, qmake-qt5,,$PATH)
 fi
 if test x$QMAKE = x ; then
    	AC_CHECK_PROG(QMAKE, qmake, qmake,,$PATH)
 fi
 if test x$QMAKE = x ; then
    	AC_MSG_ERROR([
-Failed to find the required qmake-qt4 or qmake program.  Please
-ensure you have the necessary Qt4 development files installed, and
-if necessary set QTDIR to the location of your Qt4 installation.
+Failed to find the required qmake-qt5 or qmake program.  Please
+ensure you have the necessary Qt5 development files installed, and
+if necessary set QTDIR to the location of your Qt5 installation.
 ])
 fi
 
@@ -98,11 +98,11 @@
 #
 QMAKE_VERSION_OUTPUT=`$QMAKE -v`
 case "$QMAKE_VERSION_OUTPUT" in
-     *2.*4.*) ;;
+     *5.*) ;;
      *) AC_MSG_WARN([
  *** The version of qmake found in "$QMAKE" looks like it might be
-     from the wrong version of Qt (Qt4 is required).  Please check
-     that this is the correct version of qmake for Qt4 builds.
+     from the wrong version of Qt (Qt5 is required).  Please check
+     that this is the correct version of qmake for Qt5 builds.
 ])
 esac
 
--- a/configure	Thu Mar 28 14:53:24 2013 +0000
+++ b/configure	Tue Apr 30 16:13:56 2013 +0100
@@ -3967,8 +3967,8 @@
 
 
 if test x$QMAKE = x ; then
-   	# Extract the first word of "qmake-qt4", so it can be a program name with args.
-set dummy qmake-qt4; ac_word=$2
+   	# Extract the first word of "qmake-qt5", so it can be a program name with args.
+set dummy qmake-qt5; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
 if ${ac_cv_prog_QMAKE+:} false; then :
@@ -3984,7 +3984,7 @@
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_QMAKE="$QTDIR/bin/qmake-qt4"
+    ac_cv_prog_QMAKE="$QTDIR/bin/qmake-qt5"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -4084,8 +4084,8 @@
 
 fi
 if test x$QMAKE = x ; then
-   	# Extract the first word of "qmake-qt4", so it can be a program name with args.
-set dummy qmake-qt4; ac_word=$2
+   	# Extract the first word of "qmake-qt5", so it can be a program name with args.
+set dummy qmake-qt5; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
 if ${ac_cv_prog_QMAKE+:} false; then :
@@ -4101,7 +4101,7 @@
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_QMAKE="qmake-qt4"
+    ac_cv_prog_QMAKE="qmake-qt5"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -4163,9 +4163,9 @@
 fi
 if test x$QMAKE = x ; then
    	as_fn_error $? "
-Failed to find the required qmake-qt4 or qmake program.  Please
-ensure you have the necessary Qt4 development files installed, and
-if necessary set QTDIR to the location of your Qt4 installation.
+Failed to find the required qmake-qt5 or qmake program.  Please
+ensure you have the necessary Qt5 development files installed, and
+if necessary set QTDIR to the location of your Qt5 installation.
 " "$LINENO" 5
 fi
 
@@ -4179,16 +4179,16 @@
 #
 QMAKE_VERSION_OUTPUT=`$QMAKE -v`
 case "$QMAKE_VERSION_OUTPUT" in
-     *2.*4.*) ;;
+     *5.*) ;;
      *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
  *** The version of qmake found in \"$QMAKE\" looks like it might be
-     from the wrong version of Qt (Qt4 is required).  Please check
-     that this is the correct version of qmake for Qt4 builds.
+     from the wrong version of Qt (Qt5 is required).  Please check
+     that this is the correct version of qmake for Qt5 builds.
 " >&5
 $as_echo "$as_me: WARNING:
  *** The version of qmake found in \"$QMAKE\" looks like it might be
-     from the wrong version of Qt (Qt4 is required).  Please check
-     that this is the correct version of qmake for Qt4 builds.
+     from the wrong version of Qt (Qt5 is required).  Please check
+     that this is the correct version of qmake for Qt5 builds.
 " >&2;}
 esac
 
@@ -8355,7 +8355,7 @@
 fi
 
 
-if ! $QMAKE -r; then
+if ! $QMAKE -r sonic-annotator.pro; then
    as_fn_error $? "qmake failed: Command was \"$QMAKE -r\"" "$LINENO" 5
 fi
 
--- a/configure.ac	Thu Mar 28 14:53:24 2013 +0000
+++ b/configure.ac	Tue Apr 30 16:13:56 2013 +0100
@@ -116,7 +116,7 @@
 
 AC_OUTPUT
 
-if ! $QMAKE -r; then
+if ! $QMAKE -r sonic-annotator.pro; then
    AC_MSG_ERROR([qmake failed: Command was "$QMAKE -r"])
 fi
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/platform-dataquay.pri	Tue Apr 30 16:13:56 2013 +0100
@@ -0,0 +1,13 @@
+
+include(./config.pri)
+
+CONFIG += staticlib
+
+DEFINES -= USE_REDLAND
+QMAKE_CXXFLAGS -= -I/usr/include/rasqal -I/usr/include/raptor2
+EXTRALIBS -= -lrdf
+
+DEFINES += USE_SORD
+QMAKE_CXXFLAGS += -I/usr/local/include/sord-0 -I/usr/local/include/serd-0 -I/usr/include/sord-0 -I/usr/include/serd-0
+EXTRALIBS += -lsord-0 -lserd-0
+
--- a/runner.pro	Thu Mar 28 14:53:24 2013 +0000
+++ b/runner.pro	Tue Apr 30 16:13:56 2013 +0100
@@ -4,7 +4,7 @@
 
 CONFIG += qt thread warn_on stl rtti exceptions console
 QT += xml network
-QT -= gui
+QT -= gui widgets
 
 # Using the "console" CONFIG flag above should ensure this happens for
 # normal Windows builds, but the console feature doesn't get picked up
@@ -32,7 +32,13 @@
 
 contains(DEFINES, BUILD_STATIC):LIBS -= -ljack
 
-LIBS = -lsvcore $$LIBS
+MY_LIBS = -Lsvcore -Ldataquay -lsvcore -ldataquay
+
+linux* {
+MY_LIBS = -Wl,-Bstatic $$MY_LIBS -Wl,-Bdynamic
+}
+
+LIBS = $$MY_LIBS $$LIBS
 
 PRE_TARGETDEPS += svcore/libsvcore.a
 
@@ -49,3 +55,7 @@
         runner/AudioDBFeatureWriter.cpp \
         runner/FeatureWriterFactory.cpp
 
+!win32 {
+    QMAKE_POST_LINK=/bin/bash tests/test.sh
+}
+
--- a/sonic-annotator.pro	Thu Mar 28 14:53:24 2013 +0000
+++ b/sonic-annotator.pro	Tue Apr 30 16:13:56 2013 +0100
@@ -1,5 +1,5 @@
 TEMPLATE = subdirs
-SUBDIRS = svcore sub_runner
+SUBDIRS = dataquay svcore svcore/data/fileio/test sub_runner
 
 sub_runner.file = runner.pro
 sub_runner.depends = svcore
--- a/tests/test.sh	Thu Mar 28 14:53:24 2013 +0000
+++ b/tests/test.sh	Tue Apr 30 16:13:56 2013 +0100
@@ -2,6 +2,8 @@
 
 mypath=`dirname $0`
 
+
+
 for x in \
     supportprogs \
     helpfulflags \
@@ -15,7 +17,7 @@
     ; do
 
     echo -n "$x: "
-    if bash $mypath/test-$x.sh; then
+    if ( cd $mypath ; bash ./test-$x.sh ); then
 	echo test succeeded
     else
 	echo "*** Test FAILED"