summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d8233802c8dd30c2c8959eb43a348e1085e43bd9 (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
70
71
72
# Maintainer: Carsten Haitzler <raster@rasterman.com>

# Performance note: If you want to run on Nvidia closed drivers in X11
# only then please remove the -Dwl=true line below in build().
# You will lose wayland support but it's not going to work well (with
# acceleration) on proprietary nvidia drivers anyway. If you don't
# disable this line and option then you'll find performance degreads in
# enlightenment.

_pkgname=enlightenment
pkgname=$_pkgname-git-asan
pkgver=0.24.0.beta1.24079.gd63f4a53e
pkgrel=1
pkgdesc="Enlightenment window manager - Development version - Asan debug build"
arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64')
url="http://www.enlightenment.org"
license=('BSD')
depends=('efl-git' 'udisks2' 'wayland' 'bluez-libs' 'libexif'
         'xorg-server-xwayland' 'bluez' 'pulseaudio' 'connman' 'bc')
makedepends=('git' 'meson' 'ninja' 'pkgconf' 'gcc' 'binutils' 'fakeroot' 'ccache')
optdepends=('acpid: power events on laptop lid close - almost essential for any ACPI based system like intel'
            'gdb: create backtraces on crash - needed for getting backtraces at crash time in ~/.e-crashdump.txt'
            'geoclue2: needed for geolocation module'
            'packagekit: needed for packagekit module'
            'ddcutil: from AUR needed for desktop monitor backlight etc. controls')
provides=("$_pkgname=$pkgver" $_pkgname-git=$pkgver 'notification-daemon')
conflicts=("$_pkgname" $_pkgname-git=$pkgver)
backup=('etc/enlightenment/sysactions.conf'
        'etc/xdg/menus/e-applications.menu')
options=('!strip' 'ccache')
source=("git+https://git.enlightenment.org/core/$_pkgname.git"
        "enlightenment_start")
sha256sums=('SKIP'
            'SKIP')

pkgver() {
  cd $_pkgname

  local v_ver=$(grep version meson.build | head -1 | sed s/version//g | tr ":'," "   " | awk '{print $1}' | tr "-" ".")

  printf "%s.%s.g%s" "$v_ver" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd $_pkgname

  export ASAN_OPTIONS="detect_leaks=0:abort_on_error=1::new_delete_type_mismatch=0"

  unset CPPFLAGS
  export CFLAGS="-O0 -g3"
  export CXXFLAGS="-O0 -g3"
  rm -rf build
  meson --prefix=/usr \
    -Db_sanitize=address \
    -Dwl=true \
    . build
  ninja -C build
}

package() {
  cd $_pkgname

  DESTDIR="$pkgdir" ninja -C build install

  install -Dm644 -t "$pkgdir/usr/share/doc/$_pkgname/" README
  install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname/" AUTHORS COPYING

  mv "$pkgdir/usr/bin/enlightenment_start" "$pkgdir/usr/bin/enlightenment_start_real"
  install -Dm755  -t "$pkgdir/usr/bin/" "$srcdir/enlightenment_start"
}

backup=(etc/enlightenment/{sysactions.conf,system.conf})