From 1919539ec916b166ea3a7b6c5778c40d5bccad70 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 28 Jun 2023 13:37:56 +0100 Subject: gentoo auto-resync : 28:06:2023 - 13:37:56 --- dev-java/Manifest.gz | Bin 58283 -> 58287 bytes dev-java/protobuf-java/Manifest | 5 +- ...obuf-java-3.23.0-unittest_retention.proto.patch | 35 +++++ dev-java/protobuf-java/metadata.xml | 8 +- dev-java/protobuf-java/protobuf-java-3.23.0.ebuild | 165 +++++++++++++++++++++ dev-java/swt/Manifest | 2 +- dev-java/swt/swt-4.28-r1.ebuild | 143 ++++++++++++++++++ dev-java/swt/swt-4.28.ebuild | 143 ------------------ 8 files changed, 353 insertions(+), 148 deletions(-) create mode 100644 dev-java/protobuf-java/files/protobuf-java-3.23.0-unittest_retention.proto.patch create mode 100644 dev-java/protobuf-java/protobuf-java-3.23.0.ebuild create mode 100644 dev-java/swt/swt-4.28-r1.ebuild delete mode 100644 dev-java/swt/swt-4.28.ebuild (limited to 'dev-java') diff --git a/dev-java/Manifest.gz b/dev-java/Manifest.gz index 0fa2edee8d37..2bb66d0784ce 100644 Binary files a/dev-java/Manifest.gz and b/dev-java/Manifest.gz differ diff --git a/dev-java/protobuf-java/Manifest b/dev-java/protobuf-java/Manifest index 6bd30d1d21d1..ee8c9bb0a7fa 100644 --- a/dev-java/protobuf-java/Manifest +++ b/dev-java/protobuf-java/Manifest @@ -1,4 +1,7 @@ +AUX protobuf-java-3.23.0-unittest_retention.proto.patch 2122 BLAKE2B b7c7297efaf11291809c46452291419482775e9cca712e000d8a1a604c01fe1bd1df3d076c56154c37ec6d32731a9384bcce1deb23b06dcaa26e0a00b4438160 SHA512 18e9da72f5fca6f1585836c37a3040c43c1db84f617f78ad91d642e9db2811953e30e8a676011ddb5e2c273698527c89487606c0428cfdcbb7c3e7d6d782832f DIST protobuf-21.12.tar.gz 5141166 BLAKE2B 33500612d103afb817062486a741e8e5503f82c42c70054d47d1899e6bb79f3fdde2666cad5b8eff6e1bc539c3b0cdf9f2b125ce7e5d3a459a69e84d67ab535e SHA512 2dc8f552388438268d8b9f7a9e84c6abf1736be3d5031438c789c317410c9f4b5cedd25bf7da6d67b3ba32ca890869f9ddaab2284d6ac0e734a5b135ffbb1346 +DIST protobuf-23.0.tar.gz 5039837 BLAKE2B 63e02590b03fd9206cdfc4a26edeb2fa55dac902f5365c33c9e9340a722f552e4a5c82d1a0b25b84fcb675d5d06b768fd92cf472743d2361295129ae9faa02f3 SHA512 46c263fab189fdc310c7310d1a3d9e76472e5d96f16228bc4b946d4211afc64188d563ec70250c11a3dd05d18158b72ccf173567bd59aa45310eff62cd5f194d DIST truth-1.1.3.jar 243021 BLAKE2B a59149038c62ef5dd352b13d4b393e1b7715fbafe5ed86ec2d16d722c738a31dcdca10132fc73b17b367ac4309e5407ba2e489f8d4c8fbca60ce5f35ae75d1e3 SHA512 f29a9fb070aff8a32358a7b6c8998c0095de5d8d68afa7f7bac759c7050309deff929e767657ecbbefd96163460f10255ca01bc567ab30df4834b9d916a4fae8 EBUILD protobuf-java-3.21.12.ebuild 4452 BLAKE2B d18bf0098fa38c538fd4852d4dc585040cbbd56ad17fbd02a18b1a4292008cdcf3307dc580ab5a5f3c95e4bb3e9025377bc524959f59df3ebb94f49c189b40f9 SHA512 5494d4060782c81d04f45f5184ac304ab846fd3fa375d0513d1481b7f99c85ebdaf6219ee170256fe7d7828121d3d44b790b23c9250aa4fc8a093d97a9d4773e -MISC metadata.xml 625 BLAKE2B 13394b9a2148b9117ce719954591e79088f845ac1ceb667bbdd2645b989daadcfea09525f9dde68c405e3f1cce5cc1af32de9fb4dff629e4745e13fa92727dd7 SHA512 47f693db57dbde04f419ed65494d81b0a800c9ac49d790c9b794baef34fb1f876da29c5a0662c45aa3c01cecd34af648e196fb76110fcc0066198c59543049b3 +EBUILD protobuf-java-3.23.0.ebuild 5007 BLAKE2B fdf28abbd24a0259167abc53a62e7699b69c3a528eebcd50a866baed6517a60f09a237e5500ae2c9b488b3407a4f55abc3fbf35ddfc459535e1e5af3d428837b SHA512 83b1a6da9f7461419e206551a1810fa491ab9b32f6a32a829f3c76a85f52c296b7743be8680f2733a65aff7bef4704489aa7a2e554786ca526146c0ad4666b66 +MISC metadata.xml 777 BLAKE2B 70de12bad5be3c8278834a4a8444c7485470c0f1822ff50f8d44280ac3c1e7150c4428cc417b59e834004cc92574a7016c90acf96728abc0b86c17ac14826df1 SHA512 7addbf4ecf146a11ab301c0e0657ec0572dfa84d4fccdd0bccb3248cab7f09956758041be670f8e22f114292447e3e00c7cd7d251c29e39b2e57eb5dd3a022c5 diff --git a/dev-java/protobuf-java/files/protobuf-java-3.23.0-unittest_retention.proto.patch b/dev-java/protobuf-java/files/protobuf-java-3.23.0-unittest_retention.proto.patch new file mode 100644 index 000000000000..c838bf3cede2 --- /dev/null +++ b/dev-java/protobuf-java/files/protobuf-java-3.23.0-unittest_retention.proto.patch @@ -0,0 +1,35 @@ +java/core/src/test/java/com/google/protobuf/DescriptorsTest.java:68: error: cannot find symbol +import protobuf_unittest.UnittestRetention; + ^ + symbol: class UnittestRetention + location: package protobuf_unittest +java/core/src/test/java/com/google/protobuf/DescriptorsTest.java:402: error: cannot find symbol + FileOptions options = UnittestRetention.getDescriptor().getOptions(); + ^ + symbol: variable UnittestRetention + location: class DescriptorsTest +java/core/src/test/java/com/google/protobuf/DescriptorsTest.java:403: error: cannot find symbol + assertThat(options.hasExtension(UnittestRetention.plainOption)).isTrue(); + ^ + symbol: variable UnittestRetention + location: class DescriptorsTest +java/core/src/test/java/com/google/protobuf/DescriptorsTest.java:404: error: cannot find symbol + assertThat(options.hasExtension(UnittestRetention.runtimeRetentionOption)).isTrue(); + ^ + symbol: variable UnittestRetention + location: class DescriptorsTest +java/core/src/test/java/com/google/protobuf/DescriptorsTest.java:405: error: cannot find symbol + assertThat(options.hasExtension(UnittestRetention.sourceRetentionOption)).isFalse(); + ^ + symbol: variable UnittestRetention + location: class DescriptorsTest +--- a/java/core/generate-test-sources-build.xml ++++ b/java/core/generate-test-sources-build.xml +@@ -19,6 +19,7 @@ + + + ++ + + + diff --git a/dev-java/protobuf-java/metadata.xml b/dev-java/protobuf-java/metadata.xml index 5fdb33c1c7c3..20b09444fc60 100644 --- a/dev-java/protobuf-java/metadata.xml +++ b/dev-java/protobuf-java/metadata.xml @@ -12,10 +12,12 @@ java@gentoo.org - - Soname version number of Protobuf - + https://github.com/protocolbuffers/protobuf/issues + https://protobuf.dev/getting-started/javatutorial/ protocolbuffers/protobuf + + Use protoc provided by dev-libs/protobuf + diff --git a/dev-java/protobuf-java/protobuf-java-3.23.0.ebuild b/dev-java/protobuf-java/protobuf-java-3.23.0.ebuild new file mode 100644 index 000000000000..aaf13ce4b65e --- /dev/null +++ b/dev-java/protobuf-java/protobuf-java-3.23.0.ebuild @@ -0,0 +1,165 @@ +# Copyright 2008-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +JAVA_PKG_IUSE="doc source test" +MAVEN_ID="com.google.protobuf:protobuf-java:3.23.0" +JAVA_TESTING_FRAMEWORKS="junit-4" + +inherit java-pkg-2 java-pkg-simple cmake + +DESCRIPTION="Core Protocol Buffers library" +HOMEPAGE="https://protobuf.dev" +# Currently we bundle the binary version of truth.jar used only for tests, we don't install it. +# And we build artifact 3.23.0 from the 23.0 tarball in order to allow sharing the tarball with +# dev-libs/protobuf. +SRC_URI="https://github.com/protocolbuffers/protobuf/archive/v${PV#3.}.tar.gz -> protobuf-${PV#3.}.tar.gz + test? ( https://repo1.maven.org/maven2/com/google/truth/truth/1.1.3/truth-1.1.3.jar )" +S="${WORKDIR}/protobuf-${PV#3.}" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x64-macos" +IUSE="system-protoc" + +DEPEND=" + >=virtual/jdk-1.8:* + test? ( + dev-java/guava:0 + dev-java/mockito:4 + ) +" +RDEPEND=">=virtual/jre-1.8:*" + +BDEPEND=" + system-protoc? ( ~dev-libs/protobuf-${PV#3.}:0 ) + !system-protoc? ( >=dev-cpp/abseil-cpp-20230125.2 ) +" + +PATCHES=( + "${FILESDIR}/protobuf-java-3.23.0-unittest_retention.proto.patch" +) + +JAVA_AUTOMATIC_MODULE_NAME="com.google.protobuf" +JAVA_JAR_FILENAME="protobuf.jar" +JAVA_RESOURCE_DIRS="java/core/src/main/resources" +JAVA_SRC_DIR="java/core/src/main/java" + +JAVA_TEST_GENTOO_CLASSPATH="guava,junit-4,mockito-4" +JAVA_TEST_SRC_DIR="java/core/src/test/java" + +run-protoc() { + if use system-protoc; then + protoc $1 + else + "${BUILD_DIR}"/protoc $1 + fi +} + +src_prepare() { + # If the corrsponding version of system-protoc is not available we build protoc locally + if use system-protoc; then + : + else + cmake_src_prepare + fi + java-pkg-2_src_prepare + + mkdir "${JAVA_RESOURCE_DIRS}" || die + # https://github.com/protocolbuffers/protobuf/blob/v23.0/java/core/pom.xml#L43-L62 + PROTOS=( $(sed \ + -n '/google\/protobuf.*\.proto/s:.*\(.*\):\1:p' \ + "${S}/java/core/pom.xml") ) || die + pushd src > /dev/null || die + cp --parents -v "${PROTOS[@]}" ../"${JAVA_RESOURCE_DIRS}" || die + popd > /dev/null || die + + # https://github.com/protocolbuffers/protobuf/blob/v23.0/java/core/generate-sources-build.xml + einfo "Replace variables in generate-sources-build.xml" + sed \ + -e 's:${generated.sources.dir}:java/core/src/main/java:' \ + -e 's:${protobuf.source.dir}:src:' \ + -e 's:^.*value="::' -e 's:\"/>::' \ + -e '/project\|echo\|mkdir\|exec/d' \ + -i java/core/generate-sources-build.xml || die "sed to sources failed" + + # https://github.com/protocolbuffers/protobuf/blob/v23.0/java/core/generate-test-sources-build.xml + einfo "Replace variables in generate-test-sources-build.xml" + sed \ + -e 's:${generated.testsources.dir}:java/core/src/test/java:' \ + -e 's:${protobuf.source.dir}:src:' \ + -e 's:${test.proto.dir}:java/core/src/test/proto:' \ + -e 's:^.*value="::' -e 's:\"/>::' \ + -e '/project\|mkdir\|exec\|Also generate/d' \ + -i java/core/generate-test-sources-build.xml || die "sed to test sources failed" + + # Split the file in two parts, one for each run-protoc call + awk '/--java_out/{x="test-sources-build-"++i;}{print > x;}' \ + java/core/generate-test-sources-build.xml || die +} + +src_configure() { + local mycmakeargs=( + -Dprotobuf_BUILD_TESTS=OFF + -Dprotobuf_ABSL_PROVIDER=package + ) + if use system-protoc; then + : + else + cmake_src_configure + fi +} + +src_compile() { + if use system-protoc; then + : + else + cmake_src_compile + fi + + einfo "Run protoc to generate sources" + run-protoc \ + @java/core/generate-sources-build.xml \ + || die "protoc sources failed" + + java-pkg-simple_src_compile +} + +src_test() { + # https://github.com/protocolbuffers/protobuf/blob/v23.0/java/core/pom.xml#L63-L71 + jar cvf testdata.jar \ + -C src google/protobuf/testdata/golden_message_oneof_implemented \ + -C src google/protobuf/testdata/golden_packed_fields_message || die + + JAVA_GENTOO_CLASSPATH_EXTRA="${DISTDIR}/truth-1.1.3.jar:testdata.jar" + + einfo "Running protoc on first part of generate-test-sources-build.xml" + run-protoc @test-sources-build-1 \ + || die "run-protoc test-sources-build-1 failed" + + einfo "Running protoc on second part of generate-test-sources-build.xml" + run-protoc @test-sources-build-2 \ + || die "run-protoc test-sources-build-2 failed" + + einfo "Running tests" + # Invalid test class 'map_test.MapInitializationOrderTest': + # 1. Test class should have exactly one public constructor + # Invalid test class 'protobuf_unittest.CachedFieldSizeTest': + # 1. Test class should have exactly one public constructor + pushd "${JAVA_TEST_SRC_DIR}" || die + local JAVA_TEST_RUN_ONLY=$(find * \ + -path "**/*Test.java" \ + ! -path "**/Abstract*Test.java" \ + ! -name "MapInitializationOrderTest.java" \ + ! -path '*protobuf_unittest/CachedFieldSizeTest.java' + ) + popd + JAVA_TEST_RUN_ONLY="${JAVA_TEST_RUN_ONLY//.java}" + JAVA_TEST_RUN_ONLY="${JAVA_TEST_RUN_ONLY//\//.}" + java-pkg-simple_src_test +} + +src_install() { + java-pkg-simple_src_install +} diff --git a/dev-java/swt/Manifest b/dev-java/swt/Manifest index e3c48f84b720..2ddc5594b38e 100644 --- a/dev-java/swt/Manifest +++ b/dev-java/swt/Manifest @@ -20,5 +20,5 @@ DIST swt-4.28-gtk-linux-x86_64.zip 3856600 BLAKE2B 6725d0a261444d113af74e36d8bc4 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 +EBUILD swt-4.28-r1.ebuild 3378 BLAKE2B 6f766d449b9c827a5fa884adbcd2f42f2fe128c72d8277d7d9b8b33c2581acac8bb00b976658c9084a105e6f12e69508c00470c0818f56f8730f9aeb4966e187 SHA512 fcde9659382a4fa8f7c756e9950fe6a180d3bcc71104b789cbe4973b14c2601c535c0bd65217204299038126227188a8facf1b8b59ba24e94c14a2d1ec2a92e1 MISC metadata.xml 761 BLAKE2B f70a4d3ff5fcfad5705772396957664e700bd3ffe9580ac141c5faa11e24562b0cbc199a2f49d61d6a2a08058374dc1b7bfd9ae258e4a692e5b3c340f478da25 SHA512 1e8b8ceb30071c8271365a2d515e094c11ab569c4fee7b7f905d5de0a7613518320a1912b2b958d816e04d9876ed75425e16de9a35e1d6be6466888e08a420b3 diff --git a/dev-java/swt/swt-4.28-r1.ebuild b/dev-java/swt/swt-4.28-r1.ebuild new file mode 100644 index 000000000000..46698300250e --- /dev/null +++ b/dev-java/swt/swt-4.28-r1.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+: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-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 +} diff --git a/dev-java/swt/swt-4.28.ebuild b/dev-java/swt/swt-4.28.ebuild deleted file mode 100644 index 3ce70c836f01..000000000000 --- a/dev-java/swt/swt-4.28.ebuild +++ /dev/null @@ -1,143 +0,0 @@ -# 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 -} -- cgit v1.2.3