[Goodies-commits] r6331 - in sion/trunk: . src

Enrico Troeger enrico at xfce.org
Fri Dec 19 19:13:39 CET 2008


Author: enrico
Date: 2008-12-19 18:13:38 +0000 (Fri, 19 Dec 2008)
New Revision: 6331

Added:
   sion/trunk/Makefile.am
   sion/trunk/configure.ac
   sion/trunk/src/Makefile.am
Removed:
   sion/trunk/Makefile
   sion/trunk/src/Makefile
Modified:
   sion/trunk/ChangeLog
   sion/trunk/README
   sion/trunk/autogen.sh
Log:
Add support for building Sion with autotools.

Modified: sion/trunk/ChangeLog
===================================================================
--- sion/trunk/ChangeLog	2008-12-18 15:39:04 UTC (rev 6330)
+++ sion/trunk/ChangeLog	2008-12-19 18:13:38 UTC (rev 6331)
@@ -1,3 +1,9 @@
+2008-12-19  Enrico Tröger  <enrico(at)xfce(dot)org>
+
+ * src/Makefile.am, README, configure.ac, Makefile.am, autogen.sh:
+   Add support for building Sion with autotools.
+
+
 2008-12-18  Enrico Tröger  <enrico(at)xfce(dot)org>
 
  * waf, wscript:

Added: sion/trunk/Makefile.am
===================================================================
--- sion/trunk/Makefile.am	                        (rev 0)
+++ sion/trunk/Makefile.am	2008-12-19 18:13:38 UTC (rev 6331)
@@ -0,0 +1,29 @@
+## Process this file with automake to produce Makefile.in
+
+SUBDIRS = src po
+
+EXTRA_DIST =					\
+	autogen.sh					\
+	wscript						\
+	waf							\
+	README.I18N					\
+	sion.desktop.in				\
+	intltool-extract.in			\
+	intltool-merge.in			\
+	intltool-update.in
+
+
+DISTCLEANFILES =				\
+	sion.1						\
+	sion.desktop				\
+	intltool-extract			\
+	intltool-merge				\
+	intltool-update
+
+
+man_MANS=sion.1
+
+desktopdir = $(datadir)/applications
+desktop_in_files = sion.desktop
+desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
+ at INTLTOOL_DESKTOP_RULE@


Property changes on: sion/trunk/Makefile.am
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Modified: sion/trunk/README
===================================================================
--- sion/trunk/README	2008-12-18 15:39:04 UTC (rev 6330)
+++ sion/trunk/README	2008-12-19 18:13:38 UTC (rev 6331)
@@ -22,7 +22,7 @@
 
 Installation
 ============
-If you have all the above listed requirements on your system installed,
+If you have all the above listed requirements installed on your system,
 building the code is easy:
 
 Run the following commands::
@@ -38,6 +38,18 @@
     $ ./waf help
 
 
+Alternative installation using autotools
+````````````````````````````````````````
+
+You can use the usual autotools chain to configure, compile and install
+the sources by running::
+
+    $ ./autogen.sh
+
+in the source directory.
+This is mainly intended for distro packagers and people with special needs.
+
+
 Usage
 =====
 You can start Sion in the following ways:

Modified: sion/trunk/autogen.sh
===================================================================
--- sion/trunk/autogen.sh	2008-12-18 15:39:04 UTC (rev 6330)
+++ sion/trunk/autogen.sh	2008-12-19 18:13:38 UTC (rev 6331)
@@ -1,4 +1,78 @@
 #!/bin/sh
+# Run this to generate all the initial makefiles, etc.
 
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
 
