]> git.pld-linux.org Git - packages/freetype.git/blobdiff - freetype.spec
- rel 1; still TODO applies
[packages/freetype.git] / freetype.spec
index 271377cce43d188096cd09aec4895b74438c2afa..ad9ec5510722bd3428a7759d043a0da797e227fc 100644 (file)
@@ -1,37 +1,53 @@
+# TODO:
+# - demos seem to use installed headers instead of these coming from new tarball
 #
 # Conditional build:
-%bcond_without bytecode        # without TT bytecode interpreter
-#               (patents pending in USA, Japan etc., but now it includes
-#                also patent-free hinting workaround)
-%bcond_without x11
-#
+%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):   Biblioteca de render 3D de fuentes TrueType
-Summary(ko):   ÀÚÀ¯·Ó°Ô ¾îµðµç ¾µ ¼ö Àִ Ʈ·çŸÀÔ ±Û²ÃÀ» ´Ù·ç´Â ¿£Áø
-Summary(pl):   Rasteryzer fontów TrueType
-Summary(pt_BR):        Biblioteca de renderização de fontes TrueType
-Summary(ru):   òÁÓÔÅÒÉÚÁÔÏÒ ÛÒÉÆÔÏ× TrueType
-Summary(uk):   òÁÓÔÅÒÉÚÁÔÏÒ ÛÒÉÆԦנTrueType
+Summary(es.UTF-8):     Biblioteca de render 3D de fuentes TrueType
+Summary(ko.UTF-8):     자유롭게 어디든 쓸 수 있는 트루타입 글꼴을 다루는 엔진
+Summary(pl.UTF-8):     Rasteryzer fontów TrueType
+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.1.7
-Release:       3
-License:       GPL or FTL
+Version:       2.6
+Release:       1
+Epoch:         1
+License:       GPL v2 or FTL
 Group:         Libraries
-Source0:       ftp://ftp.freetype.org/freetype/freetype2/%{name}-%{version}.tar.bz2
-# Source0-md5: d5c39853f6741c8401bfe272478958a8
-Source1:       ftp://ftp.freetype.org/freetype/freetype2/ftdocs-%{version}.tar.bz2
-# Source1-md5: 56579e3610482522061cfafbb788a81b
-Source2:       ftp://ftp.freetype.org/freetype/freetype2/ft2demos-%{version}.tar.bz2
-# Source2-md5: 89a5b3fd3177fbc71f9ba7cbc64edfa2
+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: SysVinit
-%{?with_x11:BuildRequires:     XFree86-devel}
 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
 
 %description
 The FreeType engine is a free and portable TrueType font rendering
@@ -46,145 +62,170 @@ hint and render individual glyphs efficiently. You can also see it as
 a "TrueType driver" for a higher-level library, though rendering text
 with it is extremely easy, as demo-ed by the test programs.
 
-%description -l es
-FreeType es una máquina libre y portátil para en render de fuentes
+%description -l es.UTF-8
+FreeType es una máquina libre y portátil para en render de fuentes
 TrueType. Fue desarrollada para ofrecer soporte TrueType a una gran
 variedad de plataformas y ambientes. Observa que FreeType es una
-biblioteca y no una aplicación, a pesar de que algunos utilitarios se
+biblioteca y no una aplicación, a pesar de que algunos utilitarios se
 incluyan en este paquete.
 
-%description -l pl
-FreeType jest bibliotek± s³u¿±c± do rasteryzacji fontów TrueType. Jest
-to jedynie biblioteka, a nie serwer fontów, chocia¿ zosta³a ona
-zaprojektowana do u¿ywania tak¿e w takich serwerach. Nie jest to te¿
+%description -l pl.UTF-8
+FreeType jest biblioteką służącą do rasteryzacji fontów TrueType. Jest
+to jedynie biblioteka, a nie serwer fontów, chociaż została ona
+zaprojektowana do używania także w takich serwerach. Nie jest to też
 kompletna biblioteka do rasteryzacji tekstu. Jej celem jest tylko
