- Add patch to force linking with gcc, not g++. (#606523)

This commit is contained in:
Benjamin Otte 2010-07-05 00:25:21 +00:00
parent 602c11e62f
commit 4ea3c6261e
2 changed files with 25 additions and 1 deletions

View File

@ -5,13 +5,17 @@
Summary: A 2D graphics library
Name: cairo
Version: 1.9.10
Release: 2%{?dist}
Release: 3%{?dist}
URL: http://cairographics.org
Source0: http://cairographics.org/snapshots/%{name}-%{version}.tar.gz
#Source0: http://cairographics.org/releases/%{name}-%{version}.tar.gz
License: LGPLv2 or MPLv1.1
Group: System Environment/Libraries
# Due to libcairo potentially including C++ backends, it gets linked with g++.
# We don't enable those backends, so we can link with gcc.
Patch0: link-with-cc.patch
BuildRequires: pkgconfig
BuildRequires: libXrender-devel
BuildRequires: libX11-devel
@ -63,6 +67,8 @@ This package contains tools for working with the cairo graphics library.
%prep
%setup -q
%patch0 -p1 -b .link
%build
%configure --disable-static \
--enable-warnings \
@ -105,6 +111,9 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/cairo
%changelog
* Sun Jul 04 2010 Benjamin Otte <otte@redhat.com> - 1.9.10-3
- Add patch to force linking with gcc, not g++. (#606523)
* Sun Jul 04 2010 Benjamin Otte <otte@redhat.com> - 1.9.10-2
- Don't use silent rules, we want verbose output in builders

15
link-with-cc.patch Normal file
View File

@ -0,0 +1,15 @@
--- a/src/Makefile.in 2010-06-26 15:32:39.000000000 +0200
+++ b/src/Makefile.in 2010-07-05 02:20:07.960075657 +0200
@@ -607,9 +607,9 @@
nodist_libcairo_la_OBJECTS =
libcairo_la_OBJECTS = $(am_libcairo_la_OBJECTS) \
$(nodist_libcairo_la_OBJECTS)
-libcairo_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
- $(CXXFLAGS) $(libcairo_la_LDFLAGS) $(LDFLAGS) -o $@
+libcairo_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CCFLAGS) \
+ $(CFLAGS) $(libcairo_la_LDFLAGS) $(LDFLAGS) -o $@
check_link_SOURCES = check-link.c
check_link_OBJECTS = check-link.$(OBJEXT)
check_link_DEPENDENCIES = libcairo.la