diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
commit | ed5640d8b587fbcfed7dd7967f3de04b37a76f26 (patch) | |
tree | 7a5f7c6c9d02226d7471cb3cc8fbbf631b415303 /external/freetype | |
parent | Initial commit. (diff) | |
download | libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.tar.xz libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.zip |
Adding upstream version 4:7.4.7.upstream/4%7.4.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'external/freetype')
-rw-r--r-- | external/freetype/ExternalProject_freetype.mk | 38 | ||||
-rw-r--r-- | external/freetype/Makefile | 7 | ||||
-rw-r--r-- | external/freetype/Module_freetype.mk | 17 | ||||
-rw-r--r-- | external/freetype/README | 6 | ||||
-rw-r--r-- | external/freetype/UnpackedTarball_freetype.mk | 21 | ||||
-rw-r--r-- | external/freetype/freetype-2.6.5.patch.1 | 157 | ||||
-rw-r--r-- | external/freetype/ubsan.patch | 11 |
7 files changed, 257 insertions, 0 deletions
diff --git a/external/freetype/ExternalProject_freetype.mk b/external/freetype/ExternalProject_freetype.mk new file mode 100644 index 000000000..2a61ac7d7 --- /dev/null +++ b/external/freetype/ExternalProject_freetype.mk @@ -0,0 +1,38 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_ExternalProject_ExternalProject,freetype)) + +$(eval $(call gb_ExternalProject_register_targets,freetype,\ + build \ +)) + +$(call gb_ExternalProject_get_state_target,freetype,build) : + $(call gb_Trace_StartRange,freetype,EXTERNAL) + $(call gb_ExternalProject_run,build,\ + $(gb_RUN_CONFIGURE) ./configure \ + --disable-shared \ + --with-pic \ + --without-zlib \ + --without-brotli \ + --without-bzip2 \ + --without-harfbuzz \ + --without-png \ + --prefix=$(call gb_UnpackedTarball_get_dir,freetype/instdir) \ + $(gb_CONFIGURE_PLATFORMS) \ + CFLAGS="$(CFLAGS) \ + $(call gb_ExternalProject_get_build_flags,freetype) \ + $(gb_VISIBILITY_FLAGS) \ + $(gb_EMSCRIPTEN_CPPFLAGS)" \ + LDFLAGS="$(call gb_ExternalProject_get_link_flags,freetype)" \ + && $(MAKE) install \ + && touch $@ ) + $(call gb_Trace_EndRange,freetype,EXTERNAL) + +# vim: set noet sw=4 ts=4: diff --git a/external/freetype/Makefile b/external/freetype/Makefile new file mode 100644 index 000000000..e4968cf85 --- /dev/null +++ b/external/freetype/Makefile @@ -0,0 +1,7 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- + +module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST)))) + +include $(module_directory)/../../solenv/gbuild/partial_build.mk + +# vim: set noet sw=4 ts=4: diff --git a/external/freetype/Module_freetype.mk b/external/freetype/Module_freetype.mk new file mode 100644 index 000000000..290014c47 --- /dev/null +++ b/external/freetype/Module_freetype.mk @@ -0,0 +1,17 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_Module_Module,freetype)) + +$(eval $(call gb_Module_add_targets,freetype,\ + ExternalProject_freetype \ + UnpackedTarball_freetype \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/freetype/README b/external/freetype/README new file mode 100644 index 000000000..481466432 --- /dev/null +++ b/external/freetype/README @@ -0,0 +1,6 @@ +FreeType 2 is a software font engine that is designed to be small, efficient, highly customizable, +and portable while capable of producing high-quality output (glyph images). It can be +used in graphics libraries, display servers, font conversion tools, text image generation +tools, and many other products as well. + +From [http://freetype.sourceforge.net/freetype2/index.html] diff --git a/external/freetype/UnpackedTarball_freetype.mk b/external/freetype/UnpackedTarball_freetype.mk new file mode 100644 index 000000000..076edb9e3 --- /dev/null +++ b/external/freetype/UnpackedTarball_freetype.mk @@ -0,0 +1,21 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_UnpackedTarball_UnpackedTarball,freetype)) + +$(eval $(call gb_UnpackedTarball_set_tarball,freetype,$(FREETYPE_TARBALL),,freetype)) + +$(eval $(call gb_UnpackedTarball_add_patches,freetype,\ + external/freetype/freetype-2.6.5.patch.1 \ + external/freetype/ubsan.patch \ +)) + +$(eval $(call gb_UnpackedTarball_set_patchlevel,freetype,0)) + +# vim: set noet sw=4 ts=4: diff --git a/external/freetype/freetype-2.6.5.patch.1 b/external/freetype/freetype-2.6.5.patch.1 new file mode 100644 index 000000000..c10c0bb38 --- /dev/null +++ b/external/freetype/freetype-2.6.5.patch.1 @@ -0,0 +1,157 @@ +diff -up freetype/builds/unix/configure.dt freetype/builds/unix/configure +--- freetype/builds/unix/configure.dt 2017-02-01 22:14:45.206257952 +0100 ++++ freetype/builds/unix/configure 2017-02-01 22:16:31.076183707 +0100 +@@ -9386,7 +9386,7 @@ + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' ++ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $lib' + archive_expsym_cmds='' + ;; + m68k) +@@ -9402,7 +9402,7 @@ + allow_undefined_flag=unsupported + # Joseph Beckenbach <jrb3@best.com> says some releases of gcc + # support --undefined. This deserves some investigation. FIXME +- archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' ++ archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags -o $lib' + else + ld_shlibs=no + fi +@@ -9436,7 +9436,7 @@ + ;; + + haiku*) +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' ++ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $lib' + link_all_deplibs=yes + ;; + +@@ -9531,13 +9531,13 @@ + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac +- archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' ++ archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags -o $lib' + + if test yes = "$supports_anon_versioning"; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ +- $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' ++ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-version-script $wl$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in +@@ -9567,8 +9567,8 @@ + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else +- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + +@@ -9586,8 +9586,8 @@ + + _LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi +@@ -9615,8 +9615,8 @@ + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $lib' ++ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi +@@ -9633,8 +9633,8 @@ + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then +- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' +- archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi +@@ -9937,7 +9937,7 @@ + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support +- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' ++ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $lib' + archive_expsym_cmds='' + ;; + m68k) +@@ -10207,7 +10207,7 @@ + + irix5* | irix6* | nonstopux*) + if test yes = "$GCC"; then +- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ++ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. +@@ -10237,7 +10237,7 @@ + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 + printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } + if test yes = "$lt_cv_irix_exported_symbol"; then +- archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' ++ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' + fi + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' +@@ -10332,7 +10332,7 @@ + osf3*) + if test yes = "$GCC"; then + allow_undefined_flag=' $wl-expect_unresolved $wl\*' +- archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ++ archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' +@@ -10345,7 +10345,7 @@ + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test yes = "$GCC"; then + allow_undefined_flag=' $wl-expect_unresolved $wl\*' +- archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ++ archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' +@@ -13620,10 +13620,10 @@ + XX_CFLAGS="-Wall" + case "$host" in + *-*-mingw*) +- XX_ANSIFLAGS="-pedantic" ++ XX_ANSIFLAGS="" + ;; + *-*-aix*) +- XX_ANSIFLAGS="-pedantic" ++ XX_ANSIFLAGS="" + ;; + *) + XX_ANSIFLAGS="" +@@ -13661,7 +13661,7 @@ + then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok, adding to XX_ANSIFLAGS" >&5 + printf "%s\n" "ok, adding to XX_ANSIFLAGS" >&6; } +- XX_ANSIFLAGS="${XX_ANSIFLAGS} ${a}" ++ XX_ANSIFLAGS="${XX_ANSIFLAGS}" + + else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 diff --git a/external/freetype/ubsan.patch b/external/freetype/ubsan.patch new file mode 100644 index 000000000..c8173eeff --- /dev/null +++ b/external/freetype/ubsan.patch @@ -0,0 +1,11 @@ +--- src/truetype/ttgxvar.c ++++ src/truetype/ttgxvar.c +@@ -964,7 +964,7 @@ + /* in the OpenType specification. */ + + varData = &itemStore->varData[outerIndex]; +- deltaSet = &varData->deltaSet[varData->regionIdxCount * innerIndex]; ++ deltaSet = varData->regionIdxCount * innerIndex == 0 ? varData->deltaSet : &varData->deltaSet[varData->regionIdxCount * innerIndex]; + + /* outer loop steps through master designs to be blended */ + for ( master = 0; master < varData->regionIdxCount; master++ ) |