Add pango, jasper, atk, libjpeg and gtk2
authorDaniel P. Berrange <berrange@redhat.com>
Wed, 10 Sep 2008 09:00:27 +0000 (05:00 -0400)
committerDaniel P. Berrange <berrange@redhat.com>
Wed, 10 Sep 2008 09:00:27 +0000 (05:00 -0400)
14 files changed:
atk/atk-1.23.5-mingw.patch [new file with mode: 0644]
atk/mingw-atk.spec [new file with mode: 0644]
gtk2/mingw-gtk2.spec [new file with mode: 0644]
jasper/jasper-1.900.1-mingw.patch [new file with mode: 0644]
jasper/jasper-1.900.1-sleep.patch [new file with mode: 0644]
jasper/mingw-jasper.spec [new file with mode: 0644]
libjpeg/configure.in [new file with mode: 0644]
libjpeg/jpeg-c++.patch [new file with mode: 0644]
libjpeg/jpeg-mingw.patch [new file with mode: 0644]
libjpeg/libjpeg-autoconf.patch [new file with mode: 0644]
libjpeg/libjpeg-buf-oflo.patch [new file with mode: 0644]
libjpeg/libjpeg-cflags.patch [new file with mode: 0644]
libjpeg/mingw-libjpeg.spec [new file with mode: 0644]
pango/mingw-pango.spec [new file with mode: 0644]

