aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart Ribbers <bribbers@disroot.org>2020-05-01 15:56:08 +0200
committerRasmus Thomsen <oss@cogitri.dev>2020-05-04 10:32:09 +0000
commit133698cfe24319991b9ce8f5c571bcc5d8ec7b37 (patch)
treec892fa05980229fc67607487bec240dd6da619b8
parent1ecd82679913332ed94823aab160b0ad41f2c1df (diff)
downloadaports-133698cfe24319991b9ce8f5c571bcc5d8ec7b37.tar.gz
aports-133698cfe24319991b9ce8f5c571bcc5d8ec7b37.tar.bz2
aports-133698cfe24319991b9ce8f5c571bcc5d8ec7b37.tar.xz
testing/libresource: new aport
-rw-r--r--testing/libresource/APKBUILD39
-rw-r--r--testing/libresource/fix-pkgconfig-version.patch53
2 files changed, 92 insertions, 0 deletions
diff --git a/testing/libresource/APKBUILD b/testing/libresource/APKBUILD
new file mode 100644
index 0000000000..504be22f0c
--- /dev/null
+++ b/testing/libresource/APKBUILD
@@ -0,0 +1,39 @@
+# Contributor: Bart Ribbers <bribbers@disroot.org>
+# Maintainer: Bart Ribbers <bribbers@disroot.org>
+pkgname=libresource
+pkgver=0.23.2
+pkgrel=0
+pkgdesc="Nemo's libresource"
+url="https://git.sailfishos.org/mer-core/libresource"
+arch="all"
+license="LGPL-2.1-only"
+depends_dev="dbus-dev dbus-glib-dev check-dev"
+makedepends="$depends_dev automake autoconf libtool"
+subpackages="$pkgname-static $pkgname-dev"
+source="https://git.sailfishos.org/mer-core/libresource/-/archive/$pkgver/libresource-$pkgver.tar.gz
+ fix-pkgconfig-version.patch
+ "
+options="!check" # No suitable tests
+
+prepare() {
+ default_prepare
+
+ echo "$pkgver" > .tarball-version
+ ./autogen.sh
+}
+
+build() {
+ ./configure \
+ --prefix=/usr
+ make -j1 # For some reason it breaks otherwise
+}
+
+package() {
+ DESTDIR="$pkgdir" make install
+
+ # Remove tests
+ rm -rf "$pkgdir"/opt
+}
+
+sha512sums="c185d8a3e509004a9905ed02fb914a8ffcb45a68f9ccfe40ef4b6a19597877c23c7e3887b6df1b4269f080fede13265a22166060568e763b18947f509145ac19 libresource-0.23.2.tar.gz
+66fde0af9185b3e1f484db34040bb0929b6da1e89df050a99570286b194d12a42acd5dbf76fc5e1ba6fa8201640fff4d58098d23515152b366963f2b16761fa7 fix-pkgconfig-version.patch"
diff --git a/testing/libresource/fix-pkgconfig-version.patch b/testing/libresource/fix-pkgconfig-version.patch
new file mode 100644
index 0000000000..72594f6b77
--- /dev/null
+++ b/testing/libresource/fix-pkgconfig-version.patch
@@ -0,0 +1,53 @@
+Upstream merge-request: https://git.sailfishos.org/mer-core/libresource/merge_requests/5
+
+From 5d4625173c64dec352548f262159da33d8030b1a Mon Sep 17 00:00:00 2001
+From: Bart Ribbers <bribbers@disroot.org>
+Date: Wed, 25 Mar 2020 13:49:33 +0100
+Subject: [PATCH] Never run git commands when .tarball-version exists
+
+This makes it work in environments where the building takes place in a
+git repo, but libresource is still built from a release tarball
+---
+ build-aux/git-version-gen | 25 ++++++++++++++-----------
+ 1 file changed, 14 insertions(+), 11 deletions(-)
+
+diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen
+index 819fa04..7769787 100755
+--- a/build-aux/git-version-gen
++++ b/build-aux/git-version-gen
+@@ -129,18 +129,21 @@ fi
+
+ v=`echo "$v" |sed 's/^v//'`
+
+-# Don't declare a version "dirty" merely because a time stamp has changed.
+-git status > /dev/null 2>&1
++if [ ! -f $tarball_version_file ]
++then
++ # Don't declare a version "dirty" merely because a time stamp has changed.
++ git status > /dev/null 2>&1
+
+-dirty=`sh -c 'git diff-index --name-only HEAD' 2>/dev/null` || dirty=
+-case "$dirty" in
+- '') ;;
+- *) # Append the suffix only if there isn't one already.
+- case $v in
+- *-dirty) ;;
+- *) v="$v-dirty" ;;
+- esac ;;
+-esac
++ dirty=`sh -c 'git diff-index --name-only HEAD' 2>/dev/null` || dirty=
++ case "$dirty" in
++ '') ;;
++ *) # Append the suffix only if there isn't one already.
++ case $v in
++ *-dirty) ;;
++ *) v="$v-dirty" ;;
++ esac ;;
++ esac
++fi
+
+ # We default to 0.0.0 instead of UNKNOWN
+ if test "x$v" = "xUNKNOWN"; then
+--
+2.23.0
+