144 lines
4.4 KiB
RPMSpec
144 lines
4.4 KiB
RPMSpec
%{!?_with_subpixel_rendering: %{!?_without_subpixel_rendering: %define _without_subpixel_rendering --without-subpixel_rendering}}
|
|
|
|
%{!?with_xfree86:%define with_xfree86 1}
|
|
|
|
Name: freetype
|
|
Version: 2.10.2
|
|
Release: 1
|
|
Summary: FreeType is a freely available software library to render fonts
|
|
License: (FTL or GPLv2+) and BSD and MIT and Public Domain and zlib with acknowledgement
|
|
URL: http://www.freetype.org
|
|
Source0: http://download.savannah.gnu.org/releases/freetype/freetype-%{version}.tar.xz
|
|
Source1: http://download.savannah.gnu.org/releases/freetype/freetype-doc-%{version}.tar.xz
|
|
Source2: http://download.savannah.gnu.org/releases/freetype/ft2demos-%{version}.tar.xz
|
|
Source3: ftconfig.h
|
|
|
|
Patch1: freetype-2.5.2-more-demos.patch
|
|
|
|
BuildRequires: gcc libX11-devel libpng-devel zlib-devel bzip2-devel
|
|
|
|
Provides: %{name}-bytecode %{name}-demos
|
|
%if %{?_with_subpixel_rendering:1}%{!?_with_subpixel_rendering:0}
|
|
Provides: %{name}-subpixel
|
|
%endif
|
|
|
|
Obsoletes: %{name}-demos
|
|
|
|
%description
|
|
FreeType is written in C, designed to be small,efficient, highly customizable, and portable while capable of producing high-quality
|
|
output (glyph images) of most vector and bitmap font formats
|
|
|
|
%package devel
|
|
Summary: FreeType development libraries and header files
|
|
Requires: %{name} = %{version}-%{release} pkgconf
|
|
|
|
%description devel
|
|
The freetype-devel package includes the static libraries and header files
|
|
for the FreeType font rendering engine.Install freetype-devel if you want to develop programs which will use
|
|
FreeType.
|
|
|
|
%package help
|
|
Summary: Documents for freetype
|
|
Buildarch: noarch
|
|
|
|
%description help
|
|
Man pages and other related for freetype documents.
|
|
|
|
%prep
|
|
%setup -q -b 1 -a 2
|
|
|
|
pushd ft2demos-%{version}
|
|
%patch1 -p1 -b .more-demos
|
|
popd
|
|
|
|
%build
|
|
%configure --disable-static --with-zlib=yes --with-bzip2=yes --with-png=yes --enable-freetype-config --with-harfbuzz=no
|
|
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' builds/unix/libtool
|
|
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' builds/unix/libtool
|
|
%make_build
|
|
|
|
%if %{with_xfree86}
|
|
cd ft2demos-%{version}
|
|
make TOP_DIR=".."
|
|
%endif
|
|
|
|
%install
|
|
%make_install gnulocaledir=$RPM_BUILD_ROOT%{_datadir}/locale
|
|
{
|
|
for ftdemo in ftbench ftchkwd ftmemchk ftpatchk fttimer ftdump ftlint ftmemchk ftvalid ; do
|
|
builds/unix/libtool --mode=install install -m 755 ft2demos-%{version}/bin/$ftdemo $RPM_BUILD_ROOT/%{_bindir}
|
|
done
|
|
}
|
|
%if %{with_xfree86}
|
|
{
|
|
for ftdemo in ftdiff ftgamma ftgrid ftmulti ftstring fttimer ftview ; do
|
|
builds/unix/libtool --mode=install install -m 755 ft2demos-%{version}/bin/$ftdemo $RPM_BUILD_ROOT/%{_bindir}
|
|
done
|
|
}
|
|
%endif
|
|
|
|
%define wordsize %{__isa_bits}
|
|
|
|
mv $RPM_BUILD_ROOT%{_includedir}/freetype2/freetype/config/ftconfig.h \
|
|
$RPM_BUILD_ROOT%{_includedir}/freetype2/freetype/config/ftconfig-%{wordsize}.h
|
|
install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_includedir}/freetype2/freetype/config/ftconfig.h
|
|
|
|
%triggerpostun -- freetype < 2.0.5-3
|
|
{
|
|
# ttmkfdir updated - as of 2.0.5-3, on upgrades we need xfs to regenerate
|
|
# things to get the iso10646-1 encoding listed.
|
|
for I in %{_datadir}/fonts/*/TrueType /usr/share/X11/fonts/TTF; do
|
|
[ -d $I ] && [ -f $I/fonts.scale ] && [ -f $I/fonts.dir ] && touch $I/fonts.scale
|
|
done
|
|
exit 0
|
|
}
|
|
|
|
%post -p /sbin/ldconfig
|
|
|
|
%postun -p /sbin/ldconfig
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%license docs/LICENSE.TXT docs/FTL.TXT docs/GPLv2.TXT
|
|
%{_libdir}/libfreetype.so.*
|
|
%{_bindir}/ft*
|
|
|
|
%files devel
|
|
%{_datadir}/aclocal/freetype2.m4
|
|
%{_includedir}/freetype2/*
|
|
%{_libdir}/libfreetype.so
|
|
%{_libdir}/pkgconfig/freetype2.pc
|
|
%{_bindir}/freetype-config
|
|
%exclude %{_libdir}/*.{a,la}
|
|
|
|
%files help
|
|
%doc docs/design
|
|
%doc docs/glyphs
|
|
%doc docs/reference
|
|
%doc docs/tutorial
|
|
%doc docs/CHANGES docs/formats.txt docs/ft2faq.html
|
|
%doc ChangeLog README
|
|
%{_mandir}/man1/*
|
|
|
|
%changelog
|
|
* Mon Jul 20 2020 wangye <wangye70@huawei.com> - 2.10.2-1
|
|
- Type:enhancement
|
|
- Id:NA
|
|
- SUG:NA
|
|
- DESC:version update to 2.10.2
|
|
|
|
* Tue Jan 14 2020 openEuler Buildteam <buildteam@openeuler.org> - 2.9.1-5
|
|
- Type:enhancement
|
|
- Id:NA
|
|
- SUG:NA
|
|
- DESC:optimization the spec
|
|
|
|
* Sat Jan 11 2020 openEuler Buildteam <buildteam@openeuler.org> - 2.9.1-4
|
|
- Type:enhancement
|
|
- Id:NA
|
|
- SUG:NA
|
|
- DESC:optimization the spec
|
|
|
|
* Wed Sep 11 2019 openEuler jimmy<dukaitian@huawei.com> - 2.9.1-3
|
|
- Package init jimmy
|