add arm support

Package-Manager: portage-2.2.14
RepoMan-Options: --force
This commit is contained in:
Mario Fetka 2015-08-07 22:24:26 +02:00
parent 85dcae3bd1
commit 5bbaec4f90
7 changed files with 484 additions and 0 deletions

10
dev-java/swt/ChangeLog Normal file
View File

@ -0,0 +1,10 @@
# ChangeLog for dev-java/swt
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
*swt-3.5.2 (07 Aug 2015)
07 Aug 2015; Mario Fetka <mario.fetka@gmail.com>
+files/as-needed-and-flag-fixes.patch, +files/build.xml,
+files/swt-3.5-manifest, +metadata.xml, +swt-3.5.2.ebuild:
add arm support

9
dev-java/swt/Manifest Normal file
View File

@ -0,0 +1,9 @@
AUX as-needed-and-flag-fixes.patch 7229 SHA256 016a810cc9649235fcab73467a056240b712d5557663b7756d4de64c939256ee SHA512 1c4d217965bd8ee9a293095dcf8abca399277a103e523610340a6f3cc25291cc53c2e89b9fed396298e5f9e7b78221df5c4bc881d65713058f029810799f8010 WHIRLPOOL c2abc3a0dfb593f8f3ab2d2f2427cc6c817367ec0c73108dff238e1110bde39c6d98b5e0adeede7d89c9296f227970db17e23893318b60f2becfb352837a69ef
AUX build.xml 458 SHA256 bbac0fb3bf9454b81e6d27dae4ebb9538cf62f2be17adcf169538749230dc8e7 SHA512 49f3a4cc04d4d9cf0609aa97e01fa409a8f2dbb953ab3a52bc9984799d0bf4092d2a63fe665d8ba6ca0428089984b6ef47bc78900c613373ca1a7b588f6c5525 WHIRLPOOL e70d35ed0834e72c83818e346e4c40af55059de096fb6ef4c4f4927f13886e88925b9caa538306aa1ec9ece966f28782282139a60f2dbefc4aec53a0401db9a9
AUX swt-3.5-manifest 752 SHA256 8ad9d69aa58e533cc03b9ccf3d8e0356505c357aaeb14968bf146f94d8b79be9 SHA512 7021ce5766ff50b999ad3474de00a2f19490e5eaef1f811b95d3cf01a43467de3e8e4913b668d019d59513ca54a159b50fd0bda427c4efcb3fddc522fa2925a6 WHIRLPOOL 09ba77a4ef824120624b9d6122a9eb6a39004e643b7e95f5a7f0f3e934a985f1cef86c838f5663ae4f3149f1953ceee0231e0d86ae7c3b9ab47a62ddee9a16ec
DIST swt-3.5.2-gtk-linux-ppc.zip 4947929 SHA256 f2619f6e107eee3c55c6694df4c89e77976d2d5517b6f3c17c358602536abf28 SHA512 2d3d194d2bb4c7f0e6d5bc801d41cb6de970de78c544a7edd2f18c4ed9291f7639dbedab4594c5221e76dd559c884c6fda7f32d11d0465a2d017fe0398a33dae WHIRLPOOL 282057de0d2e23c887db96d20ff8e39a1ea1e87adde415357903323095d4439e966218390932bebd2234dfed2117a0afa93372e9088e695770cb521ff7180501
DIST swt-3.5.2-gtk-linux-x86.zip 4881316 SHA256 00477e6fc3c913916cd980a1ec29629c5250afc52dc0fcee74b035af0360eef7 SHA512 f53226458e5404cc03475c3bb903de81efa328625b713fe97b3b418a769b0476695e437e0693b5e10fa9a356de90302d6a2d267fe5e13f172803c684db9e9c82 WHIRLPOOL 4ca8f495c6d499ed8f1f6789333a6b357978029a6138a9986b6ef309a3e60303b6399b3c288e3732b13b75eb1db45e3679a559c806113a80572b0a05a226cadd
DIST swt-3.5.2-gtk-linux-x86_64.zip 5068674 SHA256 91f9e2d4f6ca3926252d33895aafe82ba1b72bcdb77ec71dafa20d154f5d5bc7 SHA512 f226d531002dc472852f09ce9814c8dcf7b0c4209353a5639d8b814308807df6477c4a8aa0fd49743578282e6662ca8d5c316371720dca50953ad7ec44b7c6d3 WHIRLPOOL 335ab0845f3c27d3396286f26b45583cf4b71469c3567dd2a978fa3b82af7828d02925529ec686825d283207b3e3858237664f43ab4ecb56835a84ffb066033b
EBUILD swt-3.5.2.ebuild 4885 SHA256 1d68178bdcfea520ab2046119390b307c1c2f11e71b98a5d0aee257e3d2c50d4 SHA512 9c62b6e6c4b50cd24345c67172762c05df1f6a4f189683bba498cc331af1138653a6d77083ccf6c5eb814ca0c6954d570c236b25540b4f5b98197b0904fe9a57 WHIRLPOOL 918cd95905283bacf155c286911403ddf77d7bdebf25b7f6fbe6c5747a6c5217af1bc52403161d48ce8715a97eb8a9142db3fa9f47c3e8bb8d8fffe7b55f70c9
MISC ChangeLog 328 SHA256 c747e30529383f385c83af2acc2fd798fe2c1e3548c85d9ce8b9c658e58de03a SHA512 979da8464f01147c4472a32cc3852d7628805bc997b2aaab6a1812694568be9f62d926d8a96ebf3066e2dd4b02649a4e0e4adcdb65e6e906c5252252343debb4 WHIRLPOOL 8e5495b642ac311202d3c6689955e1387bf88e9652474623c62538014d82c7f0f3313d8bb0d964706fcbb5cf27a47d348e74417597718e604415731d04d2fa8a
MISC metadata.xml 578 SHA256 1e4845acfd81dc03aba0b504ac5c3307bf8d8a3bf666ece773fc483e458eaea0 SHA512 2b9ed1965582b5cd8371b473a296d620005273c82b393f5f32c3c45ce65926330bb75e4a312256c21bdb3f69a9c2a4b99f18e9396a349ba17ba94ebe647e5b8a WHIRLPOOL a32177b01a02581a0b4762e31cdf8029a88fc7e57ec9809c9a8156326a843e604a861e8f5f7bb44d8adc9e1c0c09eebb58d8d6ffd613ae531f99d6f1113cf044

