pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/x11/modular-xorg-server modular-xorg-server: Simplify ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/71d9f3f6557d
branches:  trunk
changeset: 771626:71d9f3f6557d
user:      nia <nia%pkgsrc.org@localhost>
date:      Mon Dec 20 07:29:09 2021 +0000

description:
modular-xorg-server: Simplify builtin.mk: use the pkg-config file.

diffstat:

 x11/modular-xorg-server/builtin.mk |  77 ++++++++-----------------------------
 1 files changed, 17 insertions(+), 60 deletions(-)

diffs (89 lines):

diff -r af6990af1b2e -r 71d9f3f6557d x11/modular-xorg-server/builtin.mk
--- a/x11/modular-xorg-server/builtin.mk        Mon Dec 20 07:19:42 2021 +0000
+++ b/x11/modular-xorg-server/builtin.mk        Mon Dec 20 07:29:09 2021 +0000
@@ -1,68 +1,25 @@
-# $NetBSD: builtin.mk,v 1.2 2021/12/03 13:44:01 ryoon Exp $
+# $NetBSD: builtin.mk,v 1.3 2021/12/20 07:29:09 nia Exp $
+
+.include "../../mk/bsd.fast.prefs.mk"
 
 BUILTIN_PKG:=  modular-xorg-server
 
-BUILTIN_FIND_FILES_VAR:=       XORG_SERVER
-BUILTIN_FIND_FILES.XORG_SERVER=        ${X11BASE}/bin/Xorg
-
-.include "../../mk/buildlink3/bsd.builtin.mk"
+PKGCONFIG_FILE.modular-xorg-server=    ${X11BASE}/lib/pkgconfig/xorg-server.pc
+PKGCONFIG_BASE.modular-xorg-server=    ${X11BASE}
 
-###
-### Determine if there is a built-in implementation of the package and
-### set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
-###
-.if !defined(IS_BUILTIN.modular-xorg-server)
-.  if empty(XORG_SERVER:M__nonexistent__)
-IS_BUILTIN.modular-xorg-server=        yes
-.  else
-IS_BUILTIN.modular-xorg-server=        no
-.  endif
-.endif
-MAKEVARS+=             IS_BUILTIN.modular-xorg-server
+.include "../../mk/buildlink3/pkgconfig-builtin.mk"
 
 ###
-### 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.modular-xorg-server) && \
-    !empty(IS_BUILTIN.modular-xorg-server:M[yY][eE][sS]) && \
-    empty(XORG_SERVER:M__nonexistent__)
-
-# we're more worried about existence, rather than actual version
-BUILTIN_VERSION.modular-xorg-server=   1.20.13
-BUILTIN_PKG.modular-xorg-server=       modular-xorg-server-${BUILTIN_VERSION.modular-xorg-server}
-.endif
-MAKEVARS+=             BUILTIN_PKG.modular-xorg-server
-
-###
-### Determine whether we should use the built-in implementation if it
-### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no").
+### The section below only applies if we are not including this file
+### solely to determine whether a built-in implementation exists.
 ###
-.if !defined(USE_BUILTIN.modular-xorg-server)
-.  if ${PREFER.modular-xorg-server} == "pkgsrc"
-USE_BUILTIN.modular-xorg-server=       no
-.  else
-USE_BUILTIN.modular-xorg-server=       ${IS_BUILTIN.modular-xorg-server}
-.    if defined(BUILTIN_PKG.modular-xorg-server) && \
-        !empty(IS_BUILTIN.modular-xorg-server:M[yY][eE][sS])
-USE_BUILTIN.modular-xorg-server=       yes
-.      for _dep_ in ${BUILDLINK_API_DEPENDS.modular-xorg-server}
-.        if !empty(USE_BUILTIN.modular-xorg-server:M[yY][eE][sS])
-USE_BUILTIN.modular-xorg-server!=                                                      \
-       if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.modular-xorg-server:Q}; then \
-               ${ECHO} yes;                                            \
-       else                                                            \
-               ${ECHO} no;                                             \
-       fi
-.        endif
-.      endfor
-.    endif
-.  endif  # PREFER.modular-xorg-server
-.endif
+
+CHECK_BUILTIN.modular-xorg-server?=            no
+.if !empty(CHECK_BUILTIN.modular-xorg-server:M[nN][oO])
 
-# Now set up the appropriate prefix for modular-xorg-server
-.if !empty(USE_BUILTIN.modular-xorg-server:M[yY][eE][sS])
-XORG_SERVERBASE=               ${X11BASE}
-.else
-XORG_SERVERBASE=               ${PREFIX}
-.endif
+.  if !empty(USE_BUILTIN.modular-xorg-server:M[yY][eE][sS])
+BUILDLINK_PREFIX.modular-xorg-server=  ${X11BASE}
+BUILDLINK_FILES.modular-xorg-server+=  lib/pkgconfig/xorg-server.pc
+.  endif
+
+.endif  # CHECK_BUILTIN.modular-xorg-server



Home | Main Index | Thread Index | Old Index