diff options
author | Andre Schröder | 2020-01-05 15:43:48 +0100 |
---|---|---|
committer | Andre Schröder | 2020-01-05 15:43:48 +0100 |
commit | 934126f7f6ae86b4b98227763b833f1a83651670 (patch) | |
tree | 16fc0975e816bcbff256a4d48b83dddfe0759091 | |
download | aur-934126f7f6ae86b4b98227763b833f1a83651670.tar.gz |
Initial upload: cgrep-clang-git r110.b21ebb0-1
-rw-r--r-- | .SRCINFO | 19 | ||||
-rw-r--r-- | PKGBUILD | 48 | ||||
-rw-r--r-- | dont-precompile-header.patch | 31 |
3 files changed, 98 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..269e0cd92d16 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,19 @@ +pkgbase = cgrep-clang-git + pkgdesc = grep for C/C++ source files + pkgver = r110.b21ebb0 + pkgrel = 1 + url = https://github.com/bloodstalker/cgrep + arch = any + license = GPL3 + makedepends = git + depends = llvm + depends = clang + source = cgrep-clang::git+https://github.com/bloodstalker/cgrep + source = git+https://github.com/bloodstalker/cfe-extra + source = dont-precompile-header.patch + sha256sums = SKIP + sha256sums = SKIP + sha256sums = e356a34c71aab5ce49c94cf20a48392c19a26c006f1e11bed323b6535c7fb65a + +pkgname = cgrep-clang-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..3ea7e0aff720 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,48 @@ +# Maintainer: Andre Schröder <andre.schroedr at gmail dot com> + +# All my PKGBUILDs are managed at https://github.com/schra/pkgbuilds + +_name=cgrep-clang +pkgname="$_name-git" +pkgver=r110.b21ebb0 +pkgrel=1 +pkgdesc='grep for C/C++ source files' +arch=('any') +url='https://github.com/bloodstalker/cgrep' +license=('GPL3') +depends=('llvm' 'clang') +makedepends=('git') +source=("$_name::git+$url" "git+https://github.com/bloodstalker/cfe-extra" dont-precompile-header.patch) +sha256sums=('SKIP' 'SKIP' 'e356a34c71aab5ce49c94cf20a48392c19a26c006f1e11bed323b6535c7fb65a') + +pkgver() { + cd "$srcdir/$_name" + + # from https://wiki.archlinux.org/index.php/VCS_package_guidelines#Git + ( set -o pipefail + git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + ) +} + +prepare() { + cd "$srcdir/$_name" + + git submodule init + git config submodule.cfe-extra.url "$srcdir"/cfe-extra + git submodule update +} + +package() { + cd "$srcdir/$_name" + + # For me compilation fails with enabled precompiled headers + patch -p1 -i "${srcdir}/dont-precompile-header.patch" + + make + + # `make install` isn't provided, so we have to manually copy the files + install -dm755 "${pkgdir}"/{usr/bin,usr/share/licenses/${pkgname}} + install -m 755 cgrep "${pkgdir}/usr/bin" + install -m 644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE.md +} diff --git a/dont-precompile-header.patch b/dont-precompile-header.patch new file mode 100644 index 000000000000..cef5d82b2a96 --- /dev/null +++ b/dont-precompile-header.patch @@ -0,0 +1,31 @@ +diff --git a/makefile b/makefile +index e403348..9b1f043 100644 +--- a/makefile ++++ b/makefile +@@ -85,8 +85,6 @@ LD_FLAGS+=$(EXTRA_LD_FLAGS) + + .PHONY:all clean help ASM SO TAGS + +-all: pch.hpp.gch $(TARGET) +- + everything:$(TARGET) A ASM SO $(TARGET)-dbg TAGS $(TARGET)-cov + + depend:.depend +@@ -100,7 +98,7 @@ depend:.depend + -include ./.depend + + %.o:%.cpp +- $(CXX) -include-pch pch.hpp.gch $(CXX_FLAGS) -c $< -o $@ ++ $(CXX) $(CXX_FLAGS) -c $< -o $@ + + %.odbg:%.cpp + $(CXX) $(CXX_FLAGS) -g -c $< -o $@ +@@ -108,9 +106,6 @@ depend:.depend + %.ocov:%.cpp + $(CXX) $(CXX_FLAGS) $(COV_CXX) -c $< -o $@ + +-pch.hpp.gch: pch.hpp +- $(CXX) $(CXX_FLAGS) -c $< -o $@ +- + ./cfe-extra/cfe_extra.o:./cfe-extra/cfe_extra.cpp + $(CXX) $(CXX_FLAGS) -c $< -o $@ |