[arch-commits] Commit in java-atk-wrapper/trunk (PKGBUILD)

Levente Polyak anthraxx at archlinux.org
Thu Dec 5 18:09:32 UTC 2019


    Date: Thursday, December 5, 2019 @ 18:09:30
  Author: anthraxx
Revision: 535660

upgpkg: java-atk-wrapper 0.37.1-1

Modified:
  java-atk-wrapper/trunk/PKGBUILD

----------+
 PKGBUILD |  112 +++++++++++++++++++++++++++++++------------------------------
 1 file changed, 57 insertions(+), 55 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-12-05 18:07:22 UTC (rev 535659)
+++ PKGBUILD	2019-12-05 18:09:30 UTC (rev 535660)
@@ -1,78 +1,80 @@
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
 # Contributor: Guillaume ALAUX <guillaume at archlinux.org>
 # Contributor: Martin Wimpress <code at flexion.org>
 # Contributor: Kyle <kyle at gmx.ca>
 
 pkgbase=java-atk-wrapper
-pkgname=('java-atk-wrapper-common' 'java-atk-wrapper-openjdk7' 'java-atk-wrapper-openjdk8')
-pkgver=0.33.3
+pkgname=(java-atk-wrapper-common java-atk-wrapper-openjdk)
+pkgver=0.37.1
 pkgrel=1
+_jvmvers=(8 10 11 13)
+pkgdesc='ATK wrapper for screen reader access to Java Swing applications'
+url='https://gitlab.gnome.org/GNOME/java-atk-wrapper/'
 arch=('x86_64')
-url="https://git.gnome.org/browse/java-atk-wrapper/"
 license=('LGPL')
