Remove call to setenv.
[fedora-mingw.git] / inkscape / mingw32-inkscape.spec
1 # NB: Not for a Fedora package, just an example to show how
2 # to build Inkscape using the cross-compiler.
3
4 %define __strip %{_mingw32_strip}
5 %define __objdump %{_mingw32_objdump}
6 %define _use_internal_dependency_generator 0
7 %define __find_requires %{_mingw32_findrequires}
8 %define __find_provides %{_mingw32_findprovides}
9
10 Name:           mingw32-inkscape
11 Version:        20081027
12 Release:        1%{?dist}
13 Summary:        MinGW Windows port of Inkscape vector graphics editor
14
15 License:        LGPLv2+
16 Group:          Development/Libraries
17 URL:            http://www.inkscape.org/
18 # Checked out of SVN on the date shown and then just rolled up into
19 # a tarball.
20 # svn co https://inkscape.svn.sourceforge.net/svnroot/inkscape/inkscape/trunk inkscape
21 # tar zcf /tmp/inkscape-%{version}.tar.gz inkscape
22 Source0:        inkscape-%{version}.tar.gz
23 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
24
25 # Source patches needed.
26 Patch0:         mingw32-inkscape-20081027-no-gc-version-check-when-crosscompiling.patch
27 Patch1:         mingw32-inkscape-20081027-no-is-os-vista.patch
28 Patch2:         mingw32-inkscape-20081027-extra-win32-objects.patch
29 Patch3:         mingw32-inkscape-20081027-pango-enable-engine.patch
30 Patch4:         mingw32-inkscape-20081027-no-setenv.patch
31
32 # This is a hack, but for some reason PKG_CHECK_MODULES isn't
33 # updating CFLAGS correctly.  This just works around the problem.
34 Patch5:         mingw32-inkscape-20081027-Makefile.am-cflags.patch
35
36 BuildArch:      noarch
37
38 BuildRequires:  mingw32-filesystem >= 30
39 BuildRequires:  mingw32-gcc
40 BuildRequires:  mingw32-gcc-c++
41 BuildRequires:  mingw32-binutils
42 BuildRequires:  mingw32-glibmm24
43 BuildRequires:  mingw32-cairomm
44 BuildRequires:  mingw32-pangomm
45 BuildRequires:  mingw32-gtkmm24
46 BuildRequires:  mingw32-popt
47 BuildRequires:  mingw32-libxml2
48 BuildRequires:  mingw32-libxslt
49 BuildRequires:  mingw32-gc
50 BuildRequires:  mingw32-gsl
51 BuildRequires:  mingw32-boost
52 BuildRequires:  mingw32-libsigc++20
53
54 BuildRequires:  autoconf, automake, libtool
55 BuildRequires:  perl
56
57
58 %description
59 An Open Source vector graphics editor, with capabilities similar to
60 Illustrator, CorelDraw, or Xara X, using the W3C standard Scalable
61 Vector Graphics (SVG) file format.
62
63 Inkscape supports many advanced SVG features (markers, clones, alpha
64 blending, etc.) and great care is taken in designing a streamlined
65 interface. It is very easy to edit nodes, perform complex path
66 operations, trace bitmaps and much more. We also aim to maintain a
67 thriving user and developer community by using open,
68 community-oriented development.
69
70
71 %prep
72 %setup -q -n inkscape
73
74 %patch0 -p0
75 %patch1 -p0
76 %patch2 -p0
77 %patch3 -p0
78 %patch4 -p0
79 %patch5 -p0
80
81 ./autogen.sh
82
83
84 %build
85 %{_mingw32_configure} \
86   --enable-lcms=no \
87   --without-gnome-vfs
88
89 # Additionally remove -lX* libraries from the Makefile.
90 perl -pi.bak -e 's/-lX\w+//g' src/Makefile
91
92 make
93
94
95 %install
96 rm -rf $RPM_BUILD_ROOT
97 make DESTDIR=$RPM_BUILD_ROOT install
98
99 # Remove static libraries but DON'T remove *.dll.a files.
100 rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libfoo.a
101
102
103 %clean
104 rm -rf $RPM_BUILD_ROOT
105
106
107 %files
108 %defattr(-,root,root)
109 %{_mingw32_bindir}/foo.dll
110 %{_mingw32_libdir}/foo.dll.a
111 # etc.
112
113
114 %changelog
115 * Wed Sep 24 2008 Your Name <you@example.com> - 1.2.3-1
116 - Initial RPM release.