haiku-format: remove old recipes and obsolete files (#9825)

* haiku-format: remove old recipes and obsolete files

* Also fixed UIUC copyright.
This commit is contained in:
Owen Pan
2023-12-04 22:30:58 -08:00
committed by GitHub
parent 62fa835428
commit 5c6eb63a2f
4 changed files with 1 additions and 141 deletions

View File

@@ -1,16 +0,0 @@
#!/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"

View File

@@ -1,61 +0,0 @@
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.
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-2022 Owen Pan"
LICENSE="Apache v2 with LLVM Exception"
REVISION="2"
srcGitRev="859d67b9d2f6395f20d424b94aa63b75db932c7d"
SOURCE_URI="https://github.com/owenca/llvm-project/archive/$srcGitRev.tar.gz"
SOURCE_DIR="llvm-project-$srcGitRev"
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
"
REQUIRES="
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:ninja
cmd:python3
"
BUILD()
{
mkdir -p build
cd build
cmake -G Ninja -DCMAKE_BUILD_TYPE=MinSizeRel -Wno-dev -DLLVM_ENABLE_PROJECTS=clang ../llvm
ninja clang-format && strip -s bin/clang-format
}
INSTALL()
{
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
}

View File

@@ -1,63 +0,0 @@
SUMMARY="Code formatter for Haiku coding style"
DESCRIPTION="Format C/C++ code following the Haiku Coding Guidelines.
This is a superset of clang-format with customizations that implement the coding style followed by \
Haiku and several applications running on Haiku.
haiku-format looks for a configuration file '.haiku-format', going up the file hierarchy starting \
with the folder of the file you want to format. This optional configuration file can be used to \
override any default Haiku style options."
HOMEPAGE="https://github.com/owenca/haiku-format"
COPYRIGHT="2003-2023 University of Illinois at Urbana-Champaign
2018-2023 Owen Pan"
LICENSE="Apache v2 with LLVM Exception"
REVISION="2"
srcGitRev="29214632fa5f0abb8c6f40ac5c13e6cd26a6ec95"
SOURCE_URI="https://github.com/owenca/llvm-project/archive/$srcGitRev.tar.gz"
SOURCE_DIR="llvm-project-$srcGitRev"
CHECKSUM_SHA256="fa3e3a9edf2e06d0f64b09752e0d6fcff3b9836f70cdbcb62052b849cf628b2a"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
haiku_format$secondaryArchSuffix = $portVersion
cmd:git_haiku_format = $portVersion
cmd:haiku_format = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:ninja
cmd:python3
cmd:sed
"
BUILD()
{
cmake -S llvm -B build -G Ninja \
-DLLVM_ENABLE_PROJECTS=clang \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_SKIP_RPATH=On \
-Wno-dev
ninja -C build clang-format
strip -sv build/bin/clang-format
}
INSTALL()
{
mkdir -pv $prefix/bin
cp -fv build/bin/clang-format $prefix/bin/haiku-format
gitHaikuFormat=$prefix/bin/git-haiku-format
sed s/clang-format/haiku-format/g clang/tools/clang-format/git-clang-format > $gitHaikuFormat
chmod -v +x $gitHaikuFormat
}

View File

@@ -4,7 +4,7 @@ LLVM Release License
University of Illinois/NCSA
Open Source License
Copyright (c) 2003-2018 University of Illinois at Urbana-Champaign.
Copyright (c) 2003-2019 University of Illinois at Urbana-Champaign.
All rights reserved.
Developed by: