summaryrefslogtreecommitdiff
path: root/x11/libXvMC/builtin.mk
blob: 1336d11d1986c33694239a4709a8066ff9550cae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# $NetBSD: builtin.mk,v 1.1 2011/01/19 17:50:48 tron Exp $

.include "../../mk/bsd.fast.prefs.mk"

BUILTIN_PKG:=	libXvMC

BUILTIN_FIND_FILES_VAR:=	PC_LIBXVMC LIB_XVMCW
BUILTIN_FIND_FILES.PC_LIBXVMC=	${X11BASE}/lib/pkgconfig/xvmc.pc
.if ${_OPSYS_SHLIB_TYPE} == "dylib"
BUILTIN_FIND_FILES.LIB_XVMCW=	${X11BASE}/lib/libXvMCW.dylib
.else
BUILTIN_FIND_FILES.LIB_XVMCW=	${X11BASE}/lib/libXvMCW.so
.endif

.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 ${X11BASE} == ${LOCALBASE}
IS_BUILTIN.libXvMC=	no
.elif !defined(IS_BUILTIN.libXvMC)
IS_BUILTIN.libXvMC=	no
.  if empty(PC_LIBXVMC:M__nonexistent__) && \
      empty(LIB_XVMCW:M__nonexistent__)
IS_BUILTIN.libXvMC=	yes
.  endif
.endif
MAKEVARS+=	IS_BUILTIN.libXvMC

###
### 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.libXvMC)
.  if ${PREFER.libXvMC} == "pkgsrc"
USE_BUILTIN.libXvMC=	no
.  else
USE_BUILTIN.libXvMC=	${IS_BUILTIN.libXvMC}
.    if defined(BUILTIN_PKG.libXvMC) && \
        !empty(IS_BUILTIN.libXvMC:M[yY][eE][sS])
USE_BUILTIN.libXvMC=	yes
.      for _dep_ in ${BUILDLINK_API_DEPENDS.libXvMC}
.        if !empty(USE_BUILTIN.libXvMC:M[yY][eE][sS])
USE_BUILTIN.libXvMC!=							\
	if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.libXvMC:Q}; then \
		${ECHO} yes;						\
	else								\
		${ECHO} no;						\
	fi
.        endif
.      endfor
.    endif
.  endif  # PREFER.libXvMC
.endif
MAKEVARS+=	USE_BUILTIN.libXvMC

.include "../../mk/x11.builtin.mk"