pkgsrc-Changes archive

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

CVS commit: pkgsrc/meta-pkgs/modular-xorg-drivers



Module Name:    pkgsrc
Committed By:   nia
Date:           Thu Dec  2 17:40:40 UTC 2021

Added Files:
        pkgsrc/meta-pkgs/modular-xorg-drivers: builtin-common.mk

Log Message:
modular-xorg-drivers: Add a common builtin.mk fragment


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/meta-pkgs/modular-xorg-drivers/builtin-common.mk

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

Added files:

Index: pkgsrc/meta-pkgs/modular-xorg-drivers/builtin-common.mk
diff -u /dev/null pkgsrc/meta-pkgs/modular-xorg-drivers/builtin-common.mk:1.1
--- /dev/null   Thu Dec  2 17:40:40 2021
+++ pkgsrc/meta-pkgs/modular-xorg-drivers/builtin-common.mk     Thu Dec  2 17:40:40 2021
@@ -0,0 +1,63 @@
+# $NetBSD: builtin-common.mk,v 1.1 2021/12/02 17:40:40 nia Exp $
+
+BUILTIN_PKG:=  ${X11_BUILTIN_NAME}
+
+BUILTIN_FIND_FILES_VAR:=               ${X11_DRV_NAME:tu}
+BUILTIN_FIND_FILES.${X11_DRV_NAME:tu}= ${X11BASE}/lib/modules/drivers/${X11_DRV_NAME}.so
+BUILTIN_FIND_FILES.${X11_DRV_NAME:tu}+=        ${X11BASE}/lib/xorg/modules/drivers/${X11_DRV_NAME}.so
+
+.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.${X11_BUILTIN_NAME})
+.  if empty(${X11_DRV_NAME:tu}:M__nonexistent__)
+IS_BUILTIN.${X11_BUILTIN_NAME}=        yes
+.  else
+IS_BUILTIN.${X11_BUILTIN_NAME}=        no
+.  endif
+.endif
+MAKEVARS+=             IS_BUILTIN.${X11_BUILTIN_NAME}
+
+###
+### If there is a built-in implementation, then set BUILTIN_PKG.<pkg> to
+### a package name to represent the built-in package.
+###
+.if !defined(BUILTIN_PKG.${X11_BUILTIN_NAME}) && \
+    !empty(IS_BUILTIN.${X11_BUILTIN_NAME}:M[yY][eE][sS]) && \
+    empty(${X11_DRV_NAME:tu}:M__nonexistent__)
+
+# we're more worried about existence, rather than actual version
+BUILTIN_VERSION.${X11_BUILTIN_NAME}=   0
+
+BUILTIN_PKG.${X11_BUILTIN_NAME}=       ${X11_BUILTIN_NAME}-${BUILTIN_VERSION.${X11_BUILTIN_NAME}}
+.endif
+MAKEVARS+=             BUILTIN_PKG.${X11_BUILTIN_NAME}
+
+###
+### Determine whether we should use the built-in implementation if it
+### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no").
+###
+.if !defined(USE_BUILTIN.${X11_BUILTIN_NAME})
+.  if ${PREFER.${X11_BUILTIN_NAME}} == "pkgsrc"
+USE_BUILTIN.${X11_BUILTIN_NAME}=       no
+.  else
+USE_BUILTIN.${X11_BUILTIN_NAME}=       ${IS_BUILTIN.${X11_BUILTIN_NAME}}
+.    if defined(BUILTIN_PKG.${X11_BUILTIN_NAME}) && \
+        !empty(IS_BUILTIN.${X11_BUILTIN_NAME}:M[yY][eE][sS])
+USE_BUILTIN.${X11_BUILTIN_NAME}=       yes
+.      for _dep_ in ${BUILDLINK_API_DEPENDS.${X11_BUILTIN_NAME}}
+.        if !empty(USE_BUILTIN.${X11_BUILTIN_NAME}:M[yY][eE][sS])
+USE_BUILTIN.${X11_BUILTIN_NAME}!=                                              \
+       if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.${X11_BUILTIN_NAME}:Q}; then \
+               ${ECHO} yes;                                            \
+       else                                                            \
+               ${ECHO} no;                                             \
+       fi
+.        endif
+.      endfor
+.    endif
+.  endif  # PREFER.${X11_BUILTIN_NAME}
+.endif



Home | Main Index | Thread Index | Old Index