summaryrefslogtreecommitdiff
path: root/graphics/libepoxy/Makefile
blob: 30df96c2523b6dd892ec6dfc5b574f9c6f383534 (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
60
# $NetBSD: Makefile,v 1.18 2017/02/18 02:37:11 ryoon Exp $

DISTNAME=	libepoxy-1.4
CATEGORIES=	graphics
MASTER_SITES=	${MASTER_SITE_GITHUB:=anholt/}
GITHUB_TAG=	v${PKGVERSION_NOREV}

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	https://github.com/anholt/libepoxy/
COMMENT=	Library for OpenGL function pointer management
LICENSE=	mit

BUILD_DEPENDS+=	${PYPKGPREFIX}-expat>=0:../../textproc/py-expat

USE_LIBTOOL=		yes
USE_TOOLS+=		pkg-config autoconf autoreconf automake
GNU_CONFIGURE=		yes
PKGCONFIG_OVERRIDE+=	epoxy.pc.in
PYTHON_FOR_BUILD_ONLY=	yes

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

PLIST_VARS+=		egl glx

PKG_OPTIONS_VAR=	PKG_OPTIONS.libepoxy
PKG_SUPPORTED_OPTIONS=	x11
PKG_SUGGESTED_OPTIONS=	x11

.include "../../mk/bsd.options.mk"

.if !empty(PKG_OPTIONS:Mx11)
CONFIGURE_ARGS+=	--enable-glx=yes
PLIST.glx=	yes
.include "../../graphics/MesaLib/buildlink3.mk"
.include "../../x11/libX11/buildlink3.mk"
.  if ${OPSYS} == "Darwin"
CONFIGURE_ARGS+=	--enable-egl=yes
.    if ${X11_TYPE} == "modular"
CPPFLAGS+=	-DGLX_LIB=\"${PREFIX}/lib/libGL.dylib\"
.    endif
.  else # ! Darwin
CONFIGURE_ARGS+=	--enable-egl=${MESALIB_SUPPORTS_EGL}
.    if !empty(MESALIB_SUPPORTS_EGL:Myes)
PLIST.egl=	yes
.    endif
.  endif
.else # ! x11
CONFIGURE_ARGS+=	--enable-glx=no
CONFIGURE_ARGS+=	--enable-egl=no
.  if !(${OPSYS} == "Darwin" && ${X11_TYPE} == "native")
PKG_FAIL_REASON+=	"The x11 option must be enabled on this platform/configuration."
.  endif
.endif

pre-configure:
	cd ${WRKSRC} && autoreconf -vif

.include "../../lang/python/tool.mk"
.include "../../devel/xorg-util-macros/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"