Package Details: include-what-you-use 0.22-1

Git Clone URL: https://aur.archlinux.org/include-what-you-use.git (read-only, click to copy)
Package Base: include-what-you-use
Description: A tool for use with clang to analyze #includes in C and C++ source files
Upstream URL: https://include-what-you-use.org
Keywords: c c++ format header include iwyu
Licenses: LicenseRef-LLVM-Release-License
Submitter: Mindless
Maintainer: sebschrader (jetm)
Last Packager: jetm
Votes: 45
Popularity: 0.51
First Submitted: 2011-12-03 05:58 (UTC)
Last Updated: 2024-07-06 16:25 (UTC)

Pinned Comments

jetm commented on 2023-11-10 00:05 (UTC) (edited on 2024-11-13 11:49 (UTC) by jetm)

IWYU v0.23 is out, but clang v19 has not been released in Arch Linux. Please don't flag out-of-date until the new clang version is available. Thanks.

Latest Comments

1 2 3 4 5 6 7 Next › Last »

arpit commented on 2024-07-09 07:03 (UTC)

@Winterreise Thanks that worked!

Winterreise commented on 2024-07-09 06:48 (UTC)

@arpit Hey, try to remove the older version and reinstall it will solve this.

arpit commented on 2024-07-09 06:07 (UTC)

clang18 is available in Arch repos, but this package requires clang<18.0.0. Can this package support clang18?

djrollins commented on 2024-03-30 08:49 (UTC)

Apologies, I flagged as out-of-date before I saw your comment on clang18.

jetm commented on 2024-03-26 21:39 (UTC)

Updated PKGBUILD with all the suggestions. Thanks!

Porous3247 commented on 2024-03-26 18:10 (UTC)

Note: version 0.22 doesn't build properly with llvm17, must wait until clang/llvm 18 is available in Arch Linux

aperez commented on 2024-02-23 09:00 (UTC) (edited on 2024-02-23 09:03 (UTC) by aperez)

This wasn't building for me in a clean chroot, so I took a chance to simplify the package, the following worked for me:

diff --git a/PKGBUILD b/PKGBUILD
index 4ce4d1b..b4e3744 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,10 +8,10 @@ _clang_major=16
 _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"
+url="https://include-what-you-use.org"
 license=('LLVM Release License')
-source=("https://github.com/${pkgname}/${pkgname}/archive/${pkgver}.tar.gz")
-sha512sums=('77195dc36338a37d3397c78701d81e52fc1c6a3441979fa016f154b0fc860598959e6430e78a51bbf9049f6b2bb62956e50f5531ac5c94c6554e2383ace540f5')
+source=("${url}/downloads/${pkgname}-${pkgver}.src.tar.gz")
+sha512sums=('618445c4b2aa8a33b0b4985b284f3778a5532667cbaac22f23d9061cd17a3223761655d413b6fc93fa2f9c0b35645f475babec3e321c91ef6a5177fea6543281')
 arch=('x86_64')
 _min="${_clang_ver}"
 _max=$((_clang_major + 1)).0
@@ -20,27 +20,16 @@ makedepends=("clang>=${_min}" "clang<${_max}" "cmake" "llvm>=${_min}" "llvm<${_m
 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}" -Bbuild --install-prefix /usr
+  cmake --build build
 }

 package() {
-   cd "${srcdir}/${pkgname}-${pkgver}/build"
+   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}

-   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"
 }

 # vim:set ts=2 sw=2 et:

jetm commented on 2023-11-10 00:05 (UTC) (edited on 2024-11-13 11:49 (UTC) by jetm)

IWYU v0.23 is out, but clang v19 has not been released in Arch Linux. Please don't flag out-of-date until the new clang version is available. Thanks.

lahwaacz commented on 2023-09-05 16:11 (UTC) (edited on 2023-09-05 16:11 (UTC) by lahwaacz)

@xeruf The llvm/clang packages in official Arch Linux repositories were recently updated to version 16, so you don't have to compile it yourself. Of course, if you use a different distribution, you need to ask elsewhere.