diff options
author | Marek Gradzki <mgradzki@cisco.com> | 2016-04-26 08:01:31 +0200 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2016-04-28 16:23:35 +0000 |
commit | 60c63c7b537260c88225848bd42f0c34a618671d (patch) | |
tree | 2e0dfc006395ffba8468abcdd3f25fc831fb01fd | |
parent | e0ef46b7c0d7a1d1b0078450d73470b6e6a812bf (diff) |
VPP-8: Set java-8 for JNI
Change-Id: Ia81713a72e3c48b1d97bbf3f20a908bbc4ebd3b1
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
-rw-r--r-- | Makefile | 15 | ||||
-rw-r--r-- | build-data/packages/vpp-api.mk | 2 |
2 files changed, 15 insertions, 2 deletions
@@ -22,7 +22,7 @@ MINIMAL_STARTUP_CONF="unix { interactive }" GDB_ARGS= -ex "handle SIGUSR1 noprint nostop" DEB_DEPENDS = curl build-essential autoconf automake bison libssl-dev ccache -DEB_DEPENDS += debhelper dkms default-jdk git libtool libganglia1-dev libapr1-dev dh-systemd +DEB_DEPENDS += debhelper dkms openjdk-8-jdk git libtool libganglia1-dev libapr1-dev dh-systemd DEB_DEPENDS += libconfuse-dev git-review exuberant-ctags cscope RPM_DEPENDS_GROUPS = 'Development Tools' @@ -77,8 +77,19 @@ help: @echo " PLATFORM = $(PLATFORM)" @echo " DPDK_VERSION = $(DPDK_VERSION)" +# openjdk-8-jdk is not available in 14.04 repos by default +define use_ppa_for_jdk8 +if [ "$(shell lsb_release -r | awk '{print $$2}')"=="14.04" ]; then \ + sudo apt install software-properties-common; \ + sudo add-apt-repository -y ppa:openjdk-r/ppa; \ + sudo apt update; \ +fi; +endef + $(BR)/.bootstrap.ok: ifeq ("$(shell lsb_release -si)", "Ubuntu") + $(use_ppa_for_jdk8) + @MISSING=$$(apt-get install -y -qq -s $(DEB_DEPENDS) | grep "^Inst ") ; \ if [ -n "$$MISSING" ] ; then \ echo "\nPlease install missing packages: \n$$MISSING\n" ; \ @@ -108,6 +119,7 @@ bootstrap: $(BR)/.bootstrap.ok install-dep: ifeq ("$(shell lsb_release -si)", "Ubuntu") + $(use_ppa_for_jdk8) @sudo apt-get -y install $(DEB_DEPENDS) else ifneq ("$(wildcard /etc/redhat-release)","") @sudo yum groupinstall -y $(RPM_DEPENDS_GROUPS) @@ -188,3 +200,4 @@ ctags: ctags.files cscope: cscope.files @cscope -b -q -v + diff --git a/build-data/packages/vpp-api.mk b/build-data/packages/vpp-api.mk index f18416485c2..4937023aceb 100644 --- a/build-data/packages/vpp-api.mk +++ b/build-data/packages/vpp-api.mk @@ -20,4 +20,4 @@ vpp-api_LDFLAGS = $(call installed_libs_fn, \ vlib \ vlib-api) -vpp-api_CPPFLAGS += -I/usr/lib/jvm/java-7-openjdk-amd64/include +vpp-api_CPPFLAGS += -I/usr/lib/jvm/java-8-openjdk-amd64/include |