Package Details: svg2tikz-git 3.2.1.r555.20240924.89d1721-1

Git Clone URL: https://aur.archlinux.org/svg2tikz-git.git (read-only, click to copy)
Package Base: svg2tikz-git
Description: Set of tools for converting SVG graphics to TikZ/PGF code.
Upstream URL: http://xyz2tex.github.io/svg2tikz/
Licenses: GPL-2.0-or-later
Conflicts: inkscape-tikz, python-svg2tikz, svg2tikz, svg2tikz-doc
Provides: inkscape-tikz, python-svg2tikz, svg2tikz, svg2tikz-doc
Replaces: inkscape-tikz-hg
Submitter: haawda
Maintainer: dreieck
Last Packager: dreieck
Votes: 17
Popularity: 0.000000
First Submitted: 2014-08-23 13:27 (UTC)
Last Updated: 2024-09-30 13:04 (UTC)

Required by (0)

Sources (1)

Latest Comments

« First ‹ Previous 1 2 3 4 Next › Last »

Samega7Cattac commented on 2023-07-03 15:34 (UTC)

@dreieck ur PKGBUILD requires python-poetry this solves @oriba issue I flagged this package since it's no longer updated with upstream

oriba commented on 2023-06-01 13:37 (UTC)

This package is broken. I tried the PKGBUILD from dreieck, which also did not worked: "ModuleNotFoundError: No module named 'poetry'"

"ERROR Backend 'poetry.core.masonry.api' is not available. ==> ERROR: A failure occurred in build()."

dreieck commented on 2023-05-05 11:10 (UTC)

Ahoj,

there are several issues with the PKGBUILD, which I adress here, and for all but one of them I give the fix:

  • package() fails:
==> Starting package()...
python: can't open file '/tmp/makepkg/build/svg2tikz-git/src/svg2tikz/setup.py': [Errno 2] No such file or directory

Fix is to use in build() python -m build --wheel --no-isolation and in package() python -m installer --destdir="$pkgdir" dist/*.whl, and add to makedepends 'python-build' 'python-installer' 'python-wheel'.

  • Please add svg2tikz to the provides and conflicts arrays.

  • Upstream has an official version number, currently: 1.2.0+84. This can be retrieved by parsing git describe --tags. Please prepend it to $pkgver. Then, you can also add =${pkgver} to the provides entries.
    A possible pkgver() that does this:

pkgver() {
  cd "$srcdir"/"$_gitname"

  _ver="$(git describe  --tags | sed 's|^v||' | sed 's|-[^-]*$||' | tr '-' '+')"
  _rev="$(git rev-list --count HEAD)"
  _date="$(git log -1 --date=format:"%Y%m%d" --format="%ad")"
  _hash="$(git rev-parse --short HEAD)"

  if [ -z "${_ver}" ]; then
    error "Version could not be determined."
    return 1
  else
    printf '%s' "${_ver}.r${_rev}.${_date}.${_hash}"
  fi
}
  • According to pyproject.toml, you the following dependencies are missing:
    python-inkex.

Please correct your package.

A fixed PKGBUILD (except for the last issue), that also installs documentation, is ↗ here:

# Maintainer: Stefan Husmann <stefan-husmann@t-online.de>
# Contributor: max_meyer <dev@fedux.org>

pkgname=svg2tikz-git
pkgver=1.2.0+84.r337.20230505.47a99e0
pkgrel=1
pkgdesc="set of tools for converting SVG graphics to TikZ/PGF code"
arch=('any')
url="https://github.com/kjellmf/svg2tikz"
license=('GPL')
depends=('python-lxml')
makedepends=('git' 'python-build' 'python-installer' 'python-wheel')
provides=("inkscape-tikz=${pkgver}" "svg2tikz=${pkgver}")
conflicts=('inkscape-tikz' 'svg2tikz')
replaces=('inkscape-tikz-hg')
optdepends=('inkscape: for using the inksape extension files')
source=("git+https://github.com/kjellmf/svg2tikz")
md5sums=('SKIP')
_gitname="svg2tikz"

pkgver() {
  cd "$srcdir"/"$_gitname"

  _ver="$(git describe  --tags | sed 's|^v||' | sed 's|-[^-]*$||' | tr '-' '+')"
  _rev="$(git rev-list --count HEAD)"
  _date="$(git log -1 --date=format:"%Y%m%d" --format="%ad")"
  _hash="$(git rev-parse --short HEAD)"

  if [ -z "${_ver}" ]; then
    error "Version could not be determined."
    return 1
  else
    printf '%s' "${_ver}.r${_rev}.${_date}.${_hash}"
  fi
}

prepare() {
  cd "$srcdir"/"$_gitname"

  git log > "${srcdir}/git.log"
}

build() {
  cd "$srcdir"/"$_gitname"

  python -m build --wheel --no-isolation

  #cd docs
  #make dirhtml
}

package() {
  cd "$srcdir/$_gitname"

  python -m installer --destdir="$pkgdir" dist/*.whl
  _inkscape_ext="$pkgdir/usr/share/inkscape/extensions"
  install -d "$_inkscape_ext"
  cp ./svg2tikz/extensions/tikz_export* "$_inkscape_ext"

  for _docfile in "${srcdir}/git.log" CHANGELOG.md README.md; do
    install -D -v -m644 "${_docfile}" "${pkgdir}/usr/share/doc/svg2tikz/$(basename "${_docfile}")"
  done
  cp -rv docs "${pkgdir}/usr/share/doc/svg2tikz/docs"

  install -D -v -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
  ln -svr "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" "${pkgdir}/usr/share/doc/svg2tikz/LICENSE"
}

Regards!

PBS commented on 2023-03-01 08:46 (UTC)

setup.py was removed in 06654d0a on Feb 4, and package no longer builds

haawda commented on 2015-05-14 10:35 (UTC)

Thanks, I implemented your sugeestions in a similar way.

giniu commented on 2015-05-14 06:56 (UTC)

Hi there! I believe two things can be improved with this PKGBUILD: 1) There is new recommended versioning (see /usr/share/pacman/PKGBUILD-vcs.proto) 2) /usr/share/inkscape/extensions is missing (with files tikz_export_effect.inx and tikz_export_output.inx which are nowhere installed by setup.py) Modified PKGBUILD is here: http://pastebin.com/S8ejJc8B Thanks for maintaining this!

Mikaye commented on 2014-08-22 08:21 (UTC)

Now the project uses git (https://github.com/kjellmf/svg2tikz)

crabman commented on 2013-05-24 14:34 (UTC)

please add python2-lxml to the list of dependencies.

haawda commented on 2013-04-06 20:20 (UTC)

pacman-4.1-ready PKGBUILD

haawda commented on 2012-11-30 22:09 (UTC)

Hm, the name is misleading then. But you are right.