Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions projects/ccache.dev/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
To install symlinks for compilers that will automatically use
ccache, prepend this directory to your PATH:
`~/.tea/ccache.dev/v*/libexec`

If this is an upgrade and you have previously added the symlinks to
your PATH, you may need to modify it to the path specified above so
it points to the current version.

NOTE: ccache can prevent some software from compiling.
54 changes: 54 additions & 0 deletions projects/ccache.dev/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
distributable:
url: https://github.com/ccache/ccache/releases/download/v{{version}}/ccache-{{version}}.tar.gz
strip-components: 1
versions:
github: ccache/ccache
dependencies:
github.com/redis/hiredis: '*'
facebook.com/zstd: '*'
build:
dependencies:
tea.xyz/gx/cc: c99
tea.xyz/gx/make: '*'
asciidoctor.org: '*'
cmake.org: '*'
freedesktop.org/pkg-config: '*'
script:
- cmake -S . -B build $CMAKE_ARGS
- cmake --build build
- cmake --install build
- run: |
files="clang,clang++,cc,gcc,gcc2,gcc3,gcc-3.3,gcc-4.0,\
gcc-4.2,gcc-4.3,gcc-4.4,gcc-4.5,gcc-4.6,gcc-4.7,gcc-4.8,\
gcc-4.9,gcc-5,gcc-6,gcc-7,gcc-8,gcc-9,gcc-10,gcc-11,gcc-12,\
gcc-13,c++,c++3,c++-3.3,c++-4.0,c++-4.2,c++-4.3,c++-4.4,c++-4.5,\
c++-4.6,c++-4.7,c++-4.8,c++-4.9,c++-5,c++-6,c++-7,c++-8,c++-9,c++-10,\
c++-11,c++-12,c++-13,g++,g++2,g++3,g++-3.3,g++-4.0,g++-4.2,g++-4.3,g++-4.4,\
g++-4.5,g++-4.6,g++-4.7,g++-4.8,g++-4.9,g++-5,g++-6,g++-7,g++-8,g++-9,g++-10,\
g++-11,g++-12,g++-13,i686-w64-mingw32-gcc,i686-w64-mingw32-g++,x86_64-w64-mingw32-gcc,\
x86_64-w64-mingw32-g++"

IFS=',' read -ra files_array <<< "$files"

for file in "${files_array[@]}"; do
ln -s ../bin/ccache "$file"
done
working-directory: "{{prefix}}/libexec"
env:
CMAKE_ARGS:
- -DCMAKE_INSTALL_PREFIX="{{prefix}}
- -DCMAKE_INSTALL_LIBDIR=lib
- -DCMAKE_BUILD_TYPE=Release
- -DCMAKE_FIND_FRAMEWORK=LAST
- -DCMAKE_VERBOSE_MAKEFILE=ON
- -Wno-dev
- -DBUILD_TESTING=OFF
- -DENABLE_IPO=TRUE
provides:
- bin/ccache
test:
script:
- ccache -s
- ccache --version | grep {{version}}
- export PATH={{prefix}}/libexec:$PATH
- which clang | grep "{{prefix}}"