On 2023/01/03 11:25:23 +0900, SASANO Takayoshi <u...@mx5.nisiq.net> wrote: > Hi, > > previous ports cannot support alsa-plugin due to libdl detection, > here is new ports with patch. (the patch is sent same as pull-request at > https://github.com/alsa-project/alsa-lib/pull/290 )
looked for curiosity; the patch for configure.ac can be simplified a bit: Index: configure.ac --- configure.ac.orig +++ configure.ac @@ -255,9 +255,8 @@ AC_ARG_WITH(libdl, [ have_libdl="$withval" ], [ have_libdl="yes" ]) HAVE_LIBDL= if test "$have_libdl" = "yes"; then - AC_CHECK_LIB([dl], [dlsym], [HAVE_LIBDL="yes"]) + AC_SEARCH_LIBS([dlsym], [dl], [HAVE_LIBDL="yes"]) if test "$HAVE_LIBDL" = "yes" ; then - ALSA_DEPLIBS="$ALSA_DEPLIBS -ldl" AC_DEFINE([HAVE_LIBDL], 1, [Have libdl]) fi else AC_SEARCH_LIBS tries first to see if the functions are provided in libc and if not tries with the list of libraries provided (`dl' in this case.) It works equally well for linux and the BSDs. (on linux "-ldl" is automatically added to LIBS and handled by automake, and so ALSA_DEPLIBS is not needed at all.) (from a quick look upstream could switch also the other checks to AC_SEARCH_LIBS and drop ALSA_DEPLIBS entirely. the only place I'm not sure is when looking for clock_gettime in -lrt) I'd add a comment before NO_TESTS since there seem to be a regress suite, but does not compile. There are two places in src/pcm/pcm.c where it prints a time_t as it were `long': pcm.c:2357:6: warning: format specifies type 'long' but the argument has type 'time_t' (aka 'long long') [-Wformat] status->trigger_tstamp.tv_sec, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ pcm.c:2360:3: warning: format specifies type 'long' but the argument has type 'time_t' (aka 'long long') [-Wformat] status->tstamp.tv_sec, status->tstamp.tv_nsec / 1000); ^~~~~~~~~~~~~~~~~~~~~ 2 warnings generated. could be patched to cast the time_t to `long long' and using the "%lld" format. No mean to test it. Is it required by other ports for compatibility? Port looks fine to me anyawy.