From 477710bd1e43867c91bd2802b75a81140c0f0763 Mon Sep 17 00:00:00 2001 From: Bertrand Lorentz Date: Mon, 2 Jul 2012 13:56:06 -0400 Subject: [PATCH] build: Fix API version for cairo and don't hardcode it Cairo has a different API version that was hardcoded. Define it in a new variable in configure.ac and use it in AssemblyInfo and Makefile.am. This fixes make distcheck, as the cairo-sharp.dll assembly was not getting uninstalled from the GAC. --- cairo/{AssemblyInfo.cs => AssemblyInfo.cs.in} | 2 +- cairo/Makefile.am | 5 ++--- configure.ac | 3 +++ 3 files changed, 6 insertions(+), 4 deletions(-) rename cairo/{AssemblyInfo.cs => AssemblyInfo.cs.in} (66%) diff --git a/cairo/AssemblyInfo.cs b/cairo/AssemblyInfo.cs.in similarity index 66% rename from cairo/AssemblyInfo.cs rename to cairo/AssemblyInfo.cs.in index d96c651fb..cd085cac2 100644 --- a/cairo/AssemblyInfo.cs +++ b/cairo/AssemblyInfo.cs.in @@ -1,5 +1,5 @@ using System.Reflection; using System.Runtime.CompilerServices; -[assembly:AssemblyVersion("1.10.0.0")] +[assembly:AssemblyVersion("@CAIRO_API_VERSION@")] [assembly:AssemblyDelaySign(false)] diff --git a/cairo/Makefile.am b/cairo/Makefile.am index c5738866f..e3d1d8560 100644 --- a/cairo/Makefile.am +++ b/cairo/Makefile.am @@ -1,5 +1,5 @@ ASSEMBLY_NAME = cairo-sharp -ASSEMBLY_NAME_VERSION = $(ASSEMBLY_NAME),Version=$(API_VERSION) +ASSEMBLY_NAME_VERSION = $(ASSEMBLY_NAME),Version=$(CAIRO_API_VERSION) ASSEMBLY = $(ASSEMBLY_NAME).dll SNK = $(srcdir)/mono.snk @@ -11,7 +11,6 @@ CLEANFILES = $(ASSEMBLY) $(ASSEMBLY).mdb sources = \ Antialias.cs \ - AssemblyInfo.cs \ Cairo.cs \ Content.cs \ Context.cs \ @@ -62,7 +61,7 @@ sources = \ XlibSurface.cs \ # -build_sources = $(addprefix $(srcdir)/, $(sources)) +build_sources = $(addprefix $(srcdir)/, $(sources)) $(builddir)/AssemblyInfo.cs $(ASSEMBLY): $(build_sources) $(SNK) @rm -f $(ASSEMBLY).mdb diff --git a/configure.ac b/configure.ac index c7611abaf..4586a1463 100644 --- a/configure.ac +++ b/configure.ac @@ -7,6 +7,8 @@ AM_MAINTAINER_MODE API_VERSION=3.0.0.0 AC_SUBST(API_VERSION) +CAIRO_API_VERSION=1.10.0.0 +AC_SUBST(CAIRO_API_VERSION) POLICY_VERSIONS="" AC_SUBST(POLICY_VERSIONS) @@ -230,6 +232,7 @@ gio/Makefile gio/gio-sharp-3.0.pc gio/gio-sharp.dll.config gio/glue/Makefile +cairo/AssemblyInfo.cs cairo/Makefile pango/Makefile pango/pango-sharp.dll.config