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); diff --git a/harfbuzz/PSPBUILD b/harfbuzz/PSPBUILD new file mode 100644 index 00000000..5592a899 --- /dev/null +++ b/harfbuzz/PSPBUILD @@ -0,0 +1,46 @@ +pkgname=harfbuzz +pkgver=8.3.0 +pkgrel=1 +pkgdesc="OpenType text shaping engine" +arch=('mips') +url="https://harfbuzz.github.io/" +license=('MIT') +depends=('freetype2') +makedepends=() +optdepends=() +source=( + "https://github.com/harfbuzz/harfbuzz/releases/download/${pkgver}/harfbuzz-${pkgver}.tar.xz" + "fix-cmake.patch" +) +sha256sums=( + "109501eaeb8bde3eadb25fab4164e993fbace29c3d775bcaa1c1e58e2f15f847" + "9248557e549775ce9f3689bf271722bedab9bceba4cbc9ba452c68b652d31616" +) + +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 + + cd .. + patch -p1 < ../fix-cmake.patch +} + +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 \ + -DHB_HAVE_FREETYPE=ON "${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" +} 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 () 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; } }