Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified)) by mollari.NetBSD.org (Postfix) with ESMTPS id 03B301A9239 for ; Thu, 2 Dec 2021 17:40:42 +0000 (UTC) Received: by mail.netbsd.org (Postfix, from userid 605) id 1D04D84F06; Thu, 2 Dec 2021 17:40:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 57D8F84ED2 for ; Thu, 2 Dec 2021 17:40:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id SFAHQ90KgDcT for ; Thu, 2 Dec 2021 17:40:40 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id C283A84DA9 for ; Thu, 2 Dec 2021 17:40:40 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id BC01CFAEC; Thu, 2 Dec 2021 17:40:40 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_163846684074380" MIME-Version: 1.0 Date: Thu, 2 Dec 2021 17:40:40 +0000 From: "Nia Alarie" Subject: CVS commit: pkgsrc/meta-pkgs/modular-xorg-drivers To: pkgsrc-changes@NetBSD.org Reply-To: nia@netbsd.org X-Mailer: log_accum Message-Id: <20211202174040.BC01CFAEC@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_163846684074380 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" 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. --_----------=_163846684074380 Content-Disposition: inline Content-Length: 2553 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii 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. 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. 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. 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 --_----------=_163846684074380--