diff --git a/atk/atk-1.23.5-mingw.patch b/atk/atk-1.23.5-mingw.patch
new file mode 100644 (file)
index 0000000..6da4129
--- /dev/null
@@ -0,0 +1,24 @@
+diff -rup atk-1.23.5/atk/Makefile.am atk-1.23.5-new/atk/Makefile.am
+--- atk-1.23.5/atk/Makefile.am 2008-07-21 02:49:43.000000000 -0400
++++ atk-1.23.5-new/atk/Makefile.am     2008-09-09 11:25:26.000000000 -0400
+@@ -139,7 +139,7 @@ s-enum-types-c: @REBUILD@ $(atk_headers)
+ if OS_WIN32
+ atk_def = atk.def
+ libatk_1_0_la_LDFLAGS += -export-symbols $(srcdir)/atk.def -no-undefined -Wl,atk-win32-res.o
+-libatk_1_0_la_DEPENDENCIES = atk-win32-res.o
++libatk_1_0_la_DEPENDENCIES = atk-win32-res.o atk.def
+ install-def-file:
+       $(INSTALL) $(srcdir)/atk.def $(DESTDIR)$(libdir)/atk-1.0.def
+diff -rup atk-1.23.5/atk/Makefile.in atk-1.23.5-new/atk/Makefile.in
+--- atk-1.23.5/atk/Makefile.in 2008-07-21 02:50:09.000000000 -0400
++++ atk-1.23.5-new/atk/Makefile.in     2008-09-09 11:25:31.000000000 -0400
+@@ -334,7 +334,7 @@ BUILT_SOURCES = atkmarshal.h atkmarshal.
+ # ---------- Win32 stuff ----------
+ @OS_WIN32_TRUE@atk_def = atk.def
+-@OS_WIN32_TRUE@libatk_1_0_la_DEPENDENCIES = atk-win32-res.o
++@OS_WIN32_TRUE@libatk_1_0_la_DEPENDENCIES = atk-win32-res.o atk.def
+ @MS_LIB_AVAILABLE_TRUE@noinst_DATA = atk-$(ATK_API_VERSION).lib
+ EXTRA_DIST = atk.symbols atk.rc.in atkmarshal.list atkintl.h
+ DISTCLEANFILES = \
diff --git a/atk/mingw-atk.spec b/atk/mingw-atk.spec
new file mode 100644 (file)
index 0000000..df65723
--- /dev/null
@@ -0,0 +1,62 @@
+%include /usr/lib/rpm/mingw-defs
+
+Name:           mingw-atk
+Version:        1.23.5
+Release:        1%{?dist}
+Summary:        MinGW Windows Atk library
+
+License: LGPLv2+
+Group:          Development/Libraries
+URL: http://developer.gnome.org/projects/gap/
+Source: http://download.gnome.org/sources/atk/1.23/atk-%{version}.tar.bz2 
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Patch1: atk-%{version}-mingw.patch
+
+BuildArch:      noarch
+
+BuildRequires:  mingw-filesystem >= 19
+BuildRequires:  mingw-gcc
+BuildRequires:  mingw-binutils
+BuildRequires:  mingw-iconv
+BuildRequires:  mingw-gettext
+BuildRequires:  mingw-glib2
+
+%description
+MinGW Windows Atk library.
+
+
+%prep
+%setup -q -n atk-%{version}
+%patch1 -p1
+
+%build
+PKG_CONFIG_PATH="%{_mingw_libdir}/pkgconfig" \
+%{_mingw_configure}
+make
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+make DESTDIR=$RPM_BUILD_ROOT install
+
+rm -f $RPM_BUILD_ROOT/%{_mingw_libdir}/charset.alias
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%files
+%defattr(-,root,root)
+%{_mingw_bindir}/libatk-1.0-0.dll
+%{_mingw_includedir}/atk-1.0
+%{_mingw_libdir}/atk-1.0.def
+%{_mingw_libdir}/libatk-1.0.dll.a
+%{_mingw_libdir}/libatk-1.0.la
+%{_mingw_libdir}/pkgconfig/atk.pc
+%{_mingw_datadir}/gtk-doc/html/atk/
+%{_mingw_datadir}/locale/*/LC_MESSAGES/atk10.mo
+
+%changelog
+* Tue Sep  9 2008 Daniel P. Berrange <berrange@redhat.com> - 1.23.5-1
+- Initial RPM release
diff --git a/gtk2/mingw-gtk2.spec b/gtk2/mingw-gtk2.spec
new file mode 100644 (file)
index 0000000..7cebe4f
--- /dev/null
@@ -0,0 +1,105 @@
+%include /usr/lib/rpm/mingw-defs
+
+Name:           mingw-gtk2
+Version:        2.14.0
+Release:        1%{?dist}
+Summary:        MinGW Windows Gtk2 library
+
+License:        LGPLv2+
+Group:          Development/Libraries
+URL:            http://www.gtk.org
+Source0:        http://download.gnome.org/sources/gtk/2.14/gtk+-%{version}.tar.bz2
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildArch:      noarch
+
+BuildRequires:  mingw-filesystem >= 19
+BuildRequires:  mingw-gcc
+BuildRequires:  mingw-binutils
+BuildRequires:  mingw-iconv
+BuildRequires:  mingw-gettext
+BuildRequires:  mingw-glib2
+BuildRequires:  mingw-cairo
+BuildRequires:  mingw-jasper
+BuildRequires:  mingw-libpng
+BuildRequires:  mingw-libjpeg
+BuildRequires:  mingw-pango
+BuildRequires:  mingw-atk
+
+%description
+MinGW Windows Gtk2 library.
+
+
+%prep
+%setup -q -n gtk+-%{version}
+
+
+%build
+# XXX fix jasper dlls
+PKG_CONFIG_PATH=%{_mingw_libdir}/pkgconfig \
+%{_mingw_configure} --without-jasper
+make
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+make DESTDIR=$RPM_BUILD_ROOT install
+
+rm -f $RPM_BUILD_ROOT/%{_mingw_libdir}/charset.alias
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%files
+%defattr(-,root,root)
+%{_mingw_datadir}/gtk-doc/html/gail-libgail-util
+%{_mingw_datadir}/gtk-doc/html/gdk-pixbuf
+%{_mingw_datadir}/gtk-doc/html/gdk
+%{_mingw_datadir}/gtk-doc/html/gtk
+%{_mingw_datadir}/locale/*/LC_MESSAGES/gtk20-properties.mo
+%{_mingw_datadir}/locale/*/LC_MESSAGES/gtk20.mo
+%{_mingw_datadir}/themes/*
+%{_mingw_bindir}/gdk-pixbuf-csource.exe
+%{_mingw_bindir}/gdk-pixbuf-query-loaders.exe
+%{_mingw_bindir}/gtk-builder-convert
+%{_mingw_bindir}/gtk-demo.exe
+%{_mingw_bindir}/gtk-query-immodules-2.0.exe
+%{_mingw_bindir}/gtk-update-icon-cache.exe
+%{_mingw_bindir}/libgailutil-18.dll
+%{_mingw_bindir}/libgdk-win32-2.0-0.dll
+%{_mingw_bindir}/libgdk_pixbuf-2.0-0.dll
+%{_mingw_bindir}/libgtk-win32-2.0-0.dll
+%{_mingw_libdir}/gtk-2.0/
+%{_mingw_libdir}/libgailutil.dll.a
+%{_mingw_libdir}/libgailutil.la
+%{_mingw_libdir}/libgdk-win32-2.0.dll.a
+%{_mingw_libdir}/libgdk-win32-2.0.la
+%{_mingw_libdir}/libgdk_pixbuf-2.0.dll.a
+%{_mingw_libdir}/libgdk_pixbuf-2.0.la
+%{_mingw_libdir}/libgtk-win32-2.0.dll.a
+%{_mingw_libdir}/libgtk-win32-2.0.la
+%{_mingw_libdir}/gdk_pixbuf-2.0.def
+%{_mingw_libdir}/gdk-win32-2.0.def
+%{_mingw_libdir}/gtk-win32-2.0.def
+%{_mingw_libdir}/pkgconfig/gail.pc
+%{_mingw_libdir}/pkgconfig/gdk-2.0.pc
+%{_mingw_libdir}/pkgconfig/gdk-win32-2.0.pc
+%{_mingw_libdir}/pkgconfig/gdk-pixbuf-2.0.pc
+%{_mingw_libdir}/pkgconfig/gtk+-2.0.pc
+%{_mingw_libdir}/pkgconfig/gtk+-win32-2.0.pc
+%{_mingw_includedir}/gtk-2.0/
+%{_mingw_includedir}/gail-1.0/
+%{_mingw_sysconfdir}/gtk-2.0/
+%{_mingw_datadir}/aclocal/gtk-2.0.m4
+%{_mingw_datadir}/gtk-2.0/
+%{_mingw_mandir}/man1/gdk-pixbuf-csource.1*
+%{_mingw_mandir}/man1/gdk-pixbuf-query-loaders.1*
+%{_mingw_mandir}/man1/gtk-builder-convert.1*
+%{_mingw_mandir}/man1/gtk-query-immodules-2.0.1*
+%{_mingw_mandir}/man1/gtk-update-icon-cache.1*
+
+%changelog
+* Tue Sep  9 2008 Daniel P. Berrange <berrange@redhat.com> - 2.14.0-1
+- Initial RPM release
diff --git a/jasper/jasper-1.900.1-mingw.patch b/jasper/jasper-1.900.1-mingw.patch
new file mode 100644 (file)
index 0000000..02180ea
--- /dev/null
@@ -0,0 +1,22 @@
+diff -rup jasper-1.900.1.orig/src/libjasper/Makefile.am jasper-1.900.1.new/src/libjasper/Makefile.am
+--- jasper-1.900.1.orig/src/libjasper/Makefile.am      2007-01-19 16:43:07.000000000 -0500
++++ jasper-1.900.1.new/src/libjasper/Makefile.am       2008-09-09 10:08:53.000000000 -0400
+@@ -85,5 +85,5 @@ libjasper_la_LIBADD = \
+ # -release $(LT_RELEASE)
+ libjasper_la_LDFLAGS = \
+-      -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
++      -no-undefined -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
+diff -rup jasper-1.900.1.orig/src/libjasper/Makefile.in jasper-1.900.1.new/src/libjasper/Makefile.in
+--- jasper-1.900.1.orig/src/libjasper/Makefile.in      2007-01-19 16:54:45.000000000 -0500
++++ jasper-1.900.1.new/src/libjasper/Makefile.in       2008-09-09 10:08:43.000000000 -0400
+@@ -290,7 +290,7 @@ libjasper_la_LIBADD = \
+ # -release $(LT_RELEASE)
+ libjasper_la_LDFLAGS = \
+-      -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
++      -no-undefined -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
+ all: all-recursive
diff --git a/jasper/jasper-1.900.1-sleep.patch b/jasper/jasper-1.900.1-sleep.patch
new file mode 100644 (file)
index 0000000..b647e48
--- /dev/null
@@ -0,0 +1,18 @@
+diff -rup jasper-1.900.1/src/appl/tmrdemo.c jasper-1.900.1.new/src/appl/tmrdemo.c
+--- jasper-1.900.1/src/appl/tmrdemo.c  2007-01-19 16:43:08.000000000 -0500
++++ jasper-1.900.1.new/src/appl/tmrdemo.c      2008-09-09 09:14:21.000000000 -0400
+@@ -1,4 +1,5 @@
+ #include <jasper/jasper.h>
++#include <windows.h>
+ int main(int argc, char **argv)
+ {
+@@ -43,7 +44,7 @@ int main(int argc, char **argv)
+       printf("zero time %.3f us\n", t * 1e6);
+       jas_tmr_start(&tmr);
+-      sleep(1);
++      Sleep(1);
+       jas_tmr_stop(&tmr);
+       t = jas_tmr_get(&tmr);
+       printf("time delay %.8f s\n", t);
diff --git a/jasper/mingw-jasper.spec b/jasper/mingw-jasper.spec
new file mode 100644 (file)
index 0000000..9c1ccf1
--- /dev/null
@@ -0,0 +1,63 @@
+%include /usr/lib/rpm/mingw-defs
+
+Name:           mingw-jasper
+Version:        1.900.1
+Release:        1%{?dist}
+Summary:        MinGW Windows Jasper library
+
+License: JasPer
+URL:     http://www.ece.uvic.ca/~mdadams/jasper/
+Source0: http://www.ece.uvic.ca/~mdadams/jasper/software/jasper-%{version}.zip
+Patch1: jasper-%{version}-sleep.patch
+Patch2: jasper-%{version}-mingw.patch
+Group:          Development/Libraries
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildArch:      noarch
+
+BuildRequires:  mingw-filesystem >= 19
+BuildRequires:  mingw-gcc
+BuildRequires:  mingw-binutils
+BuildRequires:  mingw-libjpeg
+
+%description
+MinGW Windows Jasper library.
+
+
+%prep
+%setup -q -n jasper-%{version}
+%patch1 -p1
+%patch2 -p1
+
+%build
+%{_mingw_configure} --disable-opengl --enable-libjpeg
+make
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+make DESTDIR=$RPM_BUILD_ROOT install mandir=%{_mingw_mandir}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%files
+%defattr(-,root,root)
+# XXX dlls
+%{_mingw_bindir}/i686-pc-mingw32-imgcmp.exe
+%{_mingw_bindir}/i686-pc-mingw32-imginfo.exe
+%{_mingw_bindir}/i686-pc-mingw32-jasper.exe
+%{_mingw_bindir}/i686-pc-mingw32-tmrdemo.exe
+%{_mingw_includedir}/jasper/
+%{_mingw_libdir}/libjasper.a
+%{_mingw_libdir}/libjasper.la
+%{_mingw_mandir}/man1/i686-pc-mingw32-imgcmp.1*
+%{_mingw_mandir}/man1/i686-pc-mingw32-imginfo.1*
+%{_mingw_mandir}/man1/i686-pc-mingw32-jasper.1*
+%{_mingw_mandir}/man1/i686-pc-mingw32-jiv.1*
+
+%changelog
+* Tue Sep  9 2008 Daniel P. Berrange <berrange@redhat.com> - 2.18.0-1
+- Initial RPM release
diff --git a/libjpeg/configure.in b/libjpeg/configure.in
new file mode 100644 (file)
index 0000000..d73dcdf
--- /dev/null
@@ -0,0 +1,346 @@
+dnl IJG auto-configuration source file.
+dnl Process this file with autoconf to produce a configure script.
+AC_INIT(jcmaster.c)
+AC_CONFIG_HEADER(jconfig.h:jconfig.cfg)
+dnl
+dnl do these first since other macros rely on them
+AC_PROG_CC
+AC_PROG_CPP
+dnl
+dnl See if compiler supports prototypes.
+AC_MSG_CHECKING(for function prototypes)
+AC_CACHE_VAL(ijg_cv_have_prototypes,
+[AC_TRY_COMPILE([
+int testfunction (int arg1, int * arg2); /* check prototypes */
+struct methods_struct {                /* check method-pointer declarations */
+  int (*error_exit) (char *msgtext);
+  int (*trace_message) (char *msgtext);
+  int (*another_method) (void);
+};
+int testfunction (int arg1, int * arg2) /* check definitions */
+{ return arg2[arg1]; }
+int test2function (void)       /* check void arg list */
+{ return 0; }
+], [ ], ijg_cv_have_prototypes=yes, ijg_cv_have_prototypes=no)])
+AC_MSG_RESULT($ijg_cv_have_prototypes)
+if test $ijg_cv_have_prototypes = yes; then
+  AC_DEFINE(HAVE_PROTOTYPES,1)
+else
+  echo Your compiler does not seem to know about function prototypes.
+  echo Perhaps it needs a special switch to enable ANSI C mode.
+  echo If so, we recommend running configure like this:
+  echo "   ./configure  CC='cc -switch'"
+  echo where -switch is the proper switch.
+fi
+dnl
+dnl check header files
+AC_CHECK_HEADER(stddef.h, AC_DEFINE(HAVE_STDDEF_H,1))
+AC_CHECK_HEADER(stdlib.h, AC_DEFINE(HAVE_STDLIB_H,1))
+AC_CHECK_HEADER(string.h,, AC_DEFINE(NEED_BSD_STRINGS,1))
+dnl See whether type size_t is defined in any ANSI-standard places;
+dnl if not, perhaps it is defined in <sys/types.h>.
+AC_MSG_CHECKING(for size_t)
+AC_TRY_COMPILE([
+#ifdef HAVE_STDDEF_H
+#include <stddef.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#include <stdio.h>
+#ifdef NEED_BSD_STRINGS
+#include <strings.h>
+#else
+#include <string.h>
+#endif
+typedef size_t my_size_t;
+], [ my_size_t foovar; ], ijg_size_t_ok=yes,
+[ijg_size_t_ok="not ANSI, perhaps it is in sys/types.h"])
+AC_MSG_RESULT($ijg_size_t_ok)
+if test "$ijg_size_t_ok" != yes; then
+AC_CHECK_HEADER(sys/types.h, [AC_DEFINE(NEED_SYS_TYPES_H,1)
+AC_EGREP_CPP(size_t, [#include <sys/types.h>],
+[ijg_size_t_ok="size_t is in sys/types.h"], ijg_size_t_ok=no)],
+ijg_size_t_ok=no)
+AC_MSG_RESULT($ijg_size_t_ok)
+if test "$ijg_size_t_ok" = no; then
+  echo Type size_t is not defined in any of the usual places.
+  echo Try putting '"typedef unsigned int size_t;"' in jconfig.h.
+fi
+fi
+dnl
+dnl check compiler characteristics
+AC_MSG_CHECKING(for type unsigned char)
+AC_TRY_COMPILE(, [ unsigned char un_char; ],
+[AC_MSG_RESULT(yes)
+AC_DEFINE(HAVE_UNSIGNED_CHAR,1)], AC_MSG_RESULT(no))
+AC_MSG_CHECKING(for type unsigned short)
+AC_TRY_COMPILE(, [ unsigned short un_short; ],
+[AC_MSG_RESULT(yes)
+AC_DEFINE(HAVE_UNSIGNED_SHORT,1)], AC_MSG_RESULT(no))
+AC_MSG_CHECKING(for type void)
+AC_TRY_COMPILE([
+/* Caution: a C++ compiler will insist on valid prototypes */
+typedef void * void_ptr;       /* check void * */
+#ifdef HAVE_PROTOTYPES         /* check ptr to function returning void */
+typedef void (*void_func) (int a, int b);
+#else
+typedef void (*void_func) ();
+#endif
+
+#ifdef HAVE_PROTOTYPES         /* check void function result */
+void test3function (void_ptr arg1, void_func arg2)
+#else
+void test3function (arg1, arg2)
+     void_ptr arg1;
+     void_func arg2;
+#endif
+{
+  char * locptr = (char *) arg1; /* check casting to and from void * */
+  arg1 = (void *) locptr;
+  (*arg2) (1, 2);              /* check call of fcn returning void */
+}
+], [ ], AC_MSG_RESULT(yes), [AC_MSG_RESULT(no)
+AC_DEFINE(void,char)])
+
+AC_C_CONST
+dnl check for non-broken inline under various spellings
+AC_MSG_CHECKING(for inline)
+ijg_cv_inline=""
+AC_TRY_COMPILE(, [} __inline__ int foo() { return 0; }
+int bar() { return foo();], ijg_cv_inline="__inline__",
+AC_TRY_COMPILE(, [} __inline int foo() { return 0; }
+int bar() { return foo();], ijg_cv_inline="__inline",
+AC_TRY_COMPILE(, [} inline int foo() { return 0; }
+int bar() { return foo();], ijg_cv_inline="inline")))
+AC_MSG_RESULT($ijg_cv_inline)
+AC_DEFINE_UNQUOTED(INLINE,$ijg_cv_inline)
+dnl we cannot check for bogus warnings, but at least we can check for errors
+AC_MSG_CHECKING(for broken incomplete types)
+AC_TRY_COMPILE([ typedef struct undefined_structure * undef_struct_ptr; ], ,
+AC_MSG_RESULT(ok),
+[AC_MSG_RESULT(broken)
+AC_DEFINE(INCOMPLETE_TYPES_BROKEN,1)])
+dnl test whether global names are unique to at least 15 chars
+AC_MSG_CHECKING(for short external names)
+AC_TRY_LINK([
+int possibly_duplicate_function () { return 0; }
+int possibly_dupli_function () { return 1; }
+], [ ], AC_MSG_RESULT(ok), [AC_MSG_RESULT(short)
+AC_DEFINE(NEED_SHORT_EXTERNAL_NAMES,1)])
+dnl
+dnl run-time checks
+AC_MSG_CHECKING(to see if char is signed)
+AC_TRY_RUN([
+#ifdef HAVE_PROTOTYPES
+int is_char_signed (int arg)
+#else
+int is_char_signed (arg)
+     int arg;
+#endif
+{
+  if (arg == 189) {            /* expected result for unsigned char */
+    return 0;                  /* type char is unsigned */
+  }
+  else if (arg != -67) {       /* expected result for signed char */
+    printf("Hmm, it seems 'char' is not eight bits wide on your machine.\n");
+    printf("I fear the JPEG software will not work at all.\n\n");
+  }
+  return 1;                    /* assume char is signed otherwise */
+}
+char signed_char_check = (char) (-67);
+int main() {
+  exit(is_char_signed((int) signed_char_check));
+}], [AC_MSG_RESULT(no)
+AC_DEFINE(CHAR_IS_UNSIGNED,1)], AC_MSG_RESULT(yes),
+[echo Assuming that char is signed on target machine.
+echo If it is unsigned, this will be a little bit inefficient.
+])
+dnl
+AC_MSG_CHECKING(to see if right shift is signed)
+AC_TRY_RUN([
+#ifdef HAVE_PROTOTYPES
+int is_shifting_signed (long arg)
+#else
+int is_shifting_signed (arg)
+     long arg;
+#endif
+/* See whether right-shift on a long is signed or not. */
+{
+  long res = arg >> 4;
+
+  if (res == -0x7F7E80CL) {    /* expected result for signed shift */
+    return 1;                  /* right shift is signed */
+  }
+  /* see if unsigned-shift hack will fix it. */
+  /* we can't just test exact value since it depends on width of long... */
+  res |= (~0L) << (32-4);
+  if (res == -0x7F7E80CL) {    /* expected result now? */
+    return 0;                  /* right shift is unsigned */
+  }
+  printf("Right shift isn't acting as I expect it to.\n");
+  printf("I fear the JPEG software will not work at all.\n\n");
+  return 0;                    /* try it with unsigned anyway */
+}
+int main() {
+  exit(is_shifting_signed(-0x7F7E80B1L));
+}], [AC_MSG_RESULT(no)
+AC_DEFINE(RIGHT_SHIFT_IS_UNSIGNED,1)], AC_MSG_RESULT(yes),
+AC_MSG_RESULT(Assuming that right shift is signed on target machine.))
+dnl
+AC_MSG_CHECKING(to see if fopen accepts b spec)
+AC_TRY_RUN([
+#include <stdio.h>
+int main() {
+  if (fopen("conftestdata", "wb") != NULL)
+    exit(0);
+  exit(1);
+}], AC_MSG_RESULT(yes), [AC_MSG_RESULT(no)
+AC_DEFINE(DONT_USE_B_MODE,1)],
+AC_MSG_RESULT(Assuming that it does.))
+dnl
+dnl system services
+AC_PROG_INSTALL
+AC_PROG_RANLIB
+
+# Decide whether to use libtool,
+# and if so whether to build shared, static, or both flavors of library.
+AC_DISABLE_SHARED
+AC_DISABLE_STATIC
+if test "x$enable_shared" != xno  -o  "x$enable_static" != xno; then
+  USELIBTOOL="yes"
+
+  # Configure libtool.
+  AC_PROG_LIBTOOL
+
+  LIBTOOL="./libtool"
+  O="lo"
+  A="la"
+  LN='$(LIBTOOL) --mode=link $(CC)'
+  INSTALL_LIB='$(LIBTOOL) --mode=install ${INSTALL}'
+  INSTALL_PROGRAM="\$(LIBTOOL) --mode=install $INSTALL_PROGRAM"
+else
+  USELIBTOOL="no"
+  LIBTOOL=""
+  O="o"
+  A="a"
+  LN='$(CC)'
+  INSTALL_LIB="$INSTALL_DATA"
+fi
+AC_SUBST(LIBTOOL)
+AC_SUBST(O)
+AC_SUBST(A)
+AC_SUBST(LN)
+AC_SUBST(INSTALL_LIB)
+
+# Select memory manager depending on user input.
+# If no "-enable-maxmem", use jmemnobs
+MEMORYMGR='jmemnobs.$(O)'
+MAXMEM="no"
+AC_ARG_ENABLE(maxmem,
+[  --enable-maxmem[=N]     enable use of temp files, set max mem usage to N MB],
+MAXMEM="$enableval")
+dnl [# support --with-maxmem for backwards compatibility with IJG V5.]
+dnl AC_ARG_WITH(maxmem, , MAXMEM="$withval")
+if test "x$MAXMEM" = xyes; then
+  MAXMEM=1
+fi
+if test "x$MAXMEM" != xno; then
+changequote(, )dnl
+  if test -n "`echo $MAXMEM | sed 's/[0-9]//g'`"; then
+changequote([, ])dnl
+    AC_MSG_ERROR(non-numeric argument to --enable-maxmem)
+  fi
+  DEFAULTMAXMEM=`expr $MAXMEM \* 1048576`
+AC_DEFINE_UNQUOTED(DEFAULT_MAX_MEM, ${DEFAULTMAXMEM})
+AC_MSG_CHECKING([for 'tmpfile()'])
+AC_TRY_LINK([#include <stdio.h>], [ FILE * tfile = tmpfile(); ],
+[AC_MSG_RESULT(yes)
+MEMORYMGR='jmemansi.$(O)'],
+[AC_MSG_RESULT(no)
+dnl if tmpfile is not present, must use jmemname.
+MEMORYMGR='jmemname.$(O)'
+AC_DEFINE(NEED_SIGNAL_CATCHER,1)
+AC_MSG_CHECKING([for 'mktemp()'])
+AC_TRY_LINK(, [ char fname[80]; mktemp(fname); ], AC_MSG_RESULT(yes),
+[AC_MSG_RESULT(no)
+AC_DEFINE(NO_MKTEMP,1)])])
+fi
+AC_SUBST(MEMORYMGR)
+
+# Include PNG support in cjpeg/djpeg if appropriate.
+AC_ARG_WITH(png,
+[  --with-png              enable PNG support in cjpeg/djpeg],
+[#], [with_png="maybe"])
+
+# try to detect whether libpng is present
+if test "x$with_png" = xmaybe ; then
+  AC_CHECK_HEADER(png.h, [: ok so far], [with_png="no"])
+fi
+if test "x$with_png" = xmaybe ; then
+  AC_CHECK_HEADER(zlib.h, [: ok so far], [with_png="no"])
+fi
+if test "x$with_png" = xmaybe ; then
+  AC_CHECK_LIB(z, deflate, [: ok so far], [with_png="no"])
+fi
+if test "x$with_png" = xmaybe ; then
+  AC_CHECK_LIB(png, png_create_info_struct,
+       [with_png="yes"], [with_png="no"], [-lz -lm])
+fi
+
+if test "x$with_png" = xyes ; then
+  AC_DEFINE(PNG_SUPPORTED,1)
+  LIBS="-lpng -lz -lm $LIBS"
+fi
+
+# Extract the library version ID from jpeglib.h.
+AC_MSG_CHECKING([libjpeg version number])
+[JPEG_LIB_VERSION=`sed -e '/^#define JPEG_LIB_VERSION/!d' -e 's/^[^0-9]*\([0-9][0-9]*\).*$/\1/' $srcdir/jpeglib.h`]
+AC_MSG_RESULT($JPEG_LIB_VERSION)
+AC_SUBST(JPEG_LIB_VERSION)
+
+# Prepare to massage makefile.cfg correctly.
+if test $ijg_cv_have_prototypes = yes; then
+  A2K_DEPS=""
+  COM_A2K="# "
+else
+  A2K_DEPS="ansi2knr"
+  COM_A2K=""
+fi
+AC_SUBST(A2K_DEPS)
+AC_SUBST(COM_A2K)
+# ansi2knr needs -DBSD if string.h is missing
+if test $ac_cv_header_string_h = no; then
+  ANSI2KNRFLAGS="-DBSD"
+else
+  ANSI2KNRFLAGS=""
+fi
+AC_SUBST(ANSI2KNRFLAGS)
+dnl
+# Substitutions to enable or disable libtool-related stuff
+if test $USELIBTOOL = yes -a $ijg_cv_have_prototypes = yes; then
+  COM_LT=""
+else
+  COM_LT="# "
+fi
+AC_SUBST(COM_LT)
+if test "x$enable_shared" != xno; then
+  FORCE_INSTALL_LIB="install-lib"
+else
+  FORCE_INSTALL_LIB=""
+fi
+AC_SUBST(FORCE_INSTALL_LIB)
+dnl
+# Set up -I directives
+if test "x$srcdir" = x.; then
+  INCLUDEFLAGS='-I$(srcdir)'
+else
+  if test "x$GCC" = xyes; then
+    INCLUDEFLAGS='-I- -I. -I$(srcdir)'
+  else
+    INCLUDEFLAGS='-I. -I$(srcdir)'
+  fi
+fi
+AC_SUBST(INCLUDEFLAGS)
+dnl
+AC_OUTPUT(Makefile:makefile.cfg)
diff --git a/libjpeg/jpeg-c++.patch b/libjpeg/jpeg-c++.patch
new file mode 100644 (file)
index 0000000..81dcc39
--- /dev/null
@@ -0,0 +1,24 @@
+--- jpeg-6b/jpeglib.h.c++      Sat Jun 17 21:58:15 2000
++++ jpeg-6b/jpeglib.h  Sat Jun 17 21:58:53 2000
+@@ -13,6 +13,10 @@
+ #ifndef JPEGLIB_H
+ #define JPEGLIB_H
++#ifdef __cplusplus
++extern "C" {
++#endif
++
+ /*
+  * First we include the configuration files that record how this
+  * installation of the JPEG library is set up.  jconfig.h can be
+@@ -1091,6 +1095,10 @@
+ #ifdef JPEG_INTERNALS
+ #include "jpegint.h"          /* fetch private declarations */
+ #include "jerror.h"           /* fetch error codes too */
++#endif
++
++#ifdef __cplusplus
++}
+ #endif
+ #endif /* JPEGLIB_H */
diff --git a/libjpeg/jpeg-mingw.patch b/libjpeg/jpeg-mingw.patch
new file mode 100644 (file)
index 0000000..dde7843
--- /dev/null
@@ -0,0 +1,12 @@
+diff -rup jpeg-6b/makefile.cfg jpeg-6b.new/makefile.cfg
+--- jpeg-6b/makefile.cfg       2008-09-09 09:54:38.000000000 -0400
++++ jpeg-6b.new/makefile.cfg   2008-09-09 09:55:03.000000000 -0400
+@@ -169,7 +169,7 @@ libjpeg.a: @A2K_DEPS@ $(LIBOBJECTS)
+ # with libtool:
+ libjpeg.la: @A2K_DEPS@ $(LIBOBJECTS)
+       $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -o libjpeg.la $(LIBOBJECTS) \
+-              -rpath $(libdir) -version-info $(JPEG_LIB_VERSION)
++              -no-undefined -rpath $(libdir) -version-info $(JPEG_LIB_VERSION)
+ # sample programs:
diff --git a/libjpeg/libjpeg-autoconf.patch b/libjpeg/libjpeg-autoconf.patch
new file mode 100644 (file)
index 0000000..2bd8ce6
--- /dev/null
@@ -0,0 +1,30 @@
+Work around bogosity in autoconf-2.62: it breaks #undef's that have a
+comment after them, a construct that has worked fine in every previous
+autoconf release.  See bz #449471 and bz #449245.
+
+
+diff -Naur jpeg-6b.orig/jconfig.cfg jpeg-6b/jconfig.cfg
+--- jpeg-6b.orig/jconfig.cfg   1994-12-06 11:43:15.000000000 -0500
++++ jpeg-6b/jconfig.cfg        2008-05-31 16:59:32.000000000 -0400
+@@ -28,11 +28,16 @@
+ #ifdef JPEG_CJPEG_DJPEG
+-#define BMP_SUPPORTED         /* BMP image file format */
+-#define GIF_SUPPORTED         /* GIF image file format */
+-#define PPM_SUPPORTED         /* PBMPLUS PPM/PGM image file format */
+-#undef RLE_SUPPORTED          /* Utah RLE image file format */
+-#define TARGA_SUPPORTED               /* Targa image file format */
++/* BMP image file format */
++#define BMP_SUPPORTED
++/* GIF image file format */
++#define GIF_SUPPORTED
++/* PBMPLUS PPM/PGM image file format */
++#define PPM_SUPPORTED
++/* Utah RLE image file format */
++#undef RLE_SUPPORTED
++/* Targa image file format */
++#define TARGA_SUPPORTED
+ #undef TWO_FILE_COMMANDLINE
+ #undef NEED_SIGNAL_CATCHER
diff --git a/libjpeg/libjpeg-buf-oflo.patch b/libjpeg/libjpeg-buf-oflo.patch
new file mode 100644 (file)
index 0000000..b2ec018
--- /dev/null
@@ -0,0 +1,25 @@
+Dike out a section of code that has no usefulness on Unix-like systems,
+and will crash if fed a comment string exceeding 64K.  Per report from
+Lubomir Kundrak, RH bug #226965
+
+
+diff -Naur jpeg-6b.orig/wrjpgcom.c jpeg-6b/wrjpgcom.c
+--- jpeg-6b.orig/wrjpgcom.c    1997-10-23 00:47:03.000000000 -0400
++++ jpeg-6b/wrjpgcom.c 2007-06-25 22:26:42.000000000 -0400
+@@ -446,6 +446,8 @@
+     } else if (keymatch(arg, "comment", 1)) {
+       if (++argn >= argc) usage();
+       comment_arg = argv[argn];
++#if 0
++#error "There is a buffer overflow in the code below"
+       /* If the comment text starts with '"', then we are probably running
+        * under MS-DOG and must parse out the quoted string ourselves.  Sigh.
+        */
+@@ -466,6 +468,7 @@
+         strcat(comment_arg, argv[argn]);
+       }
+       }
++#endif
+       comment_length = (unsigned int) strlen(comment_arg);
+     } else
+       usage();
diff --git a/libjpeg/libjpeg-cflags.patch b/libjpeg/libjpeg-cflags.patch
new file mode 100644 (file)
index 0000000..b7a73a1
--- /dev/null
@@ -0,0 +1,20 @@
+--- jpeg-6b/makefile.cfg.useCFLAGS     1998-03-21 14:08:57.000000000 -0500
++++ jpeg-6b/makefile.cfg       2006-07-10 17:21:14.000000000 -0400
+@@ -54,7 +54,7 @@
+ # miscellaneous OS-dependent stuff
+ SHELL= /bin/sh
+ # linker
+-LN= @LN@
++LN= @LN@ $(CFLAGS) 
+ # file deletion command
+ RM= rm -f
+ # directory creation command
+@@ -168,7 +168,7 @@
+ # with libtool:
+ libjpeg.la: @A2K_DEPS@ $(LIBOBJECTS)
+-      $(LIBTOOL) --mode=link $(CC) -o libjpeg.la $(LIBOBJECTS) \
++      $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -o libjpeg.la $(LIBOBJECTS) \
+               -rpath $(libdir) -version-info $(JPEG_LIB_VERSION)
+ # sample programs:
diff --git a/libjpeg/mingw-libjpeg.spec b/libjpeg/mingw-libjpeg.spec
new file mode 100644 (file)
index 0000000..d863778
--- /dev/null
@@ -0,0 +1,104 @@
+%include /usr/lib/rpm/mingw-defs
+
+Name:           mingw-libjpeg
+Version:        6b
+Release:        1%{?dist}
+Summary:        MinGW Windows Libjpeg library
+
+License: IJG
+URL: http://www.ijg.org/
+Group:          Development/Libraries
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Source0: ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.bz2
+Source1: configure.in
+
+Patch1: jpeg-c++.patch
+Patch4: libjpeg-cflags.patch
+Patch5: libjpeg-buf-oflo.patch
+Patch6: libjpeg-autoconf.patch
+
+Patch100: jpeg-mingw.patch
+
+BuildArch:      noarch
+
+BuildRequires:  mingw-filesystem >= 19
+BuildRequires:  mingw-gcc
+BuildRequires:  mingw-binutils
+BuildRequires: mingw-libpng
+BuildRequires: mingw-zlib
+BuildRequires: autoconf libtool
+
+%description
+MinGW Windows Libjpeg library.
+
+
+%prep
+%setup -q -n jpeg-6b
+
+%patch1 -p1 -b .c++
+%patch4 -p1 -b .cflags
+%patch5 -p1 -b .oflo
+%patch6 -p1
+
+%patch100 -p1
+
+# For long-obsolete reasons, libjpeg 6b doesn't ship with a configure.in.
+# We need to re-autoconf though, in order to update libtool support,
+# so supply configure.in.
+cp %{SOURCE1} configure.in
+
+# libjpeg 6b includes a horribly obsolete version of libtool.
+# Blow it away and replace with build system's version.
+rm -f config.guess config.sub ltmain.sh ltconfig aclocal.m4
+cp /usr/share/aclocal/libtool.m4 aclocal.m4
+libtoolize
+autoconf
+
+%build
+%{_mingw_configure} --enable-shared --enable-static
+make libdir=%{_mingw_libdir}
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+mkdir -p $RPM_BUILD_ROOT%{_mingw_bindir}
+mkdir -p $RPM_BUILD_ROOT%{_mingw_includedir}
+mkdir -p $RPM_BUILD_ROOT%{_mingw_libdir}
+mkdir -p $RPM_BUILD_ROOT%{_mingw_mandir}/man1
+mkdir -p $RPM_BUILD_ROOT%{_mingw_prefix}/man/man1
+
+make prefix=$RPM_BUILD_ROOT%{_mingw_prefix} install
+
+# Work around the broken makefiles...
+mv $RPM_BUILD_ROOT%{_mingw_prefix}/man/man1/*.1 $RPM_BUILD_ROOT%{_mingw_mandir}/man1
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%files
+%defattr(-,root,root)
+%{_mingw_bindir}/cjpeg
+%{_mingw_bindir}/djpeg
+%{_mingw_bindir}/jpegtran
+%{_mingw_bindir}/rdjpgcom
+%{_mingw_bindir}/wrjpgcom
+%{_mingw_bindir}/libjpeg-62.dll
+%{_mingw_includedir}/jconfig.h
+%{_mingw_includedir}/jerror.h
+%{_mingw_includedir}/jmorecfg.h
+%{_mingw_includedir}/jpeglib.h
+%{_mingw_libdir}/libjpeg.a
+%{_mingw_libdir}/libjpeg.dll.a
+%{_mingw_libdir}/libjpeg.la
+%{_mingw_mandir}/man1/cjpeg.1*
+%{_mingw_mandir}/man1/djpeg.1*
+%{_mingw_mandir}/man1/jpegtran.1*
+%{_mingw_mandir}/man1/rdjpgcom.1*
+%{_mingw_mandir}/man1/wrjpgcom.1*
+
+%changelog
+* Tue Sep  9 2008 Daniel P. Berrange <berrange@redhat.com> - 2.18.0-1
+- Initial RPM release
diff --git a/pango/mingw-pango.spec b/pango/mingw-pango.spec
new file mode 100644 (file)
index 0000000..091cdba
--- /dev/null
@@ -0,0 +1,79 @@
+%include /usr/lib/rpm/mingw-defs
+
+Name:           mingw-pango
+Version:        1.21.6
+Release:        1%{?dist}
+Summary:        MinGW Windows Pango library
+
+License:        LGPLv2+
+Group:          Development/Libraries
+URL:            http://www.pango.org
+Source0:        http://download.gnome.org/sources/pango/1.21/pango-%{version}.tar.bz2
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildArch:      noarch
+
+BuildRequires:  mingw-filesystem >= 19
+BuildRequires:  mingw-gcc
+BuildRequires:  mingw-binutils
+BuildRequires:  mingw-iconv
+BuildRequires:  mingw-gettext
+BuildRequires:  mingw-cairo
+BuildRequires:  mingw-freetype
+BuildRequires:  mingw-fontconfig
+
+%description
+MinGW Windows Pango library.
+
+
+%prep
+%setup -q -n pango-%{version}
+
+%build
+PKG_CONFIG_PATH=%{_mingw_libdir}/pkgconfig \
+%{_mingw_configure}
+make
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+make DESTDIR=$RPM_BUILD_ROOT install
+
+rm -f $RPM_BUILD_ROOT/%{_mingw_libdir}/charset.alias
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%files
+%defattr(-,root,root)
+%{_mingw_bindir}/libpango-1.0-0.dll
+%{_mingw_bindir}/libpangocairo-1.0-0.dll
+%{_mingw_bindir}/libpangoft2-1.0-0.dll
+%{_mingw_bindir}/libpangowin32-1.0-0.dll
+%{_mingw_bindir}/pango-querymodules.exe
+%{_mingw_includedir}/pango-1.0/
+%{_mingw_libdir}/libpango-1.0.dll.a
+%{_mingw_libdir}/libpango-1.0.la
+%{_mingw_libdir}/libpangocairo-1.0.dll.a
+%{_mingw_libdir}/libpangocairo-1.0.la
+%{_mingw_libdir}/libpangoft2-1.0.dll.a
+%{_mingw_libdir}/libpangoft2-1.0.la
+%{_mingw_libdir}/libpangowin32-1.0.dll.a
+%{_mingw_libdir}/libpangowin32-1.0.la
+%{_mingw_libdir}/pango-1.0.def
+%{_mingw_libdir}/pangocairo-1.0.def
+%{_mingw_libdir}/pangoft2-1.0.def
+%{_mingw_libdir}/pangowin32-1.0.def
+%{_mingw_libdir}/pango/
+%{_mingw_libdir}/pkgconfig/pango.pc
+%{_mingw_libdir}/pkgconfig/pangocairo.pc
+%{_mingw_libdir}/pkgconfig/pangoft2.pc
+%{_mingw_libdir}/pkgconfig/pangowin32.pc
+%{_mingw_datadir}/gtk-doc/html/pango/
+%{_mingw_mandir}/man1/pango-querymodules.1*
+
+%changelog
+* Tue Sep  9 2008 Daniel P. Berrange <berrange@redhat.com> - 1.21.6-1
+- Initial RPM release