]> git.pld-linux.org Git - packages/freetype.git/blobdiff - freetype.spec
- rel 2; apply ft2demos patch in a way that won't require patch updates
[packages/freetype.git] / freetype.spec
index 75b0f01c95541131eb2ea4147a4fc8aefa612bf9..e30ac36f4126d7ad0dea6f83069d380a6c718159 100644 (file)
-Summary:       Truetype font rasterizer
-Summary(pl):   Rasteryzer fontów Truetype
+#
+# Conditional build:
+%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):     자유롭게 어디든 쓸 수 있는 트루타입 글꼴을 다루는 엔진
+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:       1.2
-Release:       6
-Copyright:     LGPL
+Version:       2.6.3
+Release:       2
+Epoch:         1
+License:       GPL v2 or FTL
 Group:         Libraries
-Group(pl):     Biblioteki
-Source:                ftp://ftp.physiol.med.tu-muenchen.de/pub/freetype/%{name}-%{version}.tar.gz
-URL:           http://www.physiol.med.tu-muenchen.de/~robert/freetype.html
-BuildPrereq:   gettext
-BuildPrereq:   XFree86-devel
-BuildRoot:     /tmp/%{name}-%{version}-root
+Source0:       http://download.savannah.gnu.org/releases/freetype/%{name}-%{version}.tar.bz2
+# Source0-md5: 0037b25a8c090bc8a1218e867b32beb1
+Source1:       http://download.savannah.gnu.org/releases/freetype/%{name}-doc-%{version}.tar.bz2
+# Source1-md5: ec2629b81f80decdae04a4b528097b81
+Source2:       http://download.savannah.gnu.org/releases/freetype/ft2demos-%{version}.tar.bz2
+# Source2-md5: f7c6102f29834a80456264fe4edd81d1
+Patch0:                %{name}-2.2.1-enable-valid.patch
+Patch1:                ft2demos-includes.patch
+URL:           http://www.freetype.org/
+BuildRequires: automake
+BuildRequires: bzip2-devel
+%{?with_harfbuzz:BuildRequires:        harfbuzz-devel >= 0.9.19}
+BuildRequires: libpng-devel
+BuildRequires: pkgconfig >= 1:0.24
+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
+# 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 engine,
-available in ANSI C and Pascal source code.  It has been developed to
-provide TT support to a great variety of platforms and environments.
+The FreeType engine is a free and portable TrueType font rendering
+engine. It has been developed to provide TrueType support to a great
+variety of platforms and environments.
+
+Note that FreeType is a *library*. It is not a font server for your
+favorite platform, even though it was designed to be used in many of
+them. Note also that it is *not* a complete text-rendering library.
+Its purpose is simply to open and manage font files, as well as load,
+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.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
+incluyan en este paquete.
+
+%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 pl
-FreeType jest bibliotek± s³u¿±c± do rasteryzacji fontów TrueType.
-Kody ¼ród³owe napisane
-s± w ANSI C orza PASCAL'u. 
+%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.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(pl):   Pliki nag³ówkowe biblioteki freetype i dokumentacja
+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
-Group(pl):     Programowanie/Biblioteki
-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 documentations and libraries
-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
+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 potrzebne przy tworzeniu programów
+wykorzystujących bibliotekę FreeType.
 
-%description -l pl devel 
-Pakiet ten zawiera pliki nag³ówkowe oraz biblioteki niezbêdne przy
-kompilowaniu program 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 uk.UTF-8
+Цей пакет містить хедери необхідні для розробки програм, що
+використовують FreeType.
+
+%package apidocs
+Summary:       FreeType API documetation
+Summary(pl.UTF-8):     Dokumentacja API FreeType
+Group:         Documentation
+%if "%{_rpmversion}" >= "5"
+BuildArch:     noarch
+%endif
+
+%description apidocs
+FreeType API documetation.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API FreeType.
 
 %package static
-Summary:       Freetype static libraries
-Summary(pl):   Biblioteki statyczne freetype
+Summary:       FreeType static libraries
+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
-Group(pl):     Programowanie/Biblioteki
-Requires:      %{name}-devel = %{version}
+Requires:      %{name}-devel = %{epoch}:%{version}-%{release}
+Obsoletes:     freetype2-static
 
 %description static