-odczytywanie i zarz±dzanie plikami z fontami oraz wczytywanie i
-wykonywanie hintingu i rasteryzacji poszczególnych glifów. Mo¿e byæ
-tak¿e uwa¿ana za "sterownik TrueType" dla bibliotek wy¿szego poziomu,
-jednak u¿ycie samej biblioteki FreeType do rasteryzacji jest bardzo
-proste, co mo¿na zobaczyæ w programach demonstracyjnych.
-
-%description -l pt_BR
-FreeType é uma máquina livre e portável para renderização de fontes
+odczytywanie i zarządzanie plikami z fontami oraz wczytywanie i
+wykonywanie hintingu i rasteryzacji poszczególnych glifów. Może być
+także uważana za "sterownik TrueType" dla bibliotek wyższego poziomu,
+jednak użycie samej biblioteki FreeType do rasteryzacji jest bardzo
+proste, co można zobaczyć w programach demonstracyjnych.
+
+%description -l pt_BR.UTF-8
+FreeType é uma máquina livre e portável para renderização de fontes
 TrueType. Ela foi desenvolvida para fornecer suporte TrueType a uma
-grande variedade de plataformas e ambientes. Note que FreeType é uma
-biblioteca e não uma aplicação, apesar que alguns utilitários são
-incluídos neste pacote.
-
-%description -l ru
-âÉÂÌÉÏÔÅËÁ FreeType - ÜÔÏ Ó×ÏÂÏÄÎÁÑ ÐÅÒÅÎÏÓÉÍÁÑ ÂÉÂÌÉÏÔÅËÁ ÄÌÑ
-ÒÅÎÄÅÒÉÎÇÁ (ÒÁÓÔÅÒÉÚÁÃÉÉ) ÛÒÉÆÔÏ× TrueType, ÄÏÓÔÕÐÎÁÑ × ÉÓÈÏÄÎÙÈ
-ÔÅËÓÔÁÈ ÎÁ ANSI C É Pascal. ïÎÁ ÂÙÌÁ ÒÁÚÒÁÂÏÔÁÎÁ ÄÌÑ ÐÏÄÄÅÒÖËÉ TT ÎÁ
-ÒÁÚÎÏÏÂÒÁÚÎÙÈ ÐÌÁÔÆÏÒÍÁÈ.
-
-%description -l uk
-â¦Â̦ÏÔÅËÁ FreeType - ÃŠצÌØÎÁ ÐÅÒÅÎÏÓÉÍÁ Â¦Â̦ÏÔÅËÁ ÄÌÑ ÒÅÎÄÅÒÉÎÇÕ
-(ÒÁÓÔÅÒÉÚÁæ§) ÛÒÉÆԦנTrueType, ÝÏ ÒÏÚÐÏ×ÓÀÄÖÕ¤ÔØÓÑ Õ ×ÉȦÄÎÉÈ
-ÔÅËÓÔÁÈ ÎÁ C ÔÁ Pascal. ÷ÏÎÁ ÂÕÌÁ ÒÏÚÒÏÂÌÅÎÁ ÄÌѠЦÄÔÒÉÍËÉ TT ÎÁ
-Ò¦ÚÎÉÈ ÐÌÁÔÆÏÒÍÁÈ.
+grande variedade de plataformas e ambientes. Note que FreeType é uma
+biblioteca e não uma aplicação, apesar que alguns utilitários são
+incluídos neste pacote.
+
+%description -l ru.UTF-8
+Библиотека FreeType - это свободная переносимая библиотека для
+рендеринга (растеризации) шрифтов TrueType, доступная в исходных
+текстах на ANSI C и Pascal. Она была разработана для поддержки TT на
+разнообразных платформах.
+
+%description -l uk.UTF-8
+Бібліотека FreeType - це вільна переносима бібліотека для рендерингу
+(растеризації) шрифтів TrueType, що розповсюджується у вихідних
+текстах на C та Pascal. Вона була розроблена для підтримки TT на
+різних платформах.
 
 %package devel
