Installing Sencha CMD with Emergence on Gentoo

Configure Build Options

This guide will assume that you are starting after completing the Installing Emergence on Gentoo Linux guide.

We will be installing Oracle Java JRE, rubygems, compass, and Sencha CMD.

All documentation examples will show text editing with nano to follow Gentoo handbook conventions. You may of course use any editor you wish.

Accept license and download software

Since Oracle requires acceptance of their license terms before downloading the JRE, Gentoo can't do it automatically.

  1. Open
  2. Click the download button for the Standard Edition JRE
  3. Review and click the radio input to accept Oracle's license agreement
  4. Click the download link for the Linux x64 version in .tar.gz format
  5. Allow the download to start and then cancel it. Use your browser's download manager to copy the full URL with your unique AuthParam, which you won't get until you let your browser start the download. Copying the link itself won't work
  6. Finally, download the archive directly to your server using your terminal and place it where Gentoo expects it:

user@hostname ~ $ wget[Your Unique Token]

user@hostname ~ $ sudo mv jre-7u9-linux-x64.tar.gz\?* /var/portage/distfiles/jre-7u9-linux-x64.tar.gz

Unmask oracle-jre-bin for 64-bit

If you're running the amd64 version of Gentoo you'll need to unmask oracle-jre-bin.


user@hostname ~ $ sudo nano -w /etc/portage/package.keywords

Add these lines to /etc/portage/package.keywords


=dev-java/oracle-jre-bin- ~amd64

Accept license for oracle-jre-bin

You need to review and explicitely accept Oracle's license to install oracle-jre-bin on Gentoo.


user@hostname ~ $ sudo nano -w /etc/portage/package.license

Add these lines to /etc/portage/package.license


>=dev-java/oracle-jre-bin-1.7 Oracle-BCLA-JavaSE

Prevent installation of GUI features

We'll be installing some packages with rendering dependencies that will pull in a ton of desktop components without these global USE flag changes:


user@hostname ~ $ sudo nano -w /etc/make.conf

Add these lines to /etc/make.conf. If you already have a line setting USE, append the flags within the quotes to the end of your existing value, ensuring a space is between the two sets


USE="-X -alsa -cups"

Install dependencies

We have to install two dependencies, java-config and java-config-wrapper, using the --nodeps option to prevent Portage from installing the IcedTea JRE. IcedTea is Gentoo's preferred JRE but Oracle's will work in its place, and Sencha CMD requires Oracle's JRE.


user@hostname ~ $ sudo emerge -av --nodeps java-config java-config-wrapper

user@hostname ~ $ sudo emerge -av oracle-jre-bin rubygems fontconfig unzip

user@hostname ~ $ sudo eselect java-vm set system 1

user@hostname ~ $ sudo gem install compass

Install Sencha CMD

Visit Sencha's CMD Linux 64-bit download page, cancel your browser's download and instead copy the download URL from the "click here" link.

Then download, decompress, and execute the CMD installer:


user@hostname ~ $ wget

user@hostname ~ $ unzip SenchaCmd-*

user@hostname ~ $ chmod +x SenchaCmd-*.run

user@hostname ~ $ sudo ./SenchaCmd-*.run

  1. Within the installer, first accept Sencha's license
  2. Then specify /usr/local/bin as the installation directory
  3. Finally, enter Y to confirm the installation

After Sencha CMD is installed, we need to create a symlink for emergence to use for finding the current version. You may need to update if you just installed a newer version.


user@hostname ~ $ cd /usr/local/bin/Sencha/Cmd/

user@hostname /usr/local/bin/Sencha/Cmd $ sudo ln -sf current

Install Sencha SDKs

Now we must install the SDKs for Sencha Touch and ExtJS

Visit Sencha's ExtJS SDK download page and Sencha's Touch SDK download page to review licensing terms and obtain current and appropriately-licensed download URLs:

Then download and extract the SDKs to your local library. Update version numbers where needed.


user@hostname ~ $ sudo mkdir -p /usr/local/lib/sencha/touch /usr/local/lib/sencha/ext

user@hostname ~ $ wget

user@hostname ~ $ sudo unzip -d /usr/local/lib/sencha/touch/2.1.0

user@hostname ~ $ wget

user@hostname ~ $ sudo unzip -d /usr/local/lib/sencha/ext/4.1.1a

user@hostname ~ $ sudo chown -R nobody:nobody /usr/local/lib/sencha