diff options
author | Miroslav Šulc <fordfrog@gentoo.org> | 2021-07-18 08:15:26 +0200 |
---|---|---|
committer | Miroslav Šulc <fordfrog@gentoo.org> | 2021-07-18 08:15:47 +0200 |
commit | dbdf713c73909fa2631e525a4f2d57e91951a93f (patch) | |
tree | cdb78bf21771197b9a63a4a65c6dea8412e4a182 | |
parent | app-misc/hivex: add ruby27 (diff) | |
download | gentoo-dbdf713c73909fa2631e525a4f2d57e91951a93f.tar.gz gentoo-dbdf713c73909fa2631e525a4f2d57e91951a93f.tar.bz2 gentoo-dbdf713c73909fa2631e525a4f2d57e91951a93f.zip |
dev-java/swt: fixed libdir detection in 4.10-r2
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
-rw-r--r-- | dev-java/swt/swt-4.10-r2.ebuild | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/dev-java/swt/swt-4.10-r2.ebuild b/dev-java/swt/swt-4.10-r2.ebuild index 8c3986977dbe..291a35848865 100644 --- a/dev-java/swt/swt-4.10-r2.ebuild +++ b/dev-java/swt/swt-4.10-r2.ebuild @@ -87,23 +87,17 @@ src_compile() { # Drop jikes support as it seems to be unfriendly with SWT java-pkg_filter-compiler jikes - local AWT_ARCH local JAWTSO="libjawt.so" - if [[ $(tc-arch) == 'ppc64' ]] ; then - # no big-endian support - AWT_ARCH="ppc64le" - else - AWT_ARCH="amd64" - fi - if [[ -f "${JAVA_HOME}/jre/lib/${AWT_ARCH}/${JAWTSO}" ]]; then - export AWT_LIB_PATH="${JAVA_HOME}/jre/lib/${AWT_ARCH}" - elif [[ -f "${JAVA_HOME}/jre/bin/${JAWTSO}" ]]; then - export AWT_LIB_PATH="${JAVA_HOME}/jre/bin" - elif [[ -f "${JAVA_HOME}/$(get_libdir)/${JAWTSO}" ]] ; then - export AWT_LIB_PATH="${JAVA_HOME}/$(get_libdir)" - elif [[ -f "${JAVA_HOME}/lib/${JAWTSO}" ]] ; then - export AWT_LIB_PATH="${JAVA_HOME}/lib" - else + IFS=":" read -r -a ldpaths <<< $(java-config -g LDPATH) + + for libpath in "${ldpaths[@]}"; do + if [[ -f "${libpath}/${JAWTSO}" ]]; then + export AWT_LIB_PATH="${libpath}" + break + fi + done + + if [[ -z "${AWT_LIB_PATH}" ]]; then eerror "${JAWTSO} not found in the JDK being used for compilation!" die "cannot build AWT library" fi |