diff --git a/media-libs/freetype/freetype-2.10.4.recipe b/media-libs/freetype/freetype-2.11.0.recipe similarity index 77% rename from media-libs/freetype/freetype-2.10.4.recipe rename to media-libs/freetype/freetype-2.11.0.recipe index d1458d7dd..306d0e290 100644 --- a/media-libs/freetype/freetype-2.10.4.recipe +++ b/media-libs/freetype/freetype-2.11.0.recipe @@ -5,10 +5,14 @@ output (glyph images) of most vector and bitmap font formats." HOMEPAGE="https://www.freetype.org/" COPYRIGHT="1996-2018 David Turner, Robert Wilhelm, Werner Lemberg, et al." LICENSE="FreeType" -REVISION="3" +REVISION="1" SOURCE_URI="https://download.savannah.gnu.org/releases/freetype/freetype-$portVersion.tar.xz" -CHECKSUM_SHA256="86a854d8905b19698bbc8f23b860bc104246ce4854dcea8e3b0fb21284f75784" -PATCHES="enable-validation-modules.patchset" +CHECKSUM_SHA256="8bee39bd3968c4804b70614a0a3ad597299ad0e824bc8aad5ce8aaf48067bde7" +PATCHES=" + enable-validation-modules.patchset + use-includedir.patchset + gcc2-buildfix.patchset + " #PATCHES="freetype-subpixel.patchset" # enable patented subpixel rendering ARCHITECTURES="all" @@ -16,7 +20,7 @@ SECONDARY_ARCHITECTURES="x86_gcc2 x86" PROVIDES=" freetype$secondaryArchSuffix = $portVersion - lib:libfreetype$secondaryArchSuffix = 6.17.4 compat >= 6 + lib:libfreetype$secondaryArchSuffix = 6.18.0 compat >= 6 " REQUIRES=" haiku$secondaryArchSuffix @@ -30,11 +34,9 @@ if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then " fi - PROVIDES_devel=" freetype${secondaryArchSuffix}_devel = $portVersion - cmd:freetype_config${secondaryArchSuffix} = $portVersion - devel:libfreetype${secondaryArchSuffix} = 6.17.4 compat >= 6 + devel:libfreetype${secondaryArchSuffix} = 6.18.0 compat >= 6 " REQUIRES_devel=" freetype${secondaryArchSuffix} == $portVersion base @@ -60,32 +62,35 @@ if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then " fi BUILD_PREREQUIRES=" - cmd:aclocal - cmd:autoconf - cmd:automake cmd:gcc$secondaryArchSuffix cmd:ld$secondaryArchSuffix - cmd:libtoolize$secondaryArchSuffix >= 2.4.2 - cmd:make + cmd:meson cmd:pkg_config$secondaryArchSuffix - cmd:which + cmd:python3 " defineDebugInfoPackage freetype$secondaryArchSuffix \ - $libDir/libfreetype.so.6.17.4 + $libDir/libfreetype.so.6.18.0 BUILD() { - ./autogen.sh - runConfigure ./configure --enable-freetype-config - make $jobArgs + unset meson + meson setup build . --buildtype release \ + --prefix $prefix \ + --bindir $binDir \ + --datadir $dataDir \ + --includedir $includeDir \ + --libdir $libDir \ + --default-library shared + meson compile -C build $jobArgs } INSTALL() { - make install + unset meson + meson install -C build - rm $libDir/libfreetype.la + install -Dt $dataRootDir/aclocal -m644 builds/unix/freetype2.m4 prepareInstalledDevelLibs libfreetype fixPkgconfig @@ -100,7 +105,6 @@ INSTALL() # devel package packageEntries devel \ - $binDir \ $dataRootDir/aclocal \ $developDir } diff --git a/media-libs/freetype/freetype_bootstrap-2.10.4.recipe b/media-libs/freetype/freetype_bootstrap-2.11.0.recipe similarity index 74% rename from media-libs/freetype/freetype_bootstrap-2.10.4.recipe rename to media-libs/freetype/freetype_bootstrap-2.11.0.recipe index c00a1690d..306dcd2e5 100644 --- a/media-libs/freetype/freetype_bootstrap-2.10.4.recipe +++ b/media-libs/freetype/freetype_bootstrap-2.11.0.recipe @@ -7,9 +7,13 @@ COPYRIGHT="1996-2018 David Turner, Robert Wilhelm, Werner Lemberg, et al." LICENSE="FreeType" REVISION="1" SOURCE_URI="https://download.savannah.gnu.org/releases/freetype/freetype-$portVersion.tar.xz" -CHECKSUM_SHA256="86a854d8905b19698bbc8f23b860bc104246ce4854dcea8e3b0fb21284f75784" +CHECKSUM_SHA256="8bee39bd3968c4804b70614a0a3ad597299ad0e824bc8aad5ce8aaf48067bde7" SOURCE_DIR="freetype-$portVersion" -PATCHES="enable-validation-modules.patchset" +PATCHES=" + enable-validation-modules.patchset + use-includedir.patchset + gcc2-buildfix.patchset + " #PATCHES="freetype-subpixel.patchset" # enable patented subpixel rendering ARCHITECTURES="all" @@ -17,8 +21,7 @@ SECONDARY_ARCHITECTURES="x86_gcc2 x86" PROVIDES=" freetype_bootstrap$secondaryArchSuffix = $portVersion - cmd:freetype_config${secondaryArchSuffix} = $portVersion - devel:libfreetype${secondaryArchSuffix} = 6.17.4 compat >= 6 + devel:libfreetype${secondaryArchSuffix} = 6.18.0 compat >= 6 " REQUIRES=" haiku$secondaryArchSuffix @@ -40,28 +43,32 @@ BUILD_REQUIRES=" devel:libz$secondaryArchSuffix " BUILD_PREREQUIRES=" - cmd:aclocal - cmd:autoconf - cmd:automake cmd:gcc$secondaryArchSuffix cmd:ld$secondaryArchSuffix - cmd:libtoolize$secondaryArchSuffix >= 2.4.2 - cmd:make - cmd:which + cmd:meson + cmd:pkg_config$secondaryArchSuffix + cmd:python3 " BUILD() { - ./autogen.sh - runConfigure ./configure --enable-freetype-config - make $jobArgs + unset meson + meson setup build . --buildtype release \ + --prefix $prefix \ + --bindir $binDir \ + --datadir $dataDir \ + --includedir $includeDir \ + --libdir $libDir \ + --default-library shared + meson compile -C build $jobArgs } INSTALL() { - make install + unset meson + meson install -C build - rm $libDir/libfreetype.la $libDir/libfreetype.a + install -Dt $dataRootDir/aclocal -m644 builds/unix/freetype2.m4 prepareInstalledDevelLibs libfreetype fixPkgconfig diff --git a/media-libs/freetype/patches/gcc2-buildfix.patchset b/media-libs/freetype/patches/gcc2-buildfix.patchset new file mode 100644 index 000000000..89497b696 --- /dev/null +++ b/media-libs/freetype/patches/gcc2-buildfix.patchset @@ -0,0 +1,32 @@ +From 037ec5401d0a598c8a208bc5fddd051e0e33b8c2 Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Fri, 26 Nov 2021 12:13:26 +0100 +Subject: [PATCH] gcc2 fix + +--- + src/smooth/ftgrays.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c +index 86118fb..354ff7e 100644 +--- a/src/smooth/ftgrays.c ++++ b/src/smooth/ftgrays.c +@@ -1959,6 +1959,7 @@ typedef ptrdiff_t FT_PtrDist; + /* Initialize the null cell at the start of the `cells` array. */ + /* Note that this requires `ras.cell_free` initialization to skip */ + /* over the first entry in the array. */ ++{ + PCell null_cell = NULL_CELL_PTR( ras ); + null_cell->x = CELL_MAX_X_VALUE; + null_cell->area = 0; +@@ -2023,6 +2024,7 @@ typedef ptrdiff_t FT_PtrDist; + } + + return Smooth_Err_Ok; ++} + } + + +-- +2.30.2 + diff --git a/media-libs/freetype/patches/use-includedir.patchset b/media-libs/freetype/patches/use-includedir.patchset new file mode 100644 index 000000000..7773835f4 --- /dev/null +++ b/media-libs/freetype/patches/use-includedir.patchset @@ -0,0 +1,74 @@ +From dfbbabf282d5fe93b44fece1a21e8cfe68f81307 Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Fri, 26 Nov 2021 10:35:39 +0100 +Subject: [PATCH] Haiku: use includedir where possible + +switch to python3 +--- + builds/meson/extract_freetype_version.py | 2 +- + meson.build | 15 ++++++--------- + 2 files changed, 7 insertions(+), 10 deletions(-) + +diff --git a/builds/meson/extract_freetype_version.py b/builds/meson/extract_freetype_version.py +index ab79fdb..fa83e9d 100644 +--- a/builds/meson/extract_freetype_version.py ++++ b/builds/meson/extract_freetype_version.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # + # Copyright (C) 2020-2021 by + # David Turner, Robert Wilhelm, and Werner Lemberg. +diff --git a/meson.build b/meson.build +index 0eb780b..7c4ce3c 100644 +--- a/meson.build ++++ b/meson.build +@@ -59,7 +59,7 @@ ftmodule_h = custom_target('ftmodule.h', + command: [python_exe, files('builds/meson/parse_modules_cfg.py'), + '--format=ftmodule.h', '@INPUT@', '--output', '@OUTPUT@'], + install: true, +- install_dir: 'include/freetype2/freetype/config', ++ install_dir: get_option('includedir') + '/freetype2/freetype/config', + ) + ft2_sources = [ftmodule_h] + +@@ -303,7 +303,7 @@ ftoption_h = custom_target('ftoption.h', + output: 'ftoption.h', + command: ftoption_command, + install: true, +- install_dir: 'include/freetype2/freetype/config', ++ install_dir: get_option('includedir') + '/freetype2/freetype/config', + ) + ft2_sources += ftoption_h + ft2_defines += ['-DFT_CONFIG_OPTIONS_H='] +@@ -330,7 +330,7 @@ if use_unix_ftsystem_c + output: 'ftconfig.h', + command: ftconfig_command, + install: true, +- install_dir: 'include/freetype2/freetype/config', ++ install_dir: get_option('includedir') + '/freetype2/freetype/config', + ) + ft2_sources += ftconfig_h + ft2_defines += ['-DFT_CONFIG_CONFIG_H='] +@@ -357,15 +357,12 @@ freetype_dep = declare_dependency( + meson.override_dependency('freetype2', freetype_dep) + + +-# NOTE: Using both `install_dir` and `subdir` doesn't seem to work below, +-# i.e., the subdir value seems to be ignored, contrary to examples in the +-# Meson documentation. + install_headers('include/ft2build.h', +- install_dir: 'include/freetype2') ++ subdir: 'freetype2') + install_headers(ft2_public_headers, +- install_dir: 'include/freetype2/freetype') ++ subdir: 'freetype2/freetype') + install_headers(ft2_config_headers, +- install_dir: 'include/freetype2/freetype/config') ++ subdir: 'freetype2/freetype/config') + + + pkgconfig = import('pkgconfig') +-- +2.30.2 +