View File

@ -0,0 +1,238 @@
--- make_linux.mak 2009-05-24 18:38:39.000000000 +0300
+++ make_linux.mak.fixed 2009-05-24 19:38:51.000000000 +0300
@@ -64,7 +64,7 @@
# Uncomment for Native Stats tool
#NATIVE_STATS = -DNATIVE_STATS
-MOZILLACFLAGS = -O \
+MOZILLACFLAGS = $(CXXFLAGS) \
-DSWT_VERSION=$(SWT_VERSION) \
$(NATIVE_STATS) \
-DMOZILLA_STRICT_API=1 \
@@ -92,15 +92,14 @@
XPCOMINIT_OBJECTS = swt.o xpcominit.o xpcominit_structs.o xpcominit_stats.o
GLX_OBJECTS = swt.o glx.o glx_structs.o glx_stats.o
-CFLAGS = -O -Wall \
- -DSWT_VERSION=$(SWT_VERSION) \
+CFLAGS += -DSWT_VERSION=$(SWT_VERSION) \
$(NATIVE_STATS) \
-DLINUX -DGTK \
-I$(JAVA_HOME)/include \
-I$(JAVA_HOME)/include/linux \
-fPIC \
${SWT_PTR_CFLAGS}
-LIBS = -shared -fPIC
+LIBS = -shared -fPIC $(LDFLAGS)
ifndef NO_STRIP
AWT_LIBS := $(AWT_LIBS) -s
@@ -122,7 +121,7 @@
$(CC) $(CFLAGS) -DUSE_ASSEMBLER -c callback.c
$(SWTPI_LIB): $(SWTPI_OBJECTS)
- $(CC) $(LIBS) $(GTKLIBS) -o $(SWTPI_LIB) $(SWTPI_OBJECTS)
+ $(CC) $(LIBS) -o $(SWTPI_LIB) $(SWTPI_OBJECTS) $(GTKLIBS)
swt.o: swt.c swt.h
$(CC) $(CFLAGS) -c swt.c
@@ -141,7 +140,7 @@
make_cairo: $(CAIRO_LIB)
$(CAIRO_LIB): $(CAIRO_OBJECTS)
- $(CC) $(LIBS) $(CAIROLIBS) -o $(CAIRO_LIB) $(CAIRO_OBJECTS)
+ $(CC) $(LIBS) -o $(CAIRO_LIB) $(CAIRO_OBJECTS) $(CAIROLIBS)
cairo.o: cairo.c cairo.h swt.h
$(CC) $(CFLAGS) $(CAIROCFLAGS) -c cairo.c
@@ -157,7 +156,7 @@
make_cde: $(CDE_LIB)
$(CDE_LIB): $(CDE_OBJECTS)
- $(CC) $(LIBS) $(CDE_LIBS) -o $(CDE_LIB) $(CDE_OBJECTS)
+ $(CC) $(LIBS) -o $(CDE_LIB) $(CDE_OBJECTS) $(CDE_LIBS)
#
# AWT lib
@@ -165,7 +164,7 @@
make_awt:$(AWT_LIB)
$(AWT_LIB): $(AWT_OBJECTS)
- $(CC) $(AWT_LIBS) -o $(AWT_LIB) $(AWT_OBJECTS)
+ $(CC) $(LDFLAGS) -o $(AWT_LIB) $(AWT_OBJECTS) $(AWT_LIBS)
#
# Atk lib
@@ -173,7 +172,7 @@
make_atk: $(ATK_LIB)
$(ATK_LIB): $(ATK_OBJECTS)
- $(CC) $(LIBS) $(ATKLIBS) -o $(ATK_LIB) $(ATK_OBJECTS)
+ $(CC) $(LIBS) -o $(ATK_LIB) $(ATK_OBJECTS) $(ATKLIBS)
atk.o: atk.c atk.h
$(CC) $(CFLAGS) $(ATKCFLAGS) -c atk.c
@@ -190,7 +189,7 @@
make_gnome: $(GNOME_LIB)
$(GNOME_LIB): $(GNOME_OBJECTS)
- $(CC) $(LIBS) $(GNOMELIBS) -o $(GNOME_LIB) $(GNOME_OBJECTS)
+ $(CC) $(LIBS) -o $(GNOME_LIB) $(GNOME_OBJECTS) $(GNOMELIBS)
gnome.o: gnome.c
$(CC) $(CFLAGS) $(GNOMECFLAGS) -c gnome.c
@@ -207,7 +206,7 @@
make_mozilla:$(MOZILLA_LIB)
$(MOZILLA_LIB): $(MOZILLA_OBJECTS)
- $(CXX) -o $(MOZILLA_LIB) $(MOZILLA_OBJECTS) $(MOZILLALIBS) ${MOZILLA_LIBS}
+ $(CXX) $(LDFLAGS) -o $(MOZILLA_LIB) $(MOZILLA_OBJECTS) $(MOZILLALIBS) ${MOZILLA_LIBS}
xpcom.o: xpcom.cpp
$(CXX) $(MOZILLACFLAGS) $(MOZILLAEXCLUDES) ${MOZILLA_INCLUDES} -c xpcom.cpp
@@ -227,7 +226,7 @@
make_xulrunner:$(XULRUNNER_LIB)
$(XULRUNNER_LIB): $(XULRUNNER_OBJECTS)
- $(CXX) -o $(XULRUNNER_LIB) $(XULRUNNER_OBJECTS) $(MOZILLALIBS) ${XULRUNNER_LIBS}
+ $(CXX) $(LDFLAGS) -o $(XULRUNNER_LIB) $(XULRUNNER_OBJECTS) $(MOZILLALIBS) ${XULRUNNER_LIBS}
xpcomxul.o: xpcom.cpp
$(CXX) -o xpcomxul.o $(MOZILLACFLAGS) ${XULRUNNER_INCLUDES} -c xpcom.cpp
@@ -247,7 +246,7 @@
make_xpcominit:$(XPCOMINIT_LIB)
$(XPCOMINIT_LIB): $(XPCOMINIT_OBJECTS)
- $(CXX) -o $(XPCOMINIT_LIB) $(XPCOMINIT_OBJECTS) $(MOZILLALIBS) ${XULRUNNER_LIBS}
+ $(CXX) $(LDFLAGS) -o $(XPCOMINIT_LIB) $(XPCOMINIT_OBJECTS) $(MOZILLALIBS) ${XULRUNNER_LIBS}
xpcominit.o: xpcominit.cpp
$(CXX) $(MOZILLACFLAGS) ${XULRUNNER_INCLUDES} -c xpcominit.cpp
@@ -264,7 +263,7 @@
make_glx: $(GLX_LIB)
$(GLX_LIB): $(GLX_OBJECTS)
- $(CC) $(LIBS) $(GLXLIBS) -o $(GLX_LIB) $(GLX_OBJECTS)
+ $(CC) $(LIBS) -o $(GLX_LIB) $(GLX_OBJECTS) $(GLXLIBS)
glx.o: glx.c
$(CC) $(CFLAGS) $(GLXCFLAGS) -c glx.c
--- make_freebsd.mak 2009-05-24 20:09:55.000000000 +0300
+++ make_freebsd.mak.fixed 2009-05-24 20:15:03.000000000 +0300
@@ -64,7 +64,7 @@
# Uncomment for Native Stats tool
#NATIVE_STATS = -DNATIVE_STATS
-MOZILLACFLAGS = -O \
+MOZILLACFLAGS = $(CXXFLAGS) \
-DSWT_VERSION=$(SWT_VERSION) \
$(NATIVE_STATS) \
-DMOZILLA_STRICT_API=1 \
@@ -91,15 +91,14 @@
XPCOMINIT_OBJECTS = swt.o xpcominit.o xpcominit_structs.o xpcominit_stats.o
GLX_OBJECTS = swt.o glx.o glx_structs.o glx_stats.o
-CFLAGS = -O -Wall \
- -DSWT_VERSION=$(SWT_VERSION) \
+CFLAGS += -DSWT_VERSION=$(SWT_VERSION) \
$(NATIVE_STATS) \
-DFREEBSD -DGTK \
-I$(JAVA_HOME)/include \
-I$(JAVA_HOME)/include/freebsd \
-fPIC \
${SWT_PTR_CFLAGS}
-LIBS = -shared -fPIC
+LIBS = -shared -fPIC $(LDFLAGS)
ifndef NO_STRIP
AWT_LIBS := $(AWT_LIBS) -s
@@ -121,7 +120,7 @@
$(CC) $(CFLAGS) -DUSE_ASSEMBLER -c callback.c
$(SWTPI_LIB): $(SWTPI_OBJECTS)
- $(CC) $(LIBS) $(GTKLIBS) -o $(SWTPI_LIB) $(SWTPI_OBJECTS)
+ $(CC) $(LIBS) -o $(SWTPI_LIB) $(SWTPI_OBJECTS) $(GTKLIBS)
swt.o: swt.c swt.h
$(CC) $(CFLAGS) -c swt.c
@@ -140,7 +139,7 @@
make_cairo: $(CAIRO_LIB)
$(CAIRO_LIB): $(CAIRO_OBJECTS)
- $(CC) $(LIBS) $(CAIROLIBS) -o $(CAIRO_LIB) $(CAIRO_OBJECTS)
+ $(CC) $(LIBS) -o $(CAIRO_LIB) $(CAIRO_OBJECTS) $(CAIROLIBS)
cairo.o: cairo.c cairo.h swt.h
$(CC) $(CFLAGS) $(CAIROCFLAGS) -c cairo.c
@@ -156,7 +155,7 @@
make_cde: $(CDE_LIB)
$(CDE_LIB): $(CDE_OBJECTS)
- $(CC) $(LIBS) $(CDE_LIBS) -o $(CDE_LIB) $(CDE_OBJECTS)
+ $(CC) $(LIBS) -o $(CDE_LIB) $(CDE_OBJECTS) $(CDE_LIBS)
#
# AWT lib
@@ -164,7 +163,7 @@
make_awt:$(AWT_LIB)
$(AWT_LIB): $(AWT_OBJECTS)
- $(CC) $(AWT_LIBS) -o $(AWT_LIB) $(AWT_OBJECTS)
+ $(CC) $(LDFLAGS) -o $(AWT_LIB) $(AWT_OBJECTS) $(AWT_LIBS)
#
# Atk lib
@@ -172,7 +171,7 @@
make_atk: $(ATK_LIB)
$(ATK_LIB): $(ATK_OBJECTS)
- $(CC) $(LIBS) $(ATKLIBS) -o $(ATK_LIB) $(ATK_OBJECTS)
+ $(CC) $(LIBS) -o $(ATK_LIB) $(ATK_OBJECTS) $(ATKLIBS)
atk.o: atk.c atk.h
$(CC) $(CFLAGS) $(ATKCFLAGS) -c atk.c
@@ -189,7 +188,7 @@
make_gnome: $(GNOME_LIB)
$(GNOME_LIB): $(GNOME_OBJECTS)
- $(CC) $(LIBS) $(GNOMELIBS) -o $(GNOME_LIB) $(GNOME_OBJECTS)
+ $(CC) $(LIBS) -o $(GNOME_LIB) $(GNOME_OBJECTS) $(GNOMELIBS)
gnome.o: gnome.c
$(CC) $(CFLAGS) $(GNOMECFLAGS) -c gnome.c
@@ -206,7 +205,7 @@
make_mozilla:$(MOZILLA_LIB)
$(MOZILLA_LIB): $(MOZILLA_OBJECTS)
- $(CXX) -o $(MOZILLA_LIB) $(MOZILLA_OBJECTS) $(MOZILLALIBS) ${MOZILLA_LIBS}
+ $(CXX) $(LDFLAGS) -o $(MOZILLA_LIB) $(MOZILLA_OBJECTS) $(MOZILLALIBS) ${MOZILLA_LIBS}
xpcom.o: xpcom.cpp
$(CXX) $(MOZILLACFLAGS) ${MOZILLA_INCLUDES} -c xpcom.cpp
@@ -226,7 +225,7 @@
make_xulrunner:$(XULRUNNER_LIB)
$(XULRUNNER_LIB): $(XULRUNNER_OBJECTS)
- $(CXX) -o $(XULRUNNER_LIB) $(XULRUNNER_OBJECTS) $(MOZILLALIBS) ${XULRUNNER_LIBS}
+ $(CXX) $(LDFLAGS) -o $(XULRUNNER_LIB) $(XULRUNNER_OBJECTS) $(MOZILLALIBS) ${XULRUNNER_LIBS}
xpcomxul.o: xpcom.cpp
$(CXX) -o xpcomxul.o $(MOZILLACFLAGS) ${XULRUNNER_INCLUDES} -c xpcom.cpp
@@ -252,7 +251,7 @@
make_xpcominit:$(XPCOMINIT_LIB)
$(XPCOMINIT_LIB): $(XPCOMINIT_OBJECTS)
- $(CXX) -o $(XPCOMINIT_LIB) $(XPCOMINIT_OBJECTS) $(MOZILLALIBS) ${XULRUNNER_LIBS}
+ $(CXX) $(LDFLAGS) -o $(XPCOMINIT_LIB) $(XPCOMINIT_OBJECTS) $(MOZILLALIBS) ${XULRUNNER_LIBS}
xpcominit.o: xpcominit.cpp
$(CXX) $(MOZILLACFLAGS) ${XULRUNNER_INCLUDES} -c xpcominit.cpp
@@ -269,7 +268,7 @@
make_glx: $(GLX_LIB)
$(GLX_LIB): $(GLX_OBJECTS)
- $(CC) $(LIBS) $(GLXLIBS) -o $(GLX_LIB) $(GLX_OBJECTS)
+ $(CC) $(LIBS) -o $(GLX_LIB) $(GLX_OBJECTS) $(GLXLIBS)
glx.o: glx.c
$(CC) $(CFLAGS) $(GLXCFLAGS) -c glx.c

