summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-java')
-rw-r--r--dev-java/swt/Manifest3
-rw-r--r--dev-java/swt/swt-4.31.ebuild151
2 files changed, 154 insertions, 0 deletions
diff --git a/dev-java/swt/Manifest b/dev-java/swt/Manifest
index 75b83fcd9ee2..bdc642795cb1 100644
--- a/dev-java/swt/Manifest
+++ b/dev-java/swt/Manifest
@@ -9,3 +9,6 @@ DIST swt-4.29-gtk-linux-x86_64.zip 3857122 BLAKE2B ac4416044f93eaed396ac10edb74e
DIST swt-4.30-gtk-linux-aarch64.zip 3836637 BLAKE2B 4cedb6eae73e03c32f6c226560f8e7bcbde5b6fc57579255e793fd5d01a5ff80f8b673dd7035eb7f2693abadd98bd0cfdb2eec632c05995552a9a1f1b673b8cc SHA512 dfdddd12ba30373d3ee7f0337b42d3a4f55a55dc898be9c97fbcc3d841c082d00190a75513272076c5709ee626e8af3f77c7c2dc518aa9289e80e33f4b134907
DIST swt-4.30-gtk-linux-ppc64le.zip 3860636 BLAKE2B a535c1bcc6c668905f4d4aaa8c5ae7f3b8f48fc95004522d09924ae54d5172b18f80169d78633e960ce0c5141e5b34492d1dd05188a0b1f48d9f79d286bd2982 SHA512 5a17bd7752343da638466ac28de460d9fa9f0e777d1e48625ddb6c5538704e36cd97439d1bf8f07ad34a32b7d5f27f19d8877e8a9bb9094b4a74bdbb1dc126f7
DIST swt-4.30-gtk-linux-x86_64.zip 3856990 BLAKE2B 0ea29a5f286fb4bb362758629226bcd6f27716afae7abb80cb37e7d4b72f0c835d63a196384465d3bc74135c42454a74c75455c094204e6329229ad8ca1fda78 SHA512 3802bd1dc84c7d684dac6b0b21de6b4958dd0c736a6b42176cf734806f04ae9dfdb18515ec5249eeff5f6bb716bf327a7a10e79d68cc487a1ad02267394507a1
+DIST swt-4.31-gtk-linux-aarch64.zip 4019864 BLAKE2B 597f9c2ce1382aacd4667c7d1fc350b2318d8b1577dfc32a0139efb9d26e7c32703a0fb2507876ef441c47901d46ba522ea40714f9b88f1d517e3d9d24c2416a SHA512 636e3a4e7adc21ab8ee3ecdc3f85bbd0ad5786836492cf0096f99177716043150b41807cc456f4813ebb1797092761bb227809e8594bf64155b438973cc84bfc
+DIST swt-4.31-gtk-linux-ppc64le.zip 4036590 BLAKE2B da9ad8a7e0bf168b024c4e1fbdbcc01154ec0d7e8b38b2912ba7edf1bf8239f05a9ce1f08790174158ebb788c9cc3adf754d13942fc8aa0fe9d4a53177a814ff SHA512 bf8f3f45b4229db383839a64b7d08294340ab2f0c623be8e382609b5ff9a59683229bb308d49480ffb01596ab050d45f97894fec99c0d4eb710e60c40b864531
+DIST swt-4.31-gtk-linux-x86_64.zip 4039479 BLAKE2B 6f7e434acf57cd03dd5e938b1b1c578339b3d7817202681a15420ebdec3be10b95b1bf5eca6f1cf71de9a5a0c390d2d6ee903c2a71e8974e03987cc52322e44d SHA512 da61610ce00fc46893ec3ee6d5d7ed5cc59312002c6946a3748cff1a776af75bad0026512b412ef1622ca0bee124764ed8ee7f5f87364cff945b296feb86e74b
diff --git a/dev-java/swt/swt-4.31.ebuild b/dev-java/swt/swt-4.31.ebuild
new file mode 100644
index 000000000000..bcfb034a7ae1
--- /dev/null
+++ b/dev-java/swt/swt-4.31.ebuild
@@ -0,0 +1,151 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+JAVA_PKG_IUSE="doc source"
+
+inherit flag-o-matic java-pkg-2 java-pkg-simple toolchain-funcs
+
+MY_PV="${PV/_rc/RC}"
+MY_DMF="https://download.eclipse.org/eclipse/downloads/drops4/R-${MY_PV}-202402290520"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="GTK based SWT Library"
+HOMEPAGE="https://www.eclipse.org/swt/"
+SRC_URI="
+ amd64? ( ${MY_DMF}/${MY_P}-gtk-linux-x86_64.zip )
+ arm64? ( ${MY_DMF}/${MY_P}-gtk-linux-aarch64.zip )
+ ppc64? ( ${MY_DMF}/${MY_P}-gtk-linux-ppc64le.zip )"
+S="${WORKDIR}/library"
+
+LICENSE="CPL-1.0 LGPL-2.1 MPL-1.1"
+SLOT="4.31"
+KEYWORDS="~amd64 ~arm64 ~ppc64"
+IUSE="cairo opengl webkit"
+
+BDEPEND="
+ app-arch/unzip
+ virtual/pkgconfig
+"
+COMMON_DEP="
+ app-accessibility/at-spi2-core:2
+ dev-libs/glib
+ x11-libs/gtk+:3
+ x11-libs/libXtst
+ cairo? ( x11-libs/cairo )
+ opengl? (
+ virtual/glu
+ virtual/opengl
+ )
+ webkit? (
+ net-libs/webkit-gtk:4.1
+ )"
+DEPEND="${COMMON_DEP}
+ >=virtual/jdk-17:*[-headless-awt]
+ x11-base/xorg-proto
+ x11-libs/libX11
+ x11-libs/libXrender
+ x11-libs/libXt
+ x11-libs/libXtst"
+# error: pattern matching in instanceof is not supported in -source 11
+RDEPEND="${COMMON_DEP}
+ >=virtual/jre-17:*"
+
+HTML_DOCS=( ../about.html )
+
+JAVA_RESOURCE_DIRS="../resources"
+JAVA_SRC_DIR="../src"
+
+PATCHES=(
+ "${FILESDIR}/swt-4.27-as-needed-and-flag-fixes.patch"
+)
+
+src_unpack() {
+ default
+ unpack "./src.zip"
+}
+
+src_prepare() {
+ default #780585
+ java-pkg-2_src_prepare
+ # .css stuff is essential at least for running net-p2p/biglybt
+ unzip ../swt.jar 'org/eclipse/swt/internal/gtk/*.css' -d resources || die
+ java-pkg_clean
+ cd .. || die
+ mkdir resources src || die "mkdir failed"
+ find org -type f -name '*.java' \
+ | xargs \
+ cp --parent -t src -v \
+ || die "copying resources failed"
+ find org -type f ! -name '*.java' \
+ | xargs \
+ cp --parent -t resources -v \
+ || die "copying resources failed"
+ cp version.txt resources || die "adding version.txt failed"
+}
+
+src_compile() {
+ append-cflags -fcommon # https://bugs.gentoo.org/707838
+
+ local JAWTSO="libjawt.so"
+ 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
+ # this is a workaround for broken LDPATH in <=openjdk-8.292_p10 and <=dev-java/openjdk-bin-8.292_p10
+ elif [[ -f "${libpath}/$(tc-arch)/${JAWTSO}" ]]; then
+ export AWT_LIB_PATH="${libpath}/$(tc-arch)"
+ 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
+
+ # Fix the pointer size for AMD64
+ export SWT_PTR_CFLAGS=-DJNI64
+
+ # Bug #461784, g_thread_init is deprecated since glib-2.32.
+ append-cflags -DNO__1g_1thread_1init
+
+ local make="emake -f make_linux.mak NO_STRIP=y CC=$(tc-getCC) CXX=$(tc-getCXX)"
+
+ einfo "Building AWT library"
+ export SWT_JAVA_HOME="$(java-config -g JAVA_HOME)"
+ ${make} make_awt AWT_LIBS="-L\$(AWT_LIB_PATH) -Wl,-rpath,\$(AWT_LIB_PATH) -ljawt \`pkg-config --libs x11\`"
+
+ einfo "Building SWT library"
+ ${make} make_swt
+
+ einfo "Building JAVA-AT-SPI bridge"
+ ${make} make_atk
+
+ if use cairo ; then
+ einfo "Building CAIRO support"
+ ${make} make_cairo
+ fi
+
+ if use opengl ; then
+ einfo "Building OpenGL component"
+ ${make} make_glx
+ fi
+
+ if use webkit ; then
+ einfo "Building WebKit component"
+ ${make} make_webkit
+ fi
+
+ java-pkg-simple_src_compile
+}
+
+src_install() {
+ java-pkg-simple_src_install
+
+ java-pkg_sointo "/usr/$(get_libdir)/swt"
+ java-pkg_doso *.so
+}