diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-06-23 07:23:47 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-06-23 07:23:47 +0100 |
commit | 8702447e13af0a540c01f75bee0416677bced231 (patch) | |
tree | c48f57af58200e8671b2cf0e8685449dffe3a12c /dev-java/swt | |
parent | 7828eef5de9e45f50282e2b1eaf348f1ac7af477 (diff) |
gentoo auto-resync : 23:06:2023 - 07:23:46
Diffstat (limited to 'dev-java/swt')
-rw-r--r-- | dev-java/swt/Manifest | 4 | ||||
-rw-r--r-- | dev-java/swt/swt-4.28.ebuild | 143 |
2 files changed, 147 insertions, 0 deletions
diff --git a/dev-java/swt/Manifest b/dev-java/swt/Manifest index 708ca2e50dad..e3c48f84b720 100644 --- a/dev-java/swt/Manifest +++ b/dev-java/swt/Manifest @@ -14,7 +14,11 @@ DIST swt-4.10-gtk-linux-x86_64.zip 3844306 BLAKE2B 0e0ed21708acce347fd025920ee63 DIST swt-4.27-gtk-linux-aarch64.zip 3849438 BLAKE2B b07daa4942c450d5cca5a323b0649a645fe9a283b272a73a9675f3bd07fbae859c41f451521231a93f4fb56ae4093d57474545611c4789c076abad2e9e1c911f SHA512 a3ba011258e5906beb15ffd5deaa73fc9a5ed5f7bce78a4a683ad8ad12a5cca1fa3a0d89fed6da9f4ade530ea3bda09093ad43202993b522a060a9dcd98746d3 DIST swt-4.27-gtk-linux-ppc64le.zip 3872996 BLAKE2B 58ae779b7103da932719fe702674e211f8f0068c3b6094172b4c58e939de96d8d43ef80d40740c29f6fcd802a252a87ba850e9e6320d881c958b0161700e4e8c SHA512 6f8f1fce502e0980ced3f201dcdeb3397a583a9ba9ebe76d82c713c440d614c4ff38efe5f596a9da25940f931e3c651c36b18211faea4fab31872d25566b060a DIST swt-4.27-gtk-linux-x86_64.zip 3869518 BLAKE2B d0eb7d1be59944cbffe5556c258043d084f7f1a8fa1d9ad9c3738896adc12aa015f85b675ba72af31de566ae451280bb83d82082b3f589c8da643631bf1f7bfb SHA512 efa89c1752340978e1aa1d2343a07df001fa952092aef959bdeedf53a31270d24ebe34ccb50e72ef2221da810ed08c53b188a80aab8a37e5932f85f6771ea1ef +DIST swt-4.28-gtk-linux-aarch64.zip 3836289 BLAKE2B 3460e8bcde76cae74d3fba94198b2f0a6b8ed21c4f123003a216421db4af03686f43a26ce00cf4c59c56f8a31b88626482ae5f13f2e92c06e2147658fa482aeb SHA512 d91ff48ca384de057d70f3a886691193bd88960c6da0e37fb4ef695c32399c0d3ab87f6174075e5637046e7b2b22a73e4b03e0133a2bdb7ee584d4fa53baa11c +DIST swt-4.28-gtk-linux-ppc64le.zip 3860453 BLAKE2B 8de275767f1bd0b68a58744804c71314760fb3d56a396db32917376583830bb0307b5169f0f8c56a200180aaf7e871a1ab01e2ed682c16a49d2d236d1ae3bc3a SHA512 56d7f82b249924966184be29d4cdac454308169247b5c7819b77f592eef7f434ba5e913d95688411667940c354cb9d9db023935925914053e04117a654e2ad91 +DIST swt-4.28-gtk-linux-x86_64.zip 3856600 BLAKE2B 6725d0a261444d113af74e36d8bc451d2a8f3fbecb13f137877d4ac3acf427944b4eeb782967bddbd30c0af88ab0c8976020731c2c70c318012053ccdde83b17 SHA512 81c42fc08432c031f8c2d862fde5ac59c96ff0b70109fb1a65b00c22f136c696d7aa9ec02416660cb71691f3c9d36de553a68315cb4e9aeee86290114e69a829 EBUILD swt-3.7.2-r3.ebuild 4286 BLAKE2B 40e4b69caa7d503bbe4a832a7b3d685fc88c6469a10bad3321b33f97959e46f4af4677afaac824526c97f683a43644e4f0fd7c45b47ba360a3e9c5f18c01edc6 SHA512 517cd181329938b7bf6108713827c29825410e3053b38c3971cfbdeacc7012c3385717e130d244f7e02d96dc18d7349d52656df552c26a452d903d2be1bee995 EBUILD swt-4.10-r2.ebuild 4528 BLAKE2B 71b929a9ca02b5918314b5bf2631aa374c089d3a749e645c84865266f1cc5eebc2de5cea17471834fc329012276722c6a922c9d9266d9c9f24c45362af3b5b9b SHA512 5d7bf83a2c1b664e5e2b76336b35100eed8eef45986dc896ef5751b50431b34cfe99d9084ecae547e54dc5b250fc793fe7dd5f8c52294c442f193c2acabec480 EBUILD swt-4.27.ebuild 3319 BLAKE2B 843acf63dd65ba10623f6a2159fa4c5164098b1e7f60fcff45c49660368ad012fca8ab7fd00a68dca4e7fe4f5597c4f0f76546100bba1ab992302831e5408d5d SHA512 362b075b4126b07f2f44bc053731be3cee0b3e9bb68b8f5d8e56815c6bccc6bc7ad8aaefd33bf38b7525b525e15b15d025e0ba02b0372305da6512174b21f743 +EBUILD swt-4.28.ebuild 3378 BLAKE2B 778373895c07349a0bddcd382c99a4d61a5f4a03426a4fb56611e0c5646ce24008e6d4dd194a79edeaecb27b764d35c148c05a62f24ebf5ff5e42ed9bab7cccf SHA512 d41180abe678cf22aca04a3e761aa6e32335ca0aebd497cb1d09b73639ad7ec2a8bf73965f148aa3e41c721d0ce74857465a0288f1f4b8f96183a644999cea0f MISC metadata.xml 761 BLAKE2B f70a4d3ff5fcfad5705772396957664e700bd3ffe9580ac141c5faa11e24562b0cbc199a2f49d61d6a2a08058374dc1b7bfd9ae258e4a692e5b3c340f478da25 SHA512 1e8b8ceb30071c8271365a2d515e094c11ab569c4fee7b7f905d5de0a7613518320a1912b2b958d816e04d9876ed75425e16de9a35e1d6be6466888e08a420b3 diff --git a/dev-java/swt/swt-4.28.ebuild b/dev-java/swt/swt-4.28.ebuild new file mode 100644 index 000000000000..3ce70c836f01 --- /dev/null +++ b/dev-java/swt/swt-4.28.ebuild @@ -0,0 +1,143 @@ +# Copyright 1999-2023 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}-202306050440" +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 )" + +LICENSE="CPL-1.0 LGPL-2.1 MPL-1.1" +SLOT="4.27" +KEYWORDS="~amd64 ~arm64 ~ppc64" +IUSE="cairo opengl webkit" + +COMMON_DEP=" + app-accessibility/at-spi2-core:2 + dev-libs/glib + x11-libs/gtk+:2 + x11-libs/libXtst + cairo? ( x11-libs/cairo ) + opengl? ( + virtual/glu + virtual/opengl + ) + webkit? ( + net-libs/webkit-gtk:4.1 + )" +DEPEND="${COMMON_DEP} + >=virtual/jdk-11:*[-headless-awt] + x11-base/xorg-proto + x11-libs/libX11 + x11-libs/libXrender + x11-libs/libXt + x11-libs/libXtst" +RDEPEND="${COMMON_DEP} + >=virtual/jre-1.8:*" +BDEPEND=" + app-arch/unzip + virtual/pkgconfig +" + +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 + 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 + mkdir src || die "mkdir failed" + mv org src || die "moving java sources failed" + find src -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 +} |