-Summary:       Header files and development documentation
-Summary(es):   Archivos de inclusión e bibliotecas estáticas para desarrollo con FreeType
-Summary(ko):   FreeTypeÀ» ¾µ ¶§ ÇÊ¿äÇÑ Á¤Àû ¶óÀ̺귯¸®¿Í ¸Ó¸®¸» ÆÄÀÏ
-Summary(pl):   Pliki nag³ówkowe biblioteki freetype i dokumentacja
-Summary(pt_BR):        Arquivos de inclusão e bibliotecas estáticas para desenvolvimento com FreeType
-Summary(ru):   âÉÂÌÉÏÔÅËÉ ÒÁÚÒÁÂÏÔÞÉËÁ ÄÌÑ freetype
-Summary(uk):   â¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ ÄÌÑ freetype
+Summary:       Header files for FreeType development
+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
+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} = %{version}
+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 and documentation necessary to
-develop applications that use FreeType.
+This package includes the header files necessary to develop
+applications that use FreeType.
 
-%description devel -l es
+%description devel -l es.UTF-8
 Este paquete es necesario, si pretendes desarrollar/compilar
 aplicaciones con la biblioteca FreeType. Si, simplemente, deseas
 ejecutar aplicaciones existentes, no lo necesitas.
 
-%description devel -l pl
-Pakiet ten zawiera pliki nag³ówkowe oraz dokumentacjê potrzebne przy
-tworzeniu programów wykorzystuj±cych bibliotekê FreeType.
+%description devel -l pl.UTF-8
+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
+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
+Этот пакет содержит хедеры необходимые для разработки программ,
+использующих FreeType.
 
-%description devel -l pt_BR
-Este pacote é necessário se você pretende desenvolver/compilar
-aplicações com a biblioteca FreeType. Se você simplesmente deseja
-rodar aplicações existentes, você não precisa deste pacote.
+%description devel -l uk.UTF-8
+Цей пакет містить хедери необхідні для розробки програм, що
+використовують FreeType.
 
-%description devel -l ru
-üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÈÅÄÅÒÙ É ÂÉÂÌÉÏÔÅËÉ, ÎÅÏÂÈÏÄÉÍÙÅ ÄÌÑ ÒÁÚÒÁÂÏÔËÉ
-ÐÒÏÇÒÁÍÍ, ÉÓÐÏÌØÚÕÀÝÉÈ freetype.
+%package apidocs
+Summary:       FreeType API documetation
+Summary(pl.UTF-8):     Dokumentacja API FreeType
+Group:         Documentation
 
-%description devel -l uk
-ãÅÊ ÐÁËÅԠͦÓÔÉÔØ ÈÅÄÅÒÉ ÔÁ Â¦Â̦ÏÔÅËÉ, ÎÅÏÂȦÄΦ ÄÌÑ ÒÏÚÒÏÂËÉ
-ÐÒÏÇÒÁÍ, ÝÏ ×ÉËÏÒÉÓÔÏ×ÕÀÔØ freetype.
+%description apidocs
+FreeType API documetation.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API FreeType.
 
 %package static
 Summary:       FreeType static libraries
-Summary(es):   Static libraries for freetype development
-Summary(pl):   Biblioteki statyczne FreeType
-Summary(pt_BR):        Bibliotecas estáticas para desenvolvimento com freetype
-Summary(ru):   óÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ freetype
-Summary(uk):   óÔÁÔÉÞΦ Â¦Â̦ÏÔÅËÉ freetype
+Summary(es.UTF-8):     Static libraries for freetype development
+Summary(pl.UTF-8):     Biblioteki statyczne FreeType
+Summary(pt_BR.UTF-8):  Bibliotecas estáticas para desenvolvimento com freetype
+Summary(ru.UTF-8):     Статические библиотеки freetype
+Summary(uk.UTF-8):     Статичні бібліотеки freetype
 Group:         Development/Libraries
-Requires:      %{name}-devel = %{version}
+Requires:      %{name}-devel = %{epoch}:%{version}-%{release}
 Obsoletes:     freetype2-static
 
 %description static
 Static FreeType libraries.
 
-%description static -l es
+%description static -l es.UTF-8
 Static libraries for freetype development.
 
-%description static -l pl
+%description static -l pl.UTF-8
 Biblioteki statyczne FreeType.
 
