From 14c4f680460e61a62f41e3fd91a3e330551f5ce3 Mon Sep 17 00:00:00 2001 From: hazen2215 Date: Sun, 13 Aug 2023 01:33:27 +0900 Subject: [PATCH] plplot: fix build on musl --- srcpkgs/plplot/template | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/srcpkgs/plplot/template b/srcpkgs/plplot/template index 221562823b6..67976037229 100644 --- a/srcpkgs/plplot/template +++ b/srcpkgs/plplot/template @@ -26,10 +26,6 @@ build_options="ada gen_tools" desc_option_ada="Enable Ada bindings" desc_option_gen_tools="Build files for host required during cross build" -if [ "$XBPS_TARGET_LIBC" = "musl" ]; then - broken="PTHREAD_MUTEX_RECURSIVE_NP" -fi - if ! [ "$CROSS_BUILD" ]; then build_options_default="gen_tools" fi @@ -46,6 +42,13 @@ post_patch() { vsed -i cmake/modules/tcl-related.cmake -e '/if(NOT PLPLOT_TK_VERSION)/ i set(PLPLOT_TK_VERSION ${PLPLOT_TCL_VERSION} CACHE STRING "Tk version found by wish")' } +post_configure() { + if [ "$XBPS_TARGET_LIBC" = musl ]; then + vsed -i build/plplot_config.h \ + -e '/PTHREAD_MUTEX_RECURSIVE_NP/s/_NP//' + fi +} + pre_build() { if ! [ "$build_option_gen_tools" ]; then ln -s /usr/lib/qsastime/deltaT-gen build/lib/qsastime