From 39e1491309d896bb34ad40a96fdd8356447c463a Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Mon, 16 Jan 2017 10:35:29 +0100 Subject: [PATCH] fzf: Update from 0.15.9 to 0.16.1 --- packages/fzf/build.sh | 33 ++++++--------------------------- packages/fzf/src-Makefile.patch | 16 ++++++++++++++++ 2 files changed, 22 insertions(+), 27 deletions(-) create mode 100644 packages/fzf/src-Makefile.patch diff --git a/packages/fzf/build.sh b/packages/fzf/build.sh index 06c48c1e..441f4b1c 100644 --- a/packages/fzf/build.sh +++ b/packages/fzf/build.sh @@ -1,39 +1,18 @@ TERMUX_PKG_HOMEPAGE=https://github.com/junegunn/fzf TERMUX_PKG_DESCRIPTION="Command-line fuzzy finder" -# Use git master until next release with https://github.com/junegunn/fzf/pull/768 -TERMUX_PKG_VERSION=0.15.9.1 -_COMMIT=847c512539f9909ae69a5067c1a64cb9bb485ea3 -# TERMUX_PKG_SRCURL=https://github.com/junegunn/fzf/archive/${TERMUX_PKG_VERSION}.tar.gz -# TERMUX_PKG_FOLDERNAME=fzf-${TERMUX_PKG_VERSION} -TERMUX_PKG_SRCURL=https://github.com/junegunn/fzf/archive/$_COMMIT.zip -TERMUX_PKG_FOLDERNAME=fzf-$_COMMIT +TERMUX_PKG_VERSION=0.16.1 +TERMUX_PKG_SRCURL=https://github.com/junegunn/fzf/archive/${TERMUX_PKG_VERSION}.tar.gz +TERMUX_PKG_FOLDERNAME=fzf-$TERMUX_PKG_VERSION TERMUX_PKG_BUILD_IN_SRC="yes" TERMUX_PKG_DEPENDS="bash, ncurses" termux_step_make_install () { - export GOPATH=$TERMUX_PKG_TMPDIR - cd $GOPATH - mkdir -p src/github.com/junegunn/fzf - cp -Rf $TERMUX_PKG_SRCDIR/* src/github.com/junegunn/fzf - termux_setup_golang - export CGO_CFLAGS="-I$TERMUX_PREFIX/include -L$TERMUX_PREFIX/lib" + export CGO_CFLAGS="-I$TERMUX_PREFIX/include" export CGO_LDFLAGS="-L$TERMUX_PREFIX/lib" - mkdir -p $GOPATH/src/github.com/junegunn/fzf/src/vendor/github.com/junegunn/{go-runewidth,go-shellwords,go-isatty} - for file in runewidth.go runewidth_posix.go; do - curl -o $GOPATH/src/github.com/junegunn/fzf/src/vendor/github.com/junegunn/go-runewidth/$file \ - https://raw.githubusercontent.com/junegunn/go-runewidth/master/$file - done - for file in shellwords.go util_posix.go; do - curl -o $GOPATH/src/github.com/junegunn/fzf/src/vendor/github.com/junegunn/go-shellwords/$file \ - https://raw.githubusercontent.com/junegunn/go-shellwords/master/$file - done - curl -o $GOPATH/src/github.com/junegunn/fzf/src/vendor/github.com/junegunn/go-isatty/isatty_linux.go \ - https://raw.githubusercontent.com/junegunn/go-isatty/master/isatty_linux.go - - cd $GOPATH/src/github.com/junegunn/fzf/src/fzf - CGO_ENABLED=1 go build -a -ldflags="-extldflags=-pie" -o $TERMUX_PREFIX/bin/fzf + cd $TERMUX_PKG_SRCDIR/src + make android-build # Install fzf-tmux, a bash script for launching fzf in a tmux pane: cp $TERMUX_PKG_SRCDIR/bin/fzf-tmux $TERMUX_PREFIX/bin diff --git a/packages/fzf/src-Makefile.patch b/packages/fzf/src-Makefile.patch new file mode 100644 index 00000000..83b8a4e5 --- /dev/null +++ b/packages/fzf/src-Makefile.patch @@ -0,0 +1,16 @@ +diff -u -r ../fzf-0.16.1/src/Makefile ./src/Makefile +--- ../fzf-0.16.1/src/Makefile 2017-01-16 04:27:40.000000000 +0100 ++++ ./src/Makefile 2017-01-16 10:30:50.941798907 +0100 +@@ -53,10 +53,8 @@ + cd $(SRCDIR) && go get -tags "$(TAGS)" + + android-build: $(SRCDIR) +- cd $(SRCDIR) && GOARCH=arm GOARM=7 CGO_ENABLED=1 go get +- cd $(SRCDIR)/fzf && GOARCH=arm GOARM=7 CGO_ENABLED=1 go build -a -ldflags="-w -extldflags=-pie" -o $(BINARYARM7) +- cd $(SRCDIR)/fzf && cp $(BINARYARM7) $(RELEASEARM7) && tar -czf $(RELEASEARM7).tgz $(RELEASEARM7) && \ +- rm -f $(RELEASEARM7) ++ cd $(SRCDIR) && CGO_ENABLED=1 go get ++ cd $(SRCDIR)/fzf && CGO_ENABLED=1 go build -a -ldflags="-w -extldflags=-pie" -o $(PREFIX)/bin/fzf + + test: deps + SHELL=/bin/sh GOOS=$(GOOS) go test -v -tags "$(TAGS)" ./... -- 2.11.0