summaryrefslogtreecommitdiff
path: root/packages/net-www/midori/midori-0.5.11-r3.exheres-0
blob: d64a38f15d9383389253cf20ea0393d938fefed7 (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
# Copyright 2009 Elias Pipping <elias@pipping.org>
# Copyright 2017 Rasmus Thomsen <Rasmus.thomsen@protonmail.com>
# Distributed under the terms of the GNU General Public License v2

require midori

PLATFORMS="~amd64 ~x86"

src_prepare() {
    cmake_src_prepare

    # Fix build with vala >=0.34
    edo sed -e 's/protected Tally/public Tally/g' \
        -i midori/midori-notebook.vala
    edo sed -e 's/%d other files/%u other files/g' \
        -i extensions/transfers.vala

    for f in transfers adblock/widgets apps history-list notes; do
    sed -e 's/.remove (iter/.remove (ref iter/g' \
        -i "extensions/$f.vala"
    done

    # Fix installation of addons
    edo sed -e "s:usr:usr/$(exhost --target):" \
        -i config/CMakeLists.txt
}

src_install() {
    cmake_src_install

    # Fix the installation location of .desktop files
    # This should be handeled by patching cmake files,
    # but upstream is pretty much dead, so this will do.
    edo mv "${IMAGE}"usr/$(exhost --target)/share/* "${IMAGE}"usr/share/
    edo rmdir "${IMAGE}"usr/$(exhost --target)/share/
}