[buildout]
extends = 
  ../patchelf/buildout.cfg
  ../zlib/buildout.cfg
  ../alsa/buildout.cfg
  ../libpng/buildout.cfg
  ../freetype/buildout.cfg
  ../xorg/buildout.cfg
parts = 
  java-jdk


[java-jdk]
recipe = slapos.recipe.build
update =
  from zc.buildout import UserError
  raise UserError("unsupported platform")


[java-jdk:linux and platform.machine() == 'x86_64']
recipe = slapos.recipe.cmmi
shared = true
url = https://download.java.net/java/GA/jdk12.0.2/e482c34c86bd4bf8b56c0b35558996b9/10/GPL/openjdk-12.0.2_linux-x64_bin.tar.gz
md5sum = f5da6f4dec81bdd2a096184ec1d69216
configure-command = :
make-binary = :
post-install =
  mv * %(location)s
  cd %(location)s
  set -x
  ${patchelf:location}/bin/patchelf --set-rpath %(rpath)s bin/* lib/*.so
rpath = ${zlib:location}/lib:${alsa:location}/lib:${freetype:location}/lib:${libpng:location}/lib:${libXrender:location}/lib:${libXtst:location}/lib:${libX11:location}/lib:${libXau:location}/lib:${libXext:location}/lib:${libXdmcp:location}/lib:${libXi:location}/lib:${libxcb:location}/lib:@@LOCATION@@/lib:@@LOCATION@@/lib/server
