hdf5 and hdf5-c++: fix up the threads option

Explicitly disable the hl interface of hdf5 with threads, removing
files from PLIST, and also preventing support for the C++ interface.

That is also why we won't enable threads by default anytime soon.
It is a specific option needed for some users. The jury is still out
if the threadsafe option or the C++ API has less users.

Not incrementing PKGREVISION, as build of hdf5-c++ with threads option
was broken anyway, as was PLIST of hdf5. Default builds without threads
are unaffected.
This commit is contained in:
thor 2022-07-22 14:50:32 +00:00
parent 156004e8ab
commit 4f6ee77b07
3 changed files with 47 additions and 48 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.8 2021/06/07 11:52:48 adam Exp $
# $NetBSD: Makefile,v 1.9 2022/07/22 14:50:33 thor Exp $
PKGNAME= ${DISTNAME:S/-/-c++-/}
COMMENT= Hierarchical Data Format (new generation) - C++ wrappers
@ -34,12 +34,8 @@ do-install:
# same options should be passed:
.include "../../devel/hdf5/options.mk"
#.if !empty(PKG_BUILD_OPTIONS.hdf5:Mszip)
#CONFIGURE_ARGS+= --with-szlib
#.endif
#.if !empty(PKG_BUILD_OPTIONS.hdf5:Mthreads)
#CONFIGURE_ARGS+= --enable-threadsafe
#.endif
.if !empty(PKG_OPTIONS:Mthreads)
PKG_FAIL_REASON= "Threadsafe HDF5 with C++ interface is unsupported."
.endif
.include "../../mk/bsd.pkg.mk"

View file

@ -1,6 +1,6 @@
@comment $NetBSD: PLIST,v 1.29 2021/06/07 11:52:48 adam Exp $
bin/gif2h5
bin/h52gif
@comment $NetBSD: PLIST,v 1.30 2022/07/22 14:50:32 thor Exp $
${PLIST.hl}bin/gif2h5
${PLIST.hl}bin/h52gif
bin/h5cc
bin/h5clear
bin/h5copy
@ -18,14 +18,14 @@ bin/h5repack
bin/h5repart
bin/h5stat
bin/h5unjam
bin/h5watch
${PLIST.hl}bin/h5watch
bin/mirror_server
bin/mirror_server_stop
include/H5ACpublic.h
include/H5Apublic.h
include/H5Cpublic.h
include/H5DOpublic.h
include/H5DSpublic.h
${PLIST.hl}include/H5DOpublic.h
${PLIST.hl}include/H5DSpublic.h
include/H5Dpublic.h
include/H5Epubgen.h
include/H5Epublic.h
@ -46,20 +46,20 @@ include/H5FDstdio.h
include/H5FDwindows.h
include/H5Fpublic.h
include/H5Gpublic.h
include/H5IMpublic.h
${PLIST.hl}include/H5IMpublic.h
include/H5Ipublic.h
include/H5LDpublic.h
include/H5LTpublic.h
${PLIST.hl}include/H5LDpublic.h
${PLIST.hl}include/H5LTpublic.h
include/H5Lpublic.h
include/H5MMpublic.h
include/H5Opublic.h
include/H5PLextern.h
include/H5PLpublic.h
include/H5PTpublic.h
${PLIST.hl}include/H5PTpublic.h
include/H5Ppublic.h
include/H5Rpublic.h
include/H5Spublic.h
include/H5TBpublic.h
${PLIST.hl}include/H5TBpublic.h
include/H5Tpublic.h
include/H5Zpublic.h
include/H5api_adpt.h
@ -68,10 +68,10 @@ include/H5pubconf.h
include/H5public.h
include/H5version.h
include/hdf5.h
include/hdf5_hl.h
${PLIST.hl}include/hdf5_hl.h
lib/libhdf5.la
lib/libhdf5.settings
lib/libhdf5_hl.la
${PLIST.hl}lib/libhdf5_hl.la
share/doc/hdf5/COPYING
share/doc/hdf5/HISTORY-1_0-1_8_0_rc3.txt
share/doc/hdf5/HISTORY-1_10.txt
@ -114,28 +114,28 @@ share/examples/hdf5/c/h5_vds.c
share/examples/hdf5/c/h5_write.c
share/examples/hdf5/c/ph5example.c
share/examples/hdf5/c/run-c-ex.sh
share/examples/hdf5/hl/c/ex_ds1.c
share/examples/hdf5/hl/c/ex_image1.c
share/examples/hdf5/hl/c/ex_image2.c
share/examples/hdf5/hl/c/ex_lite1.c
share/examples/hdf5/hl/c/ex_lite2.c
share/examples/hdf5/hl/c/ex_lite3.c
share/examples/hdf5/hl/c/ex_table_01.c
share/examples/hdf5/hl/c/ex_table_02.c
share/examples/hdf5/hl/c/ex_table_03.c
share/examples/hdf5/hl/c/ex_table_04.c
share/examples/hdf5/hl/c/ex_table_05.c
share/examples/hdf5/hl/c/ex_table_06.c
share/examples/hdf5/hl/c/ex_table_07.c
share/examples/hdf5/hl/c/ex_table_08.c
share/examples/hdf5/hl/c/ex_table_09.c
share/examples/hdf5/hl/c/ex_table_10.c
share/examples/hdf5/hl/c/ex_table_11.c
share/examples/hdf5/hl/c/ex_table_12.c
share/examples/hdf5/hl/c/image24pixel.txt
share/examples/hdf5/hl/c/image8.txt
share/examples/hdf5/hl/c/pal_rgb.h
share/examples/hdf5/hl/c/ptExampleFL.c
share/examples/hdf5/hl/c/run-hlc-ex.sh
share/examples/hdf5/hl/run-hl-ex.sh
${PLIST.hl}share/examples/hdf5/hl/c/ex_ds1.c
${PLIST.hl}share/examples/hdf5/hl/c/ex_image1.c
${PLIST.hl}share/examples/hdf5/hl/c/ex_image2.c
${PLIST.hl}share/examples/hdf5/hl/c/ex_lite1.c
${PLIST.hl}share/examples/hdf5/hl/c/ex_lite2.c
${PLIST.hl}share/examples/hdf5/hl/c/ex_lite3.c
${PLIST.hl}share/examples/hdf5/hl/c/ex_table_01.c
${PLIST.hl}share/examples/hdf5/hl/c/ex_table_02.c
${PLIST.hl}share/examples/hdf5/hl/c/ex_table_03.c
${PLIST.hl}share/examples/hdf5/hl/c/ex_table_04.c
${PLIST.hl}share/examples/hdf5/hl/c/ex_table_05.c
${PLIST.hl}share/examples/hdf5/hl/c/ex_table_06.c
${PLIST.hl}share/examples/hdf5/hl/c/ex_table_07.c
${PLIST.hl}share/examples/hdf5/hl/c/ex_table_08.c
${PLIST.hl}share/examples/hdf5/hl/c/ex_table_09.c
${PLIST.hl}share/examples/hdf5/hl/c/ex_table_10.c
${PLIST.hl}share/examples/hdf5/hl/c/ex_table_11.c
${PLIST.hl}share/examples/hdf5/hl/c/ex_table_12.c
${PLIST.hl}share/examples/hdf5/hl/c/image24pixel.txt
${PLIST.hl}share/examples/hdf5/hl/c/image8.txt
${PLIST.hl}share/examples/hdf5/hl/c/pal_rgb.h
${PLIST.hl}share/examples/hdf5/hl/c/ptExampleFL.c
${PLIST.hl}share/examples/hdf5/hl/c/run-hlc-ex.sh
${PLIST.hl}share/examples/hdf5/hl/run-hl-ex.sh
share/examples/hdf5/run-all-ex.sh

View file

@ -1,4 +1,4 @@
# $NetBSD: options.mk,v 1.9 2019/11/03 10:39:13 rillig Exp $
# $NetBSD: options.mk,v 1.10 2022/07/22 14:50:32 thor Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.hdf5
PKG_SUPPORTED_OPTIONS= szip threads
@ -11,8 +11,11 @@ CONFIGURE_ARGS+= --with-szlib
.include "../../archivers/libaec/buildlink3.mk"
.endif
# Threadsafe API is incompatible with high-level and C++ APIs.
PLIST_VARS+= hl
.if !empty(PKG_OPTIONS:Mthreads)
CONFIGURE_ARGS+= --enable-threadsafe
# XXX libraries should not be linked against -lpthread
CONFIGURE_ARGS+= --enable-threadsafe --disable-hl
.include "../../mk/pthread.buildlink3.mk"
.else
PLIST.hl= yes
.endif