plplot: fix build on musl

This commit is contained in:
hazen2215 2023-08-13 01:33:27 +09:00 committed by Chocimier
parent 0d108c98a6
commit 14c4f68046
1 changed files with 7 additions and 4 deletions

View File

@ -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