From 15867e61e28e8d641ca4a9abafd2ab93e05b09ea Mon Sep 17 00:00:00 2001 From: Tee KOBAYASHI Date: Thu, 14 Apr 2022 18:25:35 +0900 Subject: [PATCH] new package: binutils-is-llvm --- packages/binutils-is-llvm/LICENSE | 21 +++++++++++++++++++++ packages/binutils-is-llvm/build.sh | 30 ++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 packages/binutils-is-llvm/LICENSE create mode 100644 packages/binutils-is-llvm/build.sh diff --git a/packages/binutils-is-llvm/LICENSE b/packages/binutils-is-llvm/LICENSE new file mode 100644 index 000000000..c2a40c0dc --- /dev/null +++ b/packages/binutils-is-llvm/LICENSE @@ -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. diff --git a/packages/binutils-is-llvm/build.sh b/packages/binutils-is-llvm/build.sh new file mode 100644 index 000000000..b2c64b39d --- /dev/null +++ b/packages/binutils-is-llvm/build.sh @@ -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 +}