From f269cc481e62a5dd9060f6679263ae03368f3bf5 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sun, 24 Apr 2022 23:56:01 -0500 Subject: user/itstool: Move to system/ for shadow Documentation for shadow now requires itstool to build. --- system/itstool/APKBUILD | 39 +++++++++++++++++++++++++++++++++++++++ system/itstool/fix-segfault.patch | 25 +++++++++++++++++++++++++ user/itstool/APKBUILD | 39 --------------------------------------- user/itstool/fix-segfault.patch | 25 ------------------------- 4 files changed, 64 insertions(+), 64 deletions(-) create mode 100644 system/itstool/APKBUILD create mode 100644 system/itstool/fix-segfault.patch delete mode 100644 user/itstool/APKBUILD delete mode 100644 user/itstool/fix-segfault.patch diff --git a/system/itstool/APKBUILD b/system/itstool/APKBUILD new file mode 100644 index 000000000..c4fee9e06 --- /dev/null +++ b/system/itstool/APKBUILD @@ -0,0 +1,39 @@ +# Maintainer: A. Wilcox +pkgname=itstool +pkgver=2.0.6 +pkgrel=0 +pkgdesc="ITS-based XML translation tool" +url="http://itstool.org/" +arch="noarch" +license="GPL-3.0+" +depends="py3-libxml2 python3" +makedepends="" +subpackages="$pkgname-doc" +source="http://files.itstool.org/itstool/$pkgname-$pkgver.tar.bz2 + fix-segfault.patch" + +build() { + PYTHON="/usr/bin/python3" ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --localstatedir=/var + make +} + +check() { + make check + # verify that the shebang is correct + chmod +x itstool + ./itstool +} + +package() { + make DESTDIR="$pkgdir" install +} + +sha512sums="51058bdcb208f6fb84810f71f9bf67e42b00bf157a9756be45f060849c0aff36f695f4403404193720d4446818fa77de61fa94eed9e8789d26c07a2926072eb7 itstool-2.0.6.tar.bz2 +eb426e7cc9f151154f47b93ef46d6fcfb5fa0982be3bf78863ebf5ea009a89de252a6c63dfb090d76003c47107ebb5d1ac2a7d1ef7db08defe19e32f996dbdbd fix-segfault.patch" diff --git a/system/itstool/fix-segfault.patch b/system/itstool/fix-segfault.patch new file mode 100644 index 000000000..047b691b7 --- /dev/null +++ b/system/itstool/fix-segfault.patch @@ -0,0 +1,25 @@ +From 1549b6d12eb2f35e5c7f1b1856c21768e92ba794 Mon Sep 17 00:00:00 2001 +From: Guido Trentalancia +Date: Wed, 1 Nov 2017 18:23:44 +0100 +Subject: [PATCH] Fix a segmentation fault bug introduced with version 2.0.4. + +https://github.com/itstool/itstool/issues/17 + +This fix seems a lot easier than the previous reverted commit. +--- + itstool.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/itstool.in b/itstool.in +index c1d0585..e492e95 100755 +--- a/itstool.in ++++ b/itstool.in +@@ -1048,7 +1048,7 @@ class Document (object): + else: + ctxt.replaceEntities(1) + ctxt.parseDocument() +- trnode = ctxt.doc().getRootElement() ++ trnode = ctxt.doc().getRootElement().copyNode(1) + try: + self._check_errors() + except libxml2.parserError: diff --git a/user/itstool/APKBUILD b/user/itstool/APKBUILD deleted file mode 100644 index c4fee9e06..000000000 --- a/user/itstool/APKBUILD +++ /dev/null @@ -1,39 +0,0 @@ -# Maintainer: A. Wilcox -pkgname=itstool -pkgver=2.0.6 -pkgrel=0 -pkgdesc="ITS-based XML translation tool" -url="http://itstool.org/" -arch="noarch" -license="GPL-3.0+" -depends="py3-libxml2 python3" -makedepends="" -subpackages="$pkgname-doc" -source="http://files.itstool.org/itstool/$pkgname-$pkgver.tar.bz2 - fix-segfault.patch" - -build() { - PYTHON="/usr/bin/python3" ./configure \ - --build=$CBUILD \ - --host=$CHOST \ - --prefix=/usr \ - --sysconfdir=/etc \ - --mandir=/usr/share/man \ - --infodir=/usr/share/info \ - --localstatedir=/var - make -} - -check() { - make check - # verify that the shebang is correct - chmod +x itstool - ./itstool -} - -package() { - make DESTDIR="$pkgdir" install -} - -sha512sums="51058bdcb208f6fb84810f71f9bf67e42b00bf157a9756be45f060849c0aff36f695f4403404193720d4446818fa77de61fa94eed9e8789d26c07a2926072eb7 itstool-2.0.6.tar.bz2 -eb426e7cc9f151154f47b93ef46d6fcfb5fa0982be3bf78863ebf5ea009a89de252a6c63dfb090d76003c47107ebb5d1ac2a7d1ef7db08defe19e32f996dbdbd fix-segfault.patch" diff --git a/user/itstool/fix-segfault.patch b/user/itstool/fix-segfault.patch deleted file mode 100644 index 047b691b7..000000000 --- a/user/itstool/fix-segfault.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 1549b6d12eb2f35e5c7f1b1856c21768e92ba794 Mon Sep 17 00:00:00 2001 -From: Guido Trentalancia -Date: Wed, 1 Nov 2017 18:23:44 +0100 -Subject: [PATCH] Fix a segmentation fault bug introduced with version 2.0.4. - -https://github.com/itstool/itstool/issues/17 - -This fix seems a lot easier than the previous reverted commit. ---- - itstool.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/itstool.in b/itstool.in -index c1d0585..e492e95 100755 ---- a/itstool.in -+++ b/itstool.in -@@ -1048,7 +1048,7 @@ class Document (object): - else: - ctxt.replaceEntities(1) - ctxt.parseDocument() -- trnode = ctxt.doc().getRootElement() -+ trnode = ctxt.doc().getRootElement().copyNode(1) - try: - self._check_errors() - except libxml2.parserError: -- cgit v1.2.3-70-g09d2