summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolkmar W. Pogatzki <gentoo@pogatzki.net>2024-12-22 10:27:39 +0100
committerMiroslav Šulc <fordfrog@gentoo.org>2024-12-23 07:03:59 +0100
commit2f26ce40be1ff7375853eab28c2651de3813c1fb (patch)
tree3ce3e1bfbec800b2525400b6b6c35cb45d69d381 /dev-java
parentmedia-gfx/plantuml: drop 1.2024.7 (diff)
downloadgentoo-2f26ce40be1ff7375853eab28c2651de3813c1fb.tar.gz
gentoo-2f26ce40be1ff7375853eab28c2651de3813c1fb.tar.bz2
gentoo-2f26ce40be1ff7375853eab28c2651de3813c1fb.zip
dev-java/swt: 4.34-r1 add riscv sources
Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net> Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'dev-java')
-rw-r--r--dev-java/swt/Manifest1
-rw-r--r--dev-java/swt/swt-4.34-r1.ebuild153
2 files changed, 154 insertions, 0 deletions
diff --git a/dev-java/swt/Manifest b/dev-java/swt/Manifest
index 2a5a03f3edac..dce80bbee78d 100644
--- a/dev-java/swt/Manifest
+++ b/dev-java/swt/Manifest
@@ -20,4 +20,5 @@ DIST swt-4.33-gtk-linux-ppc64le.zip 3966353 BLAKE2B 0ab4a75ac1efdedfcacdd235f45b
DIST swt-4.33-gtk-linux-x86_64.zip 3950557 BLAKE2B 6cf4f48e32bcfa40082c08a78dd8d64e9454db3859533696c7cc7cd37639ac7df980d9cfd13abaa80e95e44ad619b96944387363d2fb93d7de34f5f25052bd54 SHA512 3211a5480b886c542f99e29b715b5b1221ba679b572f1de6ca68bdb7b06eec6863c68fbddb9b70d74f13e501c3d76a220c7c8b466031b6c0a25bba5c011f8a63
DIST swt-4.34-gtk-linux-aarch64.zip 4001004 BLAKE2B 4ed2ba9b61cecfda5bad8a3701dccfb12f78617222b24a96e0752bcc481fed96afc31c8053ab38f9b0cc41e46d0c33ddd0c5f04ddba194e7a8725f6856a60d52 SHA512 1c6ab66d02ff27ec45124e46e349a99e6d20f63511c32afbd70ec4d835a86e4f1f83205c67259697bb86250758ac625460bdd105123897f53b233d1e54283cb1
DIST swt-4.34-gtk-linux-ppc64le.zip 4038598 BLAKE2B 8dd08a73c06c99cf286a894fbe42f8eb74592e4a42d03e184bc8941d067f564e2a1f13d27436ae7e0be44f5a28a0e2124d49dbae6261d841b39d832d3024e31e SHA512 c7c9048f1fc3730f27926d606301100c491b44ee5bab594d4a52bda8f0652302b0954b91d86bd7418532d596c332235a044f04bc677e4e36f33d316819a2a44b
+DIST swt-4.34-gtk-linux-riscv64.zip 4009994 BLAKE2B a7f4d3f830df978b31c0d0f07c8c3db2cbf222d8aa72d7dffd178b6c51b3e93e474eb76a78413518acda64d3e55ceab224d597733887a5bdd0ec4c73c9cc407b SHA512 abd2912878bad153b7e2cf15bdc68c713aa7fd5e33bed5569f4a2400f25f6342e95453a2331ce610905f0f8e0d171841b69e7fc50d43a07edd1f7a05f0a27815
DIST swt-4.34-gtk-linux-x86_64.zip 4021887 BLAKE2B b9d549db7e143ea79200355e59e393a1305fd30cedfe39d94cd2f02947a62a1a2dc8bea45726e59dddd2360117e8ae757b3f597a37d84bed4e88bf8d4f957797 SHA512 486e18d150e23adb197e2f88448a1c7a48d8ef0d20751b358975460b21792f59a2d7ee55ad2340de381deb5d5508dada2e01087e58fa64690a92271bd3bbc7e7
diff --git a/dev-java/swt/swt-4.34-r1.ebuild b/dev-java/swt/swt-4.34-r1.ebuild
new file mode 100644
index 000000000000..62431e6e5bb6
--- /dev/null
+++ b/dev-java/swt/swt-4.34-r1.ebuild
@@ -0,0 +1,153 @@
+# 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}-202411201800"
+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 )
+ riscv? ( ${MY_DMF}/${MY_P}-gtk-linux-riscv64.zip )"
+S="${WORKDIR}/library"
+
+LICENSE="CPL-1.0 LGPL-2.1 MPL-1.1"
+SLOT="4.34"
+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:*
+ x11-libs/libX11"
+
+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
+}