mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-21 19:20:08 +02:00
haiku-format: update to latest commit (#7273)
Added post-install script to move the config file to ~/config/settings
This commit is contained in:
16
sys-devel/haiku-format/additional-files/haiku-format_install_config.sh
Executable file
16
sys-devel/haiku-format/additional-files/haiku-format_install_config.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
settingsDir="$(finddir B_USER_SETTINGS_DIRECTORY)"
|
||||
|
||||
configSysDataDir="$(finddir B_SYSTEM_DATA_DIRECTORY)/haiku-format"
|
||||
configUserDataDir="$(finddir B_USER_DATA_DIRECTORY)/haiku-format"
|
||||
|
||||
if [ -e "$configSysDataDir/.haiku-format" ]; then
|
||||
cp -a "$configSysDataDir/.haiku-format" "$settingsDir"
|
||||
elif [ -e "$configUserDataDir/.haiku-format" ]; then
|
||||
cp -a "$configUserDataDir/.haiku-format" "$settingsDir"
|
||||
else
|
||||
exit 1 # couldn't find .haiku-format
|
||||
fi
|
||||
|
||||
chmod +w "$settingsDir/.haiku-format"
|
||||
@@ -2,20 +2,28 @@ SUMMARY="Code formatter for Haiku coding style"
|
||||
DESCRIPTION="Format C++ code following the Haiku Coding Guidelines.
|
||||
|
||||
This is a fork of clang-format with customizations to implement the coding style followed by Haiku \
|
||||
and several applications running on Haiku."
|
||||
and several applications running on Haiku.
|
||||
|
||||
haiku-format looks for a configuration file '.haiku-format' or '_haiku-format', going up the file \
|
||||
hierarchy starting with the folder of the file you want to format. It defaults to ~/config/settings/.haiku-format."
|
||||
HOMEPAGE="https://github.com/owenca/haiku-format"
|
||||
COPYRIGHT="2003-2019 University of Illinois at Urbana-Champaign
|
||||
2019-2021 Owen Pan, Saloni Goyal, Adrien Destugues"
|
||||
2019-2022 Owen Pan"
|
||||
LICENSE="Apache v2 with LLVM Exception"
|
||||
REVISION="1"
|
||||
srcGitRev="bcc5a44f23e6663ade208840fe5509c6da5f2459"
|
||||
REVISION="2"
|
||||
srcGitRev="859d67b9d2f6395f20d424b94aa63b75db932c7d"
|
||||
SOURCE_URI="https://github.com/owenca/llvm-project/archive/$srcGitRev.tar.gz"
|
||||
SOURCE_DIR="llvm-project-$srcGitRev"
|
||||
CHECKSUM_SHA256="b9b923099224a238187560fdf5bd2181d9df73a624040cc83c6db26f6aae3f77"
|
||||
CHECKSUM_SHA256="a94575766a076d76031a0d2f4294cb254c2fc5af54716b38f7e92f05e0381acc"
|
||||
|
||||
ADDITIONAL_FILES="haiku-format_install_config.sh"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
USER_SETTINGS_FILES="settings/.haiku-format template data/haiku-format/.haiku-format"
|
||||
POST_INSTALL_SCRIPTS="$relativePostInstallDir/haiku-format_install_config.sh"
|
||||
|
||||
PROVIDES="
|
||||
haiku_format$secondaryArchSuffix = $portVersion
|
||||
cmd:haiku_format = $portVersion
|
||||
@@ -44,6 +52,10 @@ BUILD()
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
mkdir -p $prefix/bin
|
||||
cp build/bin/clang-format $prefix/bin/haiku-format
|
||||
mkdir -p $prefix/bin $dataDir/haiku-format
|
||||
cp -uv build/bin/clang-format $prefix/bin/haiku-format
|
||||
cp -pv ./_haiku-format $dataDir/haiku-format/.haiku-format
|
||||
|
||||
mkdir -p $postInstallDir
|
||||
cp $portDir/additional-files/haiku-format_install_config.sh $postInstallDir
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user