summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-08-25 14:48:39 +0000
committerCoprDistGit <infra@openeuler.org>2024-08-25 14:48:39 +0000
commit74e96eca1f8cebfbf15549165324846bb7c47bc5 (patch)
tree29c89eeda04b71cd028c658159c627a461d6daf2
parent8553d089a54c76ea2d36ee64b1e54ccd5bae39a9 (diff)
automatic import of freetypeopeneuler24.03_LTS
-rw-r--r--.gitignore4
-rw-r--r--backport-freetype-2.10.0-internal-outline.patch86
-rw-r--r--backport-freetype-2.10.1-debughook.patch21
-rw-r--r--backport-freetype-2.2.1-enable-valid.patch30
-rw-r--r--backport-freetype-2.3.0-enable-spr.patch19
-rw-r--r--freetype-2.13.2-include-header.patch10
-rw-r--r--freetype.spec227
-rw-r--r--ftconfig.h14
-rw-r--r--sources4
9 files changed, 415 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..a6db394 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/As.I.Lay.Dying.ttf
+/freetype-2.13.3.tar.xz
+/freetype-doc-2.13.3.tar.xz
+/ft2demos-2.13.3.tar.xz
diff --git a/backport-freetype-2.10.0-internal-outline.patch b/backport-freetype-2.10.0-internal-outline.patch
new file mode 100644
index 0000000..a3e7b4d
--- /dev/null
+++ b/backport-freetype-2.10.0-internal-outline.patch
@@ -0,0 +1,86 @@
+From 2e6bf149908d61c2b2121dad36f2caef260a2053 Mon Sep 17 00:00:00 2001
+From: Marek Kasik <mkasik@redhat.com>
+Date: May 28 2019 12:56:55 +0000
+Subject: Keep FT_Outline_New_Internal() and FT_Outline_Done_Internal()
+for ABI compatibility but make them just throw
+Unimplemented_Feature error.
+
+Remove them once soname has been bumped!
+
+Resolves: #1689117
+
+Conflict:NA
+Reference:https://src.fedoraproject.org/rpms/freetype/c/2e6bf149908d61c2b2121dad36f2caef260a2053
+
+--- freetype-2.10.0/include/freetype/ftoutln.h
++++ freetype-2.10.0/include/freetype/ftoutln.h
+@@ -165,6 +165,15 @@ FT_BEGIN_HEADER
+ FT_Int numContours,
+ FT_Outline *anoutline );
+
++ /*
++ * Kept downstream for ABI compatibility only.
++ * It just throws error now. Remove once soname has been bumped.
++ */
++ FT_EXPORT( FT_Error )
++ FT_Outline_New_Internal( FT_Memory memory,
++ FT_UInt numPoints,
++ FT_Int numContours,
++ FT_Outline *anoutline );
+
+ /**************************************************************************
+ *
+@@ -192,6 +201,13 @@ FT_BEGIN_HEADER
+ FT_Outline_Done( FT_Library library,
+ FT_Outline* outline );
+
++ /*
++ * Kept downstream for ABI compatibility only.
++ * It just throws error now. Remove once soname has been bumped.
++ */
++ FT_EXPORT( FT_Error )
++ FT_Outline_Done_Internal( FT_Memory memory,
++ FT_Outline* outline );
+
+ /**************************************************************************
+ *
+--- freetype-2.10.0/src/base/ftoutln.c
++++ freetype-2.10.0/src/base/ftoutln.c
+@@ -291,6 +291,19 @@
+
+ /* documentation is in ftoutln.h */
+
++ /*
++ * Kept downstream for ABI compatibility only.
++ * It just throws error now. Remove once soname has been bumped.
++ */
++ FT_EXPORT_DEF( FT_Error )
++ FT_Outline_New_Internal( FT_Memory memory,
++ FT_UInt numPoints,
++ FT_Int numContours,
++ FT_Outline *anoutline )
++ {
++ return FT_THROW( Unimplemented_Feature );
++ }
++
+ FT_EXPORT_DEF( FT_Error )
+ FT_Outline_New( FT_Library library,
+ FT_UInt numPoints,
+@@ -423,6 +436,17 @@
+
+ /* documentation is in ftoutln.h */
+
++ /*
++ * Kept downstream for ABI compatibility only.
++ * It just throws error now. Remove once soname has been bumped.
++ */
++ FT_EXPORT_DEF( FT_Error )
++ FT_Outline_Done_Internal( FT_Memory memory,
++ FT_Outline* outline )
++ {
++ return FT_THROW( Unimplemented_Feature );
++ }
++
+ FT_EXPORT_DEF( FT_Error )
+ FT_Outline_Done( FT_Library library,
+ FT_Outline* outline )
diff --git a/backport-freetype-2.10.1-debughook.patch b/backport-freetype-2.10.1-debughook.patch
new file mode 100644
index 0000000..58af2d5
--- /dev/null
+++ b/backport-freetype-2.10.1-debughook.patch
@@ -0,0 +1,21 @@
+From ac07a003d7f75321346188eb9618d418d2b2decb Mon Sep 17 00:00:00 2001
+From: Michael Kuhn <suraia@fedoraproject.org>
+Date: Oct 17 2019 19:06:50 +0000
+Subject: Revert FT_DebugHook_Func ABI/API changes
+
+Conflict:NA
+Reference:https://src.fedoraproject.org/rpms/freetype/c/ac07a003d7f75321346188eb9618d418d2b2decb
+
+diff --git a/include/freetype/ftmodapi.h b/include/freetype/ftmodapi.h
+index 8d039c4f3..88488bfe8 100644
+--- a/include/freetype/ftmodapi.h
++++ b/include/freetype/ftmodapi.h
+@@ -623,7 +623,7 @@ FT_BEGIN_HEADER
+ * it is bytecode interpreter's execution context, `TT_ExecContext`,
+ * which is declared in FreeType's internal header file `tttypes.h`.
+ */
+- typedef FT_Error
++ typedef void
+ (*FT_DebugHook_Func)( void* arg );
+
+
diff --git a/backport-freetype-2.2.1-enable-valid.patch b/backport-freetype-2.2.1-enable-valid.patch
new file mode 100644
index 0000000..4f61e60
--- /dev/null
+++ b/backport-freetype-2.2.1-enable-valid.patch
@@ -0,0 +1,30 @@
+From cbf2c99f7813750cb82deb367a37e50dbb709395 Mon Sep 17 00:00:00 2001
+From: besfahbo <besfahbo@fedoraproject.org>
+Date: Jul 08 2006 01:07:01 +0000
+Subject: - Enable modules gxvalid and otvalid
+
+Enable modules gxvalid and otvalid
+
+Conflict:NA
+Reference:https://src.fedoraproject.org/rpms/freetype/c/cbf2c99f7813750cb82deb367a37e50dbb709395
+
+--- freetype-2.2.1/modules.cfg.orig 2006-07-07 21:01:09.000000000 -0400
++++ freetype-2.2.1/modules.cfg 2006-07-07 21:01:54.000000000 -0400
+@@ -110,7 +110,7 @@
+
+ # TrueType GX/AAT table validation. Needs `ftgxval.c' below.
+ #
+-# AUX_MODULES += gxvalid
++AUX_MODULES += gxvalid
+
+ # Support for streams compressed with gzip (files with suffix .gz).
+ #
+@@ -124,7 +124,7 @@
+
+ # OpenType table validation. Needs `ftotval.c' below.
+ #
+-# AUX_MODULES += otvalid
++AUX_MODULES += otvalid
+
+ # Auxiliary PostScript driver component to share common code.
+ #
diff --git a/backport-freetype-2.3.0-enable-spr.patch b/backport-freetype-2.3.0-enable-spr.patch
new file mode 100644
index 0000000..c873bec
--- /dev/null
+++ b/backport-freetype-2.3.0-enable-spr.patch
@@ -0,0 +1,19 @@
+From c1c64f8cf9264592bca747c9463814a805150346 Mon Sep 17 00:00:00 2001
+From: besfahbo <besfahbo@fedoraproject.org>
+Date: Jan 18 2007 19:42:34 +0000
+Subject: - Add without_subpixel_rendering.
+
+Conflict:NA
+Reference:https://src.fedoraproject.org/rpms/freetype/c/c1c64f8cf9264592bca747c9463814a805150346
+
+--- freetype-2.3.0/include/freetype/config/ftoption.h.spf 2007-01-18 14:27:34.000000000 -0500
++++ freetype-2.3.0/include/freetype/config/ftoption.h 2007-01-18 14:27:48.000000000 -0500
+@@ -92,7 +92,7 @@
+ * When this macro is not defined, FreeType offers alternative LCD
+ * rendering technology that produces excellent output.
+ */
+-/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
++#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING
+
+
+ /**************************************************************************
diff --git a/freetype-2.13.2-include-header.patch b/freetype-2.13.2-include-header.patch
new file mode 100644
index 0000000..ba84ab2
--- /dev/null
+++ b/freetype-2.13.2-include-header.patch
@@ -0,0 +1,10 @@
+--- freetype-2.13.2/meson.build.orig 2024-08-12 22:01:02.043277188 +0800
++++ freetype-2.13.2/meson.build 2024-08-12 22:09:40.560560147 +0800
+@@ -156,6 +156,7 @@
+ 'include/freetype/ftincrem.h',
+ 'include/freetype/ftlcdfil.h',
+ 'include/freetype/ftlist.h',
++ 'include/freetype/ftlogging.h',
+ 'include/freetype/ftlzw.h',
+ 'include/freetype/ftmac.h',
+ 'include/freetype/ftmm.h',
diff --git a/freetype.spec b/freetype.spec
new file mode 100644
index 0000000..306d07e
--- /dev/null
+++ b/freetype.spec
@@ -0,0 +1,227 @@
+%{!?_with_subpixel_rendering: %{!?_without_subpixel_rendering: %define _without_subpixel_rendering --without-subpixel_rendering}}
+
+%{!?with_xfree86:%define with_xfree86 1}
+
+%bcond_without harfbuzz
+
+Name: freetype
+Version: 2.13.3
+Release: 1
+Summary: FreeType is a freely available software library to render fonts
+License: (FTL OR GPL-2.0-or-later) AND BSD-3-Clause AND MIT AND MIT-Modern-Variant AND Zlib
+URL: https://www.freetype.org
+Source0: https://download.savannah.gnu.org/releases/freetype/freetype-%{version}.tar.xz
+Source1: https://download.savannah.gnu.org/releases/freetype/freetype-doc-%{version}.tar.xz
+Source2: https://download.savannah.gnu.org/releases/freetype/ft2demos-%{version}.tar.xz
+Source3: ftconfig.h
+#from tests/scripts/download-test-fonts.py:https://github.com/python-pillow/Pillow/files/6622147/As.I.Lay.Dying.zip
+Source4: As.I.Lay.Dying.ttf
+
+Patch1: freetype-2.13.2-include-header.patch
+Patch6000: backport-freetype-2.3.0-enable-spr.patch
+Patch6001: backport-freetype-2.2.1-enable-valid.patch
+Patch6002: backport-freetype-2.10.0-internal-outline.patch
+Patch6003: backport-freetype-2.10.1-debughook.patch
+
+BuildRequires: gcc meson >= 0.55.0
+BuildRequires: pkgconfig(bzip2)
+BuildRequires: pkgconfig(libbrotlidec)
+BuildRequires: pkgconfig(libpng)
+BuildRequires: pkgconfig(zlib)
+%if %{with harfbuzz}
+BuildRequires: pkgconfig(harfbuzz) >= 2.0.0
+%endif
+
+Provides: %{name}-bytecode = %{version}-%{release}
+%if %{?_with_subpixel_rendering:1}%{!?_with_subpixel_rendering:0}
+Provides: %{name}-subpixel = %{version}-%{release}
+%endif
+
+%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 demos
+Summary: A collection of freetype demos
+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
+Summary: FreeType development libraries and header files
+Requires: %{name} = %{version}-%{release}
+
+%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
+
+%prep
+%autosetup -b 1 -a 2 -p1
+
+pushd ft2demos-%{version}
+tar xf %{S:0}
+mv %{name}-%{version} subprojects/freetype2
+popd
+
+%build
+%meson -Dtests=enabled \
+ -Dbrotli=enabled \
+ -Dbzip2=enabled \
+ -Dpng=enabled \
+ -Dzlib=system \
+%if %{with harfbuzz}
+ -Dharfbuzz=enabled \
+%else
+ -Dharfbuzz=disabled \
+%endif
+%{nil}
+%meson_build
+
+pushd ft2demos-%{version}
+%meson -Dfreetype2:default_library=shared \
+ -Dlibrsvg=disabled \
+%if %{with harfbuzz}
+ -Dfreetype2:harfbuzz=enabled \
+%else
+ -Dfreetype2:harfbuzz=disabled \
+%endif
+%{nil}
+%meson_build
+popd
+
+%install
+%meson_install
+
+mkdir -p %{buildroot}/%{_bindir}
+mkdir -p %{buildroot}/%{_mandir}/man1
+
+{
+ for ftdemo in ftbench ftchkwd ftmemchk ftpatchk fttimer ftdump ftlint ftmemchk ftvalid ttdebug ; do
+ install -m 755 ft2demos-%{version}/%{_vpath_builddir}/$ftdemo %{buildroot}/%{_bindir}
+ done
+ install ft2demos-%{version}/man/{ftbench.1,ftdump.1,ftlint.1,ftvalid.1,ttdebug.1} %{buildroot}/%{_mandir}/man1
+}
+
+%if %{with_xfree86}
+{
+ for ftdemo in ftdiff ftgamma ftgrid ftmulti ftsdf ftstring ftview ; do
+ install -m 755 ft2demos-%{version}/%{_vpath_builddir}/$ftdemo %{buildroot}/%{_bindir}
+ install ft2demos-%{version}/man/$ftdemo.1 %{buildroot}/%{_mandir}/man1
+ 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 %{S:3} $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
+}
+
+%check
+mkdir -p tests/data
+cp %{S:4} tests/data/
+%meson_test
+
+%files
+%license LICENSE.TXT docs/FTL.TXT docs/GPLv2.TXT
+%{_libdir}/libfreetype.so.*
+
+%files demos
+%{_bindir}/ft*
+%{_bindir}/ttdebug
+
+%files devel
+%{_datadir}/aclocal/freetype2.m4
+%{_includedir}/freetype2/*
+%{_libdir}/libfreetype.so
+%{_libdir}/pkgconfig/freetype2.pc
+
+%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 Aug 12 2024 Funda Wang <fundawang@yeah.net> - 2.13.3-1
+- update to 2.13.3
+- build with meson
+
+* Sun Aug 11 2024 Funda Wang <fundawang@yeah.net> - 2.13.2-2
+- Cleanup spec
+- Conditioned build harfbuzz support
+
+* Thu Dec 28 2023 Paul Thomas <paulthomas100199@gmail.com> - 2.13.2-1
+- update to version 2.13.2
+
+* Wed Sep 20 2023 zhouwenpei <zhouwenpei1@h-partners.com> - 2.13.1-2
+- enable check
+
+* Fri Jul 14 2023 zhangpan <zhangpan103@h-partners.com> - 2.13.1-1
+- update to 2.13.1
+
+* Mon Apr 17 2023 zhouwenpei <zhouwenpei1@h-partners.com> - 2.12.1-2
+- fix CVE-2023-2004
+
+* Tue Nov 29 2022 zhouwenpei <zhouwenpei1@h-partners.com> - 2.12.1-1
+- update to 2.12.1
+
+* Sat May 14 2022 wangkerong <wangkerong@h-partners.com> - 2.11.0-3
+- fix CVE-2022-27454,CVE-2022-27455,CVE-2022-27456
+
+* Thu Dec 09 2021 dongyuzhen <dongyuzhen@huawei.com> - 2.11.0-2
+- detach a demos package
+- fix the patch name
+
+* Wed Dec 08 2021 dongyuzhen <dongyuzhen@huawei.com> - 2.11.0-1
+- update to 2.11.0
+
+* Tue Apr 13 2021 hanhui<hanhui15@huawei.com> - 2.10.2-3
+- Type:bugfix
+- CVE:NA
+- SUG:NA
+- DESC:add community patches
+
+* Tue Dec 08 2020 zhanzhimin <zhanzhimin@huawei.com> - 2.10.2-2
+- Type:CVE
+- CVE:CVE-2020-15999
+- SUG:NA
+- DESC:fix CVE-2020-15999
+
+* 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
diff --git a/ftconfig.h b/ftconfig.h
new file mode 100644
index 0000000..8d4a074
--- /dev/null
+++ b/ftconfig.h
@@ -0,0 +1,14 @@
+#ifndef __FTCONFIG_H__MULTILIB
+#define __FTCONFIG_H__MULTILIB
+
+#include <bits/wordsize.h>
+
+#if __WORDSIZE == 32
+# include "ftconfig-32.h"
+#elif __WORDSIZE == 64
+# include "ftconfig-64.h"
+#else
+# error "unexpected value for __WORDSIZE macro"
+#endif
+
+#endif
diff --git a/sources b/sources
new file mode 100644
index 0000000..00f329b
--- /dev/null
+++ b/sources
@@ -0,0 +1,4 @@
+e153d60e66199660f7cfe99ef4705ad7 As.I.Lay.Dying.ttf
+f3b4432c4212064c00500e1ad63fbc64 freetype-2.13.3.tar.xz
+6affe0d431939398cc3c7cdd58d824f8 freetype-doc-2.13.3.tar.xz
+0e4e6017813b7d134a1029d336dbc38a ft2demos-2.13.3.tar.xz