From 26539ec2f2fa2cc2b75714593c77374b49fa9a4c Mon Sep 17 00:00:00 2001 From: Calvin Hill Date: Thu, 24 Oct 2019 10:43:36 +0100 Subject: [PATCH] tldr: new recipe (#4308) --- app-misc/tldr/tldr-1.3.0.recipe | 68 +++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 app-misc/tldr/tldr-1.3.0.recipe diff --git a/app-misc/tldr/tldr-1.3.0.recipe b/app-misc/tldr/tldr-1.3.0.recipe new file mode 100644 index 000000000..496d8779c --- /dev/null +++ b/app-misc/tldr/tldr-1.3.0.recipe @@ -0,0 +1,68 @@ +SUMMARY="Simplified man-page command line client in C for BSD, OS X, Linux" +DESCRIPTION="tldr is a command line client for tldr, written in plain ISO C90. \ +This is the C implementation of the tldr client and many other implementations exist \ +that are written in other languages." +HOMEPAGE="https://tldr.sh/" +COPYRIGHT="2016-2019 Arvid Gerstmann" +LICENSE="MIT" +REVISION="1" +SOURCE_URI="https://github.com/tldr-pages/tldr-cpp-client/archive/v$portVersion.tar.gz" +SOURCE_DIR="tldr-cpp-client-$portVersion" +CHECKSUM_SHA256="6210ece3f5d8f8e55b404e2f6c84be50bfdde9f0d194a271bce751a3ed6141be" + +ARCHITECTURES="!x86_gcc2 ?x86 x86_64" + +if [ "$targetArchitecture" = x86_gcc2 ]; then + SECONDARY_ARCHITECTURES="x86" + ARCH=x86 +else + ARCH=x64 +fi + +# On x86_gcc2 we don't want to install the commands in bin//, but in bin/. +commandBinDir=$binDir +if [ "$targetArchitecture" = x86_gcc2 ]; then + commandBinDir=$prefix/bin +fi + +PROVIDES=" + tldr$secondaryArchSuffix = $portVersion + cmd:tldr$commandSuffix = $portVersion + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libcurl$secondaryArchSuffix + lib:libz$secondaryArchSuffix + lib:libzip$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + gcc${secondaryArchSuffix}_syslibs_devel + devel:libcurl$secondaryArchSuffix + devel:libz$secondaryArchSuffix >= 1.2.8 + devel:libzip$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:find + cmd:gcc$secondaryArchSuffix + cmd:g++$secondaryArchSuffix + cmd:ld$secondaryArchSuffix + cmd:make + cmd:pkg_config$secondaryArchSuffix + cmd:sed + " + +BUILD() +{ + sed -i 's/-lc -lm//' Makefile + ALL_LDLIBS="-lroot -lcurl -lzip" make $jobArgs +} + +INSTALL() +{ + mkdir -p $commandBinDir $manDir/man1 + echo $manDir + cp -r tldr $commandBinDir + cp -r man/tldr.1 $manDir/man1/ +}