wok-current view midori/receipt @ rev 25650
Fix libwebkit gtk+ twice in dep, thanks Ceel
author | Stanislas Leduc <shann@slitaz.org> |
---|---|
date | Fri Feb 02 17:58:11 2024 +0000 (9 months ago) |
parents | a23978bfa665 |
children |
line source
1 # SliTaz package receipt.
3 PACKAGE="midori"
4 VERSION="0.5.11"
5 CATEGORY="network"
6 TAGS="web-browser"
7 SHORT_DESC="Lightweight web browser based on GTK+/WebKit"
8 MAINTAINER="pankso@slitaz.org"
9 LICENSE="LGPL2.1"
10 WEB_SITE="https://github.com/midori-browser/core"
12 TARBALL="$PACKAGE-$VERSION.tar.bz2"
13 WGET_URL="https://launchpad.net/$PACKAGE/trunk/$VERSION/+download/$TARBALL"
15 GENERIC_MENUS="no"
16 SUGGESTED="midori-lang"
17 DEPENDS="libnotify libunique libsoup webkit2gtk libxslt xorg-libXss \
18 libsoup248-gnome gcr-base harfbuzz-icu gst-plugins-base-1.0 libsecret \
19 mesa libegl-mesa libwebp"
20 BUILD_DEPENDS="glib-dev gtk+-dev gtk+3-dev libnotify-dev libsoup-dev \
21 libunique-dev webkit2gtk-dev libxslt-dev xorg-libXss-dev gcr-dev"
23 # Handle cross compilation
24 case "$ARCH" in
25 i?86)
26 BUILD_DEPENDS="$BUILD_DEPENDS cmake desktop-file-utils-extra
27 librsvg-apps python vala"
28 esac
30 current_version()
31 {
32 wget -O - https://github.com/midori-browser/core/releases 2>/dev/null | \
33 sed '/archive.*tar/!d;s|.*/v*\(.*\).tar.*|\1|;q'
34 }
36 # Rules to configure and make the package.
37 compile_rules()
38 {
39 # patch for vala >= 0.36
40 # see bugs.freebsd.org/bugzilla/show_bug.cgi?id=222015
41 patch -p1 < $stuff/midori-notebook.patch
42 patch -p1 < $stuff/midori-extensions-adblock.patch
43 patch -p1 < $stuff/midori-extensions-apps.patch
44 patch -p1 < $stuff/midori-extensions-history.patch
45 patch -p1 < $stuff/midori-extensions-notes.patch
46 patch -p1 < $stuff/midori-extensions-transfers.patch
48 # patch midori to avoid segmentfault
49 # see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=834236
50 patch -p1 < $stuff/midori-webkitgtk.patch
52 sed -i 's|[^\.]ListStore| Gtk.ListStore|' extensions/history-list.vala
53 sed -i 's|store.remove (iter)|store.remove (ref iter)|' extensions/transfers.vala
55 # patch for cmake
56 patch -p1 < $stuff/midori-cmake.patch
58 # Let's pkg-config found libsoup248
59 export PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/lib/libsoup248/pkgconfig"
61 # Fix build with new glib/gtk
62 find . -type f -regex '.*\.\(c\|vala\)' -exec sed -i \
63 's/Gtk.STOCK_FILE/"text-x-generic"/g;s/Gtk.STOCK_CLOSE/"window-close"/g;s/Gtk.STOCK_ADD/"list-add"/g;s/Gtk.STOCK_HELP/"help-browser"/g;s/Gtk.STOCK_APPLY/""/g;s/Gtk.STOCK_CANCEL/""/g;s/Gtk.STOCK_COPY/"edit-copy"/g;s/Gtk.STOCK_DELETE/"edit-delete"/g;s/Gtk.STOCK_EDIT/""/g;s/Gtk.STOCK_OPEN/"document-open"/g;s/Gtk.STOCK_PREFERENCES/"preferences-system"/g;s/Gtk.STOCK_PROPERTIES/"document-properties"/g;s/Gtk.STOCK_SAVE/"document-save"/g;s/Gtk.STOCK_CLEAR/"edit-clear"/g;s/Gtk.STOCK_DIRECTORY/"folder"/g' \
64 "{}" +;
66 mkdir -p build && cd build
67 cmake \
68 -DCMAKE_C_FLAGS:STRING="$CFLAGS" \
69 -DCMAKE_INSTALL_PREFIX=/usr \
70 -DCMAKE_INSTALL_LIBDIR=lib \
71 -DUSE_GTK3=OFF \
72 -DHALF_BRO_INCOM_WEBKIT2=ON \
73 -DUSE_ZEITGEIST=0 .. &&
74 #./configure \
75 # --prefix=/usr \
76 # --disable-zeitgeist &&
77 make &&
78 make install DESTDIR=$install
79 }
81 # Rules to gen a SliTaz package suitable for Tazpkg.
82 genpkg_rules()
83 {
84 mkdir -p $fs/usr/share/doc/midori
85 mkdir -p $fs/usr/share/pixmaps
87 cp -a $install/etc $fs
88 cp $stuff/config $fs/etc/xdg/midori
89 # add SliTaz token to DDG, add Twitter search
90 cd $fs
91 patch -p1 < $stuff/search.patch
92 status
94 # Midori use sqlite to store bookmarks
95 #cp $stuff/bookmarks.xbel $fs/etc/xdg/midori
97 cp -a $install/usr/bin $fs/usr
98 cp -a $install/usr/lib $fs/usr
100 # desktop files
101 cp -a $install/usr/share/applications $fs/usr/share
103 cp -a $install/usr/share/doc/midori/faq* $fs/usr/share/doc/midori
104 cp -a $install/usr/share/midori $fs/usr/share
106 # Icons
107 cp -a $install/usr/share/icons $fs/usr/share
108 rm -rf $fs/usr/share/icons/hicolor/scalable
109 }