]> git.pld-linux.org Git - packages/freetype.git/blobdiff - freetype.spec
- rel 1; still TODO applies
[packages/freetype.git] / freetype.spec
index 873e69d7c46defdf1dc822f4b44aa6875fa38efa..ad9ec5510722bd3428a7759d043a0da797e227fc 100644 (file)
@@ -1,10 +1,12 @@
+# TODO:
+# - demos seem to use installed headers instead of these coming from new tarball
 #
 # Conditional build:
-%bcond_without bytecode        # without TT bytecode interpreter (Apple patents in USA)
 %bcond_without lcd             # without LCD subpixel color filtering (Microsoft patents in USA)
 %bcond_without x11             # don't build examples (X11-based)
+%bcond_without harfbuzz        # harfbuzz based autohinting
 %bcond_without apidocs         # disable api docs
-#
+
 Summary:       TrueType font rasterizer
 Summary(es.UTF-8):     Biblioteca de render 3D de fuentes TrueType
 Summary(ko.UTF-8):     자유롭게 어디든 쓸 수 있는 트루타입 글꼴을 다루는 엔진
@@ -13,26 +15,37 @@ Summary(pt_BR.UTF-8):       Biblioteca de renderização de fontes TrueType
 Summary(ru.UTF-8):     Растеризатор шрифтов TrueType
 Summary(uk.UTF-8):     Растеризатор шрифтів TrueType
 Name:          freetype
-Version:       2.3.5
+Version:       2.6
 Release:       1
 Epoch:         1
-License:       GPL or FTL
+License:       GPL v2 or FTL
 Group:         Libraries
-Source0:       http://dl.sourceforge.net/freetype/%{name}-%{version}.tar.bz2
-# Source0-md5: 65234327c5ac46ee00ebda15995d4c1c
-Source1:       http://dl.sourceforge.net/freetype/%{name}-doc-%{version}.tar.bz2
-# Source1-md5: 8f443368764f7cd776749e0143f423dd
-Source2:       http://dl.sourceforge.net/freetype/ft2demos-%{version}.tar.bz2
-# Source2-md5: 708bf1bc13a0a1d1bb801466d6d97c40
+Source0:       http://download.savannah.gnu.org/releases/freetype/%{name}-%{version}.tar.bz2
+# Source0-md5: 5682890cb0267f6671dd3de6eabd3e69
+Source1:       http://download.savannah.gnu.org/releases/freetype/%{name}-doc-%{version}.tar.bz2
+# Source1-md5: f456b7ead3c351c7c218bb3afd45803c
+Source2:       http://download.savannah.gnu.org/releases/freetype/ft2demos-%{version}.tar.bz2
+# Source2-md5: c6c209b37f10621d6ff100620b8292b4
+Patch0:                %{name}-2.2.1-enable-valid.patch
 URL:           http://www.freetype.org/
 BuildRequires: automake
+BuildRequires: bzip2-devel
+%{?with_harfbuzz:BuildRequires:        harfbuzz-devel >= 0.9.19}
+BuildRequires: libpng-devel
 BuildRequires: python
+BuildRequires: python-modules
+BuildRequires: rpm >= 4.4.9-56
+BuildRequires: sed >= 4.0
+%if "%{pld_release}" == "ac"
+%{?with_x11:BuildRequires:     XFree86-devel}
+%else
 %{?with_x11:BuildRequires:     xorg-lib-libX11-devel}
+%endif
 BuildRequires: zlib-devel
 Obsoletes:     freetype2
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define                specflags_ia32  -fomit-frame-pointer 
+%define                specflags_ia32  -fomit-frame-pointer
 # see <freetype/internal/ftserv.h>, the real horror
 %define                specflags       -fno-strict-aliasing
 
@@ -88,20 +101,23 @@ incluídos neste pacote.
 
 %package devel
 Summary:       Header files for FreeType development
