[lasi] - Add patch to build with freetype 2.5.1+ (bug #1057815) - BUild and package documentation
Orion Poplawski
orion at fedoraproject.org
Sat Jan 25 04:41:38 UTC 2014
commit 6e007db77997e864c96f8e226c80da8a30c39453
Author: Orion Poplawski <orion at cora.nwra.com>
Date: Fri Jan 24 21:41:56 2014 -0700
- Add patch to build with freetype 2.5.1+ (bug #1057815)
- BUild and package documentation
lasi-freetype.patch | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++
lasi.spec | 36 ++++++++++++++++++++++++++++--
2 files changed, 92 insertions(+), 3 deletions(-)
---
diff --git a/lasi-freetype.patch b/lasi-freetype.patch
new file mode 100644
index 0000000..2983e03
--- /dev/null
+++ b/lasi-freetype.patch
@@ -0,0 +1,59 @@
+--- include/LASi.h.orig 2011-09-21 14:09:55.000000000 -0500
++++ include/LASi.h 2013-11-27 05:49:26.000000000 -0600
+@@ -11,7 +11,8 @@
+ #include <sstream>
+ #include <map>
+ #include <pango/pango.h>
+-#include <freetype/ftglyph.h>
++#include <ft2build.h>
++#include FT_GLYPH_H
+
+ class FreetypeGlyphMgr;
+ class ContextMgr;
+--- src/drawGlyph.cpp.orig 2011-09-21 14:09:55.000000000 -0500
++++ src/drawGlyph.cpp 2013-11-27 05:47:16.000000000 -0600
+@@ -6,7 +6,8 @@
+ */
+
+ #include <ostream>
+-#include <freetype/ftoutln.h>
++#include <ft2build.h>
++#include FT_OUTLINE_H
+ #include <algorithm>
+ #include <LASi.h>
+ #include <config.h>
+--- src/glyphMgr.cpp.orig 2011-09-21 14:09:55.000000000 -0500
++++ src/glyphMgr.cpp 2013-11-27 05:49:04.000000000 -0600
+@@ -10,8 +10,7 @@
+
+ #include <ft2build.h>
+ #include FT_FREETYPE_H
+-
+-#include <freetype/ftglyph.h>
++#include FT_GLYPH_H
+
+ #include <cassert>
+ #include "util.h"
+--- src/glyphMgr.h.orig 2011-09-21 14:09:55.000000000 -0500
++++ src/glyphMgr.h 2013-11-27 05:48:18.000000000 -0600
+@@ -15,8 +15,7 @@
+
+ #include <ft2build.h>
+ #include FT_FREETYPE_H
+-
+-#include <freetype/ftglyph.h>
++#include FT_GLYPH_H
+
+ /** Manage FT_Glyph by insuring that FT_Glyph is handled correctly.
+ */
+--- src/util.h.orig 2011-09-21 14:09:55.000000000 -0500
++++ src/util.h 2013-11-27 05:48:46.000000000 -0600
+@@ -18,7 +18,7 @@
+
+ #include <ft2build.h>
+ #include FT_FREETYPE_H
+-#include <freetype/ftglyph.h>
++#include FT_GLYPH_H
+
+ std::ostream& operator<<(std::ostream&, const FT_Library);
+ std::ostream& operator<<(std::ostream&, const FT_Face);
diff --git a/lasi.spec b/lasi.spec
index be8a472..d6f28f4 100644
--- a/lasi.spec
+++ b/lasi.spec
@@ -1,3 +1,5 @@
+%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
+
Name: lasi
Version: 1.1.1
Release: 7%{?dist}
@@ -8,9 +10,14 @@ License: LGPLv2+
URL: http://www.unifont.org/lasi/
Source0: http://downloads.sourceforge.net/lasi/libLASi-%{version}.tar.gz
Patch0: lasi-multilib.patch
+# Fix build for freetype 2.5.1
+# https://sourceforge.net/p/lasi/bugs/2/
+# https://bugzilla.redhat.com/show_bug.cgi?id=1057815
+Patch1: lasi-freetype.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: pango-devel, cmake
+BUildRequires: doxygen
# For testing
BuildRequires: dejavu-sans-mono-fonts
@@ -43,9 +50,21 @@ Requires: pango-devel
%{summary}.
+%package doc
+Summary: Documentation for %{name}
+Group: Documentation
+BuildArch: noarch
+
+%description doc
+%{summary}.
+
+
%prep
%setup -q -n libLASi-%{version}
%patch0 -p1 -b .multilib
+%patch1 -p0 -b .freetype
+# Change docdir
+sed -i -e '/set(docdir/s| .*| %{_pkgdocdir})|' cmake/modules/instdirs.cmake
%build
@@ -62,6 +81,8 @@ make VERBOSE=1 %{?_smp_mflags}
rm -rf $RPM_BUILD_ROOT
cd fedora
make install DESTDIR=$RPM_BUILD_ROOT VERBOSE=1
+cd -
+cp -p AUTHORS ChangeLog COPYING README $RPM_BUILD_ROOT%{_pkgdocdir}/
%check
@@ -80,20 +101,29 @@ rm -rf $RPM_BUILD_ROOT
%files
-%defattr(-,root,root,-)
-%doc AUTHORS ChangeLog COPYING README
+%dir %{_pkgdocdir}
+%{_pkgdocdir}/AUTHORS
+%{_pkgdocdir}/ChangeLog
+%{_pkgdocdir}/COPYING
+%{_pkgdocdir}/README
%{_libdir}/libLASi.so.*
%files devel
-%defattr(-,root,root,-)
%{_includedir}/LASi.h
%{_libdir}/libLASi.so
%{_libdir}/pkgconfig/lasi.pc
%doc %{_datadir}/lasi%{version}/
+%files doc
+%{_pkgdocdir}/
+
%changelog
+* Fri Jan 24 2014 Orion Poplawski <orion at cora.nwra.com> - 1.1.1-8
+- Add patch to build with freetype 2.5.1+ (bug #1057815)
+- BUild and package documentation
+
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.1.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
More information about the scm-commits
mailing list