-Static freetype libraries.
-
-%description -l pl static 
-Biblioteki statyczne freetype.
-
-%package progs
-Summary:       Freetype library utilities
-Summary(pl):   Programy u¿ytkowe freetype
-Group:         Utilities
-Group(pl):     Programowanie/Biblioteki
-Requires:      %{name} = %{version}
-
-%description progs
-Freetype library utilites:
-- ftimer   - a simple performance timer for the engine,
-- fzoom    - very simple glyph viewer,
-- ftlint   - program will hint each glyph of a font file, at a given point
-             size,
-- ftwiew   - display all glyphs in a given font, applying hinting to each one,
-- fdump    - a simple TrueType font or collection dumper,
-- ftstring - a simple program to show off string text generation.
-- ftstrpn  - convert a rendered text string into the PGM or PBM format,
-- fterror  - small test program. Tests the gettext()
-             functionality for internationalized messages.
-
-%description -l pl progs
-Przyk³adowe aplikacje wykorzystuj±ce freetype
+Static FreeType libraries.
+
+%description static -l es.UTF-8
+Static libraries for freetype development.
+
+%description static -l pl.UTF-8
+Biblioteki statyczne FreeType.
+
+%description static -l pt_BR.UTF-8
+Bibliotecas estáticas para desenvolvimento com freetype.
+
+%description static -l ru.UTF-8
+Этот пакет содержит статические библиотеки, необходимые для написания
+программ, использующих freetype.
+
+%description static -l uk.UTF-8
+Цей пакет містить статичні бібліотеки, необхідні для написання
+програм, що використовують freetype.
+
+%package demos
+Summary:       FreeType demo programs
+Summary(ko.UTF-8):     FreeType을 시험해볼 수 있는 프로그램 모음
+Summary(pl.UTF-8):     Programy demonstracyjne FreeType
+Group:         X11/Applications
+Requires:      %{name} = %{epoch}:%{version}-%{release}
+
+%description demos
+Demonstration programs for FreeType library.
+
+%description demos -l pl.UTF-8
+Programy demonstracyjne do biblioteki FreeType.
 
 %prep
-%setup -q
+%setup -q -a1 -a2
+%patch0 -p1
+cd ft2demos-%{version}
+%patch1 -p2
+cd ..
+
+# avoid propagating -L%{_libdir} through *.la
+%{__sed} -i -e 's,libpng-config --ldflags,libpng-config --libs,' builds/unix/configure
 
 %build
-autoconf
-CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-s" \
-./configure %{_target} \
-       --prefix=%{_prefix} \
-        --enable-static \
-        --with-locale-dir=%{_datadir}/locale \
-        --with-gnu-ld
-make
+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=%{?_x_libraries}
+
+%if %{with x11}
+CC="%{__cc}" \
+%{__make} -C ft2demos-* \
+       TOP_DIR=$(pwd) \
+       X11_LIB=%{?_x_libraries}
+%endif
+
+%{__make} refdoc
 
 %install
 rm -rf $RPM_BUILD_ROOT
-make install \
-       prefix=$RPM_BUILD_ROOT/usr \
-       localedir=$RPM_BUILD_ROOT%{_datadir}/locale \
-       gnulocaledir=$RPM_BUILD_ROOT%{_datadir}/locale
+install -d $RPM_BUILD_ROOT%{_bindir}
 
-strip $RPM_BUILD_ROOT%{_libdir}/lib*so.*.*
+%{__make} install \
+       DESTDIR=$RPM_BUILD_ROOT
 
-gzip -9nf howto/unix.txt README announce docs/{*.txt,*.doc,FAQ,TODO,credits}
+%if %{with x11}
+install -p ft2demos-*/bin/.libs/ft* $RPM_BUILD_ROOT%{_bindir}
+%endif
 
-%find_lang freetype
+%clean
+rm -rf $RPM_BUILD_ROOT
 
 %post   -p /sbin/ldconfig
 %postun -p /sbin/ldconfig
 
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%files -f freetype.lang
-%attr(755,root,root) %{_libdir}/lib*so.*.*
+%files
+%defattr(644,root,root,755)
+%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 howto/unix* docs/*txt* *.gz
-%attr(755,root,root) %{_libdir}/lib*.so
-%{_includedir}/*
+%doc docs/DEBUG
+%attr(755,root,root) %{_bindir}/freetype-config
+%attr(755,root,root) %{_libdir}/libfreetype.so
+%{_libdir}/libfreetype.la
+%{_includedir}/freetype2
+%{_aclocaldir}/freetype2.m4
+%{_pkgconfigdir}/freetype2.pc
+%{_mandir}/man1/freetype-config.1*
 
-%files static
+%if %{with apidocs}
+%files apidocs
 %defattr(644,root,root,755)
-%{_libdir}/lib*.a
+%doc docs/reference
+%endif
 
-%files progs
-%attr(755,root,root) %{_bindir}/*
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libfreetype.a
 
-%changelog
-* Sat May 29 1999 Tomasz K³oczko <kloczek@rudy.mif.pg.gda.pl>
-  [1.2.-6]
-- based on cpec from RH contrib (Arne Coucheron <arneco@online.no>),
-- spec rewrited by PLD team,
-- pl translation by Wojtek ¦lusarczyk <wojtek@shadow.eu.org>.
+%if %{with x11}
+%files demos
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/ft*
+%endif
This page took 0.097234 seconds and 4 git commands to generate.