-Summary(es.UTF-8):     Archivos de inclusión e bibliotecas estáticas para desarrollo con FreeType
+Summary(es.UTF-8):     Archivos de inclusión para desarrollo con FreeType
 Summary(ko.UTF-8):     FreeType을 쓸 때 필요한 정적 라이브러리와 머리말 파일
-Summary(pl.UTF-8):     Pliki nagłówkowe biblioteki freetype i dokumentacja
-Summary(pt_BR.UTF-8):  Arquivos de inclusão e bibliotecas estáticas para desenvolvimento com FreeType
+Summary(pl.UTF-8):     Pliki nagłówkowe biblioteki FreeType
+Summary(pt_BR.UTF-8):  Arquivos de inclusão para desenvolvimento com FreeType
 Summary(ru.UTF-8):     Библиотеки разработчика для freetype
 Summary(uk.UTF-8):     Бібліотеки програміста для freetype
 Group:         Development/Libraries
 Requires:      %{name} = %{epoch}:%{version}-%{release}
+Requires:      bzip2-devel
+%{?with_harfbuzz:Requires:     harfbuzz-devel >= 0.9.19}
+Requires:      libpng-devel
 Requires:      zlib-devel
 Obsoletes:     freetype2-devel
 
 %description devel
-This package includes the header files necessary to develop applications that
-use FreeType.
+This package includes the header files necessary to develop
+applications that use FreeType.
 
 %description devel -l es.UTF-8
 Este paquete es necesario, si pretendes desarrollar/compilar
@@ -109,8 +125,8 @@ aplicaciones con la biblioteca FreeType. Si, simplemente, deseas
 ejecutar aplicaciones existentes, no lo necesitas.
 
 %description devel -l pl.UTF-8
-Pakiet ten zawiera pliki nagłówkowe oraz dokumentację potrzebne przy
-tworzeniu programów wykorzystujących bibliotekę FreeType.
+Pakiet ten zawiera pliki nagłówkowe potrzebne przy tworzeniu programów
+wykorzystujących bibliotekę FreeType.
 
 %description devel -l pt_BR.UTF-8
 Este pacote é necessário se você pretende desenvolver/compilar
@@ -118,20 +134,24 @@ aplicações com a biblioteca FreeType. Se você simplesmente deseja
 rodar aplicações existentes, você não precisa deste pacote.
 
 %description devel -l ru.UTF-8
-ЭÑ\82оÑ\82 Ð¿Ð°ÐºÐµÑ\82 Ñ\81одеÑ\80жиÑ\82 Ñ\85едеÑ\80Ñ\8b Ð¸ Ð±Ð¸Ð±Ð»Ð¸Ð¾Ñ\82еки, Ð½ÐµÐ¾Ð±Ñ\85одимÑ\8bе Ð´Ð»Ñ\8f Ñ\80азÑ\80абоÑ\82ки
¿Ñ\80огÑ\80амм, Ð¸Ñ\81полÑ\8cзÑ\83Ñ\8eÑ\89иÑ\85 freetype.
+ЭÑ\82оÑ\82 Ð¿Ð°ÐºÐµÑ\82 Ñ\81одеÑ\80жиÑ\82 Ñ\85едеÑ\80Ñ\8b Ð½ÐµÐ¾Ð±Ñ\85одимÑ\8bе Ð´Ð»Ñ\8f Ñ\80азÑ\80абоÑ\82ки Ð¿Ñ\80огÑ\80амм,
¸Ñ\81полÑ\8cзÑ\83Ñ\8eÑ\89иÑ\85 FreeType.
 
 %description devel -l uk.UTF-8
-Цей пакет містить хедери та бібліотеки, необхідні для розробки
¿Ñ\80огÑ\80ам, Ñ\89о Ð²Ð¸ÐºÐ¾Ñ\80иÑ\81Ñ\82овÑ\83Ñ\8eÑ\82Ñ\8c freetype.
+Цей пакет містить хедери необхідні для розробки програм, що
²Ð¸ÐºÐ¾Ñ\80иÑ\81Ñ\82овÑ\83Ñ\8eÑ\82Ñ\8c FreeType.
 
 %package apidocs
 Summary:       FreeType API documetation