View File

@ -0,0 +1,17 @@
<project name="SWT" default="jar" basedir=".">
<property name="src" location="."/>
<property name="build" location="build"/>
<target name="init">
<tstamp/>
<mkdir dir="${build}"/>
</target>
<target name="compile" depends="init" description="Compile the SWT toolset">
<javac srcdir="${src}" destdir="${build}"/>
</target>
<target name="jar">
<jar destfile="swt.jar" basedir="${build}"/>
</target>
</project>

View File

@ -0,0 +1,17 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Fragment-Host: org.eclipse.swt; bundle-version="[3.0.0,4.0.0)"
Bundle-SymbolicName: org.eclipse.swt.gtk.linux.SWT_ARCH; singleton:=true
Bundle-Version: 3.5
Eclipse-PlatformFilter: (& (osgi.ws=gtk) (osgi.os=linux) (osgi.arch=SWT_ARCH))
Export-Package: org.eclipse.swt.internal.accessibility.gtk; x-internal:=true,
org.eclipse.swt.internal.cairo; x-internal:=true,
org.eclipse.swt.internal.cde; x-internal:=true,
org.eclipse.swt.internal.gnome; x-internal:=true,
org.eclipse.swt.internal.gtk; x-internal:=true,
org.eclipse.swt.internal.mozilla; x-internal:=true,
org.eclipse.swt.internal.opengl.glx; x-internal:=true

