[arch-commits] Commit in asciidoc/trunk (PKGBUILD)

Eli Schwartz eschwartz at archlinux.org
Tue Jul 28 04:09:21 UTC 2020


    Date: Tuesday, July 28, 2020 @ 04:09:21
  Author: eschwartz
Revision: 665608

upgpkg: asciidoc 9.0.2-1

upstream release moves to python3 \o/
adopt package
add testsuite
add new optdepend for graphviz filter, revealed by testsuite

Modified:
  asciidoc/trunk/PKGBUILD

----------+
 PKGBUILD |   62 +++++++++++++++++++++++++++++--------------------------------
 1 file changed, 30 insertions(+), 32 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-07-28 03:44:57 UTC (rev 665607)
+++ PKGBUILD	2020-07-28 04:09:21 UTC (rev 665608)
@@ -1,3 +1,5 @@
+# Maintainer: Eli Schwartz <eschwartz at archlinux.org>
+# Contributor: Florian Pritz <flo at xinu.at>
 # Contributor: Chris Brannon <cmbrannon79 at gmail.com>
 # Contributor: Geoffroy Carrier <geoffroy at archlinux.org>
 # Contributor: Dan McGee <dan at archlinux.org>
@@ -4,17 +6,18 @@
 # Contributor: Jaroslaw Rosiek <philosoph at interia.pl>
 # Contributor: Darwin Bautista <djclue917 at gmail.com>
 # Contributor: Daniel J Griffiths <ghost1227 at archlinux.us>
-# Maintainer: Florian Pritz <flo at xinu.at>
 
 pkgname=asciidoc
-pkgver=8.6.10
-pkgrel=2
+pkgver=9.0.2
+pkgrel=1
 pkgdesc='Text document format for short documents, articles, books and UNIX man pages.'
 arch=('any')
-url='https://www.methods.co.nz/asciidoc/'
+url='https://asciidoc.org/'
 license=('GPL')
-depends=('python2' 'libxslt' 'docbook-xsl')
-optdepends=('lilypond: music-filter'
+depends=('python' 'libxslt' 'docbook-xsl')
+checkdepends=('dblatex' 'graphviz' 'lilypond' 'source-highlight')
+optdepends=('graphviz: graphviz-filter'
+            'lilypond: music-filter'
             'imagemagick: music-filter'
             'source-highlight: source-highlight-filter'
             'dblatex: pdf generation'
@@ -21,46 +24,41 @@
             'fop: alternative pdf generation'
             'w3m: text generation'
             'lynx: alternative text generation')
-source=("${pkgname}-${pkgver}.tar.gz::https://github.com/asciidoc/asciidoc/archive/${pkgver}.tar.gz")
-md5sums=('4e69960f4d431780e9828f53417d8d7a')
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/asciidoc/asciidoc-py3/archive/${pkgver}.tar.gz")
+sha256sums=('ea73425151f56f278433e442f8b5085599765fa120574db65e6d053eb52927e2')
+b2sums=('5f5deca6b8c15d4b86e2bd6fdb131908eecd862a5fdbbd8418937050d335a25ad012a3b1bc716379f5623db676176fc6da1a09691c2b42a213a6230281626b69')
 
 prepare() {
-  cd ${pkgname}-${pkgver}
+  cd ${pkgname}-py3-${pkgver}
 
-  # python2 fix
-  #for file in asciidocapi.py a2x.py asciidoc.py filters/music/music2png.py filters/latex/latex2png.py \
-	  #filters/code/code-filter.py filters/graphviz/graphviz2png.py; do
-	#sed -i 's_#!/usr/bin/env python_#!/usr/bin/env python2_' $file
-  #done
-  #sed -i -e 's_sys:python_sys:python2_g' -e 's_sys3:python_sys3:python2_g' xhtml11.conf
-  #sed -i 's_sys:python_sys:python2_g' xhtml11-quirks.conf
-  #sed -i -e 's/{python}/{python2}/g' \
-	  #-e 's#{language at python:py:#{language at python2:py:#' \
-	  #filters/source/source-highlight-filter.conf \
-	  #html5.conf xhtml11.conf xhtml11-quirks.conf
-  #sed -i -e "s#'python'#'python2'#g" filters/code/code-filter.py
-  sed -i -e 's#python a2x.py#python2 a2x.py#' Makefile.in
+  autoconf
 }
 
 build() {
-  cd ${pkgname}-${pkgver}
+  cd ${pkgname}-py3-${pkgver}
 
-  autoconf
   ./configure \
     --prefix=/usr \
     --sysconfdir=/etc
+  make manpages
 }
 
+check() {
+  cd ${pkgname}-py3-${pkgver}
+
+  # this overrides the mocked time in the test
+  # https://github.com/asciidoc/asciidoc-py3/issues/131
+  env -u SOURCE_DATE_EPOCH make test
+}
+
 package() {
-  cd ${pkgname}-${pkgver}
+  cd ${pkgname}-py3-${pkgver}
 
-  make install DESTDIR=${pkgdir}
-  make docs DESTDIR=${pkgdir}
+  make install DESTDIR="${pkgdir}"
+  make docs DESTDIR="${pkgdir}"
 
+  # junk files: https://github.com/asciidoc/asciidoc-py3/issues/133
+  rm -v "${pkgdir}"/usr/share/doc/asciidoc/doc/*.{md5,svg,png}
   install -Dm644 asciidocapi.py \
-    ${pkgdir}/usr/lib/python2.7/site-packages/asciidocapi.py
-
-  # fix FS#21579 - [asciidoc] 8.6.2-2 "asciidoc" table style doesn't work (mismatched python version)
-  #sed -i 's/python/python2/' \
-    #${pkgdir}/etc/asciidoc/asciidoc.conf
+    "${pkgdir}/$(python -c 'import sysconfig; print(sysconfig.get_paths()["platlib"])')"/asciidocapi.py
 }



More information about the arch-commits mailing list