diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 00000000..b3b4516d --- /dev/null +++ b/Makefile.am @@ -0,0 +1,10 @@ +SUBDIRS = \ + build \ + notify-sharp \ + SparkleShare + +DISTCLEANFILES = \ + intltool-extract \ + intltool-merge \ + intltool-update + diff --git a/SparkleShare/AssemblyInfo.cs.in b/SparkleShare/AssemblyInfo.cs.in new file mode 100644 index 00000000..bd5ac1af --- /dev/null +++ b/SparkleShare/AssemblyInfo.cs.in @@ -0,0 +1,11 @@ +/* + * AssemblyInfo.cs + * + * This is free software. See COPYING for details. + */ + +using System.Reflection; +using System.Runtime.CompilerServices; + +[assembly: AssemblyVersion("@VERSION@")] +[assembly: AssemblyTitle ("SparkleShare")] diff --git a/SparkleShare/Makefile.am b/SparkleShare/Makefile.am new file mode 100644 index 00000000..c53b5c77 --- /dev/null +++ b/SparkleShare/Makefile.am @@ -0,0 +1,23 @@ +ASSEMBLY = SparkleShare +TARGET = exe + +LINK = $(REF_SPARKLESHARE) + + +SOURCES = \ +SparkleBubble.cs \ +SparkleDialog.cs \ +SparkleHelpers.cs \ +SparklePaths.cs \ +SparklePlatform.cs \ +SparkleRepo.cs \ +SparkleShare.cs \ +SparkleSpinner.cs \ +SparkleStatusIcon.cs \ +SparkleUI.cs \ +SparkleWindow.cs + +include $(top_srcdir)/build/build.mk + +bin_SCRIPTS = sparkleshare + diff --git a/SparkleShare/sparkleshare.in b/SparkleShare/sparkleshare.in new file mode 100644 index 00000000..669386ca --- /dev/null +++ b/SparkleShare/sparkleshare.in @@ -0,0 +1,3 @@ +#!/bin/sh + +exec mono "@expanded_libdir@/@PACKAGE@/SparkleShare.exe" "$@" diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 00000000..a55556a7 --- /dev/null +++ b/autogen.sh @@ -0,0 +1,5 @@ +intltoolize --copy --force +aclocal -I build/m4/sparkleshare -I build/m4/shamrock -I build/m4/shave +autoconf +automake + diff --git a/build/DllMapVerifier.cs b/build/DllMapVerifier.cs new file mode 100644 index 00000000..9acccb68 --- /dev/null +++ b/build/DllMapVerifier.cs @@ -0,0 +1,258 @@ +using System; +using System.IO; +using System.Xml; +using System.Text; +using System.Collections.Generic; + +public static class DllMapVerifier +{ + private struct DllImportRef + { + public DllImportRef (string name, int line, int column) + { + Name = name; + Line = line; + Column = column; + } + + public string Name; + public int Line; + public int Column; + } + + private static Dictionary> dll_imports + = new Dictionary> (); + private static List ignore_dlls = new List (); + private static List config_dlls = null; + + public static int Main (string [] args) + { + LoadConfigDlls (args[0]); + foreach (string file in args) { + LoadDllImports (file); + } + + return VerifyDllImports (args[0]) ? 0 : 1; + } + + private static bool VerifyDllImports (string configFile) + { + int total_unmapped_count = 0; + + foreach (KeyValuePair> dll_import in dll_imports) { + int file_unmapped_count = 0; + foreach (DllImportRef dll_import_ref in dll_import.Value) { + if (config_dlls != null && config_dlls.Contains (dll_import_ref.Name)) { + continue; + } + + if (file_unmapped_count++ == 0) { + Console.Error.WriteLine ("Unmapped DLLs in file: {0}", dll_import.Key); + } + + Console.Error.WriteLine (" + {0} : {1},{2}", dll_import_ref.Name, + dll_import_ref.Line, dll_import_ref.Column); + } + + total_unmapped_count += file_unmapped_count; + } + + if (total_unmapped_count > 0) { + Console.Error.WriteLine (); + Console.Error.WriteLine (" If any DllImport above is explicitly allowed to be unmapped,"); + Console.Error.WriteLine (" add an 'willfully unmapped' comment to the inside of the attribute:"); + Console.Error.WriteLine (); + Console.Error.WriteLine (" [DllImport (\"libX11.so.6\") /* willfully unmapped */]"); + Console.Error.WriteLine (); + } + + if (total_unmapped_count > 0 && config_dlls == null) { + Console.Error.WriteLine ("No config file for DLL mapping was found ({0})", configFile); + } + + return total_unmapped_count == 0; + } + + private static void LoadDllImports (string csFile) + { + if (csFile.StartsWith ("-i")) { + ignore_dlls.Add (csFile.Substring (2)); + return; + } + + if (Path.GetExtension (csFile) == ".cs" && File.Exists (csFile)) { + List dll_import_refs = null; + + foreach (DllImportRef dll_import in ParseFileForDllImports (csFile)) { + if (ignore_dlls.Contains (dll_import.Name)) { + continue; + } + + if (dll_import_refs == null) { + dll_import_refs = new List (); + } + + dll_import_refs.Add (dll_import); + } + + if (dll_import_refs != null) { + dll_imports.Add (csFile, dll_import_refs); + } + } + } + + private static void LoadConfigDlls (string configFile) + { + try { + XmlTextReader config = new XmlTextReader (configFile); + config_dlls = new List (); + while (config.Read ()) { + if (config.NodeType == XmlNodeType.Element && + config.Name == "dllmap") { + string dll = config.GetAttribute ("dll"); + if (!config_dlls.Contains (dll)) { + config_dlls.Add (dll); + } + } + } + } catch { + } + } + +#region DllImport parser + + private static StreamReader reader; + private static int reader_line; + private static int reader_col; + + private static IEnumerable ParseFileForDllImports (string file) + { + reader_line = 1; + reader_col = 1; + + using (reader = new StreamReader (file)) { + char c; + bool in_paren = false; + bool in_attr = false; + bool in_dll_attr = false; + bool in_string = false; + bool in_comment = false; + int dll_line = 1, dll_col = 1; + string dll_string = null; + string dll_comment = null; + + while ((c = (char)reader.Peek ()) != Char.MaxValue) { + switch (c) { + case ' ': + case '\t': Read (); break; + case '[': + in_attr = true; + dll_string = null; + dll_comment = null; + dll_line = reader_line; + dll_col = reader_col; + Read (); + break; + case '(': Read (); in_paren = true; break; + case ')': Read (); in_paren = false; break; + case '"': + Read (); + if (dll_string == null && in_dll_attr && in_paren && !in_string) { + in_string = true; + } + break; + case '/': + Read (); + if ((char)reader.Peek () == '*') { + Read (); + if (in_dll_attr && !in_comment) { + in_comment = true; + } + } + break; + case ']': + if (in_dll_attr && dll_string != null && dll_comment != "willfully unmapped") { + yield return new DllImportRef (dll_string, dll_line, dll_col); + } + in_attr = false; + in_dll_attr = false; + Read (); + break; + default: + if (!in_dll_attr && in_attr && ReadDllAttribute ()) { + in_dll_attr = true; + } else if (in_dll_attr && in_string) { + dll_string = ReadDllString (); + in_string = false; + } else if (in_dll_attr && in_comment) { + dll_comment = ReadDllComment (); + in_comment = false; + } else { + Read (); + } + break; + } + } + } + } + + private static bool ReadDllAttribute () + { + return + Read () == 'D' && + Read () == 'l' && + Read () == 'l' && + Read () == 'I' && + Read () == 'm' && + Read () == 'p' && + Read () == 'o' && + Read () == 'r' && + Read () == 't'; + } + + private static string ReadDllString () + { + StringBuilder builder = new StringBuilder (32); + while (true) { + char c = Read (); + if (Char.IsLetterOrDigit (c) || c == '.' || c == '-' || c == '_') { + builder.Append (c); + } else { + break; + } + } + return builder.ToString (); + } + + private static string ReadDllComment () + { + StringBuilder builder = new StringBuilder (); + char lc = Char.MaxValue; + while (true) { + char c = Read (); + if (c == Char.MaxValue || (c == '/' && lc == '*')) { + break; + } else if (lc != Char.MaxValue) { + builder.Append (lc); + } + lc = c; + } + return builder.ToString ().Trim (); + } + + private static char Read () + { + char c = (char)reader.Read (); + if (c == '\n') { + reader_line++; + reader_col = 1; + } else { + reader_col++; + } + return c; + } + +#endregion + +} + diff --git a/build/Makefile.am b/build/Makefile.am new file mode 100644 index 00000000..08688778 --- /dev/null +++ b/build/Makefile.am @@ -0,0 +1,18 @@ +SUBDIRS = m4 + +DLL_MAP_VERIFIER_ASSEMBLY = dll-map-verifier.exe + +ALL_TARGETS = $(DLL_MAP_VERIFIER_ASSEMBLY) + +all: $(ALL_TARGETS) + +$(DLL_MAP_VERIFIER_ASSEMBLY): DllMapVerifier.cs + $(MCS) -out:$@ $< + +EXTRA_DIST = \ + private-icon-theme-installer \ + DllMapVerifier.cs \ + dll-map-makefile-verifier + +CLEANFILES = *.exe *.mdb +MAINTAINERCLEANFILES = Makefile.in diff --git a/build/build.environment.mk b/build/build.environment.mk new file mode 100644 index 00000000..02a2fe02 --- /dev/null +++ b/build/build.environment.mk @@ -0,0 +1,45 @@ +# Initializers +MONO_BASE_PATH = +MONO_ADDINS_PATH = + +# Install Paths +DEFAULT_INSTALL_DIR = $(pkglibdir) + + +## Directories +DIR_DOCS = $(top_builddir)/docs + +DIR_ICONS = $(top_builddir)/icons +DIR_NOTIFYSHARP = $(top_builddir)/notify-sharp +DIR_SRC = $(top_builddir)/src + +DIR_BIN = $(top_builddir)/bin + + +# External libraries to link against, generated from configure +LINK_SYSTEM = -r:System +LINK_MONO_POSIX = -r:Mono.Posix + +LINK_GLIB = $(GLIBSHARP_LIBS) +LINK_GTK = $(GTKSHARP_LIBS) +LINK_GNOME = $(GNOME_SHARP_LIBS) +LINK_DBUS = $(NDESK_DBUS_LIBS) $(NDESK_DBUS_GLIB_LIBS) +LINK_DBUS_NO_GLIB = $(NDESK_DBUS_LIBS) + + +REF_NOTIFY_SHARP = $(LINK_SYSTEM) $(LINK_DBUS) $(GTKSHARP_LIBS) $(GLIBSHARP_LIBS) +LINK_NOTIFY_SHARP = -r:$(DIR_BIN)/NotifySharp.dll +LINK_NOTIFY_SHARP_DEPS = $(REF_NOTIFY_SHARP) $(LINK_NOTIFY_SHARP) + +REF_SPARKLESHARE = $(LINK_SYSTEM) $(LINK_GTK) $(LINK_DBUS) $(LINK_NOTIFY_SHARP_DEPS) $(LINK_MONO_POSIX) +LINK_SPARKLESHARE = -r:$(DIR_BIN)/SparkleShare.exe +LINK_SPARKLESHARE_DEPS = $(REF_SPARKLESHARE) $(LINK_SPARKLESHARE) + +# Cute hack to replace a space with something +colon:= : +empty:= +space:= $(empty) $(empty) + +# Build path to allow running uninstalled +RUN_PATH = $(subst $(space),$(colon), $(MONO_BASE_PATH)) + diff --git a/build/build.mk b/build/build.mk new file mode 100644 index 00000000..78e07604 --- /dev/null +++ b/build/build.mk @@ -0,0 +1,3 @@ +include $(top_srcdir)/build/build.environment.mk +include $(top_srcdir)/build/build.rules.mk + diff --git a/build/build.rules.mk b/build/build.rules.mk new file mode 100644 index 00000000..6edc902b --- /dev/null +++ b/build/build.rules.mk @@ -0,0 +1,105 @@ +UNIQUE_FILTER_PIPE = tr [:space:] \\n | sort | uniq +BUILD_DATA_DIR = $(top_builddir)/bin/share/$(PACKAGE) + +# Since all other attempts failed, we currently go this way: +# This code adds the file specified in ASSEMBLY_INFO_SOURCE to SOURCES_BUILD. +# If no such file is specified, the default AssemblyInfo.cs is used. +ASSEMBLY_INFO_SOURCE_REAL = \ + $(shell if [ "$(ASSEMBLY_INFO_SOURCE)" ]; \ + then \ + echo "$(addprefix $(srcdir)/, $(ASSEMBLY_INFO_SOURCE))"; \ + else \ + echo "$(top_srcdir)/SparkleShare/AssemblyInfo.cs"; \ + fi) + +SOURCES_BUILD = $(addprefix $(srcdir)/, $(SOURCES)) +SOURCES_BUILD += $(ASSEMBLY_INFO_SOURCE_REAL) + + +RESOURCES_EXPANDED = $(addprefix $(srcdir)/, $(RESOURCES)) +RESOURCES_BUILD = $(foreach resource, $(RESOURCES_EXPANDED), \ + -resource:$(resource),$(notdir $(resource))) + +INSTALL_ICONS = $(top_srcdir)/build/private-icon-theme-installer "$(mkinstalldirs)" "$(INSTALL_DATA)" +THEME_ICONS_SOURCE = $(wildcard $(srcdir)/ThemeIcons/*/*/*.png) $(wildcard $(srcdir)/ThemeIcons/scalable/*/*.svg) +THEME_ICONS_RELATIVE = $(subst $(srcdir)/ThemeIcons/, , $(THEME_ICONS_SOURCE)) + +ASSEMBLY_EXTENSION = $(strip $(patsubst library, dll, $(TARGET))) +ASSEMBLY_FILE = $(top_builddir)/bin/$(ASSEMBLY).$(ASSEMBLY_EXTENSION) + +INSTALL_DIR_RESOLVED = $(firstword $(subst , $(DEFAULT_INSTALL_DIR), $(INSTALL_DIR))) + +if ENABLE_TESTS + LINK += " $(NUNIT_LIBS)" + ENABLE_TESTS_FLAG = "-define:ENABLE_TESTS" +endif + +if ENABLE_ATK + ENABLE_ATK_FLAG = "-define:ENABLE_ATK" +endif + +FILTERED_LINK = $(shell echo "$(LINK)" | $(UNIQUE_FILTER_PIPE)) +DEP_LINK = $(shell echo "$(LINK)" | $(UNIQUE_FILTER_PIPE) | sed s,-r:,,g | grep '$(top_builddir)/bin/') + +OUTPUT_FILES = \ + $(ASSEMBLY_FILE) \ + $(ASSEMBLY_FILE).mdb + +moduledir = $(INSTALL_DIR_RESOLVED) +module_SCRIPTS = $(OUTPUT_FILES) + +all: $(ASSEMBLY_FILE) theme-icons + +run: + @pushd $(top_builddir); \ + make run; \ + popd; + +# uncommented for now. +# tests are currently excuted from Makefile in $(top_builddir) +#test: +# @pushd $(top_builddir)/tests; \ +# make $(ASSEMBLY); \ +# popd; + +build-debug: + @echo $(DEP_LINK) + +$(ASSEMBLY_FILE).mdb: $(ASSEMBLY_FILE) + +$(ASSEMBLY_FILE): $(SOURCES_BUILD) $(RESOURCES_EXPANDED) $(DEP_LINK) + @mkdir -p $(top_builddir)/bin + @if [ ! "x$(ENABLE_RELEASE)" = "xyes" ]; then \ + $(top_srcdir)/build/dll-map-makefile-verifier $(srcdir)/Makefile.am $(srcdir)/$(notdir $@.config) && \ + $(MONO) $(top_builddir)/build/dll-map-verifier.exe $(srcdir)/$(notdir $@.config) -iwinmm -ilibbanshee -ilibbnpx11 -ilibc -ilibc.so.6 -iintl -ilibmtp.dll -ilibigemacintegration.dylib -iCFRelease $(SOURCES_BUILD); \ + fi; + $(MCS) \ + $(GMCS_FLAGS) \ + $(ASSEMBLY_BUILD_FLAGS) \ + -nowarn:0278 -nowarn:0078 $$warn \ + -define:HAVE_GTK_2_10 -define:NET_2_0 \ + -debug -target:$(TARGET) -out:$@ \ + $(BUILD_DEFINES) $(ENABLE_TESTS_FLAG) $(ENABLE_ATK_FLAG) \ + $(FILTERED_LINK) $(RESOURCES_BUILD) $(SOURCES_BUILD) + @if [ -e $(srcdir)/$(notdir $@.config) ]; then \ + cp $(srcdir)/$(notdir $@.config) $(top_builddir)/bin; \ + fi; + @if [ ! -z "$(EXTRA_BUNDLE)" ]; then \ + cp $(EXTRA_BUNDLE) $(top_builddir)/bin; \ + fi; + +theme-icons: $(THEME_ICONS_SOURCE) + @$(INSTALL_ICONS) -il "$(BUILD_DATA_DIR)" "$(srcdir)" $(THEME_ICONS_RELATIVE) + +install-data-local: $(THEME_ICONS_SOURCE) + @$(INSTALL_ICONS) -i "$(DESTDIR)$(pkgdatadir)" "$(srcdir)" $(THEME_ICONS_RELATIVE) + +uninstall-local: $(THEME_ICONS_SOURCE) + @$(INSTALL_ICONS) -u "$(DESTDIR)$(pkgdatadir)" "$(srcdir)" $(THEME_ICONS_RELATIVE) + +EXTRA_DIST = $(SOURCES_BUILD) $(RESOURCES_EXPANDED) $(THEME_ICONS_SOURCE) + +CLEANFILES = $(OUTPUT_FILES) $(ASSEMBLY_FILE).config +DISTCLEANFILES = *.pidb +MAINTAINERCLEANFILES = Makefile.in + diff --git a/build/dll-map-makefile-verifier b/build/dll-map-makefile-verifier new file mode 100755 index 00000000..c75afa50 --- /dev/null +++ b/build/dll-map-makefile-verifier @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +if [ -f $2 ]; then + # Lame, but better than nothing + grep $(basename $2) $1 | grep module_SCRIPTS &>/dev/null || { + echo "Assembly has corresponding .config file, but it was not found in module_SCRIPTS in Makefile.am" 2>&1 + exit 1 + } +fi + diff --git a/build/m4/Makefile.am b/build/m4/Makefile.am new file mode 100644 index 00000000..30385548 --- /dev/null +++ b/build/m4/Makefile.am @@ -0,0 +1,6 @@ +EXTRA_DIST = \ + $(srcdir)/sparkleshare/*.m4 \ + $(srcdir)/shamrock/*.m4 + +MAINTAINERCLEANFILES = Makefile.in + diff --git a/build/m4/shamrock/expansions.m4 b/build/m4/shamrock/expansions.m4 new file mode 100644 index 00000000..ba623565 --- /dev/null +++ b/build/m4/shamrock/expansions.m4 @@ -0,0 +1,50 @@ +AC_DEFUN([SHAMROCK_EXPAND_LIBDIR], +[ + expanded_libdir=`( + case $prefix in + NONE) prefix=$ac_default_prefix ;; + *) ;; + esac + case $exec_prefix in + NONE) exec_prefix=$prefix ;; + *) ;; + esac + eval echo $libdir + )` + AC_SUBST(expanded_libdir) +]) + +AC_DEFUN([SHAMROCK_EXPAND_BINDIR], +[ + expanded_bindir=`( + case $prefix in + NONE) prefix=$ac_default_prefix ;; + *) ;; + esac + case $exec_prefix in + NONE) exec_prefix=$prefix ;; + *) ;; + esac + eval echo $bindir + )` + AC_SUBST(expanded_bindir) +]) + +AC_DEFUN([SHAMROCK_EXPAND_DATADIR], +[ + case $prefix in + NONE) prefix=$ac_default_prefix ;; + *) ;; + esac + + case $exec_prefix in + NONE) exec_prefix=$prefix ;; + *) ;; + esac + + expanded_datadir=`(eval echo $datadir)` + expanded_datadir=`(eval echo $expanded_datadir)` + + AC_SUBST(expanded_datadir) +]) + diff --git a/build/m4/shamrock/gnome-doc.m4 b/build/m4/shamrock/gnome-doc.m4 new file mode 100644 index 00000000..e8896bd7 --- /dev/null +++ b/build/m4/shamrock/gnome-doc.m4 @@ -0,0 +1,6 @@ +AC_DEFUN([SHAMROCK_CHECK_GNOME_DOC_UTILS], +[ + GNOME_DOC_INIT([$1], HAVE_GNOME_DOC_UTILS=yes, HAVE_GNOME_DOC_UTILS=no) + + AM_CONDITIONAL(ENABLE_GNOME_DOCS, test "x$HAVE_GNOME_DOC_UTILS" = "xyes") +]) diff --git a/build/m4/shamrock/i18n.m4 b/build/m4/shamrock/i18n.m4 new file mode 100644 index 00000000..e6326471 --- /dev/null +++ b/build/m4/shamrock/i18n.m4 @@ -0,0 +1,10 @@ +AC_DEFUN([SHAMROCK_CONFIGURE_I18N], +[ + ALL_LINGUAS=`grep -v '^#' $srcdir/po/LINGUAS | $SED ':a;N;$!ba;s/\n/ /g; s/[ ]+/ /g' | xargs` + GETTEXT_PACKAGE=$1 + AC_SUBST(GETTEXT_PACKAGE) + AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext Package]) + AM_GLIB_GNU_GETTEXT + AC_SUBST([CONFIG_STATUS_DEPENDENCIES],['$(top_srcdir)/po/LINGUAS']) +]) + diff --git a/build/m4/shamrock/mono.m4 b/build/m4/shamrock/mono.m4 new file mode 100644 index 00000000..c40ecbfc --- /dev/null +++ b/build/m4/shamrock/mono.m4 @@ -0,0 +1,94 @@ +AC_DEFUN([SHAMROCK_FIND_MONO_1_0_COMPILER], +[ + SHAMROCK_FIND_PROGRAM_OR_BAIL(MCS, mcs) +]) + +AC_DEFUN([SHAMROCK_FIND_MONO_2_0_COMPILER], +[ + SHAMROCK_FIND_PROGRAM_OR_BAIL(MCS, gmcs) +]) + +AC_DEFUN([SHAMROCK_FIND_MONO_4_0_COMPILER], +[ + SHAMROCK_FIND_PROGRAM_OR_BAIL(MCS, dmcs) +]) + +AC_DEFUN([SHAMROCK_FIND_MONO_RUNTIME], +[ + SHAMROCK_FIND_PROGRAM_OR_BAIL(MONO, mono) +]) + +AC_DEFUN([_SHAMROCK_CHECK_MONO_MODULE], +[ + PKG_CHECK_MODULES(MONO_MODULE, $1 >= $2) +]) + +AC_DEFUN([SHAMROCK_CHECK_MONO_MODULE], +[ + _SHAMROCK_CHECK_MONO_MODULE(mono, $1) +]) + +AC_DEFUN([SHAMROCK_CHECK_MONO2_MODULE], +[ + _SHAMROCK_CHECK_MONO_MODULE(mono-2, $1) +]) + +AC_DEFUN([_SHAMROCK_CHECK_MONO_MODULE_NOBAIL], +[ + PKG_CHECK_MODULES(MONO_MODULE, $2 >= $1, + HAVE_MONO_MODULE=yes, HAVE_MONO_MODULE=no) + AC_SUBST(HAVE_MONO_MODULE) +]) + +AC_DEFUN([SHAMROCK_CHECK_MONO_MODULE_NOBAIL], +[ + _SHAMROCK_CHECK_MONO_MODULE_NOBAIL(mono, $1) +]) + +AC_DEFUN([SHAMROCK_CHECK_MONO2_MODULE_NOBAIL], +[ + _SHAMROCK_CHECK_MONO_MODULE_NOBAIL(mono-2, $1) +]) + +AC_DEFUN([_SHAMROCK_CHECK_MONO_GAC_ASSEMBLIES], +[ + for asm in $(echo "$*" | cut -d, -f3- | sed 's/\,/ /g') + do + AC_MSG_CHECKING([for Mono $2 GAC for $asm.dll]) + if test \ + -e "$($PKG_CONFIG --variable=libdir $1)/mono/$2/$asm.dll" -o \ + -e "$($PKG_CONFIG --variable=prefix $1)/lib/mono/$2/$asm.dll"; \ + then \ + AC_MSG_RESULT([found]) + else + AC_MSG_RESULT([not found]) + AC_MSG_ERROR([missing required Mono $2 assembly: $asm.dll]) + fi + done +]) + +AC_DEFUN([SHAMROCK_CHECK_MONO_1_0_GAC_ASSEMBLIES], +[ + _SHAMROCK_CHECK_MONO_GAC_ASSEMBLIES(mono, 1.0, $*) +]) + +AC_DEFUN([SHAMROCK_CHECK_MONO_2_0_GAC_ASSEMBLIES], +[ + _SHAMROCK_CHECK_MONO_GAC_ASSEMBLIES(mono, 2.0, $*) +]) + +AC_DEFUN([SHAMROCK_CHECK_MONO2_2_0_GAC_ASSEMBLIES], +[ + _SHAMROCK_CHECK_MONO_GAC_ASSEMBLIES(mono-2, 2.0, $*) +]) + +AC_DEFUN([SHAMROCK_CHECK_MONO_4_0_GAC_ASSEMBLIES], +[ + _SHAMROCK_CHECK_MONO_GAC_ASSEMBLIES(mono, 4.0, $*) +]) + +AC_DEFUN([SHAMROCK_CHECK_MONO2_4_0_GAC_ASSEMBLIES], +[ + _SHAMROCK_CHECK_MONO_GAC_ASSEMBLIES(mono-2, 4.0, $*) +]) + diff --git a/build/m4/shamrock/monodoc.m4 b/build/m4/shamrock/monodoc.m4 new file mode 100644 index 00000000..891ac745 --- /dev/null +++ b/build/m4/shamrock/monodoc.m4 @@ -0,0 +1,25 @@ +AC_DEFUN([SHAMROCK_CHECK_MONODOC], +[ + AC_ARG_ENABLE(docs, AC_HELP_STRING([--disable-docs], + [Do not build documentation]), , enable_docs=yes) + + if test "x$enable_docs" = "xyes"; then + AC_PATH_PROG(MONODOCER, monodocer, no) + if test "x$MONODOCER" = "xno"; then + AC_MSG_ERROR([You need to install monodoc, or pass --disable-docs to configure to skip documentation installation]) + fi + + AC_PATH_PROG(MDASSEMBLER, mdassembler, no) + if test "x$MDASSEMBLER" = "xno"; then + AC_MSG_ERROR([You need to install mdassembler, or pass --disable-docs to configure to skip documentation installation]) + fi + + DOCDIR=`$PKG_CONFIG monodoc --variable=sourcesdir` + AC_SUBST(DOCDIR) + AM_CONDITIONAL(BUILD_DOCS, true) + else + AC_MSG_NOTICE([not building ${PACKAGE} API documentation]) + AM_CONDITIONAL(BUILD_DOCS, false) + fi +]) + diff --git a/build/m4/shamrock/nunit.m4 b/build/m4/shamrock/nunit.m4 new file mode 100644 index 00000000..4d57d007 --- /dev/null +++ b/build/m4/shamrock/nunit.m4 @@ -0,0 +1,29 @@ +AC_DEFUN([SHAMROCK_CHECK_NUNIT], +[ + NUNIT_REQUIRED=2.4.7 + + AC_ARG_ENABLE(tests, AC_HELP_STRING([--enable-tests], [Enable NUnit tests]), + enable_tests=$enableval, enable_tests="no") + + if test "x$enable_tests" = "xno"; then + do_tests=no + AM_CONDITIONAL(ENABLE_TESTS, false) + else + PKG_CHECK_MODULES(NUNIT, nunit >= $NUNIT_REQUIRED, + do_tests="yes", do_tests="no") + + AC_SUBST(NUNIT_LIBS) + AM_CONDITIONAL(ENABLE_TESTS, test "x$do_tests" = "xyes") + + if test "x$do_tests" = "xno"; then + PKG_CHECK_MODULES(NUNIT, mono-nunit >= 2.4, + do_tests="yes", do_tests="no") + + AC_SUBST(NUNIT_LIBS) + AM_CONDITIONAL(ENABLE_TESTS, test "x$do_tests" = "xyes") + + if test "x$do_tests" = "xno"; then + AC_MSG_WARN([Could not find nunit: tests will not be available]) fi + fi + fi +]) diff --git a/build/m4/shamrock/programs.m4 b/build/m4/shamrock/programs.m4 new file mode 100644 index 00000000..2bdacfec --- /dev/null +++ b/build/m4/shamrock/programs.m4 @@ -0,0 +1,15 @@ +AC_DEFUN([SHAMROCK_FIND_PROGRAM], +[ + AC_PATH_PROG($1, $2, $3) + AC_SUBST($1) +]) + +AC_DEFUN([SHAMROCK_FIND_PROGRAM_OR_BAIL], +[ + SHAMROCK_FIND_PROGRAM($1, $2, no) + if test "x$$1" = "xno"; then + AC_MSG_ERROR([You need to install '$2']) + fi +]) + + diff --git a/build/m4/shamrock/util.m4 b/build/m4/shamrock/util.m4 new file mode 100644 index 00000000..de85ba94 --- /dev/null +++ b/build/m4/shamrock/util.m4 @@ -0,0 +1,11 @@ +AC_DEFUN([SHAMROCK_CONCAT], +[ + $1="$$1 $$2" +]) + +AC_DEFUN([SHAMROCK_CONCAT_MODULE], +[ + SHAMROCK_CONCAT($1_CFLAGS, $2_CFLAGS) + SHAMROCK_CONCAT($1_LIBS, $2_LIBS) +]) + diff --git a/build/m4/shave/shave-libtool.in b/build/m4/shave/shave-libtool.in new file mode 100644 index 00000000..54ebd690 --- /dev/null +++ b/build/m4/shave/shave-libtool.in @@ -0,0 +1,109 @@ +#!/bin/sh +# +# Copyright (c) 2009, Damien Lespiau +# +# Permission is hereby granted, free of charge, to any person +# obtaining a copy of this software and associated documentation +# files (the "Software"), to deal in the Software without +# restriction, including without limitation the rights to use, +# copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following +# conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. + +# we need sed +SED=@SED@ +if test -z "$SED" ; then +SED=sed +fi + +lt_unmangle () +{ + last_result=`echo $1 | $SED -e 's#.libs/##' -e 's#[0-9a-zA-Z_\-\.]*_la-##'` +} + +# the real libtool to use +LIBTOOL="$1" +shift + +# if 1, don't print anything, the underlaying wrapper will do it +pass_though=0 + +# scan the arguments, keep the right ones for libtool, and discover the mode +preserved_args= + +# have we seen the --tag option of libtool in the command line ? +tag_seen=0 + +while test "$#" -gt 0; do + opt="$1" + shift + + case $opt in + --mode=*) + mode=`echo $opt | $SED -e 's/[-_a-zA-Z0-9]*=//'` + preserved_args="$preserved_args $opt" + ;; + -o) + lt_output="$1" + preserved_args="$preserved_args $opt" + ;; + --tag=*) + tag_seen=1 + preserved_args="$preserved_args $opt" + ;; + *) + preserved_args="$preserved_args $opt" + ;; + esac +done + +case "$mode" in +compile) + # shave will be called and print the actual CC/CXX/LINK line + preserved_args="$preserved_args --shave-mode=$mode" + pass_though=1 + ;; +link) + preserved_args="$preserved_args --shave-mode=$mode" + Q=" LINK " + ;; +*) + # let's u + # echo "*** libtool: Unimplemented mode: $mode, fill a bug report" + ;; +esac + +lt_unmangle "$lt_output" +output=$last_result + +# automake does not add a --tag switch to its libtool invocation when +# assembling a .s file and rely on libtool to infer the right action based +# on the compiler name. As shave is using CC to hook a wrapper, libtool gets +# confused. Let's detect these cases and add a --tag=CC option. +tag="" +if test $tag_seen -eq 0 -a x"$mode" = xcompile; then + tag="--tag=CC" +fi + +if test -z $V; then + if test $pass_though -eq 0; then + echo "$Q$output" + fi + $LIBTOOL --silent $tag $preserved_args +else + echo $LIBTOOL $tag $preserved_args + $LIBTOOL $tag $preserved_args +fi diff --git a/build/m4/shave/shave.in b/build/m4/shave/shave.in new file mode 100644 index 00000000..490d6c5d --- /dev/null +++ b/build/m4/shave/shave.in @@ -0,0 +1,109 @@ +#!/bin/sh +# +# Copyright (c) 2009, Damien Lespiau +# +# Permission is hereby granted, free of charge, to any person +# obtaining a copy of this software and associated documentation +# files (the "Software"), to deal in the Software without +# restriction, including without limitation the rights to use, +# copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following +# conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. + +# we need sed +SED=@SED@ +if test -z "$SED" ; then +SED=sed +fi + +lt_unmangle () +{ + last_result=`echo $1 | $SED -e 's#.libs/##' -e 's#[0-9a-zA-Z_\-\.]*_la-##'` +} + +# the tool to wrap (cc, cxx, ar, ranlib, ..) +tool="$1" +shift + +# the reel tool (to call) +REEL_TOOL="$1" +shift + +pass_through=0 +preserved_args= +while test "$#" -gt 0; do + opt="$1" + shift + + case $opt in + --shave-mode=*) + mode=`echo $opt | $SED -e 's/[-_a-zA-Z0-9]*=//'` + ;; + -o) + lt_output="$1" + preserved_args="$preserved_args $opt" + ;; + -out:*|/out:*) + lt_output="${opt#*:}" + preserved_args="$preserved_args $opt" + ;; + *) + preserved_args="$preserved_args $opt" + ;; + esac +done + +# mode=link is handled in the libtool wrapper +case "$mode,$tool" in +link,*) + pass_through=1 + ;; +*,cxx) + Q=" CXX " + ;; +*,cc) + Q=" CC " + ;; +*,fc) + Q=" FC " + ;; +*,f77) + Q=" F77 " + ;; +*,objc) + Q=" OBJC " + ;; +*,mcs) + Q=" MCS " + ;; +*,*) + # should not happen + Q=" CC " + ;; +esac + +lt_unmangle "$lt_output" +output=$last_result + +if test -z $V; then + if test $pass_through -eq 0; then + echo "$Q$output" + fi + $REEL_TOOL $preserved_args +else + echo $REEL_TOOL $preserved_args + $REEL_TOOL $preserved_args +fi diff --git a/build/m4/shave/shave.m4 b/build/m4/shave/shave.m4 new file mode 100644 index 00000000..40e47f45 --- /dev/null +++ b/build/m4/shave/shave.m4 @@ -0,0 +1,102 @@ +dnl Make automake/libtool output more friendly to humans +dnl +dnl Copyright (c) 2009, Damien Lespiau +dnl +dnl Permission is hereby granted, free of charge, to any person +dnl obtaining a copy of this software and associated documentation +dnl files (the "Software"), to deal in the Software without +dnl restriction, including without limitation the rights to use, +dnl copy, modify, merge, publish, distribute, sublicense, and/or sell +dnl copies of the Software, and to permit persons to whom the +dnl Software is furnished to do so, subject to the following +dnl conditions: +dnl +dnl The above copyright notice and this permission notice shall be +dnl included in all copies or substantial portions of the Software. +dnl +dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +dnl EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +dnl OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +dnl NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +dnl HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +dnl WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +dnl OTHER DEALINGS IN THE SOFTWARE. +dnl +dnl SHAVE_INIT([shavedir],[default_mode]) +dnl +dnl shavedir: the directory where the shave scripts are, it defaults to +dnl $(top_builddir) +dnl default_mode: (enable|disable) default shave mode. This parameter +dnl controls shave's behaviour when no option has been +dnl given to configure. It defaults to disable. +dnl +dnl * SHAVE_INIT should be called late in your configure.(ac|in) file (just +dnl before AC_CONFIG_FILE/AC_OUTPUT is perfect. This macro rewrites CC and +dnl LIBTOOL, you don't want the configure tests to have these variables +dnl re-defined. +dnl * This macro requires GNU make's -s option. + +AC_DEFUN([_SHAVE_ARG_ENABLE], +[ + AC_ARG_ENABLE([shave], + AS_HELP_STRING( + [--enable-shave], + [use shave to make the build pretty [[default=$1]]]),, + [enable_shave=$1] + ) +]) + +AC_DEFUN([SHAVE_INIT], +[ + dnl you can tweak the default value of enable_shave + m4_if([$2], [enable], [_SHAVE_ARG_ENABLE(yes)], [_SHAVE_ARG_ENABLE(no)]) + + if test x"$enable_shave" = xyes; then + dnl where can we find the shave scripts? + m4_if([$1],, + [shavedir="$ac_pwd"], + [shavedir="$ac_pwd/$1"]) + AC_SUBST(shavedir) + + dnl make is now quiet + AC_SUBST([MAKEFLAGS], [-s]) + AC_SUBST([AM_MAKEFLAGS], ['`test -z $V && echo -s`']) + + dnl we need sed + AC_CHECK_PROG(SED,sed,sed,false) + + dnl substitute libtool + SHAVE_SAVED_LIBTOOL=$LIBTOOL + LIBTOOL="${SHELL} ${shavedir}/shave-libtool '${SHAVE_SAVED_LIBTOOL}'" + AC_SUBST(LIBTOOL) + + dnl substitute cc/cxx + SHAVE_SAVED_CC=$CC + SHAVE_SAVED_CXX=$CXX + SHAVE_SAVED_FC=$FC + SHAVE_SAVED_F77=$F77 + SHAVE_SAVED_OBJC=$OBJC + SHAVE_SAVED_MCS=$MCS + CC="${SHELL} ${shavedir}/shave cc ${SHAVE_SAVED_CC}" + CXX="${SHELL} ${shavedir}/shave cxx ${SHAVE_SAVED_CXX}" + FC="${SHELL} ${shavedir}/shave fc ${SHAVE_SAVED_FC}" + F77="${SHELL} ${shavedir}/shave f77 ${SHAVE_SAVED_F77}" + OBJC="${SHELL} ${shavedir}/shave objc ${SHAVE_SAVED_OBJC}" + MCS="${SHELL} ${shavedir}/shave mcs ${SHAVE_SAVED_MCS}" + AC_SUBST(CC) + AC_SUBST(CXX) + AC_SUBST(FC) + AC_SUBST(F77) + AC_SUBST(OBJC) + AC_SUBST(MCS) + + V=@ + else + V=1 + fi + Q='$(V:1=)' + AC_SUBST(V) + AC_SUBST(Q) +]) + diff --git a/build/m4/sparkleshare/gtk-sharp.m4 b/build/m4/sparkleshare/gtk-sharp.m4 new file mode 100644 index 00000000..76077ed9 --- /dev/null +++ b/build/m4/sparkleshare/gtk-sharp.m4 @@ -0,0 +1,23 @@ +AC_DEFUN([SPARKLESHARE_CHECK_GTK_SHARP], +[ + GTKSHARP_REQUIRED=2.12.2 + + PKG_CHECK_MODULES(GTKSHARP, + gtk-sharp-2.0 >= $GTKSHARP_REQUIRED) + AC_SUBST(GTKSHARP_LIBS) + + PKG_CHECK_MODULES(GLIBSHARP, + glib-sharp-2.0 >= $GTKSHARP_REQUIRED) + AC_SUBST(GLIBSHARP_LIBS) + + PKG_CHECK_MODULES(GLIBSHARP_2_12_7, + glib-sharp-2.0 >= 2.12.7, + HAVE_GLIBSHARP_2_12_7=yes, + HAVE_GLIBSHARP_2_12_7=no) + AM_CONDITIONAL(HAVE_GLIBSHARP_2_12_7, [test "$HAVE_GLIBSHARP_2_12_7" = "yes"]) + + PKG_CHECK_MODULES(GTKSHARP_A11Y, gtk-sharp-2.0 >= 2.12.10, gtksharp_with_a11y=yes, gtksharp_with_a11y=no) + AM_CONDITIONAL(ENABLE_ATK, test "x$gtksharp_with_a11y" = "xyes") + +]) + diff --git a/build/m4/sparkleshare/mono-addins.m4 b/build/m4/sparkleshare/mono-addins.m4 new file mode 100644 index 00000000..32a48c74 --- /dev/null +++ b/build/m4/sparkleshare/mono-addins.m4 @@ -0,0 +1,12 @@ +AC_DEFUN([FSPOT_CHECK_MONO_ADDINS], +[ + PKG_CHECK_MODULES(MONO_ADDINS, mono-addins >= 0.3.1) + AC_SUBST(MONO_ADDINS_LIBS) + + PKG_CHECK_MODULES(MONO_ADDINS_SETUP, mono-addins-setup >= 0.3.1) + AC_SUBST(MONO_ADDINS_SETUP_LIBS) + + PKG_CHECK_MODULES(MONO_ADDINS_GUI, mono-addins-gui >= 0.3.1) + AC_SUBST(MONO_ADDINS_GUI_LIBS) +]) + diff --git a/build/m4/sparkleshare/notify-sharp.m4 b/build/m4/sparkleshare/notify-sharp.m4 new file mode 100644 index 00000000..8b8d4dfe --- /dev/null +++ b/build/m4/sparkleshare/notify-sharp.m4 @@ -0,0 +1,12 @@ +AC_DEFUN([SPARKLESHARE_CHECK_NOTIFY_SHARP], +[ + PKG_CHECK_MODULES(NOTIFY_SHARP, notify-sharp, have_notify_sharp=yes, have_notify_sharp=no) + if test "x$have_notify_sharp" = "xyes"; then + AC_SUBST(NOTIFY_SHARP_LIBS) + AM_CONDITIONAL(EXTERNAL_NOTIFY_SHARP, true) + else + AM_CONDITIONAL(EXTERNAL_NOTIFY_SHARP, false) + AC_MSG_RESULT([no]) + fi +]) + diff --git a/build/private-icon-theme-installer b/build/private-icon-theme-installer new file mode 100755 index 00000000..00f0ffec --- /dev/null +++ b/build/private-icon-theme-installer @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +mkinstalldirs=$1; shift +install_data=$1; shift +action=$1; shift +dest_dir=$1; shift +src_dir=$1; shift + +for icon in $@; do + dest_dir_build="${dest_dir}/icons/hicolor/$(dirname ${icon})" + if [[ ${action} == "-i" || ${action} == "-il" ]]; then + src_file="${src_dir}/ThemeIcons/${icon}" + $mkinstalldirs "${dest_dir_build}" &>/dev/null + if [[ ${action} == "-i" ]]; then + echo "Installing private icon theme icon: ${icon}" + fi + $install_data "${src_file}" "${dest_dir_build}" + else + echo "Uninstalling private icon theme icon: ${icon}" + rm -f "${dest_dir_build}/$(basename ${icon})" + fi +done + diff --git a/configure.ac b/configure.ac new file mode 100644 index 00000000..08fb4b91 --- /dev/null +++ b/configure.ac @@ -0,0 +1,92 @@ +dnl Warning: This is an automatically generated file, do not edit! +dnl Process this file with autoconf to produce a configure script. +AC_PREREQ([2.54]) +AC_INIT([SparkleShare], [0.1]) +AM_INIT_AUTOMAKE([1.11 dist-bzip2 dist-zip foreign]) +AM_MAINTAINER_MODE + +dnl pkg-config +AC_PATH_PROG(PKG_CONFIG, pkg-config, no) +if test "x$PKG_CONFIG" = "xno"; then + AC_MSG_ERROR([You need to install pkg-config]) +fi + +AC_SUBST([ACLOCAL_AMFLAGS], ["-I build/m4/sparkleshare -I build/m4/shamrock -I build/m4/shave \${ACLOCAL_FLAGS}"]) + +dnl i18n +IT_PROG_INTLTOOL([0.41.0]) +GETTEXT_PACKAGE=sparkleshare +AC_SUBST(GETTEXT_PACKAGE) +AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package]) + +SHAMROCK_EXPAND_LIBDIR +SHAMROCK_EXPAND_BINDIR +SHAMROCK_EXPAND_DATADIR + +AC_PROG_INSTALL + +AC_PATH_PROG(GMCS, gmcs, no) +if test "x$GMCS" = "xno"; then + AC_MSG_ERROR([gmcs Not found]) +fi + + +AC_ARG_ENABLE(debug, + AC_HELP_STRING([--enable-debug], + [Use 'DEBUG' Configuration [default=YES]]), + enable_debug=yes, enable_debug=no) +AM_CONDITIONAL(ENABLE_DEBUG, test x$enable_debug = xyes) +if test "x$enable_debug" = "xyes" ; then + CONFIG_REQUESTED="yes" +fi +AC_ARG_ENABLE(release, + AC_HELP_STRING([--enable-release], + [Use 'RELEASE' Configuration [default=NO]]), + enable_release=yes, enable_release=no) +AM_CONDITIONAL(ENABLE_RELEASE, test x$enable_release = xyes) +if test "x$enable_release" = "xyes" ; then + CONFIG_REQUESTED="yes" +fi +if test -z "$CONFIG_REQUESTED" ; then + AM_CONDITIONAL(ENABLE_DEBUG, true) + enable_debug=yes +fi + + +dnl package checks, common for all configs +PKG_CHECK_MODULES([NDESK_DBUS], [ndesk-dbus-1.0]) +AC_SUBST(NDESK_DBUS_LIBS) +PKG_CHECK_MODULES([NDESK_DBUS_GLIB], [ndesk-dbus-glib-1.0]) +AC_SUBST(NDESK_DBUS_GLIB_LIBS) + + +SPARKLESHARE_CHECK_GTK_SHARP +#SPARKLESHARE_CHECK_NOTIFY_SHARP + +SHAMROCK_CHECK_NUNIT + +dnl Mono and gmcs +SHAMROCK_CHECK_MONO_MODULE(2.2) +SHAMROCK_FIND_MONO_2_0_COMPILER +SHAMROCK_FIND_MONO_RUNTIME +SHAMROCK_CHECK_MONO_2_0_GAC_ASSEMBLIES([ + System + System.Security + Mono.Posix +]) + + + + +AC_OUTPUT([ +build/Makefile +build/m4/Makefile +notify-sharp/Makefile +src/sparkleshare +src/AssemblyInfo.cs +src/Makefile +po/Makefile.in +Makefile + +]) + diff --git a/notify-sharp/Makefile.am b/notify-sharp/Makefile.am new file mode 100644 index 00000000..edc94265 --- /dev/null +++ b/notify-sharp/Makefile.am @@ -0,0 +1,13 @@ +ASSEMBLY = NotifySharp + +TARGET = library + +LINK = $(REF_NOTIFY_SHARP) + +SOURCES = \ + Global.cs \ + Notification.cs + +RESOURCES = + +include $(top_srcdir)/build/build.mk diff --git a/po/Makefile.in.in b/po/Makefile.in.in new file mode 100644 index 00000000..cc8a2227 --- /dev/null +++ b/po/Makefile.in.in @@ -0,0 +1,217 @@ +# Makefile for program source directory in GNU NLS utilities package. +# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper +# Copyright (C) 2004-2008 Rodney Dawes +# +# This file may be copied and used freely without restrictions. It may +# be used in projects which are not available under a GNU Public License, +# but which still want to provide support for the GNU gettext functionality. +# +# - Modified by Owen Taylor to use GETTEXT_PACKAGE +# instead of PACKAGE and to look for po2tbl in ./ not in intl/ +# +# - Modified by jacob berkman to install +# Makefile.in.in and po2tbl.sed.in for use with glib-gettextize +# +# - Modified by Rodney Dawes for use with intltool +# +# We have the following line for use by intltoolize: +# INTLTOOL_MAKEFILE + +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +PACKAGE = @PACKAGE@ +VERSION = @VERSION@ + +SHELL = @SHELL@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +top_builddir = @top_builddir@ +VPATH = @srcdir@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ +datadir = @datadir@ +datarootdir = @datarootdir@ +libdir = @libdir@ +DATADIRNAME = @DATADIRNAME@ +itlocaledir = $(prefix)/$(DATADIRNAME)/locale +subdir = po +install_sh = @install_sh@ +# Automake >= 1.8 provides @mkdir_p@. +# Until it can be supposed, use the safe fallback: +mkdir_p = $(install_sh) -d + +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ + +GMSGFMT = @GMSGFMT@ +MSGFMT = @MSGFMT@ +XGETTEXT = @XGETTEXT@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist +GENPOT = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot + +ALL_LINGUAS = @ALL_LINGUAS@ + +PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo "$(ALL_LINGUAS)"; fi) + +USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep \^$$lang$$ $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep \^$$lang$$`"; then printf "$$lang "; fi; done; fi) + +USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done) + +POFILES=$(shell LINGUAS="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done) + +DISTFILES = Makefile.in.in POTFILES.in $(POFILES) +EXTRA_DISTFILES = ChangeLog POTFILES.skip Makevars LINGUAS + +POTFILES = \ +# This comment gets stripped out + +CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done) + +.SUFFIXES: +.SUFFIXES: .po .pox .gmo .mo .msg .cat + +.po.pox: + $(MAKE) $(GETTEXT_PACKAGE).pot + $(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox + +.po.mo: + $(MSGFMT) -o $@ $< + +.po.gmo: + file=`echo $* | sed 's,.*/,,'`.gmo \ + && rm -f $$file && $(GMSGFMT) -o $$file $< + +.po.cat: + sed -f ../intl/po2msg.sed < $< > $*.msg \ + && rm -f $@ && gencat $@ $*.msg + + +all: all-@USE_NLS@ + +all-yes: $(CATALOGS) +all-no: + +$(GETTEXT_PACKAGE).pot: $(POTFILES) + $(GENPOT) + +install: install-data +install-data: install-data-@USE_NLS@ +install-data-no: all +install-data-yes: all + linguas="$(USE_LINGUAS)"; \ + for lang in $$linguas; do \ + dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \ + $(mkdir_p) $$dir; \ + if test -r $$lang.gmo; then \ + $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \ + echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \ + else \ + $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \ + echo "installing $(srcdir)/$$lang.gmo as" \ + "$$dir/$(GETTEXT_PACKAGE).mo"; \ + fi; \ + if test -r $$lang.gmo.m; then \ + $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \ + echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \ + else \ + if test -r $(srcdir)/$$lang.gmo.m ; then \ + $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \ + $$dir/$(GETTEXT_PACKAGE).mo.m; \ + echo "installing $(srcdir)/$$lang.gmo.m as" \ + "$$dir/$(GETTEXT_PACKAGE).mo.m"; \ + else \ + true; \ + fi; \ + fi; \ + done + +# Empty stubs to satisfy archaic automake needs +dvi info ctags tags CTAGS TAGS ID: + +# Define this as empty until I found a useful application. +install-exec installcheck: + +uninstall: + linguas="$(USE_LINGUAS)"; \ + for lang in $$linguas; do \ + rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \ + rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \ + done + +check: all $(GETTEXT_PACKAGE).pot + rm -f missing notexist + srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m + if [ -r missing -o -r notexist ]; then \ + exit 1; \ + fi + +mostlyclean: + rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp + rm -f .intltool-merge-cache + +clean: mostlyclean + +distclean: clean + rm -f Makefile Makefile.in POTFILES stamp-it + rm -f *.mo *.msg *.cat *.cat.m *.gmo + +maintainer-clean: distclean + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + rm -f Makefile.in.in + +distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) +dist distdir: $(DISTFILES) + dists="$(DISTFILES)"; \ + extra_dists="$(EXTRA_DISTFILES)"; \ + for file in $$extra_dists; do \ + test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \ + done; \ + for file in $$dists; do \ + test -f $$file || file="$(srcdir)/$$file"; \ + ln $$file $(distdir) 2> /dev/null \ + || cp -p $$file $(distdir); \ + done + +update-po: Makefile + $(MAKE) $(GETTEXT_PACKAGE).pot + tmpdir=`pwd`; \ + linguas="$(USE_LINGUAS)"; \ + for lang in $$linguas; do \ + echo "$$lang:"; \ + result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \ + if $$result; then \ + if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ + rm -f $$tmpdir/$$lang.new.po; \ + else \ + if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ + :; \ + else \ + echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ + rm -f $$tmpdir/$$lang.new.po; \ + exit 1; \ + fi; \ + fi; \ + else \ + echo "msgmerge for $$lang.gmo failed!"; \ + rm -f $$tmpdir/$$lang.new.po; \ + fi; \ + done + +Makefile POTFILES: stamp-it + @if test ! -f $@; then \ + rm -f stamp-it; \ + $(MAKE) stamp-it; \ + fi + +stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \ + $(SHELL) ./config.status + +# Tell versions [3.59,3.63) of GNU make not to export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: