freetype spec config diff

Created Diff never expires
308 removals
Lines
Total
Removed
Words
Total
Removed
To continue using this feature, upgrade to
Diffchecker logo
Diffchecker Pro
459 lines
38 additions
Lines
Total
Added
Words
Total
Added
To continue using this feature, upgrade to
Diffchecker logo
Diffchecker Pro
191 lines
# Patented subpixel rendering disabled by default.
%define version 2.13.3

# Pass '--with subpixel_rendering' on rpmbuild command-line to enable.


%{!?_with_subpixel_rendering: %{!?_without_subpixel_rendering: %define _without_subpixel_rendering --without-subpixel_rendering}}
%define release 1%{?dist}






%{!?with_xfree86:%define with_xfree86 1}
# Define subpixel_rendering if not defined

%{!?_with_subpixel_rendering: %define _with_subpixel_rendering 0}






Summary: A free and portable font rendering engine

Name: freetype
Name: freetype


Version: 2.8
Version: %{version}


Release: 12%{?dist}
Release: %{release}


License: (FTL or GPLv2+) and BSD and MIT and Public Domain and zlib with acknowledgement
Summary: A free and portable font rendering engine

License: FTL or GPLv2+ and BSD and MIT and Public Domain and zlib with acknowledgement


Group: System Environment/Libraries
Group: System Environment/Libraries


URL: http://www.freetype.org
URL: http://www.freetype.org


Source: http://download.savannah.gnu.org/releases/freetype/freetype-%{version}.tar.bz2
Source0: http://download.savannah.gnu.org/releases/freetype/freetype-%{version}.tar.gz

Source1: http://download.savannah.gnu.org/releases/freetype/freetype-doc-%{version}.tar.bz2


Source2: http://download.savannah.gnu.org/releases/freetype/ft2demos-%{version}.tar.bz2
Source1: http://download.savannah.gnu.org/releases/freetype/freetype-doc-%{version}.tar.gz


Source3: ftconfig.h
Source3: ftconfig.h






Patch0: freetype-2.3.0-enable-spr.patch



# Enable otvalid and gxvalid modules

Patch1: freetype-2.2.1-enable-valid.patch



# https://bugzilla.redhat.com/show_bug.cgi?id=1197740

Patch2: freetype-2.4.11-inode-overflow.patch



# https://bugzilla.redhat.com/show_bug.cgi?id=1381678

Patch3: freetype-2.4.11-signed.patch



# Enable additional demos

Patch4: freetype-2.3.11-more-demos.patch



Patch5: freetype-2.4.11-libtool.patch



Patch6: freetype-2.8-pcf-encoding.patch



Patch7: freetype-2.8-loop-counter.patch



# https://bugzilla.redhat.com/show_bug.cgi?id=1497443

Patch8: freetype-multilib.patch



# https://bugzilla.redhat.com/show_bug.cgi?id=1544775

Patch9: freetype-2.8-getvariation.patch



# https://bugzilla.redhat.com/show_bug.cgi?id=1576504

Patch10: freetype-2.8-2.4.11-API.patch

Patch11: freetype-2.8-avar-table-load.patch



BuildRequires: libX11-devel
BuildRequires: libX11-devel


BuildRequires: libpng-devel
BuildRequires: libpng-devel


BuildRequires: zlib-devel
BuildRequires: zlib-devel


BuildRequires: bzip2-devel
BuildRequires: bzip2-devel






Provides: %{name}-bytecode
Provides: %{name}-bytecode


%if %{?_with_subpixel_rendering:1}%{!?_with_subpixel_rendering:0}
%if %{_with_subpixel_rendering}


Provides: %{name}-subpixel
Provides: %{name}-subpixel


%endif
%endif






%description
%description


The FreeType engine is a free and portable font rendering
The FreeType engine is a free and portable font rendering engine, developed to provide advanced font support for a variety of platforms and environments. FreeType is a library that can open and manage font files as well as efficiently load, hint, and render individual glyphs. FreeType is not a font server or a complete text-rendering library.

engine, developed to provide advanced font support for a variety of

platforms and environments. FreeType is a library which can open and

manages font files as well as efficiently load, hint and render

individual glyphs. FreeType is not a font server or a complete

text-rendering library.

%package demos

Summary: A collection of FreeType demos

Group: System Environment/Libraries

Requires: %{name} = %{version}-%{release}



%description demos

The FreeType engine is a free and portable font rendering

engine, developed to provide advanced font support for a variety of

platforms and environments. The demos package includes a set of useful

small utilities showing various capabilities of the FreeType library.








%package devel
%package devel


Summary: FreeType development libraries and header files
Summary: FreeType development libraries and header files


Group: Development/Libraries
Group: Development/Libraries


Requires: %{name} = %{version}-%{release}
Requires: %{name} = %{version}-%{release}


Requires: pkgconfig%{?_isa}
Requires: pkgconfig%{?_isa}






%description devel
%description devel


The freetype-devel package includes the static libraries and header files
The freetype-devel package includes the static libraries and header files for the FreeType font rendering engine.

for the FreeType font rendering engine.






Install freetype-devel if you want to develop programs which will use
Install freetype-devel if you want to develop programs that use FreeType.

FreeType.








%prep
%prep


%setup -q -b 1 -a 2
%setup -q -b 1



%if %{?_with_subpixel_rendering:1}%{!?_with_subpixel_rendering:0}

%patch0 -p1 -b .enable-spr

%endif



%patch1 -p1 -b .enable-valid

%patch2 -p1 -b .inode-overflow

%patch3 -p1 -b .signed



pushd ft2demos-%{version}

%patch4 -p1 -b .more-demos

popd



%patch5 -p1 -b .libtool

%patch6 -p1 -b .pcf-encoding

%patch7 -p1 -b .loop-counter

%patch8 -p1 -b .multilib

%patch9 -p1 -b .getvariation

%patch10 -p1 -b .2.4.11-api

%patch11 -p1 -b .avar-table-load






%build
%build




%configure --disable-static \
%configure --disable-static \


--with-zlib=yes \
--with-zlib=yes \


--with-bzip2=yes \
--with-bzip2=yes \


--with-png=yes \
--with-png=yes \


--with-harfbuzz=no \
--with-harfbuzz=no \


--enable-config \

CFLAGS="%optflags -D_FILE_OFFSET_BITS=64"
CFLAGS="%optflags -D_FILE_OFFSET_BITS=64"






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 %{?_smp_mflags}
make %{?_smp_mflags}






%if %{with_xfree86}

# Build demos

pushd ft2demos-%{version}

make TOP_DIR=".."

popd

%endif



# Convert FTL.txt and example3.cpp to UTF-8

pushd docs

iconv -f latin1 -t utf-8 < FTL.TXT > FTL.TXT.tmp && \

touch -r FTL.TXT FTL.TXT.tmp && \

mv FTL.TXT.tmp FTL.TXT



iconv -f iso-8859-1 -t utf-8 < "tutorial/example3.cpp" > "tutorial/example3.cpp.utf8"

touch -r tutorial/example3.cpp tutorial/example3.cpp.utf8 && \

mv tutorial/example3.cpp.utf8 tutorial/example3.cpp

popd





%install
%install




%make_install gnulocaledir=$RPM_BUILD_ROOT%{_datadir}/locale
%make_install gnulocaledir=$RPM_BUILD_ROOT%{_datadir}/locale






{
# freetype-config 복사

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
mkdir -p $RPM_BUILD_ROOT%{_bindir}


builds/unix/libtool --mode=install install -m 755 ft2demos-%{version}/bin/$ftdemo $RPM_BUILD_ROOT/%{_bindir}
cp builds/unix/freetype-config $RPM_BUILD_ROOT%{_bindir}/freetype-config


done


}


%endif
# man page 복사


mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1


cp docs/*.1 $RPM_BUILD_ROOT/usr/share/man/man1/


# fix multilib issues
# multilib 대응


%define wordsize %{__isa_bits}
%define wordsize %{__isa_bits}




mv $RPM_BUILD_ROOT%{_includedir}/freetype2/freetype/config/ftconfig.h \
mv $RPM_BUILD_ROOT%{_includedir}/freetype2/freetype/config/ftconfig.h \


$RPM_BUILD_ROOT%{_includedir}/freetype2/freetype/config/ftconfig-%{wordsize}.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
install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_includedir}/freetype2/freetype/config/ftconfig.h






# Don't package static a or .la files
# 정적 라이브러리 제거


rm -f $RPM_BUILD_ROOT%{_libdir}/*.{a,la}
rm -f $RPM_BUILD_ROOT%{_libdir}/*.{a,la}








%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
%post -p /sbin/ldconfig




%postun -p /sbin/ldconfig
%postun -p /sbin/ldconfig






%files
%files


%{!?_licensedir:%global license %%doc}
%license LICENSE.TXT

%license docs/LICENSE.TXT docs/FTL.TXT docs/GPLv2.TXT


%{_libdir}/libfreetype.so.*
%{_libdir}/libfreetype.so.*


%doc README
%doc README


%files demos

%{_bindir}/ftbench

%{_bindir}/ftchkwd

%{_bindir}/ftmemchk

%{_bindir}/ftpatchk

%{_bindir}/fttimer

%{_bindir}/ftdump

%{_bindir}/ftlint

%{_bindir}/ftvalid

%if %{with_xfree86}

%{_bindir}/ftdiff

%{_bindir}/ftgamma

%{_bindir}/ftgrid

%{_bindir}/ftmulti

%{_bindir}/ftstring

%{_bindir}/ftview

%endif

%doc ChangeLog README





%files devel
%files devel


%doc docs/CHANGES docs/formats.txt docs/ft2faq.html
%doc docs/CHANGES docs/formats.txt docs/ft2faq.html


%dir %{_includedir}/freetype2
%dir %{_includedir}/freetype2


%{_datadir}/aclocal/freetype2.m4
%{_datadir}/aclocal/freetype2.m4


%{_includedir}/freetype2/*
%{_includedir}/freetype2/*


%{_libdir}/libfreetype.so
%{_libdir}/libfreetype.so


%{_bindir}/freetype-config
%{_bindir}/freetype-config


%{_libdir}/pkgconfig/freetype2.pc
%{_libdir}/pkgconfig/freetype2.pc


%doc docs/design
%doc docs/design docs/glyphs docs/reference docs/tutorial

%doc docs/glyphs

%doc docs/reference

%doc docs/tutorial


%{_mandir}/man1/*
%{_mandir}/man1/*






%changelog
%changelog


* Fri Jun 08 2018 Marek Kasik <mkasik@redhat.com> - 2.8-12
* Thu Apr 17 2025 kimkh <kimkh@example.com> - 2.13.3

- Fix loading of avar tables


- Resolves: #1576504
- Update to 2.13.3