aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2020-12-12 15:49:11 -0300
committerLeo <thinkabit.ukim@gmail.com>2020-12-12 15:49:49 -0300
commitfcd0627b4c2c87e937d396477ab4f8f9e0fac87a (patch)
tree90a68283fed02d5500cbdb81d9ff43bc73044b95
parent41e4fa8d6edefe688555e9b74e00fec0aa287989 (diff)
downloadaports-fcd0627b4c2c87e937d396477ab4f8f9e0fac87a.tar.gz
aports-fcd0627b4c2c87e937d396477ab4f8f9e0fac87a.tar.bz2
aports-fcd0627b4c2c87e937d396477ab4f8f9e0fac87a.tar.xz
community/midori: fix build
-rw-r--r--community/midori/APKBUILD31
-rw-r--r--community/midori/disable-valac-fatal-warnings.patch29
2 files changed, 45 insertions, 15 deletions
diff --git a/community/midori/APKBUILD b/community/midori/APKBUILD
index 6c7d47522b..5c280bf85e 100644
--- a/community/midori/APKBUILD
+++ b/community/midori/APKBUILD
@@ -1,8 +1,8 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=midori
pkgver=9.0
-pkgrel=2
-pkgdesc="A lightweight web browser based on Gtk WebKit"
+pkgrel=3
+pkgdesc="lightweight web browser based on Gtk WebKit"
url="https://www.midori-browser.org"
arch="all !s390x !mips !mips64" # librsvg
license="LGPL-2.1-or-later"
@@ -11,28 +11,29 @@ makedepends="cmake librsvg-dev paxmark python3 vala gtk+3.0-dev gcr-dev
ninja"
subpackages="$pkgname-lang $pkgname-doc"
options="!check" # unable to check
-source="https://github.com/midori-browser/core/releases/download/v$pkgver/midori-v$pkgver.tar.gz"
-builddir="$srcdir/$pkgname-v$pkgver/build"
-
-prepare() {
- default_prepare
- mkdir "$builddir"
-}
+source="https://github.com/midori-browser/core/releases/download/v$pkgver/midori-v$pkgver.tar.gz
+ disable-valac-fatal-warnings.patch
+ "
+builddir="$srcdir/$pkgname-v$pkgver"
build() {
- cmake \
+ if [ "$CBUILD" != "$CHOST" ]; then
+ CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
+ fi
+ cmake -B build \
+ -GNinja \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_C_FLAGS="$CFLAGS -fPIC -w" \
-DVALA_CFLAGS="$CFLAGS -fPIC -w" \
- -G Ninja \
- ..
- ninja
+ $CMAKE_CROSSOPTS
+ ninja -C build
}
package() {
- DESTDIR="$pkgdir" ninja install
+ DESTDIR="$pkgdir" ninja -C build install
}
-sha512sums="0cc28643593f53c47b453838152dcbe35a9a287bff38bda830844eb8f321a4f48c99b21e16a9b07bebdd0abc936d88fd759c3222a36325aa667a28ae00148be3 midori-v9.0.tar.gz"
+sha512sums="0cc28643593f53c47b453838152dcbe35a9a287bff38bda830844eb8f321a4f48c99b21e16a9b07bebdd0abc936d88fd759c3222a36325aa667a28ae00148be3 midori-v9.0.tar.gz
+a85ba606a0edcdc438b65d8526ec80b21c7e328db4812ac9cfa5a75883d612b9e212d0dc30a9a9ced85d382df6df96a74043790aa4bb722f74cf5e198849cdf3 disable-valac-fatal-warnings.patch"
diff --git a/community/midori/disable-valac-fatal-warnings.patch b/community/midori/disable-valac-fatal-warnings.patch
new file mode 100644
index 0000000000..2b5db0597c
--- /dev/null
+++ b/community/midori/disable-valac-fatal-warnings.patch
@@ -0,0 +1,29 @@
+Not applicable upstream
+
+not everything is inside a git repository
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8e72f08..a7c5c23 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -11,18 +11,8 @@ set(PROJECT_BUGS https://github.com/midori-browser/core/issues)
+ set(PROJECT_WEBSITE https://www.midori-browser.org)
+ set(CORE_VERSION 9.0)
+
+-execute_process(COMMAND "git" "describe" "--tags"
+- OUTPUT_VARIABLE REVISION
+- ERROR_QUIET
+- OUTPUT_STRIP_TRAILING_WHITESPACE)
+-if (REVISION)
+- set(CORE_VERSION "${REVISION}")
+- # All warnings are errors in development builds
+- set(VALAFLAGS ${VALAFLAGS} --fatal-warnings)
+-else ()
+- # No runtime type checks
+- set(VALAFLAGS ${VALAFLAGS} --disable-assert)
+-endif ()
++# No runtime type checks
++set(VALAFLAGS ${VALAFLAGS} --disable-assert)
+
+ list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
+ # Disallow building during install to avoid permission problems