File libspectre-0.2.3-wix.patch of Package mingw64-libspectre

diff -Naur libspectre-0.2.4.orig/Makefile.am libspectre-0.2.4/Makefile.am
--- libspectre-0.2.4.orig/Makefile.am	2010-03-26 12:45:53.520011970 +0100
+++ libspectre-0.2.4/Makefile.am	2010-03-26 12:45:53.544002787 +0100
@@ -129,4 +129,25 @@
 	scp $(MANUAL_TAR_FILE) $(RELEASE_UPLOAD_HOST):$(MANUAL_UPLOAD_DIR)
 	ssh $(RELEASE_UPLOAD_HOST) "cd $(MANUAL_UPLOAD_DIR) && tar xzf $(MANUAL_TAR_FILE) && rm -f manual && ln -s $(MANUAL_DATED) manual && ln -sf $(MANUAL_TAR_FILE) libspectre-manual.tar.gz"
 
-.PHONY: release-verify-newer release-remove-old release-cleanup-group-sticky release-check release-upload release-publish doc-publish
\ No newline at end of file
+.PHONY: release-verify-newer release-remove-old release-cleanup-group-sticky release-check release-upload release-publish doc-publish
+
+
+EXTRA_DIST +=		\
+	libspectre.wxs
+
+if ENABLE_WIX
+@WIX_MAKE_RULES@
+
+wixlibdir = ${datadir}/wixlib
+wixlib_WIX = libspectre.wixlib
+
+libspectre.wixlib: wixdistdir
+
+all-am: libspectre-pc-stamp
+libspectre-pc-stamp: libspectre.pc
+	echo 'Requires.private: libgs' >> libspectre.pc
+	echo 'Wixlibs=${wixlibdir}/libspectre.wixlib' >> libspectre.pc
+	echo 'Fualflags=-C libspectre -D libspectre' >> libspectre.pc
+	touch $@
+
+endif
diff -Naur libspectre-0.2.4.orig/configure.ac libspectre-0.2.4/configure.ac
--- libspectre-0.2.4.orig/configure.ac	2010-03-26 12:45:53.524011038 +0100
+++ libspectre-0.2.4/configure.ac	2010-03-26 12:45:53.544002787 +0100
@@ -286,6 +286,8 @@
   AC_DEFINE(SPECTRE_VA_COPY_AS_ARRAY,1, ['va_lists' cannot be copies as values])
 fi
 
