From 1fbf80286a16437e61183a625402349e35d8f389f62a1d6fd95f6ab8acb204cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 29 Nov 2012 10:07:21 +0000 Subject: [PATCH] Accepting request 143480 from home:elvigia:branches:LibreOffice:Factory - graphite2-arm.patch :Fix build in arm and possible other platforms, we should notuse -nodefaultlibs as a linker flag and let the system do its job automatically. - freetype-devel should be freetype2-devel OBS-URL: https://build.opensuse.org/request/show/143480 OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/graphite2?expand=0&rev=6 --- graphite2-arm.patch | 30 ++++++++++++++++++++++++++++++ graphite2.changes | 8 ++++++++ graphite2.spec | 20 +++++++++++--------- 3 files changed, 49 insertions(+), 9 deletions(-) create mode 100644 graphite2-arm.patch diff --git a/graphite2-arm.patch b/graphite2-arm.patch new file mode 100644 index 0000000..522537a --- /dev/null +++ b/graphite2-arm.patch @@ -0,0 +1,30 @@ +--- tests/CMakeLists.txt.orig ++++ tests/CMakeLists.txt +@@ -39,14 +39,12 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Windo + COMPILE_DEFINITIONS "GRAPHITE2_STATIC;GRAPHITE2_NTRACING;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;UNICODE") + else (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") + set_target_properties(graphite2-base PROPERTIES +- COMPILE_FLAGS "-Wall -Wextra -fdiagnostics-show-option -fno-rtti -fno-exceptions -fno-stack-protector" ++ COMPILE_FLAGS "-Wall -Wextra -fdiagnostics-show-option -fno-rtti -fno-exceptions" + COMPILE_DEFINITIONS "GRAPHITE2_STATIC" +- LINK_FLAGS "-nodefaultlibs" + LINKER_LANGUAGE C) + set_target_properties(graphite2-segcache PROPERTIES +- COMPILE_FLAGS "-Wall -Wextra -fdiagnostics-show-option -fno-rtti -fno-exceptions -fno-stack-protector" ++ COMPILE_FLAGS "-Wall -Wextra -fdiagnostics-show-option -fno-rtti -fno-exceptions" + COMPILE_DEFINITIONS "GRAPHITE2_STATIC;GRAPHITE2_NTRACING" +- LINK_FLAGS "-nodefaultlibs" + LINKER_LANGUAGE C) + endif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") + +--- gr2fonttest/CMakeLists.txt.orig ++++ gr2fonttest/CMakeLists.txt +@@ -16,7 +16,7 @@ target_link_libraries(gr2fonttest graphi + if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + # -lgcc LINKER_LANGUAGE C + add_definitions(-fno-rtti -fno-exceptions) +- set_target_properties(gr2fonttest PROPERTIES LINK_FLAGS "-nodefaultlibs" LINKER_LANGUAGE C) ++ set_target_properties(gr2fonttest PROPERTIES LINKER_LANGUAGE C) + set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "") + # This script just fails + nolib_test(stdc++ $) diff --git a/graphite2.changes b/graphite2.changes index 1080fb9..ef6a196 100644 --- a/graphite2.changes +++ b/graphite2.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Nov 28 16:36:00 UTC 2012 - crrodriguez@opensuse.org + +- graphite2-arm.patch :Fix build in arm and possible other platforms, we should + notuse -nodefaultlibs as a linker flag and let the system + do its job automatically. +- freetype-devel should be freetype2-devel + ------------------------------------------------------------------- Tue Nov 13 08:55:33 UTC 2012 - cfarrell@suse.com diff --git a/graphite2.spec b/graphite2.spec index a4e0710..376904b 100644 --- a/graphite2.spec +++ b/graphite2.spec @@ -1,5 +1,4 @@ # -# # spec file for package graphite2 # # Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. @@ -22,16 +21,17 @@ Name: graphite2 Version: 1.2.0 Release: 0 -License: LGPL-2.1+ or GPL-2.0+ or MPL-1.1 Summary: Font rendering capabilities for complex non-Roman writing systems -Url: http://sourceforge.net/projects/silgraphite/ +License: LGPL-2.1+ or GPL-2.0+ or MPL-1.1 Group: Productivity/Publishing/Word +Url: http://sourceforge.net/projects/silgraphite/ Source0: http://downloads.sourceforge.net/silgraphite/graphite2-%{version}.tgz -BuildRequires: pkgconfig BuildRequires: cmake +BuildRequires: freetype2-devel BuildRequires: gcc-c++ -BuildRequires: freetype-devel +BuildRequires: pkgconfig BuildRoot: %{_tmppath}/%{name}-%{version}-build +Patch0: graphite2-arm.patch %description Graphite2 is a project within SIL’s Non-Roman Script Initiative and Language @@ -57,6 +57,7 @@ system implementation. Summary: Files for Developing with %{name} Group: Development/Libraries/C and C++ Requires: %{libname} = %{version} +Requires: glibc-devel %description devel Graphite2 is a project within SIL’s Non-Roman Script Initiative and Language @@ -70,10 +71,11 @@ This package contains the libexttextcat development files. %prep %setup -q - +%patch0 %build cmake \ - -DCMAKE_C_FLAGS:STRING="%{optflags}" \ + -DCMAKE_C_FLAGS:STRING="%{optflags} -D_GNU_SOURCE" \ + -DCMAKE_CXX_FLAGS:STRING="%{optflags} -D_GNU_SOURCE" \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_SKIP_RPATH=ON \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ @@ -83,12 +85,12 @@ cmake \ %endif -DGRAPHITE2_COMPARE_RENDERER=OFF \ -DVM_MACHINE_TYPE=direct \ - . + -DCMAKE_VERBOSE_MAKEFILE=ON + make %{?_smp_mflags} %install make DESTDIR=%{buildroot} install - rm %{buildroot}%{_libdir}/*.la %post -n %{libname} -p /sbin/ldconfig