Author: akv
Date: 2010-11-16 00:17:36 +0100 (Tue, 16 Nov 2010)
New Revision: 3625
Modified:
trunk/Makefile.am
trunk/autogen.sh
trunk/configure.in
trunk/src/rs-actions.c
Log:
Adding extended version information patch by Edouard Gomez.
Modified: trunk/Makefile.am
===================================================================
--- trunk/Makefile.am 2010-11-15 19:27:13 UTC (rev 3624)
+++ trunk/Makefile.am 2010-11-15 23:17:36 UTC (rev 3625)
@@ -9,7 +9,8 @@
autogen.sh \
ChangeLog \
rawstudio.desktop \
- gettext.h
+ gettext.h \
+ .version $(SVNINFO)
ChangeLog:
svn2cl -i
Modified: trunk/autogen.sh
===================================================================
--- trunk/autogen.sh 2010-11-15 19:27:13 UTC (rev 3624)
+++ trunk/autogen.sh 2010-11-15 23:17:36 UTC (rev 3625)
@@ -148,6 +148,10 @@
fi
done
+if [ -d .svn ] && svn --version >/dev/null 2>&1 ; then
+ LC_ALL=C svn info > .svninfo
+fi
+
conf_flags="--enable-maintainer-mode"
if test x$NOCONFIGURE = x; then
Modified: trunk/configure.in
===================================================================
--- trunk/configure.in 2010-11-15 19:27:13 UTC (rev 3624)
+++ trunk/configure.in 2010-11-15 23:17:36 UTC (rev 3625)
@@ -103,6 +103,60 @@
AM_CONDITIONAL(CAN_COMPILE_SSE4_1, test "$_CAN_COMPILE_SSE4_1" = yes)
AM_CONDITIONAL(CAN_COMPILE_SSE2, test "$_CAN_COMPILE_SSE2" = yes)
+[
+branchname()
+{
+ awk '
+/^Repository Root:/ {
+ root=$3;
+}
+
+/^URL:/ {
+ url=$2;
+}
+
+END{
+ sub(root, "", url);
+ if (index(url, "/branches/") == 1) {
+ branch = substr(url, 11);
+ printf(" (branch %s)", branch);
+ } else if (index(url, "/tags/") == 1) {
+ tag = substr(url, 7);
+ printf(" (tag %s)", tag);
+ } else {
+ printf(" (trunk)");
+ }
+}
+'
+}
+
+if test -f .version ; then
+ RAWSTUDIO_VERSION=$(cat .version)
+else
+ RAWSTUDIO_VERSION="${VERSION}"
+fi
+if test -d .svn && svn --version>/dev/null 2>&1 ; then
+ RAWSTUDIO_SVNREV=$(LC_ALL=C svn info | awk '/^Revision:/
{printf("-svn%s",$2); }')
+ RAWSTUDIO_BRANCH=$(LC_ALL=C svn info |branchname)
+elif test -f .svninfo ; then
+ RAWSTUDIO_SVNREV=$(awk '/^Revision:/ {printf("-snapshot%s",$2); }' .svninfo)
+ RAWSTUDIO_BRANCH=$(cat .svninfo|branchname)
+else
+ RAWSTUDIO_SVNREV=""
+ RAWSTUDIO_BRANCH=""
+fi
+]
+RAWSTUDIO_VERSION="${RAWSTUDIO_VERSION}${RAWSTUDIO_SVNREV}${RAWSTUDIO_BRANCH}"
+
+AC_DEFINE_UNQUOTED([RAWSTUDIO_VERSION], ["$RAWSTUDIO_VERSION"], ["Public
revision"])
+
+if test -f .svninfo; then
+ SVNINFO=".svninfo"
+else
+ SVNINFO=""
+fi
+AC_SUBST([SVNINFO])
+
AC_OUTPUT([
Makefile
librawstudio/Makefile
Modified: trunk/src/rs-actions.c
===================================================================
--- trunk/src/rs-actions.c 2010-11-15 19:27:13 UTC (rev 3624)
+++ trunk/src/rs-actions.c 2010-11-15 23:17:36 UTC (rev 3625)
@@ -1146,7 +1146,7 @@
"artists", artists,
"translator-credits", "Simone Contini\nPaweł
Gołaszewski\nAlexandre Prokoudine\nJakub Friedl\nCarsten Mathaes\nEdouard
Gomez\nMartin Egger\nKrzysztof Kościuszkiewicz\nEinar Ryeng\nOlli
Hänninen\nCarlos Dávila\nPatrik Jarl\nOlav Lavell\nRafael Sachetto
Oliveira\nPaco Rivière",
"comments", _("A raw image converter for GTK+/GNOME"),
- "version", VERSION,
+ "version", RAWSTUDIO_VERSION,
"website", "http://rawstudio.org/",
"name", "Rawstudio",
NULL
@@ -1386,4 +1386,4 @@
g_static_mutex_unlock(&rs_actions_spinlock);
return action;
-}
\ No newline at end of file
+}
_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit