pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/audio/sndio



Module Name:    pkgsrc
Committed By:   vins
Date:           Sun Dec 14 13:41:23 UTC 2025

Added Files:
        pkgsrc/audio/sndio: builtin.mk

Log Message:
audio/sndio: add builtin.mk


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/audio/sndio/builtin.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: pkgsrc/audio/sndio/builtin.mk
diff -u /dev/null pkgsrc/audio/sndio/builtin.mk:1.1
--- /dev/null   Sun Dec 14 13:41:23 2025
+++ pkgsrc/audio/sndio/builtin.mk       Sun Dec 14 13:41:22 2025
@@ -0,0 +1,52 @@
+# $NetBSD: builtin.mk,v 1.1 2025/12/14 13:41:22 vins Exp $
+
+BUILTIN_PKG:=  sndio
+
+BUILTIN_FIND_LIBS:=            sndio
+BUILTIN_FIND_HEADERS_VAR:=     H_SNDIO
+
+BUILTIN_FIND_HEADERS.H_SNDIO=  sndio.h
+BUILTIN_FIND_GREP.H_SNDIO=     \#define[       ]*_SNDIO_H
+
+.include "../../mk/buildlink3/bsd.builtin.mk"
+
+###
+### Determine if there is a built-in implementation of the package and
+### set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
+###
+.if !defined(IS_BUILTIN.sndio)
+IS_BUILTIN.sndio=      no
+.  if empty(H_SNDIO:M__nonexistent__) && \
+       !empty(BUILTIN_LIB_FOUND.sndio:M[yY][eE][sS])
+IS_BUILTIN.sndio=      yes
+.  else
+IS_BUILTIN.sndio=      no
+.  endif
+.endif
+MAKEVARS+=     IS_BUILTIN.sndio
+
+###
+### Determine whether we should use the built-in implementation.
+###
+.if !defined(USE_BUILTIN.sndio)
+.  if ${PREFER.sndio} == "pkgsrc"
+USE_BUILTIN.sndio=     no
+.  else
+USE_BUILTIN.sndio=     ${IS_BUILTIN.sndio}
+.    if defined(BUILTIN_PKG.sndio) && \
+        ${IS_BUILTIN.sndio:tl} == yes
+USE_BUILTIN.sndio=     yes
+.      for _dep_ in ${BUILDLINK_API_DEPENDS.sndio}
+.        if ${USE_BUILTIN.sndio:tl} == yes
+USE_BUILTIN.sndio!=                                                    \
+       if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.sndio}; then    \
+               ${ECHO} yes;                                            \
+       else                                                            \
+               ${ECHO} no;                                             \
+       fi
+.        endif
+.      endfor
+.    endif
+.  endif               # PREFER.sndio
+.endif
+MAKEVARS+=             USE_BUILTIN.sndio



Home | Main Index | Thread Index | Old Index