]> git.pld-linux.org Git - packages/crossmingw32-freetype.git/blobdiff - crossmingw32-freetype.spec
- updated to 2.13.2
[packages/crossmingw32-freetype.git] / crossmingw32-freetype.spec
index b31ccae6d5d06e17fe76c41da774ea536642aaaf..f19f9e2e92d9443b38566f1fe12ef84a8eb17ef5 100644 (file)
@@ -1,26 +1,32 @@
 #
 # 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 lcd             # disable filters reducing color fringes when
-#                 subpixel rendering for LCD (only used with a new 2.3.0 API;
-#                 patents pending)
+%bcond_without lcd             # without LCD subpixel color filtering (Microsoft patents in USA)
+%bcond_without harfbuzz        # harfbuzz based autohinting
 #
 %define                realname   freetype
-Summary:       TrueType font rasterizer - Mingw32 cross version
-Summary(pl.UTF-8):Rasteryzer fontów TrueType - wersja skrośna dla Mingw32
+Summary:       TrueType font rasterizer - MinGW32 cross version
+Summary(pl.UTF-8):     Rasteryzer fontów TrueType - wersja skrośna dla MinGW32
 Name:          crossmingw32-%{realname}
-Version:       2.3.7
+Version:       2.13.2
 Release:       1
-License:       GPL or FTL
+License:       GPL v2 or FTL
 Group:         Development/Libraries
-Source0:       http://savannah.nongnu.org/download/freetype/%{realname}-%{version}.tar.bz2
-# Source0-md5: 83306194817ebdea554133b4232a34aa
-URL:           http://www.freetype.org/
+Source0:       https://download.savannah.gnu.org/releases/freetype/%{realname}-%{version}.tar.xz
+# Source0-md5: 1f625f0a913c449551b1e3790a1817d7
+Patch0:                freetype-mingw32.patch
+URL:           https://freetype.org/
+BuildRequires: crossmingw32-bzip2
 BuildRequires: crossmingw32-gcc
+%{?with_harfbuzz:BuildRequires:        crossmingw32-harfbuzz >= 2.0.0}
+BuildRequires: crossmingw32-libpng
 BuildRequires: crossmingw32-zlib >= 1.2.3-2
+BuildRequires: pkgconfig >= 1:0.24
 BuildRequires: python
+BuildRequires: tar >= 1:1.22
+BuildRequires: xz
+Requires:      crossmingw32-bzip2
+%{?with_harfbuzz:Requires:     crossmingw32-harfbuzz >= 2.0.0}
+Requires:      crossmingw32-libpng
 Requires:      crossmingw32-zlib >= 1.2.3-2
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -29,6 +35,7 @@ BuildRoot:    %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %define                specflags       -fno-strict-aliasing
 
 %define                no_install_post_strip   1
+%define                _enable_debug_packages  0
 
 %define                target                  i386-mingw32
 %define                target_platform         i386-pc-mingw32
@@ -40,6 +47,16 @@ BuildRoot:   %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %define                _dlldir                 /usr/share/wine/windows/system
 %define                __cc                    %{target}-gcc
 %define                __cxx                   %{target}-g++
+%define                __pkgconfig_provides    %{nil}
+%define                __pkgconfig_requires    %{nil}
+
+%ifnarch %{ix86}
+# arch-specific flags (like alpha's -mieee) are not valid for i386 gcc
+%define                optflags        -O2
+%endif
+# -z options are invalid for mingw linker, most of -f options are Linux-specific
+%define                filterout_ld    -Wl,-z,.*
+%define                filterout_c     -f[-a-z0-9=]*
 
 %description
 The FreeType engine is a free and portable TrueType font rendering
@@ -71,21 +88,24 @@ demonstracyjnych.
 Ten pakiet zawiera wersję skrośną dla Win32.
 
 %package static
-Summary:       Static freetype library (cross mingw32 version)
-Summary(pl.UTF-8):     Statyczna biblioteka freetype (wersja skrośna mingw32)
+Summary:       Static freetype library (cross MinGW32 version)
+Summary(pl.UTF-8):     Statyczna biblioteka freetype (wersja skrośna MinGW32)
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
 
 %description static
-Static freetype library (cross mingw32 version).
+Static freetype library (cross MinGW32 version).
 
 %description static -l pl.UTF-8
-Statyczna biblioteka freetype (wersja skrośna mingw32).
+Statyczna biblioteka freetype (wersja skrośna MinGW32).
 
 %package dll
 Summary:       DLL freetype library for Windows
 Summary(pl.UTF-8):     Biblioteka DLL freetype dla Windows
 Group:         Applications/Emulators
+Requires:      crossmingw32-bzip2-dll
+%{?with_harfbuzz:Requires:     crossmingw32-harfbuzz-dll >= 2.0.0}
+Requires:      crossmingw32-libpng-dll
 Requires:      crossmingw32-zlib-dll
 Requires:      wine
 
@@ -97,16 +117,22 @@ Biblioteka DLL freetype dla Windows.
 
 %prep
 %setup -q -n %{realname}-%{version}
+%patch0 -p1
 
 %build
+export PKG_CONFIG_LIBDIR=%{_pkgconfigdir}
 CFLAGS="%{rpmcflags} \
-%{?with_bytecode:-DTT_CONFIG_OPTION_BYTECODE_INTERPRETER} \
-%{?with_lcd:-DFT_CONFIG_OPTION_SUBPIXEL_RENDERING}" \
+%{?with_lcd:-DFT_CONFIG_OPTION_SUBPIXEL_RENDERING} \
+-DTT_CONFIG_OPTION_SUBPIXEL_HINTING \
+" \
 %configure \
+       LIBPNG_CFLAGS="$(pkg-config --cflags libpng)" \
+       LIBPNG_LDFLAGS="$(pkg-config --libs libpng)" \
        --target=%{target} \
        --build=i686-pc-linux-gnu \
        --host=%{target} \
-       --enable-shared
+       --enable-shared \
+       %{!?with_harfbuzz:--without-harfbuzz}
 
 %{__make}
 
@@ -117,25 +143,24 @@ rm -rf $RPM_BUILD_ROOT
        DESTDIR=$RPM_BUILD_ROOT
 
 install -d $RPM_BUILD_ROOT%{_dlldir}
-mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir}
+%{__mv} -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir}
 
 %if 0%{!?debug:1}
 %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a
 %endif
 
-rm -rf $RPM_BUILD_ROOT%{_datadir}/aclocal
+%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/aclocal
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc docs/{CHANGES,FTL.TXT,LICENSE.TXT,PATENTS,TODO,formats.txt,raster.txt}
+%doc LICENSE.TXT docs/{CHANGES,FTL.TXT,TODO,formats.txt,raster.txt}
 %{_libdir}/libfreetype.dll.a
 %{_libdir}/libfreetype.la
 %{_includedir}/freetype2
-%{_includedir}/ft2build.h
 %{_pkgconfigdir}/freetype2.pc
 
 %files static
This page took 0.462048 seconds and 4 git commands to generate.