+WIX_INIT()
+
 AC_OUTPUT([
 Makefile
 Doxyfile
diff -Naur libspectre-0.2.4.orig/configure.ac.orig libspectre-0.2.4/configure.ac.orig
--- libspectre-0.2.4.orig/configure.ac.orig	1970-01-01 01:00:00.000000000 +0100
+++ libspectre-0.2.4/configure.ac.orig	2010-02-21 20:47:25.000000000 +0100
@@ -0,0 +1,296 @@
+AC_PREREQ(2.59)
+
+m4_define([spectre_major_version], [0])
+m4_define([spectre_minor_version], [2])
+m4_define([spectre_micro_version], [4])
+m4_define([spectre_version],
+          [spectre_major_version.spectre_minor_version.spectre_micro_version])
+
+AC_INIT(libspectre, [spectre_version])
+AC_CONFIG_HEADERS(config.h)
+
+AM_INIT_AUTOMAKE([1.7])
+
+m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
+
+AM_MAINTAINER_MODE
+
+# libtool versioning
+#
+# See http://sources.redhat.com/autobook/autobook/autobook_91.html#SEC91 for details
+#
+
+## increment if the interface has additions, changes, removals.
+LT_CURRENT=2
+
+## increment any time the source changes; set to
+##  0 if you increment CURRENT
+LT_REVISION=4
+
+## increment if any interfaces have been added; set to 0
+## if any interfaces have been changed or removed. removal has
+## precedence over adding, so set to 0 if both happened.
+LT_AGE=1
+
+VERSION_INFO="$LT_CURRENT:$LT_REVISION:$LT_AGE"
+AC_SUBST(VERSION_INFO)
+
+LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
+AC_SUBST(LT_CURRENT_MINUS_AGE)
+
+AC_SUBST(LT_CURRENT)
+AC_SUBST(LT_REVISION)
+AC_SUBST(LT_AGE)
+
+SPECTRE_MAJOR_VERSION=spectre_major_version
+SPECTRE_MINOR_VERSION=spectre_minor_version
+SPECTRE_MICRO_VERSION=spectre_micro_version
+SPECTRE_VERSION=spectre_major_version.spectre_minor_version.spectre_micro_version
+
+AC_SUBST(SPECTRE_MAJOR_VERSION)
+AC_SUBST(SPECTRE_MINOR_VERSION)
+AC_SUBST(SPECTRE_MICRO_VERSION)
+AC_SUBST(SPECTRE_VERSION)
+
+AC_PROG_LIBTOOL
+AC_PROG_CC
+AC_ISC_POSIX
+AC_PROG_CC_STDC
+AC_STDC_HEADERS
+AC_C_BIGENDIAN
+
+AC_CHECK_FUNC(vasprintf, [ AC_DEFINE(HAVE_VASPRINTF, 1, [Define if the 'vasprintf' function is available.]) ])
+
+AC_CHECK_FUNC(_vscprintf, [ AC_DEFINE(HAVE__VSCPRINTF, 1, [Define if the '_vscprintf' function is available.]) ])
+
+LIBGS_REQUIRED="8.62"
+
+AC_CHECK_LIB(gs, gsapi_new_instance, have_libgs=yes, have_libgs=no)
+if test "x$have_libgs" = "xyes"; then
+    LIB_GS="-lgs"
+    save_LIBS=$LIBS
+    LIBS="$LIBS -lgs"
+    AC_LANG_PUSH(C)
+    AC_MSG_CHECKING([for libgs >= $LIBGS_REQUIRED])
+    AC_RUN_IFELSE([AC_LANG_PROGRAM(
+[[
+#include <ghostscript/iapi.h>
+]],
+[[
+    gsapi_revision_t gsrev;
+
+    if (gsapi_revision (&gsrev, sizeof (gsrev)) != 0)
+        return 1;
+    if (gsrev.revision < `echo "$LIBGS_REQUIRED" | sed -e 's/\.//'`)
+        return 1;
+]])],
+                   [have_libgs=yes],
+		   [have_libgs=no],
+		   [have_libgs=yes]
+    )
+    AC_MSG_RESULT($have_libgs)
+    AC_LANG_POP(C)
+    LIBS=$save_LIBS
+    if test "x$have_libgs" = "xno"; then
+        AC_MSG_ERROR([You need libgs >= $LIBGS_REQUIRED in order to compile libspectre])
+    fi
+else
+    AC_MSG_ERROR([You need libgs in order to compile libspectre])
+fi
+AC_SUBST(LIB_GS)
+
+AC_ARG_ENABLE(asserts,
+	AS_HELP_STRING([--enable-asserts],[include assertion checks]),
+	enable_asserts=$enableval,
+	enable_asserts=$USE_MAINTAINER_MODE)
+
+if test x$enable_asserts = xno; then
+   AC_DEFINE(SPECTRE_DISABLE_ASSERT,[1],[Disable assertion checking])
+fi
+	
+AC_ARG_ENABLE(checks,
+	AS_HELP_STRING([--enable-checks],[include sanity checks on public API]),
+	enable_checks=$enableval,
+	enable_checks=yes)
+
+if test x$enable_checks = xno; then
+   AC_DEFINE(SPECTRE_DISABLE_CHECKS,[1],[Disable public API sanity checking])
+fi
+	
+dnl Test
+AC_ARG_ENABLE(test,
+              [AC_HELP_STRING([--enable-test], [Compile tests])],enable_test="$enableval",enable_test=yes)
+
+if test "x$enable_test" = "xyes"; then
+    PKG_CHECK_MODULES(CAIRO, cairo cairo-png, enable_test=yes,enable_test=no)
+
+    if test "x$enable_test" != "xyes"; then
+        AC_MSG_WARN("Tests disabled since required cairo library was not found")
+    fi
+fi
+
+AM_CONDITIONAL(ENABLE_TEST, test x$enable_test = xyes)
+
+dnl ===========================================================================
+dnl check compiler flags (From cairo)
+AC_DEFUN([SPECTRE_CC_TRY_FLAG], [
+  AC_MSG_CHECKING([whether $CC supports $1])
+
+  spectre_save_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS $1"
+
+  AC_COMPILE_IFELSE([ ], [spectre_cc_flag=yes], [spectre_cc_flag=no])
+  CFLAGS="$spectre_save_CFLAGS"
+
+  if test "x$spectre_cc_flag" = "xyes"; then
+    ifelse([$2], , :, [$2])
+  else
+    ifelse([$3], , :, [$3])
+  fi
+  AC_MSG_RESULT([$spectre_cc_flag])
+])
+
+
+dnl Use lots of warning flags with with gcc and compatible compilers
+
+dnl Note: if you change the following variable, the cache is automatically
+dnl skipped and all flags rechecked.  So there's no need to do anything
+dnl else.  If for any reason you need to force a recheck, just change
+dnl MAYBE_WARN in an ignorable way (like adding whitespace)
+
+MAYBE_WARN="-Wall -Wextra -pedantic \
+-Wsign-compare -Werror-implicit-function-declaration \
+-Wpointer-arith -Wstrict-prototypes \
+-Wmissing-prototypes -Wmissing-declarations -Wnested-externs \
+-Wpacked -Wswitch-enum \
+-Wstrict-aliasing=2 -Winit-self -Wunsafe-loop-optimizations \
+-Wdeclaration-after-statement \
+-Wno-missing-field-initializers -Wno-unused-parameter \
+-Wno-attributes -Wno-long-long -Winline"
+
+
+# invalidate cached value if MAYBE_WARN has changed
+if test "x$spectre_cv_warn_maybe" != "x$MAYBE_WARN"; then
+	unset spectre_cv_warn_cflags
+fi
+AC_CACHE_CHECK([for supported warning flags], spectre_cv_warn_cflags, [
+	echo
+	WARN_CFLAGS=""
+
+	# Some warning options are not supported by all versions of
+	# gcc, so test all desired options against the current
+	# compiler.
+	#
+	# Note that there are some order dependencies
+	# here. Specifically, an option that disables a warning will
+	# have no net effect if a later option then enables that
+	# warnings, (perhaps implicitly). So we put some grouped
+	# options (-Wall and -Wextra) up front and the -Wno options
+	# last.
+
+	for W in $MAYBE_WARN; do
+		SPECTRE_CC_TRY_FLAG([$W], [WARN_CFLAGS="$WARN_CFLAGS $W"])
+	done
+
+	spectre_cv_warn_cflags=$WARN_CFLAGS
+	spectre_cv_warn_maybe=$MAYBE_WARN
+
+	AC_MSG_CHECKING([which warning flags were supported])])
+WARN_CFLAGS="$spectre_cv_warn_cflags"
+SPECTRE_CFLAGS="$SPECTRE_CFLAGS $WARN_CFLAGS"
+
+AC_SUBST(SPECTRE_CFLAGS)
+
+dnl **********************************
+dnl *** va_copy checks (from GLib) ***
+dnl **********************************
+dnl we currently check for all three va_copy possibilities, so we get
+dnl all results in config.log for bug reports.
+AC_CACHE_CHECK([for an implementation of va_copy()],spectre_cv_va_copy,[
+	AC_LINK_IFELSE([#include <stdarg.h>
+#include <stdlib.h>
+	void f (int i, ...) {
+	va_list args1, args2;
+	va_start (args1, i);
+	va_copy (args2, args1);
+	if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
+	  exit (1);
+	va_end (args1); va_end (args2);
+	}
+	int main() {
+	  f (0, 42);
+	  return 0;
+	}],
+	[spectre_cv_va_copy=yes],
+	[spectre_cv_va_copy=no])
+])
+AC_CACHE_CHECK([for an implementation of __va_copy()],spectre_cv___va_copy,[
+	AC_LINK_IFELSE([#include <stdarg.h>
+#include <stdlib.h>	
+	void f (int i, ...) {
+	va_list args1, args2;
+	va_start (args1, i);
+	__va_copy (args2, args1);
+	if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
+	  exit (1);
+	va_end (args1); va_end (args2);
+	}
+	int main() {
+	  f (0, 42);
+	  return 0;
+	}],
+	[spectre_cv___va_copy=yes],
+	[spectre_cv___va_copy=no])
+])
+
+if test "x$spectre_cv_va_copy" = "xyes"; then
+  spectre_va_copy_func=va_copy
+else if test "x$spectre_cv___va_copy" = "xyes"; then
+  spectre_va_copy_func=__va_copy
+fi
+fi
+
+if test -n "$spectre_va_copy_func"; then
+  AC_DEFINE_UNQUOTED(SPECTRE_VA_COPY,$spectre_va_copy_func,[A 'va_copy' style function])
+fi
+
+AC_LANG_PUSH(C)
+AC_CACHE_CHECK([whether va_lists can be copied by value],
+	spectre_cv_va_val_copy,
+	[AC_RUN_IFELSE([AC_LANG_PROGRAM(
+[[
+	#include <stdarg.h>
+	#include <stdlib.h>
+]],
+[[
+	void f (int i, ...) {
+	va_list args1, args2;
+	va_start (args1, i);
+	args2 = args1;
+	if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
+	  exit (1);
+	va_end (args1); va_end (args2);
+	}
+	int main() {
+	  f (0, 42);
+	  return 0;
+	}
+]])],
+	[spectre_cv_va_val_copy=yes],
+	[spectre_cv_va_val_copy=no],
+	[spectre_cv_va_val_copy=yes])
+])
+AC_LANG_POP(C)
+
+if test "x$spectre_cv_va_val_copy" = "xno"; then
+  AC_DEFINE(SPECTRE_VA_COPY_AS_ARRAY,1, ['va_lists' cannot be copies as values])
+fi
+
+AC_OUTPUT([
+Makefile
+Doxyfile
+libspectre/Makefile
+libspectre/spectre-version.h
+test/Makefile
+libspectre.pc
+])
diff -Naur libspectre-0.2.4.orig/libspectre.wxs libspectre-0.2.4/libspectre.wxs
--- libspectre-0.2.4.orig/libspectre.wxs	1970-01-01 01:00:00.000000000 +0100
+++ libspectre-0.2.4/libspectre.wxs	2010-03-26 12:47:03.876006126 +0100
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+    <Fragment>
+        <ComponentGroup Id="libspectre">
+            <ComponentRef Id="cmp3BF52E2075651EDE87A2E1A531730D72" />
+            <ComponentRef Id="cmp15B8D4072205433E81D479507F1BCCD5" />
+            <ComponentRef Id="cmpB5EE1EA236824F5396B1BE5021EB5772" />
+            <ComponentRef Id="cmp867E949AD660461EADB42AA49F1D790C" />
+        </ComponentGroup>
+    </Fragment>
+    <Fragment>
+        <DirectoryRef Id="libspectre">
+            <Directory Id="dirC3EBF21BF0D971F81A1D7A7C4725C686" Name="bin">
+                <Component Id="cmp3BF52E2075651EDE87A2E1A531730D72" Guid="{3C9B4E80-EF4A-4185-BA3B-3A85DCF60653}">
+                    <File Id="fil118B21DEA72304677063B18CF2AF109F" KeyPath="yes" Source="$(var.wixdistdir)\bin\libspectre-1.dll" />
+                </Component>
+            </Directory>
+            <Directory Id="dirF4622C98FB524107B71D71FBE7470FF4" Name="share">
+                <Directory Id="dirA2CEAF1E085E41C8B2F04558069583B6" Name="license">
+                    <Directory Id="dir7705A31A758F4086BB26EADC86B6FC27" Name="libspectre">
+                        <Component Id="cmp15B8D4072205433E81D479507F1BCCD5" Guid="{72F331D9-5FB2-465A-B181-0D97A4EEFA19}">
+                            <File Id="fil8F24EAB9EA3148AC9079F14C27323B4F" KeyPath="yes" Source="AUTHORS" />
+                        </Component>
+                        <Component Id="cmpB5EE1EA236824F5396B1BE5021EB5772" Guid="{28C87B79-C5E3-4F18-ACC3-16E84F8D9AA9}">
+                            <File Id="fil219DEA47CB7D462087600DC7815D80FF" KeyPath="yes" Source="COPYING" />
+                        </Component>
+                        <Component Id="cmp867E949AD660461EADB42AA49F1D790C" Guid="{73BDF847-97AB-4E07-B1AB-58C652EF3997}">
+                            <File Id="filEB5B73F4F8224152AF878F0A5FAFCAFC" KeyPath="yes" Source="README" />
+                        </Component>
+                    </Directory>
+                </Directory>
+            </Directory>
+        </DirectoryRef>
+    </Fragment>
+</Wix>
openSUSE Build Service is sponsored by