From 11470772f3e36b8db98f16ec198fd59149995523 Mon Sep 17 00:00:00 2001 From: Dima Pulkinen Date: Sun, 25 Feb 2024 16:29:00 +0200 Subject: [PATCH 1/6] add harfbuzz library --- harfbuzz/PSPBUILD | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 harfbuzz/PSPBUILD diff --git a/harfbuzz/PSPBUILD b/harfbuzz/PSPBUILD new file mode 100644 index 00000000..7667a72b --- /dev/null +++ b/harfbuzz/PSPBUILD @@ -0,0 +1,37 @@ +pkgname=harfbuzz +pkgver=8.3.0 +pkgrel=1 +pkgdesc="OpenType text shaping engine" +arch=('mips') +url="https://harfbuzz.github.io/" +license=('MIT') +depends=() +makedepends=() +optdepends=() +source=("https://github.com/harfbuzz/harfbuzz/releases/download/${pkgver}/harfbuzz-${pkgver}.tar.xz") +sha256sums=('109501eaeb8bde3eadb25fab4164e993fbace29c3d775bcaa1c1e58e2f15f847') + +prepare() { + cd "harfbuzz-${pkgver}/src" + sed -i 's#@prefix@#${PSPDEV}/psp#' harfbuzz*.pc.in + sed -i 's#@exec_prefix@#${prefix}#' harfbuzz*.pc.in + sed -i 's#@libdir@#${prefix}/lib#' harfbuzz*.pc.in + sed -i 's#@includedir@#${prefix}/include#' harfbuzz*.pc.in +} + +build() { + cd "harfbuzz-${pkgver}" + mkdir -p build + cd build + cmake -Wno-dev -DCMAKE_TOOLCHAIN_FILE=$PSPDEV/psp/share/pspdev.cmake -DCMAKE_INSTALL_PREFIX=${pkgdir}/psp -DBUILD_SHARED_LIBS=OFF \ + "${XTRA_OPTS[@]}" .. || { exit 1; } + make --quiet $MAKEFLAGS || { exit 1; } +} + +package() { + cd "harfbuzz-${pkgver}/build" + make --quiet $MAKEFLAGS install + + mkdir -m 755 -p "$pkgdir/psp/share/licenses/$pkgname" + install -m 644 ../COPYING "$pkgdir/psp/share/licenses/$pkgname" +} \ No newline at end of file From f456f6730a7eadcd284267e032f59e9b4e1c93a5 Mon Sep 17 00:00:00 2001 From: Dima Pulkinen Date: Sun, 25 Feb 2024 16:59:30 +0200 Subject: [PATCH 2/6] add freetype2 dependency to harfbuzz --- harfbuzz/PSPBUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/harfbuzz/PSPBUILD b/harfbuzz/PSPBUILD index 7667a72b..563a5ab8 100644 --- a/harfbuzz/PSPBUILD +++ b/harfbuzz/PSPBUILD @@ -5,7 +5,7 @@ pkgdesc="OpenType text shaping engine" arch=('mips') url="https://harfbuzz.github.io/" license=('MIT') -depends=() +depends=('freetype2') makedepends=() optdepends=() source=("https://github.com/harfbuzz/harfbuzz/releases/download/${pkgver}/harfbuzz-${pkgver}.tar.xz") @@ -24,7 +24,7 @@ build() { mkdir -p build cd build cmake -Wno-dev -DCMAKE_TOOLCHAIN_FILE=$PSPDEV/psp/share/pspdev.cmake -DCMAKE_INSTALL_PREFIX=${pkgdir}/psp -DBUILD_SHARED_LIBS=OFF \ - "${XTRA_OPTS[@]}" .. || { exit 1; } + -DHB_HAVE_FREETYPE=ON "${XTRA_OPTS[@]}" .. || { exit 1; } make --quiet $MAKEFLAGS || { exit 1; } } From c6075363d60a64814eb05ba1b3a236105ff1a499 Mon Sep 17 00:00:00 2001 From: Dima Pulkinen Date: Sun, 3 Mar 2024 15:08:53 +0000 Subject: [PATCH 3/6] fix patching pkgconfig pc files --- harfbuzz/PSPBUILD | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/harfbuzz/PSPBUILD b/harfbuzz/PSPBUILD index 563a5ab8..20f03ce8 100644 --- a/harfbuzz/PSPBUILD +++ b/harfbuzz/PSPBUILD @@ -13,10 +13,10 @@ sha256sums=('109501eaeb8bde3eadb25fab4164e993fbace29c3d775bcaa1c1e58e2f15f847') prepare() { cd "harfbuzz-${pkgver}/src" - sed -i 's#@prefix@#${PSPDEV}/psp#' harfbuzz*.pc.in - sed -i 's#@exec_prefix@#${prefix}#' harfbuzz*.pc.in - sed -i 's#@libdir@#${prefix}/lib#' harfbuzz*.pc.in - sed -i 's#@includedir@#${prefix}/include#' harfbuzz*.pc.in + sed -i 's#%prefix%#${PSPDEV}/psp#' harfbuzz*.pc.in + sed -i 's#%exec_prefix%#${prefix}#' harfbuzz*.pc.in + sed -i 's#%libdir%#${prefix}/lib#' harfbuzz*.pc.in + sed -i 's#%includedir%#${prefix}/include#' harfbuzz*.pc.in } build() { From a87aa4dff8264e18656941fb42bc9798d4a735a7 Mon Sep 17 00:00:00 2001 From: Wouter Wijsman Date: Mon, 18 Mar 2024 23:08:22 +0100 Subject: [PATCH 4/6] Do not require linking to threads directly --- harfbuzz/PSPBUILD | 15 ++++++++++++--- harfbuzz/fix-cmake.patch | 14 ++++++++++++++ 2 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 harfbuzz/fix-cmake.patch diff --git a/harfbuzz/PSPBUILD b/harfbuzz/PSPBUILD index 20f03ce8..5592a899 100644 --- a/harfbuzz/PSPBUILD +++ b/harfbuzz/PSPBUILD @@ -8,8 +8,14 @@ license=('MIT') depends=('freetype2') makedepends=() optdepends=() -source=("https://github.com/harfbuzz/harfbuzz/releases/download/${pkgver}/harfbuzz-${pkgver}.tar.xz") -sha256sums=('109501eaeb8bde3eadb25fab4164e993fbace29c3d775bcaa1c1e58e2f15f847') +source=( + "https://github.com/harfbuzz/harfbuzz/releases/download/${pkgver}/harfbuzz-${pkgver}.tar.xz" + "fix-cmake.patch" +) +sha256sums=( + "109501eaeb8bde3eadb25fab4164e993fbace29c3d775bcaa1c1e58e2f15f847" + "9248557e549775ce9f3689bf271722bedab9bceba4cbc9ba452c68b652d31616" +) prepare() { cd "harfbuzz-${pkgver}/src" @@ -17,6 +23,9 @@ prepare() { sed -i 's#%exec_prefix%#${prefix}#' harfbuzz*.pc.in sed -i 's#%libdir%#${prefix}/lib#' harfbuzz*.pc.in sed -i 's#%includedir%#${prefix}/include#' harfbuzz*.pc.in + + cd .. + patch -p1 < ../fix-cmake.patch } build() { @@ -34,4 +43,4 @@ package() { mkdir -m 755 -p "$pkgdir/psp/share/licenses/$pkgname" install -m 644 ../COPYING "$pkgdir/psp/share/licenses/$pkgname" -} \ No newline at end of file +} diff --git a/harfbuzz/fix-cmake.patch b/harfbuzz/fix-cmake.patch new file mode 100644 index 00000000..7744e0c2 --- /dev/null +++ b/harfbuzz/fix-cmake.patch @@ -0,0 +1,14 @@ +diff -ruN original/CMakeLists.txt new/CMakeLists.txt +--- original/CMakeLists.txt 2023-11-11 15:08:45.000000000 +0100 ++++ new/CMakeLists.txt 2024-03-18 22:57:40.191313381 +0100 +@@ -116,7 +116,9 @@ + find_package(Threads) + if (CMAKE_USE_PTHREADS_INIT) + add_definitions("-DHAVE_PTHREAD") +- list(APPEND THIRD_PARTY_LIBS Threads::Threads) ++ if (NOT PSP) ++ list(APPEND THIRD_PARTY_LIBS Threads::Threads) ++ endif() + list(APPEND PC_LIBS_PRIV -pthread) + endif () + endif () From b420b71e18dada86415ed83657b1a31f9fbe1f54 Mon Sep 17 00:00:00 2001 From: Dima Pulkinen Date: Tue, 26 Mar 2024 14:42:47 +0200 Subject: [PATCH 5/6] add harfbuzz instead of freetype2 as a dependedncy to sdl2-ttf --- sdl2-ttf/PSPBUILD | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sdl2-ttf/PSPBUILD b/sdl2-ttf/PSPBUILD index 477862cd..15fe06cd 100644 --- a/sdl2-ttf/PSPBUILD +++ b/sdl2-ttf/PSPBUILD @@ -1,11 +1,11 @@ pkgname=sdl2-ttf pkgver=2.20.2 -pkgrel=1 +pkgrel=2 pkgdesc="a companion library to SDL2 for working with TrueType (tm) fonts" arch=('mips') url="https://www.libsdl.org/projects/SDL_ttf/" license=('MIT') -depends=('sdl2' 'freetype2') +depends=('sdl2' 'harfbuzz') makedepends=() optdepends=() source=( @@ -35,8 +35,8 @@ build() { mkdir -p build cd build cmake -Wno-dev -DCMAKE_TOOLCHAIN_FILE="${PSPDEV}/psp/share/pspdev.cmake" -DCMAKE_INSTALL_PREFIX=/psp \ - -DBUILD_SHARED_LIBS=OFF -DSDL2TTF_SAMPLES=OFF -DSDL2TTF_VENDORED=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=OFF \ - -DSDL2TTF_INSTALL=ON "${XTRA_OPTS[@]}" .. || { exit 1; } + -DSDL2TTF_HARFBUZZ=ON -DBUILD_SHARED_LIBS=OFF -DSDL2TTF_SAMPLES=OFF -DSDL2TTF_VENDORED=OFF \ + -DCMAKE_POSITION_INDEPENDENT_CODE=OFF -DSDL2TTF_INSTALL=ON "${XTRA_OPTS[@]}" .. || { exit 1; } make --quiet $MAKEFLAGS || { exit 1; } } From 8461ae7ae5c4643743c50da8a329a8d2f5adaabe Mon Sep 17 00:00:00 2001 From: Dima Pulkinen Date: Mon, 15 Apr 2024 13:26:06 +0300 Subject: [PATCH 6/6] prevent adding one dependency twice --- create-matrix.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/create-matrix.js b/create-matrix.js index 7761306f..b0c90d20 100644 --- a/create-matrix.js +++ b/create-matrix.js @@ -87,7 +87,7 @@ directories.forEach(library => { let info = library; const deps = []; dependencies.forEach((dependency) => { - if (dependant.get(dependency)) + if (dependant.get(dependency) && !deps.includes(dependency)) deps.push(dependency); }); deps.forEach(dependency => info = dependency + " " + info);