From: Richard W.M. Jones <"Richard W.M. Jones "> Date: Thu, 16 Oct 2008 11:26:41 +0000 (+0100) Subject: Added Windows icon patch. X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=68113c81cb8787a7cc0fcdf6d168a3159f05e7f0;p=fedora-mingw.git Added Windows icon patch. --- diff --git a/libvirt/libvirt_win_icon_16x16.ico b/libvirt/libvirt_win_icon_16x16.ico new file mode 100644 index 0000000..38e6d74 Binary files /dev/null and b/libvirt/libvirt_win_icon_16x16.ico differ diff --git a/libvirt/libvirt_win_icon_32x32.ico b/libvirt/libvirt_win_icon_32x32.ico new file mode 100644 index 0000000..4d2e7b7 Binary files /dev/null and b/libvirt/libvirt_win_icon_32x32.ico differ diff --git a/libvirt/libvirt_win_icon_48x48.ico b/libvirt/libvirt_win_icon_48x48.ico new file mode 100644 index 0000000..b03cebf Binary files /dev/null and b/libvirt/libvirt_win_icon_48x48.ico differ diff --git a/libvirt/libvirt_win_icon_64x64.ico b/libvirt/libvirt_win_icon_64x64.ico new file mode 100644 index 0000000..c23b664 Binary files /dev/null and b/libvirt/libvirt_win_icon_64x64.ico differ diff --git a/libvirt/mingw32-libvirt-0.4.6-win-icon.patch b/libvirt/mingw32-libvirt-0.4.6-win-icon.patch new file mode 100644 index 0000000..5e16bec --- /dev/null +++ b/libvirt/mingw32-libvirt-0.4.6-win-icon.patch @@ -0,0 +1,84 @@ +? docs/libvirt_win_icon_64x64.png +? src/libvirt_win_icon_16x16.ico +? src/libvirt_win_icon_32x32.ico +? src/libvirt_win_icon_48x48.ico +? src/libvirt_win_icon_64x64.ico +Index: configure.in +=================================================================== +RCS file: /data/cvs/libvirt/configure.in,v +retrieving revision 1.171 +diff -u -r1.171 configure.in +--- configure.in 10 Oct 2008 13:57:13 -0000 1.171 ++++ configure.in 15 Oct 2008 16:29:24 -0000 +@@ -34,6 +34,8 @@ + AC_PROG_INSTALL + AC_PROG_CPP + ++AC_OBJEXT ++ + dnl gl_INIT uses m4_foreach_w, yet that is not defined in autoconf-2.59. + dnl In order to accommodate developers with such old tools, here's a + dnl replacement definition. +@@ -1040,6 +1042,10 @@ + AC_SUBST([CYGWIN_EXTRA_PYTHON_LIBADD]) + AC_SUBST([MINGW_EXTRA_LDFLAGS]) + ++dnl Look for windres to build a Windows icon resource. ++AC_CHECK_TOOL([WINDRES], [windres], [no]) ++AM_CONDITIONAL([WITH_WIN_ICON], [test "$WINDRES" != "no"]) ++ + # Set LV_LIBTOOL_OBJDIR to "." or $lt_cv_objdir, depending on whether + # we're building shared libraries. This is the name of the directory + # in which .o files will be created. +Index: src/Makefile.am +=================================================================== +RCS file: /data/cvs/libvirt/src/Makefile.am,v +retrieving revision 1.95 +diff -u -r1.95 Makefile.am +--- src/Makefile.am 10 Oct 2008 13:57:13 -0000 1.95 ++++ src/Makefile.am 15 Oct 2008 16:29:24 -0000 +@@ -283,6 +283,33 @@ + rm -f $@ + mv $@-tmp $@ + ++if WITH_WIN_ICON ++virsh_LDADD += virsh_win_icon.$(OBJEXT) ++virsh_DEPENDENCIES += virsh_win_icon.$(OBJEXT) ++ ++# Before you edit virsh_win_icon.rc, please note the following ++# limitations of the resource file format: ++# ++# (1) '..' is not permitted in the icon filename field. ++# (2) '-' is not permitted in the icon filename field. ++# (3) Comments are not permitted in the file. ++# ++# Windows appears to choose the first <= 32x32 icon it finds ++# in the resource file. Therefore you should list the available ++# icons from largest to smallest, and make sure that the 32x32 ++# icon is the most legible. ++# ++# Windows .ICO is a special MS-only format. GIMP and other ++# tools can write it. However there are several variations, ++# and Windows seems to do its own colour quantization. More ++# information is needed in this area. ++ ++virsh_win_icon.$(OBJEXT): virsh_win_icon.rc ++ $(WINDRES) \ ++ --input-format rc --input $< \ ++ --output-format coff --output $@ ++endif ++ + libexec_PROGRAMS = + + if WITH_STORAGE_DISK +Index: src/virsh_win_icon.rc +=================================================================== +RCS file: src/virsh_win_icon.rc +diff -N src/virsh_win_icon.rc +--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++ src/virsh_win_icon.rc 15 Oct 2008 16:29:24 -0000 +@@ -0,0 +1,4 @@ ++xlarge ICON libvirt_win_icon_64x64.ico ++large ICON libvirt_win_icon_48x48.ico ++medium ICON libvirt_win_icon_32x32.ico ++small ICON libvirt_win_icon_16x16.ico diff --git a/libvirt/mingw32-libvirt.spec b/libvirt/mingw32-libvirt.spec index 78c353e..14640fe 100644 --- a/libvirt/mingw32-libvirt.spec +++ b/libvirt/mingw32-libvirt.spec @@ -6,7 +6,7 @@ Name: mingw32-libvirt Version: 0.4.6 -Release: 6%{?dist}%{?extra_release} +Release: 7%{?dist}%{?extra_release} Summary: MinGW Windows libvirt virtualization library License: LGPLv2+ @@ -15,8 +15,14 @@ URL: http://libvirt.org/ Source0: ftp://libvirt.org/libvirt/libvirt-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +# All of these patches are upstream after 0.4.6. Patch0: mingw32-libvirt-0.4.6-debug-registration.patch Patch1: mingw32-libvirt-0.4.6-register-remote.patch +Patch2: mingw32-libvirt-0.4.6-win-icon.patch +Source1: libvirt_win_icon_16x16.ico +Source2: libvirt_win_icon_32x32.ico +Source3: libvirt_win_icon_48x48.ico +Source4: libvirt_win_icon_64x64.ico BuildRequires: mingw32-filesystem >= 23 BuildRequires: mingw32-gcc @@ -44,6 +50,11 @@ MinGW Windows libvirt virtualization library. %setup -q -n libvirt-%{version} %patch0 -p1 %patch1 -p1 +%patch2 -p0 +cp %{SOURCE1} src/ +cp %{SOURCE2} src/ +cp %{SOURCE3} src/ +cp %{SOURCE4} src/ %build @@ -96,6 +107,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Oct 16 2008 Richard Jones - 0.4.6-7 +- Windows icon patch from + https://www.redhat.com/archives/libvir-list/2008-October/msg00331.html + * Wed Oct 15 2008 Richard Jones - 0.4.6-6 - Add patches from https://www.redhat.com/archives/libvir-list/2008-October/msg00328.html