--- rstudio-1.2.5033-orig/src/gwt/build.xml	2019-12-04 17:22:17.000000000 +1100
+++ rstudio-1.2.5033/src/gwt/build.xml	2020-01-10 18:35:29.913030923 +1100
@@ -28,17 +28,35 @@
             classname="com.google.javascript.jscomp.ant.CompileTask"
             classpath="${tools.dir}/compiler/compiler.jar"/>
 
+   <!-- Configure path to aopalliance -->
+   <property name="aopalliance.sdk" value="@GENTOO_PORTAGE_EPREFIX@/usr/share/aopalliance-1/lib"/>
+
+   <!-- Configure path to javax-inject -->
+   <property name="javax.inject" value="@GENTOO_PORTAGE_EPREFIX@/usr/share/javax-inject/lib"/>
+
+   <!-- Configure path to validation-api -->
+   <property name="validation.api" value="@GENTOO_PORTAGE_EPREFIX@/usr/share/validation-api-1.0/lib"/>
+   <property name="validation.api.sources" value="@GENTOO_PORTAGE_EPREFIX@/usr/share/validation-api-1.0/sources"/>
+
    <!-- Configure path to GWT SDK -->
-   <property name="gwt.sdk" value="${lib.dir}/gwt/2.8.1"/>
+   <property name="gwt.sdk" value="@GENTOO_PORTAGE_EPREFIX@/usr/share/gwt-2.8/lib"/>
+
+   <!-- Configure path to Google Gin -->
+   <property name="gin.sdk" value="@GENTOO_PORTAGE_EPREFIX@/usr/share/gin-2.1/lib"/>
 
    <property name="gwt.extra.args" value=""/>
    <property name="gwt.main.module" value="org.rstudio.studio.RStudio"/>
    <property name="ace.bin" value="${src.dir}/org/rstudio/studio/client/workbench/views/source/editors/text/ace"/>
+   <property environment="env"/>
 
    <path id="project.class.path">
      <pathelement location="${build.dir}"/>
+      <fileset dir="${aopalliance.sdk}" includes="*.jar"/>
+      <fileset dir="${javax.inject}" includes="*.jar"/>
+      <fileset dir="${validation.api}" includes="*.jar"/>
+      <fileset dir="${validation.api.sources}" includes="*.zip"/>
       <fileset dir="${gwt.sdk}" includes="*.jar"/>
-      <fileset dir="${lib.dir}/gin/2.1.2" includes="*.jar"/>
+      <fileset dir="${gin.sdk}" includes="*.jar"/>
    </path>
 
    <path id="test.class.path">
@@ -112,8 +130,10 @@
             <pathelement location="${src.dir}"/>
             <path refid="project.class.path"/>
          </classpath>
+         <jvmarg value="-Duser.home=${env.T}"/>
          <!-- add jvmarg -Xss16M or similar if you see a StackOverflowError -->
          <jvmarg value="-Xmx1536M"/>
+         <jvmarg value="-Djava.util.prefs.userRoot=${env.T}"/>
          <arg value="-war"/>
          <arg value="${www.dir}"/>
          <arg value="-localWorkers"/>
@@ -154,6 +174,7 @@
             <pathelement location="${src.dir}"/>
             <path refid="project.class.path"/>
          </classpath>
+         <jvmarg value="-Duser.home=${env.T}"/>
          <jvmarg value="-Xmx2048M"/>
          <arg value="-style"/>
          <arg value="PRETTY"/>
@@ -176,6 +197,7 @@
             <pathelement location="src"/>
             <path refid="project.class.path"/>
          </classpath>
+         <jvmarg value="-Duser.home=${env.T}"/>
          <jvmarg value="-Xmx2048M"/>
          <arg value="-style"/>
          <arg value="PRETTY"/>
@@ -202,6 +224,7 @@
             <pathelement location="src"/>
             <path refid="project.class.path"/>
          </classpath>
+         <jvmarg value="-Duser.home=${env.T}"/>
          <jvmarg value="-Xmx2048M"/>
       	<arg value="-src"/>
       	<arg value = "src"/>
@@ -237,6 +260,7 @@
             <pathelement location="${test.dir}"/>
             <pathelement location="${src.dir}"/>
         </classpath>
+        <jvmarg value="-Duser.home=${env.T}"/>
         <classpath refid="project.class.path"/>
         <classpath refid="unittest.class.path"/>
         <arg value="org.rstudio.studio.client.RStudioUnitTestSuite"/>
