Update to 1.11.2 and added win64 support
- Update to 1.11.2 - Added win64 support - Make freetype/fontconfig an optional runtime dependency (delay-load) - Enable tee support
This commit is contained in:
parent
4d1098b8b6
commit
0a5896bdf5
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
cairo-1.8.10.tar.gz
|
||||
/cairo-1.10.0.tar.gz
|
||||
/cairo-1.10.2.tar.gz
|
||||
/cairo-1.11.2.tar.gz
|
||||
|
||||
32
cairo-fix-def-file-generation.patch
Normal file
32
cairo-fix-def-file-generation.patch
Normal file
@ -0,0 +1,32 @@
|
||||
--- cairo-1.11.2/src/Makefile.am.orig 2012-02-19 21:36:31.805936062 +0100
|
||||
+++ cairo-1.11.2/src/Makefile.am 2012-02-19 21:37:21.002819998 +0100
|
||||
@@ -65,14 +65,14 @@
|
||||
CLEANFILES += cairo.def
|
||||
cairo.def: cairo-features.h $(enabled_cairo_headers)
|
||||
@echo Generating $@
|
||||
- @(echo EXPORTS; \
|
||||
+ @(echo LIBRARY libcairo-$(CAIRO_VERSION_SONUM).dll; \
|
||||
+ echo EXPORTS; \
|
||||
(cd $(srcdir); cat $(enabled_cairo_headers) || echo 'cairo_ERROR ()' ) | \
|
||||
grep -v -E '^# *include' | \
|
||||
( cat cairo-features.h - | $(CPP) -D__cplusplus - || echo 'cairo_ERROR ()' ) | \
|
||||
grep -E '^cairo_.* \(' | \
|
||||
sed -e 's/[ ].*//' | \
|
||||
sort; \
|
||||
- echo LIBRARY libcairo-$(CAIRO_VERSION_SONUM).dll; \
|
||||
) >$@
|
||||
@ ! grep -q cairo_ERROR $@ || ($(RM) $@; false)
|
||||
|
||||
--- cairo-1.11.2/src/check-def.sh.orig 2012-02-19 22:28:46.681132716 +0100
|
||||
+++ cairo-1.11.2/src/check-def.sh 2012-02-19 22:29:14.158624900 +0100
|
||||
@@ -38,10 +38,7 @@
|
||||
echo Checking that $so has the same symbol list as $def
|
||||
|
||||
{
|
||||
- echo EXPORTS
|
||||
eval $get_cairo_syms | c++filt --no-params | grep -v '^_cairo_test_\|^_fini\|^_init\|^_save[fg]pr\|^_rest[fg]pr\|^_Z\|^__gnu' | sort -u
|
||||
- # cheat: copy the last line from the def file!
|
||||
- tail -n1 "$def"
|
||||
} | diff "$def" - >&2 || stat=1
|
||||
done
|
||||
|
||||
150
mingw-cairo.spec
150
mingw-cairo.spec
@ -1,15 +1,17 @@
|
||||
%global __strip %{mingw32_strip}
|
||||
%global __objdump %{mingw32_objdump}
|
||||
%define __debug_install_post %{mingw32_debug_install_post}
|
||||
%?mingw_package_header
|
||||
|
||||
%global mingw_build_win32 1
|
||||
%global mingw_build_win64 1
|
||||
|
||||
Name: mingw-cairo
|
||||
Version: 1.10.2
|
||||
Release: 10%{?dist}
|
||||
Version: 1.11.2
|
||||
Release: 1%{?dist}
|
||||
Summary: MinGW Windows Cairo library
|
||||
|
||||
License: LGPLv2 or MPLv1.1
|
||||
URL: http://cairographics.org
|
||||
Source0: http://cairographics.org/releases/cairo-%{version}.tar.gz
|
||||
#Source0: http://cairographics.org/releases/cairo-%{version}.tar.gz
|
||||
Source0: http://cairographics.org/snapshots/cairo-%{version}.tar.gz
|
||||
Group: Development/Libraries
|
||||
|
||||
# The file cairo.c refers to a function called ffs(), but it
|
||||
@ -24,9 +26,16 @@ Patch1: mingw32-cairo-A1_surfaces.patch
|
||||
# https://bugs.freedesktop.org/show_bug.cgi?id=42821
|
||||
Patch2: mingw32-cairo-reset_clip.patch
|
||||
|
||||
# In recent binutils snapshots (feb 2012) the handling of .def files got more strict
|
||||
# http://sourceware.org/bugzilla/show_bug.cgi?id=13710
|
||||
# https://bugs.freedesktop.org/show_bug.cgi?id=46299
|
||||
# https://savannah.gnu.org/support/?107959
|
||||
# http://msdn.microsoft.com/en-us/library/d91k01sh%28v=vs.80%29.aspx
|
||||
Patch3: cairo-fix-def-file-generation.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: mingw32-filesystem >= 68
|
||||
BuildRequires: mingw32-filesystem >= 95
|
||||
BuildRequires: mingw32-gcc
|
||||
BuildRequires: mingw32-binutils
|
||||
BuildRequires: mingw32-fontconfig
|
||||
@ -37,17 +46,31 @@ BuildRequires: mingw32-libpng
|
||||
BuildRequires: mingw32-win-iconv
|
||||
BuildRequires: mingw32-zlib
|
||||
BuildRequires: mingw32-glib2
|
||||
BuildRequires: pkgconfig
|
||||
|
||||
Requires: pkgconfig
|
||||
BuildRequires: mingw64-filesystem >= 95
|
||||
BuildRequires: mingw64-gcc
|
||||
BuildRequires: mingw64-binutils
|
||||
BuildRequires: mingw64-fontconfig
|
||||
BuildRequires: mingw64-freetype
|
||||
BuildRequires: mingw64-libxml2
|
||||
BuildRequires: mingw64-pixman
|
||||
BuildRequires: mingw64-libpng
|
||||
BuildRequires: mingw64-win-iconv
|
||||
BuildRequires: mingw64-zlib
|
||||
BuildRequires: mingw64-glib2
|
||||
|
||||
BuildRequires: autoconf automake libtool
|
||||
BuildRequires: pkgconfig
|
||||
|
||||
|
||||
%description
|
||||
MinGW Windows Cairo library.
|
||||
|
||||
|
||||
# Win32
|
||||
%package -n mingw32-cairo
|
||||
Summary: MinGW Windows Cairo library
|
||||
Requires: pkgconfig
|
||||
|
||||
%description -n mingw32-cairo
|
||||
MinGW Windows Cairo library.
|
||||
@ -60,8 +83,24 @@ Group: Development/Libraries
|
||||
%description -n mingw32-cairo-static
|
||||
Static version of the MinGW Windows Cairo library.
|
||||
|
||||
# Win64
|
||||
%package -n mingw64-cairo
|
||||
Summary: MinGW Windows Cairo library
|
||||
Requires: pkgconfig
|
||||
|
||||
%{?_mingw32_debug_package}
|
||||
%description -n mingw64-cairo
|
||||
MinGW Windows Cairo library.
|
||||
|
||||
%package -n mingw64-cairo-static
|
||||
Summary: Static version of the MinGW Windows Cairo library
|
||||
Requires: mingw64-cairo = %{version}-%{release}
|
||||
Group: Development/Libraries
|
||||
|
||||
%description -n mingw64-cairo-static
|
||||
Static version of the MinGW Windows Cairo library.
|
||||
|
||||
|
||||
%?mingw_debug_package
|
||||
|
||||
|
||||
%prep
|
||||
@ -69,32 +108,75 @@ Static version of the MinGW Windows Cairo library.
|
||||
%patch0 -p0
|
||||
%patch1 -p1 -b .A1_surfaces
|
||||
%patch2 -p1 -b .reset_clip
|
||||
%patch3 -p1 -b .def
|
||||
|
||||
# The libtool bundled with this package is too old for win64 support
|
||||
NOCONFIGURE=1 ./autogen.sh
|
||||
|
||||
%build
|
||||
%{mingw32_configure} \
|
||||
# Function to generate an import library for delay-loading
|
||||
gen_delay_lib()
|
||||
{
|
||||
local DLL="$1"
|
||||
local OUT_IMPLIB="$2"
|
||||
|
||||
gendef - "%{mingw32_bindir}/$DLL" > build_win32/delay_load.def
|
||||
%{mingw32_dlltool} --def build_win32/delay_load.def --kill-at --output-delaylib "build_win32/$OUT_IMPLIB"
|
||||
|
||||
gendef - "%{mingw64_bindir}/$DLL" > build_win64/delay_load.def
|
||||
%{mingw64_dlltool} --def build_win64/delay_load.def --kill-at --output-delaylib "build_win64/$OUT_IMPLIB"
|
||||
}
|
||||
|
||||
mkdir build_win32
|
||||
mkdir build_win64
|
||||
|
||||
# Generate import libs for delay-loading fontconfig and freetype
|
||||
gen_delay_lib libfontconfig-1.dll libfontconfig-delayed.dll.a
|
||||
gen_delay_lib libfreetype-6.dll libfreetype-delayed.dll.a
|
||||
|
||||
MINGW_CONFIGURE_ARGS=" \
|
||||
--enable-win32 \
|
||||
--disable-pthread \
|
||||
--disable-xlib \
|
||||
--disable-xcb \
|
||||
--enable-win32 \
|
||||
--enable-fc \
|
||||
--enable-ft \
|
||||
--enable-png \
|
||||
--enable-static \
|
||||
--disable-pthread \
|
||||
--enable-gobject
|
||||
make %{?_smp_mflags}
|
||||
--enable-gobject \
|
||||
--enable-tee"
|
||||
|
||||
# The regular %%mingw_configure macro can't be used here as we need to inject custom
|
||||
# environment variables which are different between the win32 and win64 build
|
||||
pushd build_win32
|
||||
%mingw32_configure \
|
||||
FONTCONFIG_LIBS="-L`pwd` -lfontconfig-delayed" \
|
||||
FREETYPE_LIBS="-L`pwd` -lfreetype-delayed"
|
||||
popd
|
||||
|
||||
pushd build_win64
|
||||
%mingw64_configure \
|
||||
FONTCONFIG_LIBS="-L`pwd` -lfontconfig-delayed" \
|
||||
FREETYPE_LIBS="-L`pwd` -lfreetype-delayed"
|
||||
popd
|
||||
|
||||
%mingw_make %{?_smp_mflags}
|
||||
|
||||
|
||||
%install
|
||||
make DESTDIR=$RPM_BUILD_ROOT install
|
||||
%mingw_make_install DESTDIR=$RPM_BUILD_ROOT
|
||||
|
||||
rm -f $RPM_BUILD_ROOT%{mingw32_libdir}/charset.alias
|
||||
rm -r $RPM_BUILD_ROOT%{mingw32_datadir}/gtk-doc/html/cairo/
|
||||
rm -f $RPM_BUILD_ROOT%{mingw64_libdir}/charset.alias
|
||||
|
||||
rm -r $RPM_BUILD_ROOT%{mingw32_datadir}/gtk-doc
|
||||
rm -r $RPM_BUILD_ROOT%{mingw64_datadir}/gtk-doc
|
||||
|
||||
# Drop all .la files
|
||||
find $RPM_BUILD_ROOT -name "*.la" -delete
|
||||
|
||||
|
||||
# Win32
|
||||
%files -n mingw32-cairo
|
||||
%doc COPYING COPYING-LGPL-2.1 COPYING-MPL-1.1
|
||||
%{mingw32_bindir}/libcairo-2.dll
|
||||
@ -111,6 +193,7 @@ find $RPM_BUILD_ROOT -name "*.la" -delete
|
||||
%{mingw32_libdir}/pkgconfig/cairo-png.pc
|
||||
%{mingw32_libdir}/pkgconfig/cairo-ps.pc
|
||||
%{mingw32_libdir}/pkgconfig/cairo-svg.pc
|
||||
%{mingw32_libdir}/pkgconfig/cairo-tee.pc
|
||||
%{mingw32_libdir}/pkgconfig/cairo-win32-font.pc
|
||||
%{mingw32_libdir}/pkgconfig/cairo-win32.pc
|
||||
%{mingw32_libdir}/pkgconfig/cairo.pc
|
||||
@ -120,8 +203,41 @@ find $RPM_BUILD_ROOT -name "*.la" -delete
|
||||
%{mingw32_libdir}/libcairo-gobject.a
|
||||
%{mingw32_libdir}/libcairo-script-interpreter.a
|
||||
|
||||
# Win64
|
||||
%files -n mingw64-cairo
|
||||
%doc COPYING COPYING-LGPL-2.1 COPYING-MPL-1.1
|
||||
%{mingw64_bindir}/libcairo-2.dll
|
||||
%{mingw64_bindir}/libcairo-gobject-2.dll
|
||||
%{mingw64_bindir}/libcairo-script-interpreter-2.dll
|
||||
%{mingw64_includedir}/cairo/
|
||||
%{mingw64_libdir}/libcairo.dll.a
|
||||
%{mingw64_libdir}/libcairo-gobject.dll.a
|
||||
%{mingw64_libdir}/libcairo-script-interpreter.dll.a
|
||||
%{mingw64_libdir}/pkgconfig/cairo-fc.pc
|
||||
%{mingw64_libdir}/pkgconfig/cairo-ft.pc
|
||||
%{mingw64_libdir}/pkgconfig/cairo-gobject.pc
|
||||
%{mingw64_libdir}/pkgconfig/cairo-pdf.pc
|
||||
%{mingw64_libdir}/pkgconfig/cairo-png.pc
|
||||
%{mingw64_libdir}/pkgconfig/cairo-ps.pc
|
||||
%{mingw64_libdir}/pkgconfig/cairo-svg.pc
|
||||
%{mingw64_libdir}/pkgconfig/cairo-tee.pc
|
||||
%{mingw64_libdir}/pkgconfig/cairo-win32-font.pc
|
||||
%{mingw64_libdir}/pkgconfig/cairo-win32.pc
|
||||
%{mingw64_libdir}/pkgconfig/cairo.pc
|
||||
|
||||
%files -n mingw64-cairo-static
|
||||
%{mingw64_libdir}/libcairo.a
|
||||
%{mingw64_libdir}/libcairo-gobject.a
|
||||
%{mingw64_libdir}/libcairo-script-interpreter.a
|
||||
|
||||
|
||||
%changelog
|
||||
* Sun Mar 11 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.11.2-1
|
||||
- Update to 1.11.2
|
||||
- Added win64 support
|
||||
- Make freetype/fontconfig an optional runtime dependency (delay-load)
|
||||
- Enable tee support
|
||||
|
||||
* Tue Mar 06 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.10.2-10
|
||||
- Renamed the source package to mingw-cairo (RHBZ #800373)
|
||||
- Use mingw macros without leading underscore
|
||||
|
||||
Loading…
Reference in New Issue
Block a user