aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile15
-rw-r--r--build-data/packages/vpp-api.mk2
2 files changed, 15 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index caf93ddadf5..3aeea8feaa0 100644
--- a/Makefile
+++ b/Makefile
@@ -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