-./configure "$@"
+DIE=0
+
+(test -f $srcdir/configure.ac) || {
+	echo "**Error**: Directory "\`$srcdir\'" does not look like the top-level package directory"
+	exit 1
+}
+
+(autoconf --version) < /dev/null > /dev/null 2>&1 || {
+	echo
+	echo "**Error**: You must have \`autoconf' installed."
+	echo "Download the appropriate package for your distribution,"
+	echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
+	DIE=1
+}
+
+(intltoolize --version) < /dev/null > /dev/null 2>&1 || {
+	echo
+	echo "**Error**: You must have \`intltool' installed."
+	echo "You can get it from:"
+	echo "  ftp://ftp.gnome.org/pub/GNOME/"
+	DIE=1
+}
+
+(glib-gettextize --version) < /dev/null > /dev/null 2>&1 || {
+	echo
+	echo "**Error**: You must have \`glib' installed."
+	echo "You can get it from: ftp://ftp.gtk.org/pub/gtk"
+	DIE=1
+}
+
+(automake --version) < /dev/null > /dev/null 2>&1 || {
+	echo
+	echo "**Error**: You must have \`automake' (1.7 or later) installed."
+	echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
+	DIE=1
+	NO_AUTOMAKE=yes
+}
+
+
+# if no automake, don't bother testing for aclocal
+test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
+	echo
+	echo "**Error**: Missing \`aclocal'.  The version of \`automake'"
+	echo "installed doesn't appear recent enough."
+	echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/"
+	DIE=1
+}
+
+if test "$DIE" -eq 1; then
+	exit 1
+fi
+
+if test -z "$*"; then
+	echo "**Warning**: I am going to run \`configure' with no arguments."
+	echo "If you wish to pass any to it, please specify them on the"
+	echo \`$0\'" command line."
+	echo
+fi
+
+echo "Processing configure.ac"
+
+echo "no" | glib-gettextize --force --copy
+intltoolize --copy --force --automake
+#~ libtoolize --copy --force || glibtoolize --copy --force
+aclocal
+autoheader
+automake --add-missing --copy --gnu
+autoconf
+
+echo "Running $srcdir/configure $@ ..."
+$srcdir/configure "$@" && echo "Now type 'make' to compile." || exit 1
+

Added: sion/trunk/configure.ac
===================================================================
--- sion/trunk/configure.ac	                        (rev 0)
+++ sion/trunk/configure.ac	2008-12-19 18:13:38 UTC (rev 6331)
@@ -0,0 +1,65 @@
+dnl Process this file with autoconf to produce a configure script.
+dnl $Id$
+
+AC_INIT([sion], [0.0.1], [http://bugs.xfce.org/])
+AM_INIT_AUTOMAKE([AC_PACKAGE_TARNAME()], [AC_PACKAGE_VERSION()])
+
+AC_CONFIG_SRCDIR([src/main.c])
+AC_CONFIG_HEADER(config.h)
+
+AC_GNU_SOURCE
+AC_AIX
+AC_MINIX
+
+AC_PROG_CC
+
+AC_PROG_INSTALL
+AC_PROG_LN_S
+IT_PROG_INTLTOOL
+
+
+# GTK checks
+gtk_modules="gtk+-2.0 >= 2.12.0 gio-2.0 >= 2.16.0"
+PKG_CHECK_MODULES(GTK, [$gtk_modules])
+AC_SUBST(GTK_CFLAGS)
+AC_SUBST(GTK_LIBS)
+
+# --disable-deprecated switch for GTK2 purification
+AC_ARG_ENABLE(deprecated, [  --disable-deprecated    Disable deprecated GTK functions. ],
+			  [GTK_CFLAGS="$GTK_CFLAGS -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"], [])
+
+GTK_VERSION=`$PKG_CONFIG --modversion gtk+-2.0`
+
+# i18n
+GETTEXT_PACKAGE=sion
+AC_SUBST(GETTEXT_PACKAGE)
+AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext package.])
+
+ALL_LINGUAS="`sed -e '/^#/d' $srcdir/po/LINGUAS`" # take all languages found in file po/LINGUAS
+
+AM_GLIB_GNU_GETTEXT
+# workaround for intltool bug (http://bugzilla.gnome.org/show_bug.cgi?id=490845)
+if test "x$MSGFMT" = "xno"; then
+	AC_MSG_ERROR([msgfmt not found. Please install the gettext package.])
+fi
+
+# intltool hack to define install_sh on Debian/Ubuntu systems
+if test "x$install_sh" = "x"; then
+	install_sh="`pwd`/install-sh"
+	AC_SUBST(install_sh)
+fi
+
+
+AC_OUTPUT([
+Makefile
+src/Makefile
+po/Makefile.in
+sion.1
+])
+
+echo "----------------------------------------"
+echo "Install in                         : ${prefix}"
+echo "Using GTK version                  : ${GTK_VERSION}"
+echo ""
+echo "Configuration is done OK."
+echo ""


Property changes on: sion/trunk/configure.ac
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Added: sion/trunk/src/Makefile.am
===================================================================
--- sion/trunk/src/Makefile.am	                        (rev 0)
+++ sion/trunk/src/Makefile.am	2008-12-19 18:13:38 UTC (rev 6331)
@@ -0,0 +1,24 @@
+
+bin_PROGRAMS = sion
+
+sion_SOURCES = 									\
+	main.c main.h								\
+	compat.c compat.h							\
+	common.c common.h							\
+	window.c window.h							\
+	bookmark.c bookmark.h						\
+	settings.c settings.h						\
+	backendgvfs.c backendgvfs.h					\
+	menubuttonaction.c menubuttonaction.h		\
+	passworddialog.c passworddialog.h			\
+	bookmarkdialog.c bookmarkdialog.h			\
+	bookmarkeditdialog.c bookmarkeditdialog.h	\
+	preferencesdialog.c preferencesdialog.h
+
+
+AM_CFLAGS = -DLOCALEDIR=\""$(localedir)"\"
+
+
+INCLUDES = @GTK_CFLAGS@
+
+sion_LDADD = @GTK_LIBS@ $(INTLLIBS)


Property changes on: sion/trunk/src/Makefile.am
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native




More information about the Goodies-commits mailing list