# Template file for 'jep'
pkgname=jep
version=4.2.0
revision=3
build_style=python3-module
hostmakedepends="python3-setuptools openjdk17"
makedepends="python3-devel openjdk17"
short_desc="Embed Python in Java"
maintainer="Andrew Benson <abenson+void@gmail.com>"
license="Zlib"
homepage="https://github.com/ninia/jep"
changelog="https://github.com/ninia/jep/releases"
distfiles="https://github.com/ninia/jep/archive/v${version}.tar.gz"
checksum=152894b8323a905ba98281e26406856c4197f8a42f9839d01dacd98c4a6f1bff

pre_build() {
	. /etc/profile.d/jdk.sh
	export LDFLAGS="-L${XBPS_CROSS_BASE}/${JAVA_HOME}/lib/server"
}

pre_install() {
	. /etc/profile.d/jdk.sh
}

post_install() {
	ln -sf jep.so ${DESTDIR}/${py3_sitelib}/jep/libjep.so
}
