[packages/glyphy] - initial - added default-font patch (fix fc-match processing, allow passing DEFAULT_FONT explicitly

qboosh qboosh at pld-linux.org
Sat Oct 24 22:48:19 CEST 2015


commit 3ac1cc0aaec6090d2e118ef8a2130fa51a891d64
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Oct 24 22:49:31 2015 +0200

    - initial
    - added default-font patch (fix fc-match processing, allow passing DEFAULT_FONT explicitly)

 glyphy-default-font.patch |  19 ++++++++
 glyphy.spec               | 110 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 129 insertions(+)
---
diff --git a/glyphy.spec b/glyphy.spec
new file mode 100644
index 0000000..9254080
--- /dev/null
+++ b/glyphy.spec
@@ -0,0 +1,110 @@
+#
+# Conditional build:
+%bcond_without	static_libs	# don't build static libraries
+#
+Summary:	High-quality glyph rendering library using OpenGL ES2 shaders
+Summary(pl.UTF-8):	Biblioteka wysokiej jakości renderowania glifów przy użyciu shaderów OpenGL ES2
+Name:		glyphy
+Version:	0.2.0
+%define	snap	20151002
+%define	gitref	71390c5baccbe2bcba19171d1e31732a49c35fa3
+%define	rel	1
+Release:	0.%{snap}.%{rel}
+License:	Apache v2.0
+Group:		Libraries
+Source0:	https://github.com/behdad/glyphy/archive/%{gitref}/%{name}-%{snap}.tar.gz
+# Source0-md5:	295ee71482abf9b3c4798d6955bc0b6a
+Patch0:		%{name}-default-font.patch
+URL:		http://glyphy.org/
+BuildRequires:	OpenGL-devel
+BuildRequires:	OpenGL-glut-devel
+BuildRequires:	autoconf >= 2.64
+BuildRequires:	automake >= 1:1.11.1
+BuildRequires:	freetype-devel >= 2
+BuildRequires:	glew-devel
+BuildRequires:	libtool >= 2:2.2
+BuildRequires:	pkgconfig
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+GLyphy is a signed-distance-field (SDF) text renderer using OpenGL ES2
+shading language.
+
+%description -l pl.UTF-8
+GLyphy to biblioteka renderująca tekst metodą SDF (signed distance
+field) przy użyciu języka cieniującego OpenGL ES2.
+
+%package devel
+Summary:	Header files for GLyphy library
+Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki GLyphy
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+Requires:	freetype-devel >= 2
+
+%description devel
+Header files for GLyphy library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki GLyphy.
+
+%package static
+Summary:	Static GLyphy library
+Summary(pl.UTF-8):	Statyczna biblioteka GLyphy
+Group:		Development/Libraries
+Requires:	%{name}-devel = %{version}-%{release}
+
+%description static
+Static GLyphy library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka GLyphy.
+
+%prep
+%setup -q -n %{name}-%{gitref}
+%patch0 -p1
+
+%build
+%{__libtoolize}
+%{__aclocal}
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+%configure \
+	DEFAULT_FONT="%{_fontsdir}/TTF/DejaVuSans.ttf" \
+	--disable-silent-rules \
+	%{?with_static_libs:--enable-static}
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+# obsoleted by pkg-config
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libglyphy.la
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post	-p /sbin/ldconfig
+%postun	-p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS COPYING NEWS README.md
+%attr(755,root,root) %{_libdir}/libglyphy.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libglyphy.so.0
+%{_datadir}/glyphy
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libglyphy.so
+%{_includedir}/glyphy
+%{_pkgconfigdir}/glyphy.pc
+
+%if %{with static_libs}
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libglyphy.a
+%endif
diff --git a/glyphy-default-font.patch b/glyphy-default-font.patch
new file mode 100644
index 0000000..cf0c47e
--- /dev/null
+++ b/glyphy-default-font.patch
@@ -0,0 +1,19 @@
+--- glyphy-71390c5baccbe2bcba19171d1e31732a49c35fa3/configure.ac.orig	2015-10-01 23:38:09.000000000 +0200
++++ glyphy-71390c5baccbe2bcba19171d1e31732a49c35fa3/configure.ac	2015-10-24 22:21:56.330943661 +0200
+@@ -92,10 +92,15 @@
+ 
+ # Find default font, for the demo
+ AC_MSG_CHECKING([for default font])
+-DEFAULT_FONT="`fc-match -v 2>/dev/null | grep 'file:' | cut -d'\"' -f2`"
++AC_ARG_VAR([DEFAULT_FONT], [Default font])
++if test "x$DEFAULT_FONT" = x; then
++DEFAULT_FONT="$(fc-match -v 2>/dev/null | grep 'file:' | cut -d'"' -f2)"
+ if test "x$DEFAULT_FONT" = x; then :; else
+ 	AC_DEFINE_UNQUOTED([DEFAULT_FONT], ["$DEFAULT_FONT"], [Default font file.])
+ fi
++else
++	AC_DEFINE_UNQUOTED([DEFAULT_FONT], ["$DEFAULT_FONT"], [Default font file.])
++fi
+ AC_MSG_RESULT($DEFAULT_FONT)
+ 
+ dnl ===========================================================================
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/glyphy.git/commitdiff/3ac1cc0aaec6090d2e118ef8a2130fa51a891d64



More information about the pld-cvs-commit mailing list