mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
direnv: new recipe [GCI 2017] (#2078)
This commit is contained in:
68
app-shells/direnv/direnv-2.14.0.recipe
Normal file
68
app-shells/direnv/direnv-2.14.0.recipe
Normal file
@@ -0,0 +1,68 @@
|
||||
SUMMARY="Unclutter your .profile"
|
||||
DESCRIPTION="direnv is an environment switcher for the shell. It knows \
|
||||
how to hook into bash, zsh, tcsh and fish shell to load or unload \
|
||||
environment variables depending on the current directory. This allows \
|
||||
project-specific environment variables without cluttering the ~/.profile file."
|
||||
HOMEPAGE="https://direnv.net/"
|
||||
COPYRIGHT="2017 zimbatm and contributors"
|
||||
LICENSE="MIT"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/direnv/direnv/archive/v$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="917838827cb753153b91cb2d10c0d7c20cbaa85aa2dde520ee23653a74268ccd"
|
||||
PATCHES="direnv-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="?x86_gcc2 ?x86 ?x86_64"
|
||||
|
||||
PROVIDES="
|
||||
direnv = $portVersion
|
||||
cmd:direnv = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:gcc
|
||||
cmd:git
|
||||
cmd:go
|
||||
cmd:go_md2man
|
||||
cmd:make
|
||||
cmd:makeinfo
|
||||
cmd:which
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
# setup go environment
|
||||
BUILD=$(pwd)/build
|
||||
BUILD_GOPATH=$BUILD/gopath
|
||||
BUILD_GOROOT=$BUILD/goroot
|
||||
|
||||
rm -rf $BUILD
|
||||
mkdir -p $BUILD_GOPATH/bin $BUILD_GOPATH/src $BUILD_GOROOT
|
||||
cp -R -s $(go env GOROOT)/* $BUILD_GOROOT
|
||||
|
||||
export GOPATH=$BUILD_GOPATH
|
||||
export GOROOT=$BUILD_GOROOT
|
||||
export PATH=$PATH:$GOPATH/bin
|
||||
|
||||
# copy additional packages
|
||||
cp -R -s $(pwd)/vendor/* $GOPATH/src
|
||||
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
install -d $binDir $manDir/man1
|
||||
install -t $binDir direnv
|
||||
install -t $manDir/man1 man/*.1
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
make test
|
||||
}
|
||||
22
app-shells/direnv/patches/direnv-2.14.0.patchset
Normal file
22
app-shells/direnv/patches/direnv-2.14.0.patchset
Normal file
@@ -0,0 +1,22 @@
|
||||
From 59645b0fe39657b3d383bc5494e8a08c494cf195 Mon Sep 17 00:00:00 2001
|
||||
From: sfanxiang <sfanxiang@gmail.com>
|
||||
Date: Sun, 7 Jan 2018 06:03:44 +0000
|
||||
Subject: port to go 1.3
|
||||
|
||||
|
||||
diff --git a/log.go b/log.go
|
||||
index fa4bb4c..a24727a 100644
|
||||
--- a/log.go
|
||||
+++ b/log.go
|
||||
@@ -51,7 +51,7 @@ func log_debug(msg string, a ...interface{}) {
|
||||
defer log.SetFlags(log.Flags())
|
||||
log.SetFlags(log.Flags() | log.Lshortfile)
|
||||
msg = fmt.Sprintf(msg, a...)
|
||||
- log.Output(2, msg)
|
||||
+ log.Print(msg)
|
||||
}
|
||||
|
||||
func logMsg(format, msg string, a ...interface{}) {
|
||||
--
|
||||
2.15.0
|
||||
|
||||
Reference in New Issue
Block a user