[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / graphics / MesaLib

Annotation of pkgsrc/graphics/MesaLib/Makefile, Revision 1.167

1.167   ! nia         1: # $NetBSD: Makefile,v 1.166 2019/09/09 01:00:49 nia Exp $
1.1       rh          2:
1.165     nia         3: DISTNAME=      mesa-19.1.6
1.100     tnn         4: PKGNAME=       ${DISTNAME:S/mesa/MesaLib/}
1.166     nia         5: PKGREVISION=   1
1.158     nia         6: CATEGORIES=    graphics
1.151     nia         7: MASTER_SITES=  https://mesa.freedesktop.org/archive/
1.100     tnn         8: EXTRACT_SUFX=  .tar.xz
1.99      tnn         9:
                     10: MAINTAINER=    pkgsrc-users@NetBSD.org
1.139     wiz        11: HOMEPAGE=      https://www.mesa3d.org/
1.150     nia        12: COMMENT=       Open source OpenGL implementation
1.100     tnn        13: LICENSE=       mit
1.57      bjs        14:
1.160     nia        15: USE_TOOLS+=    bison flex pkg-config xgettext
1.100     tnn        16: USE_LANGUAGES= c99 c++
                     17: USE_LIBTOOL=   yes
                     18:
                     19: PKGCONFIG_OVERRIDE+=   src/egl/main/egl.pc.in
                     20: PKGCONFIG_OVERRIDE+=   src/gallium/targets/d3dadapter9/d3d.pc.in
                     21: PKGCONFIG_OVERRIDE+=   src/gallium/targets/osmesa/osmesa.pc.in
                     22: PKGCONFIG_OVERRIDE+=   src/gallium/targets/xa/xatracker.pc.in
                     23: PKGCONFIG_OVERRIDE+=   src/gbm/main/gbm.pc.in
1.149     nia        24: PKGCONFIG_OVERRIDE+=   src/glx/windows/windowsdriproto.pc.in
1.100     tnn        25: PKGCONFIG_OVERRIDE+=   src/mapi/es1api/glesv1_cm.pc.in
                     26: PKGCONFIG_OVERRIDE+=   src/mapi/es2api/glesv2.pc.in
1.78      wiz        27: PKGCONFIG_OVERRIDE+=   src/mesa/drivers/dri/dri.pc.in
1.100     tnn        28: PKGCONFIG_OVERRIDE+=   src/mesa/drivers/osmesa/osmesa.pc.in
1.78      wiz        29: PKGCONFIG_OVERRIDE+=   src/mesa/gl.pc.in
1.91      richard    30:
1.152     nia        31: SUBST_CLASSES+=                py
                     32: SUBST_STAGE.py=                pre-configure
                     33: SUBST_MESSAGE.py=      Fixing Python binary name
                     34: SUBST_FILES.py+=       meson.build
                     35: SUBST_VARS.py+=                PYTHONBIN
                     36:
1.149     nia        37: CFLAGS.SunOS+=         -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS
                     38: CXXFLAGS.SunOS+=       -Drestrict=__restrict__
                     39: LDFLAGS.SunOS+=                -lsocket -lnsl
1.140     jperkin    40:
1.158     nia        41: # Some of these get appended in options.mk.
                     42: DRI_DRIVERS=           #
                     43: GALLIUM_DRIVERS=       swrast
                     44: VULKAN_DRIVERS=                #
                     45: MESA_PLATFORMS=                surfaceless
                     46:
1.100     tnn        47: .include "../../mk/bsd.prefs.mk"
1.99      tnn        48: .include "../../mk/compiler.mk"
1.57      bjs        49: .include "options.mk"
1.40      jlam       50:
1.158     nia        51: PLIST_SUBST+=  GLVER="1.2.0"
                     52:
                     53: # classic DRI drivers
                     54: PLIST_VARS+=           i915 i965 r100 r200 nouveau_dri
                     55:
                     56: # Gallium drivers
1.166     nia        57: PLIST_VARS+=           r300 svga nouveau vc4 lima panfrost
1.158     nia        58:
                     59: # other features
                     60: PLIST_VARS+=           egl gbm vaapi xatracker
                     61:
                     62: .if ${OPSYS} != "Darwin" && ${OPSYS} != "Cygwin"
                     63: .include "../../x11/libdrm/buildlink3.mk"
                     64: MESA_PLATFORMS+=       drm
                     65: .  if ${OPSYS} != "SunOS"
                     66: MESON_ARGS+=           -Degl=true
                     67: MESON_ARGS+=           -Dgbm=true
1.160     nia        68: MESON_ARGS+=           -Dgallium-xa=true
1.158     nia        69: PLIST.egl=             yes
                     70: PLIST.gbm=             yes
1.160     nia        71: PLIST.xatracker=       yes
1.158     nia        72: .  else
                     73: MESON_ARGS+=           -Degl=false
                     74: MESON_ARGS+=           -Dgbm=false
                     75: .  endif
                     76: .  include "../../multimedia/libva/available.mk"
                     77: .  if ${VAAPI_AVAILABLE} == "yes"
                     78: MESON_ARGS+=           -Dgallium-va=true
                     79: PLIST.vaapi=           yes
                     80: .    include "../../multimedia/libva/buildlink3.mk"
                     81: .  else
                     82: MESON_ARGS+=           -Dgallium-va=false
                     83: .  endif
1.166     nia        84: .  if !empty(MACHINE_ARCH:M*arm*) || \
                     85:       ${MACHINE_ARCH} == "aarch64"
1.158     nia        86: # ARM Mali Utgard
1.166     nia        87: GALLIUM_DRIVERS+=      lima
                     88: PLIST.lima=            yes
1.158     nia        89: # ARM Mali Midgard, Bifrost
1.166     nia        90: GALLIUM_DRIVERS+=      panfrost
                     91: PLIST.panfrost=                yes
1.158     nia        92: # Vivante GCxxx
                     93: #GALLIUM_DRIVERS+=     etnaviv
                     94: #PLIST.etnaviv=                yes
                     95: # Qualcomm Snapdragon
                     96: #GALLIUM_DRIVERS+=     freedreno
                     97: #PLIST.freedreno=      yes
                     98: # Broadcom VideoCore 4
                     99: GALLIUM_DRIVERS+=      vc4
                    100: PLIST.vc4=             yes
                    101: .  endif
                    102: .  if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
                    103: GALLIUM_DRIVERS+=      svga
                    104: DRI_DRIVERS+=          i915 i965
                    105: PLIST.svga=            yes
                    106: PLIST.i915=            yes
                    107: PLIST.i965=            yes
                    108: .  endif
                    109: # FreeBSD lacks nouveau support (there are official binaries from Nvidia)
                    110: .  if ${OPSYS} != "FreeBSD"
                    111: PLIST.nouveau=         yes
                    112: PLIST.nouveau_dri=     yes
                    113: GALLIUM_DRIVERS+=      nouveau
                    114: DRI_DRIVERS+=          nouveau
                    115: .  endif
                    116: .  if !empty(MACHINE_PLATFORM:MLinux-*-x86_64)
                    117: # qemu Linux guest driver
                    118: # XXX test this
                    119: #GALLIUM_DRIVERS+=     virgl
                    120: #PLIST.virgl=          yes
                    121: .  endif
                    122: # theoretically cross platform PCI drivers
                    123: .  if empty(MACHINE_PLATFORM:MNetBSD-*-*arm*) && \
                    124:       empty(MACHINE_PLATFORM:MNetBSD-*-mipsel)
                    125: DRI_DRIVERS+=          r100 r200
                    126: GALLIUM_DRIVERS+=      r300
                    127: PLIST.r100=            yes
                    128: PLIST.r200=            yes
                    129: PLIST.r300=            yes
                    130: .  endif
                    131: .else
                    132: MESON_ARGS+=           -Degl=false
                    133: MESON_ARGS+=           -Dgbm=false
                    134: .endif # ${OPSYS} != "Darwin" && ${OPSYS} != "Cygwin"
                    135:
                    136: MESON_ARGS+=   -Dgallium-drivers=${GALLIUM_DRIVERS:ts,}
                    137: MESON_ARGS+=   -Ddri-drivers=${DRI_DRIVERS:ts,}
                    138: MESON_ARGS+=   -Dvulkan-drivers=${VULKAN_DRIVERS:ts,}
                    139: MESON_ARGS+=   -Dplatforms=${MESA_PLATFORMS:ts,}
                    140:
1.138     joerg     141: .if ${MACHINE_ARCH} == "i386"
1.152     nia       142: MESON_ARGS+=   -Dglx-read-only-text=true
1.138     joerg     143: .endif
                    144:
1.158     nia       145: MESON_ARGS+=   -Dgles1=true
                    146: MESON_ARGS+=   -Dgles2=true
                    147: MESON_ARGS+=   -Dosmesa=gallium
1.152     nia       148: MESON_ARGS+=   -Dshared-glapi=true
1.158     nia       149: MESON_ARGS+=   -Dgallium-xvmc=false
1.99      tnn       150:
1.152     nia       151: CPPFLAGS+=     -DHAVE_NOATEXIT
1.155     nia       152: CPPFLAGS+=     -DSYSCONFDIR=${PKG_SYSCONFDIR}
1.86      joerg     153:
1.164     maya      154: # https://gitlab.freedesktop.org/mesa/mesa/merge_requests/1854
1.161     nia       155: BUILDLINK_TRANSFORM+=          rm:-Werror=return-type
1.163     maya      156:
                    157: # https://gitlab.freedesktop.org/mesa/mesa/merge_requests/1853
1.162     nia       158: BUILDLINK_TRANSFORM.SunOS+=    rm:-Wl,--build-id=sha1
1.154     nia       159:
1.149     nia       160: # Work around Xorg segfaulting in radeon driver due to wrong alloca being used
                    161: CFLAGS.NetBSD+=                -Dalloca=__builtin_alloca
                    162: CXXFLAGS.NetBSD+=      -Dalloca=__builtin_alloca
                    163:
1.152     nia       164: PYTHON_FOR_BUILD_ONLY= yes
1.158     nia       165:
                    166: TOOL_DEPENDS+=         ${PYPKGPREFIX}-mako-[0-9]*:../../devel/py-mako
                    167:
1.152     nia       168: # needed to build vulkan support
1.158     nia       169: TOOL_DEPENDS+=         ${PYPKGPREFIX}-cElementTree-[0-9]*:../../textproc/py-cElementTree
1.152     nia       170:
1.155     nia       171: # LLVM detection
                    172: TOOL_DEPENDS+=         ${PYPKGPREFIX}-meson>=0.51.1nb3:../../devel/py-meson
1.149     nia       173:
1.158     nia       174: EGDIR=         ${PREFIX}/share/examples/mesa
                    175:
                    176: OWN_DIRS=      ${PKG_SYSCONFDIR}/drirc.d
                    177: CONF_FILES+=   ${EGDIR}/00-mesa-defaults.conf \
                    178:                ${PKG_SYSCONFDIR}/drirc.d/00-mesa-defaults.conf
                    179:
1.149     nia       180: INSTALLATION_DIRS+=    ${EGDIR}
1.155     nia       181:
                    182: pre-configure:
                    183:        touch ${WRKSRC}/src/glx/apple_dummy.cpp
1.105     tnn       184:
                    185: post-install:
1.155     nia       186:        ${MV} ${DESTDIR}${PREFIX}/share/drirc.d/00-mesa-defaults.conf ${DESTDIR}${EGDIR}
1.153     nia       187:
1.152     nia       188: .include "../../devel/py-meson/build.mk"
1.149     nia       189: .include "../../devel/zlib/buildlink3.mk"
                    190: .include "../../textproc/expat/buildlink3.mk"
1.1       rh        191: .include "../../mk/bsd.pkg.mk"

CVSweb <webmaster@jp.NetBSD.org>