+Summary(pl.UTF-8):     Dokumentacja API FreeType
 Group:         Documentation
 
 %description apidocs
 FreeType API documetation.
 
+%description apidocs -l pl.UTF-8
+Dokumentacja API FreeType.
+
 %package static
 Summary:       FreeType static libraries
 Summary(es.UTF-8):     Static libraries for freetype development
@@ -178,21 +198,30 @@ Programy demonstracyjne do biblioteki FreeType.
 
 %prep
 %setup -q -a1 -a2
+%patch0 -p1
+
+# avoid propagating -L%{_libdir} through *.la
+%{__sed} -i -e 's,libpng-config --ldflags,libpng-config --libs,' builds/unix/configure
 
 %build
-CFLAGS="%{rpmcflags} \
-%{?with_bytecode:-DTT_CONFIG_OPTION_BYTECODE_INTERPRETER} \
-%{?with_lcd:-DFT_CONFIG_OPTION_SUBPIXEL_RENDERING}" \
+CC="%{__cc}" \
+CFLAGS="%{rpmcflags} %{rpmcppflags} \
+%{?with_lcd:-DFT_CONFIG_OPTION_SUBPIXEL_RENDERING} \
+-DTT_CONFIG_OPTION_SUBPIXEL_HINTING \
+%{?with_harfbuzz:-DFT_CONFIG_OPTION_USE_HARFBUZZ} \
+" \
 %{__make} setup unix \
        CFG="--prefix=%{_prefix} --libdir=%{_libdir}"
 
+CC="%{__cc}" \
 %{__make} \
-       X11_LIB=
+       X11_LIB=%{?_x_libraries}
 
 %if %{with x11}
+CC="%{__cc}" \
 %{__make} -C ft2demos-* \
-       TOP_DIR="`pwd`" \
-       X11_LIB=
+       TOP_DIR=$(pwd) \
+       X11_LIB=%{?_x_libraries}
 %endif
 
 %{__make} refdoc
@@ -204,8 +233,10 @@ install -d $RPM_BUILD_ROOT%{_bindir}
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
+ln -s . $RPM_BUILD_ROOT%{_includedir}/freetype2/freetype
+
 %if %{with x11}
-install ft2demos-*/bin/.libs/ft* $RPM_BUILD_ROOT%{_bindir}
+install -p ft2demos-*/bin/.libs/ft* $RPM_BUILD_ROOT%{_bindir}
 %endif
 
 %clean
@@ -216,19 +247,20 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc docs/{CHANGES,FTL.TXT,LICENSE.TXT,PATENTS,TODO,formats.txt,raster.txt}
-%attr(755,root,root) %{_libdir}/lib*.so.*.*
+%doc docs/{CHANGES,FTL.TXT,LICENSE.TXT,TODO,formats.txt,raster.txt}
+%attr(755,root,root) %{_libdir}/libfreetype.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libfreetype.so.6
 
 %files devel
 %defattr(644,root,root,755)
 %doc docs/DEBUG
 %attr(755,root,root) %{_bindir}/freetype-config
-%attr(755,root,root) %{_libdir}/lib*.so
-%{_libdir}/lib*.la
+%attr(755,root,root) %{_libdir}/libfreetype.so
+%{_libdir}/libfreetype.la
 %{_includedir}/freetype2
-%{_includedir}/*.h
-%{_aclocaldir}/*.m4
-%{_pkgconfigdir}/*.pc
+%{_aclocaldir}/freetype2.m4
+%{_pkgconfigdir}/freetype2.pc
+%{_mandir}/man1/freetype-config.1*
 
 %if %{with apidocs}
 %files apidocs
@@ -238,7 +270,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %files static
 %defattr(644,root,root,755)
-%{_libdir}/lib*.a
+%{_libdir}/libfreetype.a
 
 %if %{with x11}
 %files demos
This page took 0.181986 seconds and 4 git commands to generate.