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:
if [[ $(tc-arch) == 'x86' ]] ; then
elif [[ $(tc-arch) == 'ppc' ]] ; then
elif [[ $(tc-arch) == 'ppc64' ]] ; then
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
3. To get a tarball downloaded for SPARC, I added the following:
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!)
Created attachment 253453 [details]
Dirty patch to allow SWT 3.5.2 porting to SPARC
Are you still interested in porting SWT to SPARC? Please let us know. Thanks.
Forget it, we don't support Java on SPARC any more.