From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1197B13933E for ; Sun, 18 Jul 2021 06:15:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4D89EE0BEB; Sun, 18 Jul 2021 06:15:52 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id AFCC7E0BEB for ; Sun, 18 Jul 2021 06:15:51 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 781B933C6B6 for ; Sun, 18 Jul 2021 06:15:50 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id DEFAE581 for ; Sun, 18 Jul 2021 06:15:48 +0000 (UTC) From: "Miroslav Šulc" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Miroslav Šulc" Message-ID: <1626588947.dbdf713c73909fa2631e525a4f2d57e91951a93f.fordfrog@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-java/swt/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-java/swt/swt-4.10-r2.ebuild X-VCS-Directories: dev-java/swt/ X-VCS-Committer: fordfrog X-VCS-Committer-Name: Miroslav Šulc X-VCS-Revision: dbdf713c73909fa2631e525a4f2d57e91951a93f X-VCS-Branch: master Date: Sun, 18 Jul 2021 06:15:48 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 8d0ae665-704d-4337-8ef8-b412877c5f93 X-Archives-Hash: 1684d6952c40e40782431c0f20bdb7e1 commit: dbdf713c73909fa2631e525a4f2d57e91951a93f Author: Miroslav Šulc gentoo org> AuthorDate: Sun Jul 18 06:15:26 2021 +0000 Commit: Miroslav Šulc gentoo org> CommitDate: Sun Jul 18 06:15:47 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dbdf713c 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 gentoo.org> dev-java/swt/swt-4.10-r2.ebuild | 26 ++++++++++---------------- 1 file 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 8c3986977db..291a3584886 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