Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 344455

Summary: dev-java/swt-3.5.2 ported to SPARC
Product: Gentoo Linux Reporter: Alex Buell <alex.buell>
Component: New packagesAssignee: Java team <java>
Status: RESOLVED WONTFIX    
Severity: enhancement CC: sparc
Priority: High    
Version: 10.1   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 159780    
Bug Blocks: 346743    
Attachments: Dirty patch to allow SWT 3.5.2 porting to SPARC

Description Alex Buell 2010-11-06 23:27:58 UTC
When porting to SPARC, I noticed a couple of problems with the swt ebuild (and this may also apply to the other ebuilds). 

1. This is a source build, why is it downloading architecture specific tarballs? It is fortunate the sources are supplied with these tarballs. Wouldn't be simpler to just get the sources and conditionally compile for the required architecture? 

2. This part: 
local JAWTSO="libjawt.so"
    if [[ $(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

Wouldn't it be simpler to just filter out architectures that aren't supported? 

To port to to the SPARC, I simply added the following:

    elif [[ $(tc-arch) == 'sparc' ]] ; then
        AWT_ARCH="sparc"

3. To get a tarball downloaded for SPARC, I added the following:

       sparc? (
            http://${MY_DMF}/${MY_P}-gtk-linux-x86.zip
        )

Hey, it might be for x86, but the sources contained within it can be built for any architecture. 

I've attached a quick and dirty hack but I'd like feedback before I rewrite the ebuild to do this in a cleaner way in order to support architectures such as SPARC and SPARC64 (yes, we hope to build a 64 bit JVM!)
Comment 1 Alex Buell 2010-11-06 23:30:10 UTC
Created attachment 253453 [details]
Dirty patch to allow SWT 3.5.2 porting to SPARC
Comment 2 Patrice Clement gentoo-dev 2016-02-08 20:26:44 UTC
Hi there

Are you still interested in porting SWT to SPARC? Please let us know. Thanks.
Comment 3 James Le Cuirot gentoo-dev 2016-02-08 20:28:12 UTC
Forget it, we don't support Java on SPARC any more.