textproc/fzf: Several fixes required after last update

1. The proper variable is MAKE_ENV, not BUILD_ENV
2. The build steps must not be surpressed!  Remove "@" from build step
3. The make command is contingent on the success of the cd command, so
   change the concatenation (";") to AND ("&&") and run the whole thing
   in a subshell
4. Additional CGO_ variables are required now.  Define CGO_LDFLAGS so
   that ncurses library can be found and add another path for CGO_CFLAGS
   so that ncurses_dll.h can be found.

Approved by:	general and ncurses blankets
This commit is contained in:
John Marino 2016-11-21 15:30:19 +00:00
parent 8035720be8
commit a4fc1182ef
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=426729

View File

@ -20,7 +20,8 @@ GH_SUBDIR:= src/github.com/${GH_ACCOUNT}/${PORTNAME}
GH_TUPLE= junegunn:go-runewidth:63c378b:runwidth/src/github.com/junegunn/go-runewidth \
junegunn:go-shellwords:35d512a:shellwords/src/github.com/junegunn/go-shellwords \
junegunn:go-isatty:66b8e73:isatty/src/github.com/junegunn/go-isatty
MAKE_ENV+= CGO_CPPFLAGS="-I${NCURSESINC}"
MAKE_ENV+= CGO_CPPFLAGS="-I${NCURSESINC} -I${NCURSESBASE}/include" \
CGO_LDFLAGS="-L${NCURSESLIB}"
PLIST_FILES= bin/fzf man/man1/fzf.1.gz
@ -35,9 +36,9 @@ TMUX_RUN_DEPENDS= bash:shells/bash
TMUX_PLIST_FILES= bin/fzf-tmux man/man1/fzf-tmux.1.gz
do-build:
@cd ${WRKSRC}/src/github.com/${GH_ACCOUNT}/${PORTNAME}/src/fzf; \
${SETENV} ${BUILD_ENV} GOPATH=${WRKSRC} \
go build -o bin/${PORTNAME}
(cd ${WRKSRC}/src/github.com/${GH_ACCOUNT}/${PORTNAME}/src/fzf && \
${SETENV} ${MAKE_ENV} GOPATH=${WRKSRC} \
go build -o bin/${PORTNAME})
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/src/github.com/${GH_ACCOUNT}/${PORTNAME}/src/${PORTNAME}/bin/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}