summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD36
1 files changed, 12 insertions, 24 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 6ccf00309c82..06e74a9d5e7b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,44 +3,32 @@
pkgname=include-what-you-use
pkgver=0.21
-pkgrel=1
+pkgrel=2
_clang_major=17
_clang_minor=0
_clang_ver="${_clang_major}.${_clang_minor}"
pkgdesc="A tool for use with clang to analyze #includes in C and C++ source files"
-url="http://include-what-you-use.org"
-license=('LLVM Release License')
-source=("https://github.com/${pkgname}/${pkgname}/archive/${pkgver}.tar.gz")
+url="https://include-what-you-use.org"
+license=('LicenseRef-LLVM-Release-License')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/${pkgname}/${pkgname}/archive/${pkgver}.tar.gz")
sha512sums=('d6940fcde5f8212b7d6e1b3b8c9075157f831320279f5b7e57346c292c5b2cc52b53491a2c65b69dfcbd83ae2246c7c71555416e1faad9fd9a0aff9c12ddf1ba')
arch=('x86_64')
_min="${_clang_ver}"
_max=$((_clang_major + 1)).0
-depends=("clang>=${_min}" "clang<${_max}" 'python3')
-makedepends=("clang>=${_min}" "clang<${_max}" "cmake" "llvm>=${_min}" "llvm<${_max}" "ninja")
+depends=("clang>=${_min}" "clang<${_max}" python3 gcc-libs glibc llvm-libs)
+makedepends=("cmake" "llvm>=${_min}" "llvm<${_max}" "ninja")
install=iwyu.install
build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- rm -rf build && mkdir build && cd build
- cmake -G "Ninja" ../
- ninja
+ rm -rf build
+ cmake -Wno-dev -GNinja -S"${pkgname}-${pkgver}" -Bbuild --install-prefix /usr
+ cmake --build build
}
package() {
- cd "${srcdir}/${pkgname}-${pkgver}/build"
-
- DESTDIR="${pkgdir}" ninja install
-
- install -Dm755 ../fix_includes.py "${pkgdir}/usr/bin/iwyu-fix-includes"
- install -Dm755 ../iwyu_tool.py "${pkgdir}/usr/bin/iwyu-tool"
-
- # ninja
- mv "${pkgdir}/usr/local/bin/include-what-you-use" "${pkgdir}/usr/bin/include-what-you-use"
- mv "${pkgdir}/usr/local/share" "${pkgdir}/usr"
- rm -f "${pkgdir}/usr/local/bin/fix_includes.py"
- rm -f "${pkgdir}/usr/local/bin/iwyu_tool.py"
- rmdir "${pkgdir}/usr/local/bin"
- rmdir "${pkgdir}/usr/local"
+ DESTDIR="${pkgdir}" cmake --install build
+ mv -v "${pkgdir}/usr/bin"/{fix_includes.py,iwyu-fix-includes}
+ mv -v "${pkgdir}/usr/bin"/{iwyu_tool.py,iwyu-tool}
}
# vim:set ts=2 sw=2 et: