Revision: 947 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=947&view=rev Author: hyperair Date: 2009-09-21 06:01:15 +0000 (Mon, 21 Sep 2009)
Log Message: ----------- Port build system updates from trunk
Remaining changes: * excluded pretty-printer, codenav, geanydoc, geanyprj support until it enters this branch
Modified Paths: -------------- branches/geany-plugins/geany-plugins-0.18/build/addons.m4 branches/geany-plugins/geany-plugins-0.18/build/geany-plugins.nsi branches/geany-plugins/geany-plugins-0.18/build/geanygdb.m4 branches/geany-plugins/geany-plugins-0.18/build/geanylatex.m4 branches/geany-plugins/geany-plugins-0.18/build/geanylipsum.m4 branches/geany-plugins/geany-plugins-0.18/build/geanylua.m4 branches/geany-plugins/geany-plugins-0.18/build/geanysendmail.m4 branches/geany-plugins/geany-plugins-0.18/build/geanyvc.m4 branches/geany-plugins/geany-plugins-0.18/build/shiftcolumn.m4 branches/geany-plugins/geany-plugins-0.18/build/spellcheck.m4 branches/geany-plugins/geany-plugins-0.18/configure.ac branches/geany-plugins/geany-plugins-0.18/spellcheck/src/Makefile.am
Added Paths: ----------- branches/geany-plugins/geany-plugins-0.18/build/expansions.m4 branches/geany-plugins/geany-plugins-0.18/build/geany.m4 branches/geany-plugins/geany-plugins-0.18/build/i18n.m4 branches/geany-plugins/geany-plugins-0.18/build/status.m4 branches/geany-plugins/geany-plugins-0.18/build/unittests.m4
Modified: branches/geany-plugins/geany-plugins-0.18/build/addons.m4 =================================================================== --- branches/geany-plugins/geany-plugins-0.18/build/addons.m4 2009-09-21 05:57:38 UTC (rev 946) +++ branches/geany-plugins/geany-plugins-0.18/build/addons.m4 2009-09-21 06:01:15 UTC (rev 947) @@ -1,5 +1,6 @@ AC_DEFUN([GP_CHECK_ADDONS], [ + GP_STATUS_PLUGIN_ADD([Addons], [yes]) AC_CONFIG_FILES([ addons/Makefile addons/src/Makefile
Added: branches/geany-plugins/geany-plugins-0.18/build/expansions.m4 =================================================================== --- branches/geany-plugins/geany-plugins-0.18/build/expansions.m4 (rev 0) +++ branches/geany-plugins/geany-plugins-0.18/build/expansions.m4 2009-09-21 06:01:15 UTC (rev 947) @@ -0,0 +1,20 @@ +AC_DEFUN([_GP_EXPAND_PREFIX_], +[ + case $prefix in + NONE) prefix=$ac_default_prefix ;; + *) ;; + esac + + case $exec_prefix in + NONE) exec_prefix=$prefix ;; + *) ;; + esac +]) + +AC_DEFUN([GP_EXPAND_DIR], +[ + AC_REQUIRE([_GP_EXPAND_PREFIX_]) + + expanded_$1=$(eval echo $$1) + expanded_$1=$(eval echo $expanded_$1) +])
Modified: branches/geany-plugins/geany-plugins-0.18/build/geany-plugins.nsi =================================================================== --- branches/geany-plugins/geany-plugins-0.18/build/geany-plugins.nsi 2009-09-21 05:57:38 UTC (rev 946) +++ branches/geany-plugins/geany-plugins-0.18/build/geany-plugins.nsi 2009-09-21 06:01:15 UTC (rev 947) @@ -31,8 +31,8 @@ ; helper defines ; ;;;;;;;;;;;;;;;;;;; !define PRODUCT_NAME "Geany-Plugins" -!define PRODUCT_VERSION "0.17.1" -!define PRODUCT_VERSION_ID "0.17.1.0" +!define PRODUCT_VERSION "0.17" +!define PRODUCT_VERSION_ID "0.17.0.0" !define PRODUCT_PUBLISHER "The Geany developer team" !define PRODUCT_WEB_SITE "http://www.geany.org/" !define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall${PRODUCT_NAME}" @@ -209,6 +209,33 @@ done: !macroend
+Function CheckForGeany + ; find and read Geany's installation directory and use it as our installation directory + ReadRegStr $INSTDIR SHCTX "${GEANY_DIR_REGKEY}" "Path" + StrCmp $INSTDIR "" 0 +3 + MessageBox MB_OK|MB_ICONSTOP "Geany could not be found. Please install Geany first." /SD IDOK + Abort + + ; check Geany's version + GetDLLVersion "$INSTDIR\bin\geany.exe" $R0 $R1 + IntOp $R2 $R0 >> 16 + IntOp $R2 $R2 & 0x0000FFFF ; $R2 now contains major version + IntOp $R3 $R0 & 0x0000FFFF ; $R3 now contains minor version + StrCpy $0 "$R2.$R3" + StrCmp $0 ${REQUIRED_GEANY_VERSION} version_check_done 0 + MessageBox MB_YESNO|MB_ICONEXCLAMATION \ + "You have Geany $0 installed but you need Geany ${REQUIRED_GEANY_VERSION}.$\nDo you really want to continue?" \ + /SD IDNO IDNO stop IDYES ignore +stop: + Abort +ignore: + MessageBox MB_OK|MB_ICONEXCLAMATION \ + "Using another version than Geany ${REQUIRED_GEANY_VERSION} may cause unloadable plugins or crashes." \ + /SD IDOK + +version_check_done: +FunctionEnd + Function .onInit ; (from http://jabref.svn.sourceforge.net/viewvc/jabref/trunk/jabref/src/windows/nsi...) ; If the user does *not* have administrator privileges, abort @@ -224,30 +251,15 @@ StrCpy $INSTDIR "$PROFILE$(^Name)" ${endif}
- ; find and read Geany's installation directory and use it as our installation directory - ReadRegStr $INSTDIR SHCTX "${GEANY_DIR_REGKEY}" "Path" - StrCmp $INSTDIR "" 0 +3 - MessageBox MB_OK|MB_ICONSTOP "Geany could not be found. Please install Geany first." /SD IDOK - Abort - - ; check Geany's version - GetDLLVersion "$INSTDIR\bin\geany.exe" $R0 $R1 - IntOp $R2 $R0 >> 16 - IntOp $R2 $R2 & 0x0000FFFF ; $R2 now contains major version - IntOp $R3 $R0 & 0x0000FFFF ; $R3 now contains minor version - StrCpy $0 "$R2.$R3" ; $0 now contains string like "1.2.0.192" - StrCmp $0 ${REQUIRED_GEANY_VERSION} +3 0 - MessageBox MB_OK|MB_ICONSTOP \ - "You have Geany $0 installed but you need Geany ${REQUIRED_GEANY_VERSION}." \ - /SD IDOK - Abort - ; prevent running multiple instances of the installer System::Call 'kernel32::CreateMutexA(i 0, i 0, t "geany_plugins_installer") i .r1 ?e' Pop $R0 StrCmp $R0 0 +3 MessageBox MB_OK|MB_ICONEXCLAMATION "The installer is already running." /SD IDOK Abort + + Call CheckForGeany + ; warn about a new install over an existing installation ReadRegStr $R0 SHCTX "${PRODUCT_UNINST_KEY}" "UninstallString" StrCmp $R0 "" finish
Added: branches/geany-plugins/geany-plugins-0.18/build/geany.m4 =================================================================== --- branches/geany-plugins/geany-plugins-0.18/build/geany.m4 (rev 0) +++ branches/geany-plugins/geany-plugins-0.18/build/geany.m4 2009-09-21 06:01:15 UTC (rev 947) @@ -0,0 +1,19 @@ +AC_DEFUN([GP_CHECK_GEANY], +[ + AC_REQUIRE([PKG_PROG_PKG_CONFIG]) + AC_ARG_WITH([geany-prefix], + AC_HELP_STRING([--with-geany-prefix=PATH], + [Set Geany's installation prefix [[default=auto]]]), + [geany_prefix=${withval}], + [geany_prefix=$(${PKG_CONFIG} --variable=prefix geany)]) + + export PKG_CONFIG_PATH="$geany_prefix/lib/pkgconfig:$PKG_CONFIG_PATH" + + PKG_CHECK_MODULES([GEANY], [geany >= $1]) + geanypluginsdir=$(${PKG_CONFIG} --variable=libdir geany)/geany + geanyversion=$(${PKG_CONFIG} --modversion geany) + AC_SUBST([geanypluginsdir]) + + PKG_CONFIG_PATH="${PKG_CONFIG_PATH#*:}" + test -z "${PKG_CONFIG_PATH}" && unset PKG_CONFIG_PATH +])
Modified: branches/geany-plugins/geany-plugins-0.18/build/geanygdb.m4 =================================================================== --- branches/geany-plugins/geany-plugins-0.18/build/geanygdb.m4 2009-09-21 05:57:38 UTC (rev 946) +++ branches/geany-plugins/geany-plugins-0.18/build/geanygdb.m4 2009-09-21 06:01:15 UTC (rev 947) @@ -1,5 +1,8 @@ AC_DEFUN([GP_CHECK_GEANYGDB], [ + GP_STATUS_PLUGIN_ADD([GeanyGDB], [yes]) + AC_CHECK_HEADERS([elf.h]) + AC_CHECK_HEADERS([elf_abi.h]) AC_CONFIG_FILES([ geanygdb/Makefile geanygdb/src/Makefile
Modified: branches/geany-plugins/geany-plugins-0.18/build/geanylatex.m4 =================================================================== --- branches/geany-plugins/geany-plugins-0.18/build/geanylatex.m4 2009-09-21 05:57:38 UTC (rev 946) +++ branches/geany-plugins/geany-plugins-0.18/build/geanylatex.m4 2009-09-21 06:01:15 UTC (rev 947) @@ -1,5 +1,6 @@ AC_DEFUN([GP_CHECK_GEANYLATEX], [ + GP_STATUS_PLUGIN_ADD([GeanyLaTeX], [yes]) AC_CONFIG_FILES([ geanylatex/Makefile geanylatex/src/Makefile
Modified: branches/geany-plugins/geany-plugins-0.18/build/geanylipsum.m4 =================================================================== --- branches/geany-plugins/geany-plugins-0.18/build/geanylipsum.m4 2009-09-21 05:57:38 UTC (rev 946) +++ branches/geany-plugins/geany-plugins-0.18/build/geanylipsum.m4 2009-09-21 06:01:15 UTC (rev 947) @@ -1,5 +1,6 @@ AC_DEFUN([GP_CHECK_GEANYLIPSUM], [ + GP_STATUS_PLUGIN_ADD([GeanyLipsum], [yes]) AC_CONFIG_FILES([ geanylipsum/Makefile geanylipsum/src/Makefile
Modified: branches/geany-plugins/geany-plugins-0.18/build/geanylua.m4 =================================================================== --- branches/geany-plugins/geany-plugins-0.18/build/geanylua.m4 2009-09-21 05:57:38 UTC (rev 946) +++ branches/geany-plugins/geany-plugins-0.18/build/geanylua.m4 2009-09-21 06:01:15 UTC (rev 947) @@ -27,6 +27,7 @@ fi
AM_CONDITIONAL(ENABLE_GEANYLUA, test $enable_geanylua = yes) + GP_STATUS_PLUGIN_ADD([GeanyLua], [$enable_geanylua])
AC_CONFIG_FILES([ geanylua/examples/edit/Makefile
Modified: branches/geany-plugins/geany-plugins-0.18/build/geanysendmail.m4 =================================================================== --- branches/geany-plugins/geany-plugins-0.18/build/geanysendmail.m4 2009-09-21 05:57:38 UTC (rev 946) +++ branches/geany-plugins/geany-plugins-0.18/build/geanysendmail.m4 2009-09-21 06:01:15 UTC (rev 947) @@ -1,5 +1,6 @@ AC_DEFUN([GP_CHECK_GEANYSENDMAIL], [ + GP_STATUS_PLUGIN_ADD([GeanySendmail], [yes]) AC_CONFIG_FILES([ geanysendmail/Makefile geanysendmail/src/Makefile
Modified: branches/geany-plugins/geany-plugins-0.18/build/geanyvc.m4 =================================================================== --- branches/geany-plugins/geany-plugins-0.18/build/geanyvc.m4 2009-09-21 05:57:38 UTC (rev 946) +++ branches/geany-plugins/geany-plugins-0.18/build/geanyvc.m4 2009-09-21 06:01:15 UTC (rev 947) @@ -1,5 +1,6 @@ AC_DEFUN([GP_CHECK_GEANYVC], [ + GP_STATUS_PLUGIN_ADD([GeanyVC], [yes]) AC_ARG_ENABLE(gtkspell, AC_HELP_STRING([--enable-gtkspell=ARG], [Enable GtkSpell support in GeanyVC. [[default=auto]]]),, @@ -13,9 +14,11 @@ fi
AM_CONDITIONAL(USE_GTKSPELL, test $enable_gtkspell = yes) + GP_STATUS_FEATURE_ADD([GeanyVC GtkSpell support], [$enable_gtkspell])
AC_CONFIG_FILES([ geanyvc/Makefile geanyvc/src/Makefile + geanyvc/tests/Makefile ]) ])
Added: branches/geany-plugins/geany-plugins-0.18/build/i18n.m4 =================================================================== --- branches/geany-plugins/geany-plugins-0.18/build/i18n.m4 (rev 0) +++ branches/geany-plugins/geany-plugins-0.18/build/i18n.m4 2009-09-21 06:01:15 UTC (rev 947) @@ -0,0 +1,12 @@ +AC_DEFUN([GP_I18N], +[ + GETTEXT_PACKAGE=geany-plugins + AC_SUBST(GETTEXT_PACKAGE) + AC_DEFINE_UNQUOTED( + [GETTEXT_PACKAGE], + ["$GETTEXT_PACKAGE"], + [The domain to use with gettext]) + LOCALEDIR="${datadir}/locale" + AC_SUBST(LOCALEDIR) + AM_GLIB_GNU_GETTEXT +])
Modified: branches/geany-plugins/geany-plugins-0.18/build/shiftcolumn.m4 =================================================================== --- branches/geany-plugins/geany-plugins-0.18/build/shiftcolumn.m4 2009-09-21 05:57:38 UTC (rev 946) +++ branches/geany-plugins/geany-plugins-0.18/build/shiftcolumn.m4 2009-09-21 06:01:15 UTC (rev 947) @@ -1,5 +1,6 @@ AC_DEFUN([GP_CHECK_SHIFTCOLUMN], [ + GP_STATUS_PLUGIN_ADD([ShiftColumn], [yes]) AC_CONFIG_FILES([ shiftcolumn/Makefile shiftcolumn/src/Makefile
Modified: branches/geany-plugins/geany-plugins-0.18/build/spellcheck.m4 =================================================================== --- branches/geany-plugins/geany-plugins-0.18/build/spellcheck.m4 2009-09-21 05:57:38 UTC (rev 946) +++ branches/geany-plugins/geany-plugins-0.18/build/spellcheck.m4 2009-09-21 06:01:15 UTC (rev 947) @@ -6,16 +6,27 @@ enable_spellcheck=auto)
ENCHANT_VERSION=1.3 + OPT_ENCHANT_VERSION=1.5
if [[ x"$enable_spellcheck" = "xauto" ]]; then - PKG_CHECK_MODULES(ENCHANT, [enchant >= $ENCHANT_VERSION], - [enable_spellcheck=yes], - [enable_spellcheck=no]) + PKG_CHECK_MODULES(ENCHANT, [enchant >= $OPT_ENCHANT_VERSION], + [have_enchant_1_5=yes; enable_spellcheck=yes], + [have_enchant_1_5=no; enable_spellcheck=auto]) + if [[ "$enable_spellcheck" = "auto" ]]; then + PKG_CHECK_MODULES(ENCHANT, [enchant >= $ENCHANT_VERSION], + [enable_spellcheck=yes], + [enable_spellcheck=no]) + fi elif [[ x"$enable_spellcheck" = "xyes" ]]; then - PKG_CHECK_MODULES(ENCHANT, [enchant >= $ENCHANT_VERSION]) + PKG_CHECK_MODULES(ENCHANT, [enchant >= $OPT_ENCHANT_VERSION], + [have_enchant_1_5=yes], + [have_enchant_1_5=no; + PKG_CHECK_MODULES(ENCHANT, [enchant >= $ENCHANT_VERSION])]) fi
AM_CONDITIONAL(ENABLE_SPELLCHECK, test $enable_spellcheck = yes) + AM_CONDITIONAL(HAVE_ENCHANT_1_5, test $have_enchant_1_5 = yes) + GP_STATUS_PLUGIN_ADD([Spellcheck], [$enable_spellcheck])
AC_CONFIG_FILES([ spellcheck/Makefile
Added: branches/geany-plugins/geany-plugins-0.18/build/status.m4 =================================================================== --- branches/geany-plugins/geany-plugins-0.18/build/status.m4 (rev 0) +++ branches/geany-plugins/geany-plugins-0.18/build/status.m4 2009-09-21 06:01:15 UTC (rev 947) @@ -0,0 +1,60 @@ +dnl add plugin status message, e.g. GP_STATUS_PLUGIN_ADD(plugin,yes) +AC_DEFUN([GP_STATUS_PLUGIN_ADD], +[ + plugins_statusmsg+="$1:$2 +" +]) + +dnl add feature status message, e.g. GP_STATUS_FEATURE_ADD(feature,yes) +AC_DEFUN([GP_STATUS_FEATURE_ADD], +[ + feature_statusmsg+="$1:$2 +" +]) + +dnl indent $1_statusmsg with RHS at col $2 +AC_DEFUN([_GP_STATUS_PRINT_INDENT_], +[ + while read line; do + test -z "$line" && break; + plugin=" ${line%:*}:" + status=${line#*:} + let extracols=$2-${#plugin} + echo -n "$plugin" + for (( i=0; $i<$extracols; i++ )); do + echo -n ' ' + done + echo $status + done << GPEOF +$$1_statusmsg +GPEOF +]) + +dnl print status message +AC_DEFUN([GP_STATUS_PRINT], +[ + GP_EXPAND_DIR(datadir) + GP_EXPAND_DIR(libdir) + GP_EXPAND_DIR(docdir) + + cat <<GPEOF + +${PACKAGE}-${VERSION} + + Build Environment: + Geany version: ${geanyversion} + Install prefix: ${prefix} + Datadir: ${expanded_datadir}/${PACKAGE_TARNAME} + Libdir: ${expanded_libdir}/${PACKAGE_TARNAME} + Docdir: ${expanded_docdir} + Plugins path: ${geanypluginsdir} + + Plugins: +GPEOF + + _GP_STATUS_PRINT_INDENT_(plugins, 34) + echo + echo " Features:" + _GP_STATUS_PRINT_INDENT_(feature, 34) + echo +])
Added: branches/geany-plugins/geany-plugins-0.18/build/unittests.m4 =================================================================== --- branches/geany-plugins/geany-plugins-0.18/build/unittests.m4 (rev 0) +++ branches/geany-plugins/geany-plugins-0.18/build/unittests.m4 2009-09-21 06:01:15 UTC (rev 947) @@ -0,0 +1,7 @@ +AC_DEFUN([GP_CHECK_UNITTESTS], +[ + PKG_CHECK_MODULES([CHECK], [check >= $1], + [AM_CONDITIONAL(UNITTESTS, true)], + [AM_CONDITIONAL(UNITTESTS, false)]) +]) +
Modified: branches/geany-plugins/geany-plugins-0.18/configure.ac =================================================================== --- branches/geany-plugins/geany-plugins-0.18/configure.ac 2009-09-21 05:57:38 UTC (rev 946) +++ branches/geany-plugins/geany-plugins-0.18/configure.ac 2009-09-21 06:01:15 UTC (rev 947) @@ -1,6 +1,6 @@ AC_PREREQ([2.61]) -AC_INIT([geany-plugins], [0.18]) -AM_INIT_AUTOMAKE([1.8 foreign dist-bzip2 tar-ustar subdir-objects]) +AC_INIT([geany-plugins], [0.17.1]) +AM_INIT_AUTOMAKE([1.8 foreign dist-bzip2 tar-ustar])
AC_CONFIG_SRCDIR([po/LINGUAS]) AC_CONFIG_HEADERS([config.h]) @@ -12,25 +12,12 @@
dnl i18n IT_PROG_INTLTOOL([0.35.0]) -GETTEXT_PACKAGE=geany-plugins -AC_SUBST(GETTEXT_PACKAGE) -AC_DEFINE_UNQUOTED( - [GETTEXT_PACKAGE], - ["$GETTEXT_PACKAGE"], - [The domain to use with gettext]) -AM_GLIB_GNU_GETTEXT -LOCALEDIR="${datadir}/locale" -AC_SUBST(LOCALEDIR) +GP_I18N
dnl common checks -PKG_CHECK_MODULES([GEANY], [geany >= 0.18]) -geanypluginsdir=`${PKG_CONFIG} --variable=libdir geany`/geany -AC_SUBST([geanypluginsdir]) +GP_CHECK_GEANY(0.18) +GP_CHECK_UNITTESTS(0.9.4)
-PKG_CHECK_MODULES([CHECK], [check >= 0.9.4], - [AM_CONDITIONAL(UNITTESTS, true)], - [AM_CONDITIONAL(UNITTESTS, false)]) - dnl plugin checks GP_CHECK_ADDONS GP_CHECK_GEANYGDB @@ -47,3 +34,4 @@ po/Makefile.in ]) AC_OUTPUT +GP_STATUS_PRINT
Modified: branches/geany-plugins/geany-plugins-0.18/spellcheck/src/Makefile.am =================================================================== --- branches/geany-plugins/geany-plugins-0.18/spellcheck/src/Makefile.am 2009-09-21 05:57:38 UTC (rev 946) +++ branches/geany-plugins/geany-plugins-0.18/spellcheck/src/Makefile.am 2009-09-21 06:01:15 UTC (rev 947) @@ -18,6 +18,10 @@ $(AM_CFLAGS) \ $(ENCHANT_CFLAGS)
+if HAVE_ENCHANT_1_5 +spellcheck_la_CFLAGS += -DHAVE_ENCHANT_1_5 +endif + spellcheck_la_LIBADD = \ $(COMMONLIBS) \ $(ENCHANT_LIBS)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
plugins-commits@lists.geany.org