git » doxygen.git » main » tree

[main] / PKGBUILD

# Maintainer: Jakub Klinkovský <lahwaacz at archlinux dot org>
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Dan McGee <dan@archlinux.org>

pkgbase=doxygen
pkgname=(doxygen)
# doxygen-docs
pkgver=1.10.0
pkgrel=3
pkgdesc='Documentation system for C++, C, Java, IDL and PHP'
url='http://www.doxygen.nl'
arch=('armv7h' 'aarch64')
license=(GPL-2.0-or-later)
makedepends=(
  cmake
  flex
  fmt
  gcc-libs
  ghostscript
  glibc
  graphviz
  python
  sqlite
)
source=(${pkgbase}-${pkgver}.tar.gz::https://github.com/doxygen/doxygen/archive/Release_${pkgver//./_}.tar.gz)
sha512sums=('d8731796d5513ff5939c234f32f7f31aabc45f5557947741a330b3d33b368fb5ad770ef1d3d7384a402d98229eafeb1f955ef76e9932310b83c1d35a2eef500f')
b2sums=('e9eaf70e106aa022bb0edc99082e6bccd5c6879c41be40ce69d2d5e4eb7d1c5ff078fd8f9132206bf546fa78aab7f8bef4584fd1f2d6e1e84b01d2e65933375e')

_pick() {
  local p="$1" f d; shift
  for f; do
    d="$srcdir/$p/${f#$pkgdir/}"
    mkdir -p "$(dirname "$d")"
    mv "$f" "$d"
    rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
  done
}

prepare() {
  cd ${pkgbase}-Release_${pkgver//./_}
  # Install the man pages in the right place
  sed -i 's:DESTINATION man/man1:DESTINATION "${CMAKE_INSTALL_PREFIX}/share/man/man1":g' \
    doc/CMakeLists.txt
}

build() {
  # Turned doc off to allow working without tex (epstopdf)
  cmake -B build -S $pkgbase-Release_${pkgver//./_} \
    -DCMAKE_BUILD_TYPE:STRING=None \
    -DCMAKE_INSTALL_PREFIX:PATH=/usr \
    -DDOC_INSTALL_DIR:PATH=share/doc/doxygen \
    -Dbuild_doc:BOOL=OFF \
    -Duse_sys_sqlite3:BOOL=ON
  cmake --build build --verbose
}

#check() {
#  ctest --test-dir build --output-on-failure
#}

package_doxygen() {
  depends=(
    fmt libfmt.so
    gcc-libs
    glibc
    sqlite libsqlite3.so
  )
  optdepends=(
    'graphviz: for caller/callee graph generation'
  )

  DESTDIR="$pkgdir" cmake --install build
  (
    cd "$pkgdir"
#    _pick $pkgbase-docs usr/share/doc
  )
  install -vDm 644 $pkgbase-Release_${pkgver//./_}/LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
}

package_doxygen-docs() {
  pkgdesc='Developer documentation for doxygen'

  mv -v $pkgname/* "$pkgdir"
  install -vDm 644 $pkgbase-Release_${pkgver//./_}/LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
}

# vim: ts=2 sw=2 et: