freetype: bump version

This commit is contained in:
Jerome Duval
2021-11-26 12:57:22 +01:00
parent e0dfeb481d
commit 174ffffb67
4 changed files with 152 additions and 35 deletions

View File

@@ -5,10 +5,14 @@ output (glyph images) of most vector and bitmap font formats."
HOMEPAGE="https://www.freetype.org/" HOMEPAGE="https://www.freetype.org/"
COPYRIGHT="1996-2018 David Turner, Robert Wilhelm, Werner Lemberg, et al." COPYRIGHT="1996-2018 David Turner, Robert Wilhelm, Werner Lemberg, et al."
LICENSE="FreeType" LICENSE="FreeType"
REVISION="3" REVISION="1"
SOURCE_URI="https://download.savannah.gnu.org/releases/freetype/freetype-$portVersion.tar.xz" SOURCE_URI="https://download.savannah.gnu.org/releases/freetype/freetype-$portVersion.tar.xz"
CHECKSUM_SHA256="86a854d8905b19698bbc8f23b860bc104246ce4854dcea8e3b0fb21284f75784" CHECKSUM_SHA256="8bee39bd3968c4804b70614a0a3ad597299ad0e824bc8aad5ce8aaf48067bde7"
PATCHES="enable-validation-modules.patchset" PATCHES="
enable-validation-modules.patchset
use-includedir.patchset
gcc2-buildfix.patchset
"
#PATCHES="freetype-subpixel.patchset" # enable patented subpixel rendering #PATCHES="freetype-subpixel.patchset" # enable patented subpixel rendering
ARCHITECTURES="all" ARCHITECTURES="all"
@@ -16,7 +20,7 @@ SECONDARY_ARCHITECTURES="x86_gcc2 x86"
PROVIDES=" PROVIDES="
freetype$secondaryArchSuffix = $portVersion freetype$secondaryArchSuffix = $portVersion
lib:libfreetype$secondaryArchSuffix = 6.17.4 compat >= 6 lib:libfreetype$secondaryArchSuffix = 6.18.0 compat >= 6
" "
REQUIRES=" REQUIRES="
haiku$secondaryArchSuffix haiku$secondaryArchSuffix
@@ -30,11 +34,9 @@ if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then
" "
fi fi
PROVIDES_devel=" PROVIDES_devel="
freetype${secondaryArchSuffix}_devel = $portVersion freetype${secondaryArchSuffix}_devel = $portVersion
cmd:freetype_config${secondaryArchSuffix} = $portVersion devel:libfreetype${secondaryArchSuffix} = 6.18.0 compat >= 6
devel:libfreetype${secondaryArchSuffix} = 6.17.4 compat >= 6
" "
REQUIRES_devel=" REQUIRES_devel="
freetype${secondaryArchSuffix} == $portVersion base freetype${secondaryArchSuffix} == $portVersion base
@@ -60,32 +62,35 @@ if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then
" "
fi fi
BUILD_PREREQUIRES=" BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:automake
cmd:gcc$secondaryArchSuffix cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix cmd:ld$secondaryArchSuffix
cmd:libtoolize$secondaryArchSuffix >= 2.4.2 cmd:meson
cmd:make
cmd:pkg_config$secondaryArchSuffix cmd:pkg_config$secondaryArchSuffix
cmd:which cmd:python3
" "
defineDebugInfoPackage freetype$secondaryArchSuffix \ defineDebugInfoPackage freetype$secondaryArchSuffix \
$libDir/libfreetype.so.6.17.4 $libDir/libfreetype.so.6.18.0
BUILD() BUILD()
{ {
./autogen.sh unset meson
runConfigure ./configure --enable-freetype-config meson setup build . --buildtype release \
make $jobArgs --prefix $prefix \
--bindir $binDir \
--datadir $dataDir \
--includedir $includeDir \
--libdir $libDir \
--default-library shared
meson compile -C build $jobArgs
} }
INSTALL() INSTALL()
{ {
make install unset meson
meson install -C build
rm $libDir/libfreetype.la install -Dt $dataRootDir/aclocal -m644 builds/unix/freetype2.m4
prepareInstalledDevelLibs libfreetype prepareInstalledDevelLibs libfreetype
fixPkgconfig fixPkgconfig
@@ -100,7 +105,6 @@ INSTALL()
# devel package # devel package
packageEntries devel \ packageEntries devel \
$binDir \
$dataRootDir/aclocal \ $dataRootDir/aclocal \
$developDir $developDir
} }

View File

@@ -7,9 +7,13 @@ COPYRIGHT="1996-2018 David Turner, Robert Wilhelm, Werner Lemberg, et al."
LICENSE="FreeType" LICENSE="FreeType"
REVISION="1" REVISION="1"
SOURCE_URI="https://download.savannah.gnu.org/releases/freetype/freetype-$portVersion.tar.xz" SOURCE_URI="https://download.savannah.gnu.org/releases/freetype/freetype-$portVersion.tar.xz"
CHECKSUM_SHA256="86a854d8905b19698bbc8f23b860bc104246ce4854dcea8e3b0fb21284f75784" CHECKSUM_SHA256="8bee39bd3968c4804b70614a0a3ad597299ad0e824bc8aad5ce8aaf48067bde7"
SOURCE_DIR="freetype-$portVersion" 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 #PATCHES="freetype-subpixel.patchset" # enable patented subpixel rendering
ARCHITECTURES="all" ARCHITECTURES="all"
@@ -17,8 +21,7 @@ SECONDARY_ARCHITECTURES="x86_gcc2 x86"
PROVIDES=" PROVIDES="
freetype_bootstrap$secondaryArchSuffix = $portVersion freetype_bootstrap$secondaryArchSuffix = $portVersion
cmd:freetype_config${secondaryArchSuffix} = $portVersion devel:libfreetype${secondaryArchSuffix} = 6.18.0 compat >= 6
devel:libfreetype${secondaryArchSuffix} = 6.17.4 compat >= 6
" "
REQUIRES=" REQUIRES="
haiku$secondaryArchSuffix haiku$secondaryArchSuffix
@@ -40,28 +43,32 @@ BUILD_REQUIRES="
devel:libz$secondaryArchSuffix devel:libz$secondaryArchSuffix
" "
BUILD_PREREQUIRES=" BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:automake
cmd:gcc$secondaryArchSuffix cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix cmd:ld$secondaryArchSuffix
cmd:libtoolize$secondaryArchSuffix >= 2.4.2 cmd:meson
cmd:make cmd:pkg_config$secondaryArchSuffix
cmd:which cmd:python3
" "
BUILD() BUILD()
{ {
./autogen.sh unset meson
runConfigure ./configure --enable-freetype-config meson setup build . --buildtype release \
make $jobArgs --prefix $prefix \
--bindir $binDir \
--datadir $dataDir \
--includedir $includeDir \
--libdir $libDir \
--default-library shared
meson compile -C build $jobArgs
} }
INSTALL() 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 prepareInstalledDevelLibs libfreetype
fixPkgconfig fixPkgconfig

View File

@@ -0,0 +1,32 @@
From 037ec5401d0a598c8a208bc5fddd051e0e33b8c2 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
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

View File

@@ -0,0 +1,74 @@
From dfbbabf282d5fe93b44fece1a21e8cfe68f81307 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
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=<ftoption.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=<ftconfig.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