From 7c670bc7301c92335faeb25f4ba1322caccce378 Mon Sep 17 00:00:00 2001 From: Suresh Sundriyal Date: Sat, 30 Jul 2016 16:04:30 -0700 Subject: [PATCH 1/6] [freebsd] Fix out of source builds --- src/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile.am b/src/Makefile.am index 3d0151be..8d735e8a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -33,7 +33,7 @@ init-sql.c: bin2c $(BIN2C_V)./bin2c -z -c $(srcdir)/init.sql $@ %.c: %.lnav bin2c - $(BIN2C_V)./bin2c -z -c $< $@ + $(BIN2C_V)./bin2c -z -c $(srcdir)/$< $@ TIME_FORMATS = \ "@%@" \ From 6cea55ae3d49595e66be103dbe7edf7365bce40a Mon Sep 17 00:00:00 2001 From: Suresh Sundriyal Date: Sat, 30 Jul 2016 16:50:25 -0700 Subject: [PATCH 2/6] [freebsd] More out of source build related fixes. --- src/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile.am b/src/Makefile.am index 8d735e8a..61f4ad91 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -32,7 +32,7 @@ default-config-json.c: $(srcdir)/default-config.json bin2c init-sql.c: bin2c $(BIN2C_V)./bin2c -z -c $(srcdir)/init.sql $@ -%.c: %.lnav bin2c +%.c: $(srcdir)/%.lnav bin2c $(BIN2C_V)./bin2c -z -c $(srcdir)/$< $@ TIME_FORMATS = \ From 08ab68049266ba528ec2dd7f0d1611e391eda8dd Mon Sep 17 00:00:00 2001 From: Suresh Sundriyal Date: Sat, 30 Jul 2016 17:06:15 -0700 Subject: [PATCH 3/6] [freebsd] Install automake before kicking off the build. --- release/vagrant-static/pkg.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/vagrant-static/pkg.sh b/release/vagrant-static/pkg.sh index 568c367c..103c6638 100755 --- a/release/vagrant-static/pkg.sh +++ b/release/vagrant-static/pkg.sh @@ -9,5 +9,5 @@ if test x"${OS}" != x"FreeBSD"; then sudo yum install -y m4 git gcc44-c++ else - pkg install -y wget git gcc m4 + pkg install -y wget git gcc m4 automake fi From 936afab0cc98314074bfef55d0ab08a8b7bede30 Mon Sep 17 00:00:00 2001 From: Suresh Sundriyal Date: Sat, 30 Jul 2016 19:04:46 -0700 Subject: [PATCH 4/6] [freebsd] Use GNU Make Either Autotools is producing a makefile that FreeBSD make does not like or FreeBSD make does not like pattern rules anymore. Or more plausibly, we are not invoking autogen.sh correctly. --- release/vagrant-static/build.sh | 5 +++-- release/vagrant-static/provision.sh | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/release/vagrant-static/build.sh b/release/vagrant-static/build.sh index 2a388893..4aefaebd 100755 --- a/release/vagrant-static/build.sh +++ b/release/vagrant-static/build.sh @@ -23,8 +23,6 @@ export PATH=${FAKE_ROOT}/bin:${PATH} saved_LD_LIBRARY_PATH=${LD_LIBRARY_PATH} export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${FAKE_ROOT}/lib ./autogen.sh -export PATH=${saved_PATH} -export LD_LIBRARY_PATH=${saved_LD_LIBRARY_PATH} rm -rf ~/github/lbuild mkdir -p ~/github/lbuild @@ -53,3 +51,6 @@ if test x"${OS}" != x"FreeBSD"; then make install-strip DESTDIR=$PWD/instdir (cd instdir/ && zip -r /vagrant/lnav-linux.zip .) fi + +export PATH=${saved_PATH} +export LD_LIBRARY_PATH=${saved_LD_LIBRARY_PATH} diff --git a/release/vagrant-static/provision.sh b/release/vagrant-static/provision.sh index 9faeb956..8b837a95 100755 --- a/release/vagrant-static/provision.sh +++ b/release/vagrant-static/provision.sh @@ -12,6 +12,7 @@ cd ~/github PACKAGE_URLS="\ http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz \ http://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz \ + https://ftp.gnu.org/gnu/make/make-4.2.1.tar.gz \ ftp://invisible-island.net/ncurses/ncurses-5.9.tar.gz \ ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.38.tar.gz \ ftp://ftp.cwru.edu/pub/bash/readline-6.3.tar.gz \ @@ -47,6 +48,8 @@ done (cd automake-1.15 && ./configure --prefix=${FAKE_ROOT} && make && make install) +(cd make-4.2.1 && ./configure --prefix=${FAKE_ROOT} && make && make install) + OS=$(uname -s) From f2cb5c80d8560ab761ee3f8f6e89a5d953126f00 Mon Sep 17 00:00:00 2001 From: Suresh Sundriyal Date: Sat, 30 Jul 2016 19:15:41 -0700 Subject: [PATCH 5/6] Revert "[freebsd] Install automake before kicking off the build." This reverts commit 08ab68049266ba528ec2dd7f0d1611e391eda8dd. --- release/vagrant-static/pkg.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/vagrant-static/pkg.sh b/release/vagrant-static/pkg.sh index 103c6638..568c367c 100755 --- a/release/vagrant-static/pkg.sh +++ b/release/vagrant-static/pkg.sh @@ -9,5 +9,5 @@ if test x"${OS}" != x"FreeBSD"; then sudo yum install -y m4 git gcc44-c++ else - pkg install -y wget git gcc m4 automake + pkg install -y wget git gcc m4 fi From 87590aab6bc369403b92baaf5083e42c16b5c660 Mon Sep 17 00:00:00 2001 From: Suresh Sundriyal Date: Sat, 30 Jul 2016 21:39:13 -0700 Subject: [PATCH 6/6] [freebsd] Revert the bump gcc to 4.8. Updated the incorrect section. --- release/vagrant-static/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release/vagrant-static/build.sh b/release/vagrant-static/build.sh index 4aefaebd..d40cbd3a 100755 --- a/release/vagrant-static/build.sh +++ b/release/vagrant-static/build.sh @@ -33,8 +33,8 @@ OS=$(uname -s) if test x"${OS}" != x"FreeBSD"; then ../lnav/configure \ LDFLAGS="-L${FAKE_ROOT}/lib" \ - CC="gcc48" \ - CXX="g++48" \ + CC="gcc44" \ + CXX="g++44" \ CPPFLAGS="-I${FAKE_ROOT}/include" \ PATH="${FAKE_ROOT}/bin:${PATH}" else