diff --git a/ax_init_standard_project.m4 b/ax_init_standard_project.m4 index 01404ac..79bc715 100644 --- a/ax_init_standard_project.m4 +++ b/ax_init_standard_project.m4 @@ -167,14 +167,18 @@ AC_DEFUN([AX_INIT_STANDARD_PROJECT], [ AX_SUBST(BUILD_NUMBER) BUILD_DATE=$(LANG= date +"%a, %d %b %Y %H:%M:%S %z") AX_SUBST(BUILD_DATE) - if test -f "${PROJECT_NAME}-logo.png"; then - PROJECT_LOGO="${PROJECT_NAME}-logo.png" + if test -f "${PACKAGE_NAME}.dektop.in"; then + PACKAGE_DESKTOP="${PACKAGE_NAME}.dektop" fi - AX_SUBST(PROJECT_LOGO) - if test -f "${PROJECT_NAME}-icon.png"; then - PROJECT_ICON="${PROJECT_NAME}-icon.png" + AX_SUBST(PACKAGE_DESKTOP) + if test -f "${PACKAGE_NAME}-logo.png"; then + PACKAGE_LOGO="${PACKAGE_NAME}-logo.png" fi - AX_SUBST(PROJECT_ICON) + AX_SUBST(PACKAGE_LOGO) + if test -f "${PACKAGE_NAME}-icon.png"; then + PACKAGE_ICON="${PACKAGE_NAME}-icon.png" + fi + AX_SUBST(PACKAGE_ICON) AC_ARG_ENABLE(pedantic, [AS_HELP_STRING([--enable-pedantic], @@ -203,6 +207,10 @@ AC_DEFUN([AX_INIT_STANDARD_PROJECT], [ else AM_CPPFLAGS="${AM_CPPFLAGS} -DQT_NO_DEBUG_OUTPUT -DQT_NO_DEBUG" fi + + if test -f ${PACKAGE_NAME}.desktop.in; then + AC_CONFIG_FILES([${PACKAGE_NAME}.desktop]) + fi AC_CONFIG_FILES([makefile]) AX_ADD_MAKEFILE_TARGET_DEP([clean-am], [clean-standard-project-targets], [makefile.in]) diff --git a/bootstrap.sh b/bootstrap.sh index 69db5cc..6bd40e1 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -118,6 +118,7 @@ GENERATED FILES * README - add project description (first line is header, followed by an empty line) * configure.ac - global configuration file template * makefile.am - global makefile template + * ${DEFAULT_PROJECT_NAME}.desktop.in - linux desktop file * src/makefile.am - if you enabled AX_USE_CXX * src/version.hxx - if you enabled AX_USE_CXX * src/version.cxx - if you enabled AX_USE_CXX @@ -322,7 +323,7 @@ checkdir() { checkfile() { exists=0 - if test -f "$1"; then + if test -f "$1" -o -f "$1".in; then exists=1 fi test $exists -eq 1 @@ -706,10 +707,10 @@ namespace NAMESPACE { return README; } std::string logo() { - return PROJECT_LOGO; + return PACKAGE_LOGO; } std::string icon() { - return PROJECT_ICON; + return PACKAGE_ICON; } const std::string WHAT("#(@) " PACKAGE_STRING); const std::string IDENT("\$Id: " PACKAGE_STRING); @@ -721,7 +722,7 @@ ${HEADER}dist_bin_SCRIPTS = MAINTAINERCLEANFILES = makefile.in EOF echo "${HEADER}MAINTAINERCLEANFILES = makefile.in" | to --condition AX_USE_DOXYGEN doc/makefile.am -to --condition AX_BUILD_TEST test/runtests.sh < test/runtests.sh +to --condition AX_BUILD_TEST test/runtests.sh < ${0%/*}/test/runtests.sh to --condition 'AX_BUILD_TEST|AX_USE_CPPUNIT' test/makefile.am <\n \2|ig -s| *CREATE *TABLE *\(if *not *exists\)\? *`\?\([a-z]\+\)`\? *|\n \2\n [shape=none, margin=0, label=<\n \n \n|ig +# remove key definitions +s/[),][\n ]*\(PRIMARY[ \n]\+\)\?KEY[ \n]\+[^(]*([^)]*)//gi -s/varchar *( *\([0-9]\+\) *)/varchar[\1]/ig +# move foreign keys as relation to the end +:b;s/\(\w\+\)\([^;]*\)FOREIGN[\n ]\+KEY[ \n]*([ \n]*`\?\([a-z]\+\)`\?[ \n]*)[ \n]*REFERENCES[ \n]*`\?\([a-z]\+\)`\?[ \n]*([ \n]*`\?\([a-z]\+\)`\?[ \n]*)[ \n]*\([^,)]*\)\([,)].*\)/\1\2\7\n \1:\3 -> \4:\5 [label="\6"]##SEMICOLON##/ig;tb -s/ *PRIMARY KEY *( *`\?\([a-z]\+\)`\? *) *[,)]//ig +# create table rows +s|[(,][ \n]*`\?\(\w\+\)`\?[ \n]\+\(\w\+\(([^)]\+)\)\?\)[ \n]*\([^,)]*\)[ \n]\+COMMENT[ \n]*["']\([^"']*\)["'][ \n]*|\n |gi +s|[(,][ \n]*`\?\(\w\+\)`\?[ \n]\+\(\w\+\(([^)]\+)\)\?\)[ \n]*\([^,)]*\)|\n |g -:b;s/\([a-z]\+\)\([^;]*\)FOREIGN KEY *( *`\?\([a-z]\+\)`\? *) *REFERENCES *`\?\([a-z]\+\)`\? *( *`\?\([a-z]\+\)`\? *) *\([^,)]*\)[,)]\(.*\)/\1\2\7\n \1:\3 -> \4:\5/ig;tb +# add line breaks for long lines +s|\(]*>[^<]\{30,40\}\)[ \n]\+\([^<]\{20,\}\)|\1
\2|g +#:d;s|\(
[^<]\{30,40\}\)[ \n]\+\([^<]\{20,\}\)|\1
\2|g;td -:c;s|\n[(,] *`\?\([a-z]\+\)`\? *\([^ ]\+\)*\([^,)]*\) *COMMENT *[`"']\([^`"']*\)[`"'] *[,)]|\n
\n,|ig;tc +# add table comment below +:k;tk +s|[ \n]*)[^)]*COMMENT[ \n]*=[ \n]*["']\?\([^"']*\)["']\?[^;]*|\n |ig;th +s|)[^);]*;|\n;|ig +:h -s| \+||g -s|\)|\1
\2|g -:d;s|\(
[^<]\{30,40\}\) \+\([^<]\{20,\}\)|\1
\2|g;td +# cleanup comment below, add line breaksfor long lines +s|\(]*>[^<]\{60,80\}\)[ \n]\+\([^<]\{30,\}\)|\1
\2|g +#:e;s|\(
[^<]\{60,80\}\)[ \n]\+\([^<]\{30,\}\)|\1
\2|g;te -s| *COMMENT *= *["']\?\([^"']*\)["']\?|\n
|ig +# close table +s|;|\n
\2
\1\2\4\5
\1\2\4
\1\2\3\4
\1
\+||g -s|\(]*>[^<]\{30,40\}\) \+\([^<]\{20,\}
\1
\n >];|ig -s| \+||g -s| \+||g -s|\(]*>[^<]\{60,80\}\) \+\([^<]\{30,\}\)|\1
\2|g -:e;s|\(
[^<]\{60,80\}\) \+\([^<]\{30,\}\)|\1
\2|g;te +# convert ##COMMA## to , +s|##COMMA##|,|g +# convert ##SEMICOLON## to ; +s,##SEMICOLON##,;,g -s/\n,[^\n]*/\n/g -s|;|\n \n >];\n|ig +# print one table +p +# get buffer back and remove the table that has just been analyzed +x +s,\(.*\)create[ \n]\+table[^;]*;\(.*\),\1\2,ig +ti $a\ }\ diff --git a/surfer.desktop.in b/surfer.desktop.in new file mode 100644 index 0000000..1797547 --- /dev/null +++ b/surfer.desktop.in @@ -0,0 +1,9 @@ +[Desktop Entry] +Type=Application +Name=surfer +GenericName=surfer +Comment=@DESCRIPTION@ +Icon=@prefix@/share/@PACKAGE_NAME@/@PACKAGE_ICON@ +Exec=surfer %u +Terminal=false +Categories=Qt;Utility;