-%description static -l pt_BR
-Bibliotecas estáticas para desenvolvimento com freetype.
+%description static -l pt_BR.UTF-8
+Bibliotecas estáticas para desenvolvimento com freetype.
 
-%description static -l ru
-üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÓÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ, ÎÅÏÂÈÏÄÉÍÙÅ ÄÌÑ ÎÁÐÉÓÁÎÉÑ
ÒÏÇÒÁÍÍ, ÉÓÐÏÌØÚÕÀÝÉÈ freetype.
+%description static -l ru.UTF-8
+Этот пакет содержит статические библиотеки, необходимые для написания
¿Ñ\80огÑ\80амм, Ð¸Ñ\81полÑ\8cзÑ\83Ñ\8eÑ\89иÑ\85 freetype.
 
-%description static -l uk
-ãÅÊ ÐÁËÅԠͦÓÔÉÔØ ÓÔÁÔÉÞΦ Â¦Â̦ÏÔÅËÉ, ÎÅÏÂȦÄΦ ÄÌÑ ÎÁÐÉÓÁÎÎÑ
ÒÏÇÒÁÍ, ÝÏ ×ÉËÏÒÉÓÔÏ×ÕÀÔØ freetype.
+%description static -l uk.UTF-8
+Цей пакет містить статичні бібліотеки, необхідні для написання
¿Ñ\80огÑ\80ам, Ñ\89о Ð²Ð¸ÐºÐ¾Ñ\80иÑ\81Ñ\82овÑ\83Ñ\8eÑ\82Ñ\8c freetype.
 
 %package demos
 Summary:       FreeType demo programs
-Summary(ko):   FreeTypeÀ» ½ÃÇèÇغ¼ ¼ö Àִ ÇÁ·Î±×·¥ ¸ðÀ½
-Summary(pl):   Programy demonstracyjne FreeType
+Summary(ko.UTF-8):     FreeType을 시험해볼 수 있는 프로그램 모음
+Summary(pl.UTF-8):     Programy demonstracyjne FreeType
 Group:         X11/Applications
-Requires:      %{name} = %{version}
+Requires:      %{name} = %{epoch}:%{version}-%{release}
 
 %description demos
 Demonstration programs for FreeType library.
 
-%description demos -l pl
+%description demos -l pl.UTF-8
 Programy demonstracyjne do biblioteki FreeType.
 
 %prep
 %setup -q -a1 -a2
+%patch0 -p1
 
-mv -f freetype-%{version}/docs/reference/* docs/reference
+# 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}" \
+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}"
+       CFG="--prefix=%{_prefix} --libdir=%{_libdir}"
 
+CC="%{__cc}" \
 %{__make} \
-       X11_LIB="/usr/X11R6/%{_lib}"
+       X11_LIB=%{?_x_libraries}
 
 %if %{with x11}
+CC="%{__cc}" \
 %{__make} -C ft2demos-* \
-       TOP_DIR="`pwd`" \
-       X11_LIB="/usr/X11R6/%{_lib}"
+       TOP_DIR=$(pwd) \
+       X11_LIB=%{?_x_libraries}
 %endif
 
+%{__make} refdoc
+
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{_bindir}
@@ -192,10 +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{multi,timer,view} $RPM_BUILD_ROOT%{_bindir}
-install ft2demos-*/bin/.libs/ft{dump,lint,memchk} $RPM_BUILD_ROOT%{_bindir}
-install ft2demos-*/bin/.libs/testname $RPM_BUILD_ROOT%{_bindir}/fttestname
+install -p ft2demos-*/bin/.libs/ft* $RPM_BUILD_ROOT%{_bindir}
 %endif
 
 %clean
@@ -206,23 +247,30 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc docs/{CHANGES,FTL.txt,PATENTS,license.txt,TODO,modules.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,TRUETYPE} docs/reference
+%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
+%defattr(644,root,root,755)
+%doc docs/reference
+%endif
 
 %files static
 %defattr(644,root,root,755)
-%{_libdir}/lib*.a
+%{_libdir}/libfreetype.a
 
 %if %{with x11}
 %files demos
This page took 0.040666 seconds and 4 git commands to generate.