new package: binutils-is-llvm

This commit is contained in:
Tee KOBAYASHI 2022-04-14 18:25:35 +09:00 committed by xtkoba
parent bb345ed241
commit 15867e61e2
2 changed files with 51 additions and 0 deletions

View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2021 Trent W. Buck
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -0,0 +1,30 @@
TERMUX_PKG_HOMEPAGE=https://github.com/trentbuck/binutils-is-llvm
TERMUX_PKG_DESCRIPTION="Use llvm as binutils"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux"
# The version number is different from the original one.
TERMUX_PKG_VERSION=0.1
TERMUX_PKG_SKIP_SRC_EXTRACT=true
TERMUX_PKG_DEPENDS="lld, llvm"
TERMUX_PKG_PROVIDES="binutils"
TERMUX_PKG_REPLACES="binutils"
TERMUX_PKG_CONFLICTS="binutils"
TERMUX_PKG_PLATFORM_INDEPENDENT=true
termux_step_make_install() {
ln -sf lld $TERMUX_PREFIX/bin/ld
local f
for f in addr2line ar as dwp nm objcopy objdump ranlib readelf size strings strip; do
ln -sf llvm-${f} $TERMUX_PREFIX/bin/${f}
done
ln -sf llvm-cxxfilt $TERMUX_PREFIX/bin/c++filt
local dir=$TERMUX_PREFIX/share/$TERMUX_PKG_NAME
mkdir -p $dir
touch $dir/.placeholder
}
termux_step_install_license() {
install -Dm600 -t $TERMUX_PREFIX/share/doc/$TERMUX_PKG_NAME \
$TERMUX_PKG_BUILDER_DIR/LICENSE
}