# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ DESCRIPTION="Google Web Toolkit" HOMEPAGE="http://code.google.com/webtoolkit/" SRC_URI="gwt-${PV}.tar.bz2 gwt-tools.tar.bz2" LICENSE="Apache-2.0" SLOT="0" KEYWORDS="~x86" IUSE="doc examples" COMMON_DEP=">=virtual/jre-1.4" RDEPEND="${COMMON_DEP}" DEPEND=">=virtual/jdk-1.4 >=dev-java/ant-1.6.5 >=dev-java/junit-3.8.1 dev-java/ant-contrib =dev-java/xerces-2.3.0-r1 >=dev-util/checkstyle-4.2 dev-java/mx4j-core dev-java/commons-el dev-java/commons-digester dev-java/commons-modeler " path2="" sed -i "s||${path1}${path2}|" gwt/build-tools/customchecks/build.xml # Keep only the tools/ files we need. Not necessary for successful build, # but allows us to be certain which files we actually need for the build. mv tools tools-full mkdir -p tools/lib/apache tools/lib/eclipse tools/redist mv tools-full/lib/apache/tapestry-util-text-*.jar tools/lib/apache/ mv tools-full/lib/eclipse/jdt-*.jar tools-full/lib/eclipse/org.eclipse.swt.gtk-linux-*.jar tools-full/lib/eclipse/libswt-*gtk-*.so tools/lib/eclipse/ mv tools-full/redist/mozilla tools/redist/ rm -R tools-full # TESTS WITH SWT (does not work for the moment) # TODO: see gwt/distro-source/linux/build.xml #rm tools/lib/eclipse/org.eclipse.swt.gtk-linux-3.2.1.jar #replaceJAR "org\.eclipse\.swt\.gtk-linux-.*\.jar" swt-3 swt.jar gwt/dev/core/build.xml cd gwt ant || die "The ant build failed." } src_install() { MY_W="${WORKDIR}/gwt/build/staging/gwt-linux-${GWT_VERSION}" # Perform a few modifications to the file tree mv -- "${MY_W}"/mozilla-*/COPYING "${MY_W}/mozilla-COPYING" for DOC in about.html about.txt COPYING COPYING.html index.html mozilla-COPYING release_notes.html; do dodoc "${MY_W}/${DOC}" rm -- "${MY_W}/${DOC}" done use doc || rm -R -- "${MY_W}/doc" use examples || rm -R -- "${MY_W}/samples" dodir "/opt/${PN}" cp -R "${MY_W}"/* "${D}/opt/${PN}" }