-makedepends=('java-environment' 'gobject-introspection'
-             'gnome-common' 'gtk2' 'gtk3'
-             'xorg-xprop')
-_pkgbase=$(echo $pkgbase | awk '{print toupper($0)}' | tr '-' '_')
-_pkgver=$(echo $pkgver | tr '.' '_')
-_altnamever="${_pkgbase}_${_pkgver}"
-source=(https://git.gnome.org/browse/$pkgbase/snapshot/$_altnamever.tar.xz
-        no-werror.patch)
-sha256sums=('11d4a1c5491b2ba5a24b710d695c3c5fea5047d06eee07171f23ac5707fef4c5'
-            'ee22d01cc6282e005cef89456208193d0c9b329a65fc5e1c38304ebb22b95842')
+makedepends=('gobject-introspection' 'gnome-common' 'gtk2' 'gtk3' 'xorg-xprop' 'at-spi2-atk')
+options=(!emptydirs)
+source=(https://gitlab.gnome.org/GNOME/java-atk-wrapper/-/archive/${pkgver}/${pkgname}-${pkgver}.tar.bz2)
+sha256sums=('2d84c276bfe7f702416e299c4b63d8186f18f5e45889077b5086d0d1acca7e5e')
+sha512sums=('ba5c255af5e63f3a9180d30f955bf17b0c93b5559e596f0268105ffdd4c2dc1bdc89d35c426f3fa22c5fd96ae05bbd82d1562e3fe13b0637e3086cc99c8072cb')
 
+for _jvmver in "${_jvmvers[@]}"; do
+  makedepends+=("java-environment=${_jvmver}")
+done
+for _jvmver in "${_jvmvers[@]:0:${#_jvmvers[@]}-1}"; do
+  _pkgname="java-atk-wrapper-openjdk${_jvmver}"
+  pkgname+=("${_pkgname}")
+  eval "package_${_pkgname}() {
+    export PATH="/usr/lib/jvm/java-${_jvmver}-openjdk/bin:${PATH}"
+    _package ${_jvmver}
+  }"
+done
+
+package_java-atk-wrapper-openjdk() {
+  _package "${_jvmvers[-1]}"
+}
+
 prepare() {
-  cd $_altnamever
-  # https://anonscm.debian.org/cgit/pkg-a11y/java-atk-wrapper.git/tree/debian/patches/no-werror
-  patch -p1 -i ../no-werror.patch
+  cd ${pkgbase}-${pkgver}-*
+  autoreconf -fiv
+  for _jvmver in "${_jvmvers[@]}" ${_jvmvers}; do
+    cp -r . ../${pkgbase}-${pkgver}-${_jvmver}
+  done
 }
 
 build() {
-  cd $_altnamever
-  ./autogen.sh --prefix=/usr
-  make
-  # make install is broken
-  mkdir "build"
-  make DESTDIR="$(pwd)/build" install
+  for _jvmver in "${_jvmvers[@]}"; do
+    cd "${srcdir}/${pkgbase}-${pkgver}-${_jvmver}"
+    export PATH="/usr/lib/jvm/java-${_jvmver}-openjdk/bin:${PATH}"
+    ./configure \
+      --prefix=/usr
+    make
+  done
 }
 
 package_java-atk-wrapper-common() {
-  pkgdesc='ATK wrapper for screen reader access to Java Swing applications - common files'
-  depends=('xorg-xprop' 'atk')
-  conflicts=('java-atk-wrapper')
+  pkgdesc+=' - common files'
+  depends=('xorg-xprop' 'atk' 'at-spi2-atk')
 
-  cd $_altnamever/build
+  _jvmver=${_jvmvers[-1]}
+  cd ${pkgbase}-${pkgver}-${_jvmver}
 
-  mkdir -p $pkgdir/usr/share/java
-  cp build/usr/lib/jvm/java-7-openjdk/jre/lib/ext/java-atk-wrapper.jar \
-     $pkgdir/usr/share/java
-  cp -r usr $pkgdir
+  make -j1 DESTDIR="${pkgdir}" install
+  install -d "${pkgdir}/etc/java-openjdk"
+  mv "${pkgdir}"/usr/lib/jvm/java-${_jvmver}-openjdk/conf/* "${pkgdir}/etc/java-openjdk"
+  rm -rf "${pkgdir}"/usr/lib/jvm
 }
 
-package_java-atk-wrapper-openjdk7() {
-  pkgdesc='ATK wrapper for screen reader access to Java Swing applications - OpenJDK 7'
-  depends=('java-atk-wrapper-common' 'java-runtime-headless-openjdk=7')
-  replaces=('java-atk-wrapper')
-  provides=('java-atk-wrapper-openjdk=7')
+_package() {
+  local _jvmver=${1}
+  pkgdesc+=" - OpenJDK ${_jvmver}"
+  depends=('java-atk-wrapper-common' "java-runtime=${_jvmver}")
+  provides=("java-atk-wrapper-openjdk=${_jvmver}")
 
-  cd $_altnamever/build
-
-  mkdir -p $pkgdir/usr/lib/jvm/java-7-openjdk/jre/lib/ext
-  ln -s /usr/share/java/java-atk-wrapper.jar \
-    $pkgdir/usr/lib/jvm/java-7-openjdk/jre/lib/ext
-  cp build/usr/lib/jvm/java-7-openjdk/jre/lib/accessibility.properties \
-    $pkgdir/usr/lib/jvm/java-7-openjdk/jre/lib
+  cd ${pkgbase}-${pkgver}-${_jvmver}
+  make -j1 DESTDIR="${pkgdir}" install
+  rm "${pkgdir}"/usr/lib/*.so*
+  rm -f "${pkgdir}"/usr/lib/jvm/java-${_jvmver}-openjdk/conf/*
 }
 
-package_java-atk-wrapper-openjdk8() {
-  pkgdesc='ATK wrapper for screen reader access to Java Swing applications - OpenJDK 8'
-  depends=('java-atk-wrapper-common' 'java-runtime-headless-openjdk=8')
-  provides=('java-atk-wrapper-openjdk=8')
-
-  cd $_altnamever/build
-
-  mkdir -p $pkgdir/usr/lib/jvm/java-8-openjdk/jre/lib/ext
-  ln -s /usr/share/java/java-atk-wrapper.jar \
-    $pkgdir/usr/lib/jvm/java-8-openjdk/jre/lib/ext
-  cp build/usr/lib/jvm/java-7-openjdk/jre/lib/accessibility.properties \
-    $pkgdir/usr/lib/jvm/java-8-openjdk/jre/lib
-}
+# vim: ts=2 sw=2 et:


More information about the arch-commits mailing list