Skip to content

Commit

Permalink
Do not require linking to threads directly
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkwouter authored and tpimh committed Mar 27, 2024
1 parent b29f4be commit 37bf9cd
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
15 changes: 12 additions & 3 deletions harfbuzz/PSPBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,24 @@ 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"
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() {
Expand All @@ -34,4 +43,4 @@ package() {

mkdir -m 755 -p "$pkgdir/psp/share/licenses/$pkgname"
install -m 644 ../COPYING "$pkgdir/psp/share/licenses/$pkgname"
}
}
14 changes: 14 additions & 0 deletions harfbuzz/fix-cmake.patch
Original file line number Diff line number Diff line change
@@ -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 ()

0 comments on commit 37bf9cd

Please sign in to comment.