13
dev-java/swt/metadata.xml Normal file
View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>java</herd>
<longdescription>
SWT is the software component that delivers native widget functionality for the
Eclipse platform in an operating system independent manner. It is analogous to
AWT/Swing in Java with a difference - SWT uses a rich set of native widgets.
</longdescription>
<use>
<flag name="webkit">Embedded browser support via net-libs/webkit-gtk:2, replacing former xulrunner-based browser.</flag>
</use>
</pkgmetadata>

View File

@ -0,0 +1,180 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-java/swt/swt-3.5.2.ebuild,v 1.9 2012/05/03 07:42:51 jdhore Exp $
EAPI=2
inherit eutils java-pkg-2 java-ant-2 toolchain-funcs java-osgi
MY_PV="${PV/_rc/RC}"
MY_DMF="download.eclipse.org/eclipse/downloads/drops/R-${MY_PV}-201002111343"
MY_P="${PN}-${MY_PV}"
DESCRIPTION="GTK based SWT Library"
HOMEPAGE="http://www.eclipse.org/"
SRC_URI="arm? (
http://${MY_DMF}/${MY_P}-gtk-linux-x86.zip
)
x86? (
http://${MY_DMF}/${MY_P}-gtk-linux-x86.zip
)
x86-fbsd? (
http://${MY_DMF}/${MY_P}-gtk-linux-x86.zip
)
amd64? (
http://${MY_DMF}/${MY_P}-gtk-linux-x86_64.zip
)
ppc? (
http://${MY_DMF}/${MY_P}-gtk-linux-ppc.zip
)
ppc64? (
http://${MY_DMF}/${MY_P}-gtk-linux-x86_64.zip
)"
SLOT="3.5"
LICENSE="CPL-1.0 LGPL-2.1 MPL-1.1"
KEYWORDS="arm amd64 ppc ppc64 x86"
IUSE="cairo gnome opengl"
COMMON=">=dev-libs/glib-2.6
>=x11-libs/gtk+-2.6.8:2
>=dev-libs/atk-1.10.2
cairo? ( >=x11-libs/cairo-1.4.14 )
gnome? (
=gnome-base/libgnome-2*
=gnome-base/gnome-vfs-2*
=gnome-base/libgnomeui-2*
)
opengl? (
virtual/opengl
virtual/glu
)
x11-libs/libXtst"
# Use a blocker to avoid file collisions when upgrading to the slotted version
# We cannot use slotmove, java packages are expected to be in /usr/share/PN-SLOT
# so this is the only way to prevent collisions
# libXtst/xextproto is done like this due to the XTest.h move - bug #292244
DEPEND=">=virtual/jdk-1.4
app-arch/unzip
x11-libs/libX11
x11-libs/libXrender
x11-libs/libXt
|| ( >=x11-libs/libXtst-1.1.0 <x11-proto/xextproto-7.1 )
x11-proto/inputproto
virtual/pkgconfig
${COMMON}"
RDEPEND=">=virtual/jre-1.4
${COMMON}"
S="${WORKDIR}"
# JNI libraries don't need SONAME, bug #253756
QA_SONAME="usr/$(get_libdir)/libswt-.*.so"
src_unpack() {
local DISTFILE=${A}
unzip -jq "${DISTDIR}"/${DISTFILE} "*src.zip" || die "Unable to extract distfile"
unpack "./src.zip"
# Cleanup the redirtied directory structure
rm -rf about_files/ || die
}
java_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.patch
}
src_compile() {
# Drop jikes support as it seems to be unfriendly with SWT
java-pkg_filter-compiler jikes
local AWT_ARCH
local JAWTSO="libjawt.so"
if [[ $(tc-arch) == 'arm' ]] ; then
AWT_ARCH="arm"
elif [[ $(tc-arch) == 'x86' ]] ; then
AWT_ARCH="i386"
elif [[ $(tc-arch) == 'ppc' ]] ; then
AWT_ARCH="ppc"
elif [[ $(tc-arch) == 'ppc64' ]] ; then
AWT_ARCH="ppc64"
else
AWT_ARCH="amd64"
fi
if [[ -f "${JAVA_HOME}/jre/lib/${AWT_ARCH}/${JAWTSO}" ]]; then
export AWT_LIB_PATH="${JAVA_HOME}/jre/lib/${AWT_ARCH}"
elif [[ -f "${JAVA_HOME}/jre/bin/${JAWTSO}" ]]; then
export AWT_LIB_PATH="${JAVA_HOME}/jre/bin"
elif [[ -f "${JAVA_HOME}/$(get_libdir)/${JAWTSO}" ]] ; then
export AWT_LIB_PATH="${JAVA_HOME}/$(get_libdir)"
else
eerror "${JAWTSO} not found in the JDK being used for compilation!"
die "cannot build AWT library"
fi
# Fix the pointer size for AMD64
[[ ${ARCH} == "amd64" || ${ARCH} == "ppc64" ]] && export SWT_PTR_CFLAGS=-DJNI64
local platform="linux"
use elibc_FreeBSD && platform="freebsd"
local make="emake -f make_${platform}.mak NO_STRIP=y CC=$(tc-getCC) CXX=$(tc-getCXX)"
einfo "Building AWT library"
${make} make_awt || die "Failed to build AWT support"
einfo "Building SWT library"
${make} make_swt || die "Failed to build SWT support"
einfo "Building JAVA-AT-SPI bridge"
${make} make_atk || die "Failed to build ATK support"
if use gnome ; then
einfo "Building GNOME VFS support"
${make} make_gnome || die "Failed to build GNOME VFS support"
fi
if use cairo ; then
einfo "Building CAIRO support"
${make} make_cairo || die "Unable to build CAIRO support"
fi
if use opengl ; then
einfo "Building OpenGL component"
${make} make_glx || die "Unable to build OpenGL component"
fi
einfo "Building JNI libraries"
eant compile
einfo "Copying missing files"
cp -i "${S}/version.txt" "${S}/build/version.txt"
cp -i "${S}/src/org/eclipse/swt/internal/SWTMessages.properties" \
"${S}/build/org/eclipse/swt/internal/"
einfo "Packing JNI libraries"
eant jar
}
src_install() {
swtArch=${ARCH}
use amd64 && swtArch=x86_64
use x86-fbsd && swtArch=x86
sed "s/SWT_ARCH/${swtArch}/" "${FILESDIR}/${PN}-3.5-manifest" > "MANIFEST_TMP.MF"
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 || die
}