summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2020-09-20 01:51:47 +0000
committerSam James <sam@gentoo.org>2020-09-20 02:03:55 +0000
commit07f5673249ad52ebd58cfaf4b544796bad3aebca (patch)
treea0c9091d8806255aa9ef2b50202b8150082cc5f6
parentdev-java/odfdom: port to EAPI 7 (diff)
downloadgentoo-07f5673249ad52ebd58cfaf4b544796bad3aebca.tar.gz
gentoo-07f5673249ad52ebd58cfaf4b544796bad3aebca.tar.bz2
gentoo-07f5673249ad52ebd58cfaf4b544796bad3aebca.zip
dev-java/swt: port to EAPI 7
Closes: https://bugs.gentoo.org/741022 Package-Manager: Portage-3.0.4, Repoman-3.0.1 Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--dev-java/swt/files/as-needed-and-flag-fixes-3.6.patch8
-rw-r--r--dev-java/swt/swt-3.7.2-r3.ebuild37
2 files changed, 26 insertions, 19 deletions
diff --git a/dev-java/swt/files/as-needed-and-flag-fixes-3.6.patch b/dev-java/swt/files/as-needed-and-flag-fixes-3.6.patch
index 16194fdc5f51..fba4a36aaf1c 100644
--- a/dev-java/swt/files/as-needed-and-flag-fixes-3.6.patch
+++ b/dev-java/swt/files/as-needed-and-flag-fixes-3.6.patch
@@ -1,5 +1,5 @@
---- make_linux.mak~ 2010-06-08 17:30:58.000000000 +0000
-+++ make_linux.mak 2010-08-09 22:48:01.515433721 +0000
+--- a/make_linux.mak 2010-06-08 17:30:58.000000000 +0000
++++ b/make_linux.mak 2010-08-09 22:48:01.515433721 +0000
@@ -66,7 +66,7 @@
# Uncomment for Native Stats tool
#NATIVE_STATS = -DNATIVE_STATS
@@ -124,8 +124,8 @@
glx.o: glx.c
$(CC) $(CFLAGS) $(GLXCFLAGS) -c glx.c
---- make_freebsd.mak~ 2010-06-08 17:30:58.000000000 +0000
-+++ make_freebsd.mak 2010-08-09 22:50:26.173246263 +0000
+--- a/make_freebsd.mak 2010-06-08 17:30:58.000000000 +0000
++++ b/make_freebsd.mak 2010-08-09 22:50:26.173246263 +0000
@@ -64,7 +64,7 @@
# Uncomment for Native Stats tool
#NATIVE_STATS = -DNATIVE_STATS
diff --git a/dev-java/swt/swt-3.7.2-r3.ebuild b/dev-java/swt/swt-3.7.2-r3.ebuild
index 1da53e158609..24e69a974015 100644
--- a/dev-java/swt/swt-3.7.2-r3.ebuild
+++ b/dev-java/swt/swt-3.7.2-r3.ebuild
@@ -1,9 +1,9 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=4
+EAPI=7
-inherit eutils java-pkg-2 java-ant-2 toolchain-funcs java-osgi
+inherit java-pkg-2 java-ant-2 java-osgi toolchain-funcs
MY_PV="${PV/_rc/RC}"
MY_DMF="http://archive.eclipse.org/eclipse/downloads/drops/R-${MY_PV}-201202080800"
@@ -33,10 +33,12 @@ COMMON_DEPEND="
virtual/glu
virtual/opengl
)"
-DEPEND="${COMMON_DEPEND}
+BDEPEND="
app-arch/unzip
- virtual/jdk:1.8
virtual/pkgconfig
+"
+DEPEND="${COMMON_DEPEND}
+ virtual/jdk:1.8
x11-base/xorg-proto
x11-libs/libX11
x11-libs/libXrender
@@ -48,7 +50,12 @@ RDEPEND="${COMMON_DEPEND}
S="${WORKDIR}"
# JNI libraries don't need SONAME, bug #253756
-QA_SONAME="usr/$(get_libdir)/libswt-.*.so"
+QA_SONAME="usr/lib.*/libswt-.*.so"
+
+PATCHES=(
+ # Fix Makefiles to respect flags and work with --as-needed
+ "${FILESDIR}"/as-needed-and-flag-fixes-3.6.patch
+)
src_unpack() {
local DISTFILE=${A}
@@ -59,18 +66,17 @@ src_unpack() {
rm -rf about_files/ || die
}
-java_prepare() {
+src_prepare() {
# Replace the build.xml to allow compilation without Eclipse tasks
cp "${FILESDIR}/build.xml" "${S}/build.xml" || die "Unable to update build.xml"
mkdir "${S}/src" && mv "${S}/org" "${S}/src" || die "Unable to restructure SWT sources"
- # Fix Makefiles to respect flags and work with --as-needed
- epatch "${FILESDIR}"/as-needed-and-flag-fixes-3.6.patch
-
case ${ARCH} in
- ppc|x86) epatch "${FILESDIR}"/${P}-gio_launch-URI-x86.patch ;;
- *) epatch "${FILESDIR}"/${P}-gio_launch-URI.patch ;;
+ ppc|x86) eapply "${FILESDIR}"/${P}-gio_launch-URI-x86.patch ;;
+ *) eapply "${FILESDIR}"/${P}-gio_launch-URI.patch ;;
esac
+
+ default
}
src_compile() {
@@ -131,7 +137,7 @@ src_compile() {
eant compile
einfo "Copying missing files"
- cp -i "${S}/version.txt" "${S}/build/version.txt"
+ cp -i "${S}/version.txt" "${S}/build/version.txt" || die
cp -i "${S}/src/org/eclipse/swt/internal/SWTMessages.properties" \
"${S}/build/org/eclipse/swt/internal/" || die
@@ -146,13 +152,14 @@ src_install() {
sed "s/SWT_ARCH/${swtArch}/" "${FILESDIR}/${PN}-${SLOT}-manifest" > "MANIFEST_TMP.MF" || die
use cairo || sed -i -e "/ org.eclipse.swt.internal.cairo; x-internal:=true,/d" "MANIFEST_TMP.MF"
- sed -i -e "/ org.eclipse.swt.internal.gnome; x-internal:=true,/d" "MANIFEST_TMP.MF"
+ sed -i -e "/ org.eclipse.swt.internal.gnome; x-internal:=true,/d" "MANIFEST_TMP.MF" || die
use opengl || sed -i -e "/ org.eclipse.swt.internal.opengl.glx; x-internal:=true,/d" "MANIFEST_TMP.MF"
- sed -i -e "/ org.eclipse.swt.internal.webkit; x-internal:=true,/d" "MANIFEST_TMP.MF"
+ sed -i -e "/ org.eclipse.swt.internal.webkit; x-internal:=true,/d" "MANIFEST_TMP.MF" || die
java-osgi_newjar-fromfile "swt.jar" "MANIFEST_TMP.MF" "Standard Widget Toolkit for GTK 2.0"
java-pkg_sointo /usr/$(get_libdir)
java-pkg_doso *.so
- dohtml about.html
+ docinto html
+ dodoc about.html
}