summaryrefslogtreecommitdiff
path: root/packages/media-libs/imlib2/imlib2-1.5.1.exheres-0
blob: 8a67593baa16a5259dd287a2c611ad518b3cac36 (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
61
62
63
64
65
66
67
68
69
# Copyright 2008 Richard Brown
# Distributed under the terms of the GNU General Public License v2
# Based in part upon 'imlib2-1.4.0.ebuild' from Gentoo, which is:
#     Copyright 1999-2008 Gentoo Foundation

SUMMARY="Image Processing Library"
HOMEPAGE="https://docs.enlightenment.org/api/${PN}/html/pages.html"
DOWNLOADS="mirror://sourceforge/enlightenment/${PNV}.tar.bz2"

LICENCES="${PN}"
SLOT="0"
PLATFORMS="~amd64 ~x86"
MYOPTIONS="
    tiff
    X
    ( platform: amd64 x86 )
    ( providers: ijg-jpeg jpeg-turbo ) [[ number-selected = exactly-one ]]
    ( x86_cpu_features: mmx )
"

DEPENDENCIES="
    build:
        virtual/pkg-config
        X? (
            x11-proto/xorgproto
        )
    build+run:
        app-arch/bzip2
        media-libs/freetype:=
        media-libs/giflib:=
        media-libs/libpng:=
        sys-libs/zlib
        providers:ijg-jpeg? ( media-libs/jpeg:= )
        providers:jpeg-turbo? ( media-libs/libjpeg-turbo )
        tiff? ( media-libs/tiff )
        X? (
            x11-libs/libX11
            x11-libs/libxcb[>=1.9]
            x11-libs/libXext
        )
"

src_configure() {
    local myconf=()

    myconf+=(
        --enable-visibility-hiding
        --disable-static
        --with-bzip2
        --with-gif
        --with-jpeg
        --with-png
        --with-zlib
        --without-id3
        $(option_with tiff)
        $(option_with X x)
        $(option_with X x-shm-fd)
        $(option_enable platform:amd64)
    )

    if [[ $(exhost --target) == x86_64-pc-linux-gnu ]] ; then
        myconf+=( --enable-mmx )
    elif [[ $(exhost --target) == i686-pc-linux-gnu ]] ; then
        myconf+=( option_with x86_cpu_features:mmx )
    fi

    econf "${myconf[@]}"
}