summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorbartus2019-09-12 15:25:29 +0200
committerbartus2019-09-12 15:25:29 +0200
commit1a74f2d7b67d247fbf4c08365acc573ffbd58e80 (patch)
treec87d6381d370bbf39eebbd44fb27acc76c2c5e2d
parent431ef3b5bdc0ce3dea64443d44cf35f0086e052e (diff)
downloadaur-1a74f2d7b67d247fbf4c08365acc573ffbd58e80.tar.gz
Pop babl dependency, add update.PKGBUILD script.
update.PKGBUILD probe meson.build file for dependency versions.
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD4
-rw-r--r--PKGBUILD.in63
-rwxr-xr-xupdate.PKGBUILD29
4 files changed, 97 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c65eb63c7b34..b9431f117658 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = gegl-git
pkgdesc = Graph based image processing framework
- pkgver = 0.4.17.r9777.171eec611
+ pkgver = 0.4.17.r9789.66e49574b
pkgrel = 1
url = https://www.gegl.org
arch = i686
@@ -21,7 +21,7 @@ pkgbase = gegl-git
makedepends = libtiff
makedepends = suitesparse
makedepends = gobject-introspection
- depends = babl>=0.1.71
+ depends = babl>=0.1.72
depends = libspiro
depends = json-glib
optdepends = openexr: for using the openexr plugin
@@ -32,7 +32,7 @@ pkgbase = gegl-git
optdepends = libraw: raw plugin
optdepends = suitesparse: matting-levin plugin
optdepends = lua: lua plugin
- provides = gegl=0.4.17.r9777.171eec611
+ provides = gegl=0.4.17.r9789.66e49574b
conflicts = gegl
options = !libtool
source = git+https://gitlab.gnome.org/GNOME/gegl.git
diff --git a/PKGBUILD b/PKGBUILD
index b1368e11de0d..55637d52b541 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,13 +9,13 @@
_pkgname=gegl
pkgname="${_pkgname}-git"
-pkgver=0.4.17.r9777.171eec611
+pkgver=0.4.17.r9789.66e49574b
pkgrel=1
pkgdesc="Graph based image processing framework"
arch=('i686' 'x86_64')
url="https://www.gegl.org"
license=('GPL3' 'LGPL3')
-depends=('babl>=0.1.71' 'libspiro' 'json-glib')
+depends=('babl>=0.1.72' 'libspiro' 'json-glib')
makedepends=('git' 'meson' 'intltool' 'python2' 'ruby' 'lua'
'libraw' 'openexr' 'ffmpeg' 'librsvg' 'jasper'
'libtiff' 'suitesparse' 'gobject-introspection')
diff --git a/PKGBUILD.in b/PKGBUILD.in
new file mode 100644
index 000000000000..173fc9c358a8
--- /dev/null
+++ b/PKGBUILD.in
@@ -0,0 +1,63 @@
+# Maintainer : bartus <arch-user-repoᘓbartus.33mail.com>
+# shellcheck disable=SC2034
+
+# Contributor: Filipe Laíns (FFY00) <lains@archlinux.org>
+# Contributor: Iru Cai <mytbk920423@gmail.com>
+# Contributor: Alexander Hunziker <alex.hunziker@gmail.com>
+# Contributor: Alessio Biancalana <dottorblaster@gmail.com>
+# Contributor: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
+
+_pkgname=gegl
+pkgname="${_pkgname}-git"
+pkgver=0.4.17.r9777.171eec611
+pkgrel=1
+pkgdesc="Graph based image processing framework"
+arch=('i686' 'x86_64')
+url="https://www.gegl.org"
+license=('GPL3' 'LGPL3')
+depends=('babl>=@_babl_version@' 'libspiro' 'json-glib')
+makedepends=('git' 'meson' 'intltool' 'python2' 'ruby' 'lua'
+ 'libraw' 'openexr' 'ffmpeg' 'librsvg' 'jasper'
+ 'libtiff' 'suitesparse' 'gobject-introspection')
+optdepends=('openexr: for using the openexr plugin'
+ 'ffmpeg: for using the ffmpeg plugin'
+ 'librsvg: for using the svg plugin'
+ 'libtiff: tiff plugin'
+ 'jasper: for using the jasper plugin'
+ 'libraw: raw plugin'
+ 'suitesparse: matting-levin plugin'
+ 'lua: lua plugin')
+provides=("gegl=$pkgver")
+conflicts=('gegl')
+options=(!libtool)
+source=('git+https://gitlab.gnome.org/GNOME/gegl.git')
+sha512sums=('SKIP')
+
+prepare() {
+ mkdir "${srcdir}/build" -p
+
+ meson "${srcdir}/${_pkgname}"\
+ "${srcdir}/build" \
+ --prefix=/usr \
+ -Dworkshop=true
+}
+
+
+pkgver() {
+ cd ${srcdir}/${_pkgname}
+ printf "%d.%d.%d.r%s.%s" \
+ $(grep -Po '^#define GEGL_MAJOR_VERSION \K[0-9]*$' ${srcdir}/build/config.h) \
+ $(grep -Po '^#define GEGL_MINOR_VERSION \K[0-9]*$' ${srcdir}/build/config.h) \
+ $(grep -Po '^#define GEGL_MICRO_VERSION \K[0-9]*$' ${srcdir}/build/config.h) \
+ $(git rev-list --count HEAD) \
+ $(git rev-parse --short HEAD)
+}
+
+build() {
+ ninja -C "${srcdir}/build"
+}
+
+package() {
+ DESTDIR="${pkgdir}" ninja -C "${srcdir}/build" install
+}
+
diff --git a/update.PKGBUILD b/update.PKGBUILD
new file mode 100755
index 000000000000..c7eb3f036738
--- /dev/null
+++ b/update.PKGBUILD
@@ -0,0 +1,29 @@
+#!/bin/bash
+#source PKGBUILD
+_gitname=gegl
+srcdir=$PWD/src
+
+declare -A dep_versions
+readonly -a deps=(babl)
+
+## probe configure.ac for dependencies versions
+# the rest have standard form of "[{dep_name}_raqured_version], [{version}]"
+for dep in ${deps[*]};do
+ dep_versions["_${dep}_version"]=$(grep -oP "dependency\('babl'.*version: *'>=\K.*(?='\))" ${srcdir}/${_gitname}/meson.build)
+done
+
+echo "##probed deps versions:" >&2
+for key in ${!dep_versions[*]};do echo $key:${dep_versions[$key]};done >&2
+
+echo "##generate PKGBUILD" >&2
+cp -v --backup=numbered PKGBUILD.in PKGBUILD
+for key in ${!dep_versions[*]};do sed -i "s/@${key}@/${dep_versions[${key}]}/" PKGBUILD;done >&2
+echo "##finish generating PKGBUILD"
+
+echo "##update pkgver"
+makepkg -Co
+echo "##finish updating pkgver"
+
+echo "##generate .SRCINFO" >&2
+makepkg --printsrcinfo > .SRCINFO
+echo "##finish updating package" >&2