mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
tldr: update to version 1.6.1. (#10153)
While we're at it.. make sure it doesn't pollutes $HOME anymore. Users will need to either: - manually move their old ~./.tldr/ files to ~/config/cache/tldr/ (possibly renaming `tldr-main` to just `tldr`), or - just remove the old dir, and run `tldl --update` (which takes a lot of time, and has no progress indication).
This commit is contained in:
@@ -1,68 +0,0 @@
|
||||
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="2"
|
||||
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="all !x86_gcc2 ?x86"
|
||||
|
||||
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/<arch>/, 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/
|
||||
}
|
||||
74
app-misc/tldr/tldr-1.6.1.recipe
Normal file
74
app-misc/tldr/tldr-1.6.1.recipe
Normal file
@@ -0,0 +1,74 @@
|
||||
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 Arvid Gerstmann"
|
||||
LICENSE="MIT"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/tldr-pages/tldr-c-client/archive/v$portVersion.tar.gz"
|
||||
SOURCE_DIR="tldr-c-client-$portVersion"
|
||||
CHECKSUM_SHA256="1a2aa8e764846fad1f41a0304e28416f5c38b6d3a3131ad1e85116749aec34ba"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
commandSuffix=$secondaryArchSuffix
|
||||
commandBinDir=$binDir
|
||||
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
||||
commandSuffix=
|
||||
commandBinDir=$prefix/bin
|
||||
fi
|
||||
|
||||
PROVIDES="
|
||||
tldr$secondaryArchSuffix = $portVersion
|
||||
cmd:tldr$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libcurl$secondaryArchSuffix
|
||||
lib:libzip$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libcurl$secondaryArchSuffix
|
||||
devel:libzip$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:find
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PATCH()
|
||||
{
|
||||
# Don't pollute $HOME, please!
|
||||
|
||||
# userCacheDir=$(finddir B_USER_CACHE_DIRECTORY)
|
||||
# relativeUserCacheDir=$(realpath --relative-to=$HOME $userCacheDir)
|
||||
relativeUserCacheDir="/config/cache"
|
||||
|
||||
sed -e "s|TLDR_HOME \"/.tldrc\"|TLDR_HOME \"$relativeUserCacheDir/tldrc\"|" -i src/tldr.h
|
||||
sed -e "s|TLDR_DATE \"/.tldrc/date\"|TLDR_DATE \"$relativeUserCacheDir/tldrc/date\"|" -i src/tldr.h
|
||||
sed -e "s|TLDR_EXT \"/.tldrc/tldr/pages/\"|TLDR_EXT \"$relativeUserCacheDir/tldrc/tldr/pages/\"|" -i src/tldr.h
|
||||
|
||||
# Patch-up the Makefile:
|
||||
sed -e "s|:= /usr/local|:= $prefix|" -i Makefile
|
||||
sed -e "s|:= \$(PREFIX)/share/man/man1|:= $manDir/man1|" -i Makefile
|
||||
sed -e 's|:= -ggdb -O0 -ftrapv|:= -O3|' -i Makefile
|
||||
sed -e 's|:= -lc -lm -lcurl -lzip|:= -lroot -lbsd -lcurl -lzip|' -i Makefile
|
||||
}
|
||||
|
||||
|
||||
BUILD()
|
||||
{
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
}
|
||||
Reference in New Issue
Block a user