aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2020-05-23 06:09:45 -0300
committerLeo <thinkabit.ukim@gmail.com>2020-05-23 11:41:01 +0000
commit0b5b0f6b00d269b47bbfa133543d76bc006d447c (patch)
tree41a73f8cbfe7b73d656dc9d5e47a529a8ddf0059
parent4f0ab3eaccbebec1bb0836afb994e2ec98e6efa2 (diff)
downloadaports-0b5b0f6b00d269b47bbfa133543d76bc006d447c.tar.gz
aports-0b5b0f6b00d269b47bbfa133543d76bc006d447c.tar.bz2
aports-0b5b0f6b00d269b47bbfa133543d76bc006d447c.tar.xz
community/qjson: modernize
-rw-r--r--community/qjson/APKBUILD23
1 files changed, 10 insertions, 13 deletions
diff --git a/community/qjson/APKBUILD b/community/qjson/APKBUILD
index 8c30b8eee5..bc9ab5030e 100644
--- a/community/qjson/APKBUILD
+++ b/community/qjson/APKBUILD
@@ -9,24 +9,21 @@ arch="all"
license="LGPL-2.1-or-later"
makedepends="qt5-qtbase-dev cmake"
subpackages="$pkgname-dev"
-source="$pkgname-$pkgver.tar.gz::https://github.com/flavio/$pkgname/archive/$pkgver.tar.gz"
-
-prepare() {
- cd "$builddir"
- mkdir -p "$builddir"/build
-}
+source="$pkgname-$pkgver.tar.gz::https://github.com/flavio/qjson/archive/$pkgver.tar.gz"
build() {
- cd "$builddir"/build
- cmake -DCMAKE_INSTALL_PREFIX=/usr \
- -DCMAKE_BUILD_TYPE=None \
- "$builddir"
- make
+ if [ "$CBUILD" != "$CHOST" ]; then
+ CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
+ fi
+ cmake -B build \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=None \
+ . $CMAKE_CROSSOPTS
+ make -C build
}
package() {
- cd "$builddir"/build
- make DESTDIR="$pkgdir" install
+ make -C build DESTDIR="$pkgdir" install
}
sha512sums="ff0674f32abc6c88f9c535a58931f60baafa355655b043009a2574dadb822f10ec25017b78f2911f897a554a34733d7332c94cf4290dec16a631e22070c15e61 qjson-0.9.0.tar.gz"