summaryrefslogtreecommitdiff
path: root/packages/x11-dri/primus/primus-scm.exheres-0
blob: 62c7267644ed4732a87eedd4b3562d4ff73d4108 (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
# Copyright 2013 Johannes Nixdorf <mixi@exherbo.org>
# Distributed under the terms of the GNU General Public License v2

require github [ user="amonakov" ] easy-multibuild

SUMMARY="A library for low-overhead local-only client-side OpenGL offloading via GLX forking, similar to VirtualGL"

LICENCES="ISC"
SLOT="0"
PLATFORMS="~amd64"
MYOPTIONS="
    multibuild_c:
        32 64
"

DEPENDENCIES="
    build+run:
        x11-libs/libX11[multibuild_c:*(-)?]
    run:
        x11-dri/mesa[multibuild_c:*(-)?]
        x11-drivers/nvidia-drivers[multibuild_c:*(-)?]
"

BUGS_TO="mixi@exherbo.org"

src_prepare() {
    edo sed -e "s!^PRIMUS_libGL=.*!PRIMUS_libGL='/usr/\$LIB/primus/'!" \
        -i primusrun
}

compile_one_multibuild() {
    pushd "${WORK}"

    emake \
        BUMBLEBEE_SOCKET=/run/bumblebee.socket \
        LIBDIR="${WORKBASE}/${MULTIBUILD_CLASS}/${MULTIBUILD_TARGET}" \
        PRIMUS_libGLa=/usr/${LIBDIR}/libGL/libGL-nvidia.so \
        PRIMUS_libGLd=/usr/${LIBDIR}/libGL/libGL-xorg.so

    popd
}

install_one_multibuild() {
    exeinto /usr/${LIBDIR}/primus/
    doexe libGL.so.1
}

src_install() {
    easy-multibuild_src_install

    dobin primusrun
}