<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>One hand clapping</title>
	<atom:link href="http://warped.org/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://warped.org/blog</link>
	<description>Max Baker -- A Man with a Hand</description>
	<lastBuildDate>Mon, 10 May 2010 03:26:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Phone + Endomondo + Google Earth = Geeks Workout</title>
		<link>http://warped.org/blog/2010/05/09/phone-endomondo-google-earth-geeks-workout/</link>
		<comments>http://warped.org/blog/2010/05/09/phone-endomondo-google-earth-geeks-workout/#comments</comments>
		<pubDate>Mon, 10 May 2010 03:26:25 +0000</pubDate>
		<dc:creator>max</dc:creator>
				<category><![CDATA[Bikes]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[biking]]></category>
		<category><![CDATA[endomondo]]></category>
		<category><![CDATA[gps]]></category>

		<guid isPermaLink="false">http://warped.org/blog/?p=135</guid>
		<description><![CDATA[Overview
Let&#8217;s say you want to track a run, hike or bike using your smart phone and GPS.  Now let&#8217;s say you want to brag about it on facebook, store stats, and then make little fly-over tours in Google Earth.

Enter EndoMondo a web site for tracking such things using GPS.  It has the best [...]]]></description>
			<content:encoded><![CDATA[<h1>Overview</h1>
<p>Let&#8217;s say you want to track a run, hike or bike using your smart phone and GPS.  Now let&#8217;s say you want to brag about it on facebook, store stats, and then make little fly-over tours in Google Earth.
</p>
<p>Enter <a href="http://www.endomondo.com">EndoMondo</a> a web site for tracking such things using GPS.  It has the best GPS logger for Android as far as I can tell, and also has clients for &#8220;<a href="http://www.endomondo.com/help">Android, Blackberry, iPhone, Java, Symbian S60, Windows Mobile 6.1 and newer&#8221;</a>.  And if that&#8217;s not enough it will just import GPS files from your watch or stand-alone GPS.
</p>
<ol>
<li>Install the Endomondo app on your phone</li>
<li>Log your trek using the Endomondo application for your phone or your GPS.</li>
<li>Go to the endomondo.com website and Choose export from the log:<br />
<br /><a href="http://warped.org/blog/wp-content/uploads/2010/05/gps_log.png"><img src="http://warped.org/blog/wp-content/uploads/2010/05/gps_log-300x209.png" alt="Endomondo" title="Endomondo" width="300" height="209" class="alignnone size-medium wp-image-136" /></a>
</li>
<li>Export to .gpx format :<br />
<br /><a href="http://warped.org/blog/wp-content/uploads/2010/05/gps_export.png"><img src="http://warped.org/blog/wp-content/uploads/2010/05/gps_export-300x192.png" alt="gps_export" title="gps_export" width="300" height="192" class="alignnone size-medium wp-image-141" /></a>
</li>
<li>Now you need to translate the Garamond .gpx XML file into Google Earth&#8217;s .kml format.   At some point Endomondo will add this export feature straight in, but until then use the fabulous <a href="http://www.gpsvisualizer.com/convert_input">GPS Visualizer File Converter</a>.   Click &#8220;upload the file&#8221; and then choose output type of &#8220;Google Earth KML&#8221;.</li>
<li>Now double click the file to open it in Google Earth.  Once in there you may want to change your Tour settings in Options.<br />
<br /><a href="http://warped.org/blog/wp-content/uploads/2010/05/google_earth_touring.png"><img src="http://warped.org/blog/wp-content/uploads/2010/05/google_earth_touring-300x232.png" alt="google_earth_touring" title="google_earth_touring" width="300" height="232" class="alignnone size-medium wp-image-148" /></a><br />
<br />Try starting with 10 degrees, 500 meters and Speed of 250.
</li>
<li>Now let&#8217;s start the tour.  Once you have opened the .KML file you then double-click on the trek in &#8220;Tracks&#8221;,  then Click the little tour icon nearby, then you can start and stop the tour in the scroll bar thinger at the bottom.  The three red arrows show you the steps:<br />
<a href="http://warped.org/blog/wp-content/uploads/2010/05/google_earth_go.png"><img src="http://warped.org/blog/wp-content/uploads/2010/05/google_earth_go-300x284.png" alt="google_earth_go" title="google_earth_go" width="300" height="284" class="alignnone size-medium wp-image-149" /></a><br />
You can then send that .KML file to anyone or post it to Facebook.
</li>
</ol>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://warped.org/blog/2010/05/09/phone-endomondo-google-earth-geeks-workout/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ch0wned &#8211; Adding  Open Office 3.x and Java on EL4 for X86_64 in your homedir</title>
		<link>http://warped.org/blog/2010/04/07/ch0wned-adding-open-office-3-x-and-java-on-el4-for-x86_64-in-your-homedir/</link>
		<comments>http://warped.org/blog/2010/04/07/ch0wned-adding-open-office-3-x-and-java-on-el4-for-x86_64-in-your-homedir/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 17:11:52 +0000</pubDate>
		<dc:creator>max</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[ch0wned]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[open office]]></category>

		<guid isPermaLink="false">http://warped.org/blog/?p=132</guid>
		<description><![CDATA[ch0wned. adj. This is the state when you are a Linux user and don't have root access. 

Intro

Continuing my install series, here&#8217;s how you get OpenOffice 3 and Java w/ the Browser plugin working out of your homedirectory on an old linux install (EL4) without root access.  I assume you already have a working [...]]]></description>
			<content:encoded><![CDATA[<p><tt>ch0wned. adj. This is the state when you are a Linux user and don't have root access. </tt>
</p>
<h1>Intro</h1>
<p>
Continuing my install series, here&#8217;s how you get OpenOffice 3 and Java w/ the Browser plugin working out of your homedirectory on an old linux install (EL4) without root access.  I assume you already have <a href="http://warped.org/blog/2010/04/06/ch0wned-building-your-own-firefox-on-el4-for-x86_64-in-your-homedir/">a working 64-bit firefox compiled</a>.
</p>
<p>
This guide assumes you&#8217;re leaving off from my previous post : <a href="http://warped.org/blog/2009/03/04/chown3d-part-2-gtk-and-glib-in-your-own-home-directory/">http://warped.org/blog/2009/03/04/chown3d-part-2-gtk-and-glib-in-your-own-home-directory/</a>  where you&#8217;ve setup a script called config_gapp.
</p>
<h1>Downloads</h1>
<ul>
<li>OOo_3.2.0_LinuxX86-64_install_wJRE_en-US.tar.gz</li>
<li>jdk-6u19-linux-x64.bin</li>
</ul>
<h1>Building</h1>
<ol>
<li>Open Office
<p>
After unpackaging open office run ./setup in the directory it creates.  Select $HOME/share/oo-3.2 as a destination and now you will run into your first error:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> error: can<span style="color: #ff0000;">'t create transaction lock on /var/lock/rpm/transaction</span></pre></div></div>

<p>This is due to a <a href="https://bugzilla.redhat.com/show_bug.cgi?id=222194">janky version of RPM that comes with EL4 and maybe EL5</a>.  Create the file ~/.rpmmacros with the following line :</p>

<div class="wp_syntax"><div class="code"><pre class="spec" style="font-family:monospace;">%_rpmlock_path %{_dbpath}/__db.000</pre></div></div>

<p>Now go run ./setup again.  Choose Advanced, uncheck &#8220;Gnome Integration&#8221;.  Here you will run into the second error :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Package Name: ooobasis3.2-core04-3.2.0-9483.x86_64.rpm 
&nbsp;
rpm <span style="color: #660033;">--upgrade</span> <span style="color: #660033;">--ignoresize</span> <span style="color: #660033;">-vh</span> <span style="color: #660033;">--relocate</span> <span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">opt</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$USER</span><span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>oo <span style="color: #660033;">--dbpath</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$USER</span><span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>oo<span style="color: #000000; font-weight: bold;">/</span>.RPM_OFFICE_DATABASE OOO320_m12_native_packed-<span style="color: #000000;">1</span>_en-US.9483<span style="color: #000000; font-weight: bold;">/</span>RPMS<span style="color: #000000; font-weight: bold;">/</span>ooobasis3.2-core04-3.2.0-9483.x86_64.rpm 
Returns: <span style="color: #000000;">1</span> 
Error during installation  
error: Failed dependencies: libfreetype.so.6<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>64bit<span style="color: #7a0874; font-weight: bold;">&#41;</span> is needed by ooobasis3.2-core04-3.2.0-9483.x86_64</pre></div></div>

<p>But since we know we already have this dependency installed in from my previous ch0wned post in $HOME, we can work around this.  Create a file $HOME/bin/rpm that will override this for the time being:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> <span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>rpm <span style="color: #660033;">--nodeps</span> <span style="color: #ff0000;">&quot;$@&quot;</span></pre></div></div>

<p>And now you can re-run setup a 3rd time, select advanced, deselect gnome integration and GO.  Last step is to create some symlinks to the sbase / scalc / sdraw / swriter / smath / soffice executables in your $HOME/bin directory.   You may need to create a small wrapper that calls them with run_gapp.  Be sure to remove that $HOME/bin/rpm script when you&#8217;re done.
</p>
</li>
<li>Java x86_64 w/ Firefox Plugin
<p>
Download the .bin copy of the JDK.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">chmod</span> +x jdk<span style="color: #000000; font-weight: bold;">*</span>
.<span style="color: #000000; font-weight: bold;">/</span>jdk<span style="color: #000000; font-weight: bold;">*</span>
<span style="color: #c20cb9; font-weight: bold;">mv</span> jdk<span style="color: #000000; font-weight: bold;">*</span> <span style="color: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>share 
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>bin <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>jdk<span style="color: #000000; font-weight: bold;">*/</span>bin<span style="color: #000000; font-weight: bold;">/</span>j<span style="color: #000000; font-weight: bold;">*</span> .</pre></div></div>

<p>Now for the browser plugin part</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> ~<span style="color: #000000; font-weight: bold;">/</span>.mozilla<span style="color: #000000; font-weight: bold;">/</span>plugins
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> ~<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>jdk<span style="color: #000000; font-weight: bold;">*/</span>jre<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>amd64<span style="color: #000000; font-weight: bold;">/</span>libnpjp2.so .</pre></div></div>

<p>Restart your browser and go to &#8220;about:plugins&#8221; et viola.
</p>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://warped.org/blog/2010/04/07/ch0wned-adding-open-office-3-x-and-java-on-el4-for-x86_64-in-your-homedir/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ch0wned &#8211; Building your own Thunderbird 3 on EL4 for X86_64 in your homedir</title>
		<link>http://warped.org/blog/2010/04/06/ch0wned-building-your-own-thunderbird-3-on-el4-for-x86_64-in-your-homedir/</link>
		<comments>http://warped.org/blog/2010/04/06/ch0wned-building-your-own-thunderbird-3-on-el4-for-x86_64-in-your-homedir/#comments</comments>
		<pubDate>Tue, 06 Apr 2010 23:47:04 +0000</pubDate>
		<dc:creator>max</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[ch0wned]]></category>
		<category><![CDATA[thunderbird]]></category>

		<guid isPermaLink="false">http://warped.org/blog/?p=128</guid>
		<description><![CDATA[ch0wned. adj. This is the state when you are a Linux user and don't have root access. 
Intro
Having just gone through my guide on installing Firefox now you&#8217;re ready to do basically the same thing for Thunderbird.


This guide assumes you&#8217;re leaving off from my previous post : http://warped.org/blog/2009/03/04/chown3d-part-2-gtk-and-glib-in-your-own-home-directory/  where you&#8217;ve setup a script called [...]]]></description>
			<content:encoded><![CDATA[<p><tt>ch0wned. adj. This is the state when you are a Linux user and don't have root access. </tt></p>
<h1>Intro</h1>
<p>Having just gone through my <a href="http://warped.org/blog/2010/04/06/ch0wned-building-your-own-firefox-on-el4-for-x86_64-in-your-homedir/">guide on installing Firefox</a> now you&#8217;re ready to do basically the same thing for Thunderbird.
</p>
<p>
This guide assumes you&#8217;re leaving off from my previous post : <a href="http://warped.org/blog/2009/03/04/chown3d-part-2-gtk-and-glib-in-your-own-home-directory/">http://warped.org/blog/2009/03/04/chown3d-part-2-gtk-and-glib-in-your-own-home-directory/</a>  where you&#8217;ve setup a script called config_gapp.
</p>
<h1>Prerequisites</h1>
<ul>
<li>firefox-3.6.2.source.tar.bz2 </li>
<li>nss-3.12.6-with-nspr-4.8.4.tar.gz</li>
<li>sqlite-amalgamation-3.6.23.1.tar.gz</li>
<li>Python-2.5.5.tar.bz2</li>
<li><a href="http://www.linuxfromscratch.org/blfs/view/svn/general/nspr.html">NSPR Patch from Standalone Linux</a> (READ THIS!)</li>
<li><a href="http://www.linuxfromscratch.org/blfs/view/svn/postlfs/nss.html">NSS Patch from Standalone Linux</a> (READ THIS!)</li>
<li>My Patch for OSS</li>
</ul>
<h2>Building</h2>
<p>Follow <a href="http://warped.org/blog/2010/04/06/ch0wned-building-your-own-firefox-on-el4-for-x86_64-in-your-homedir/">my guide on installing Firefox</a> for all the prereqs.</p>
<h1>Thunderbird 3.0 Building</h1>
<h2>Configuring</h2>
<p>Make a file called mozconfig-tbird</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mk_add_options <span style="color: #007800;">MOZ_OBJDIR</span>=<span style="color: #000000; font-weight: bold;">@</span>TOPSRCDIR<span style="color: #000000; font-weight: bold;">@/</span>objdir-tb-release
mk_add_options <span style="color: #007800;">MOZ_MAKE_FLAGS</span>=<span style="color: #ff0000;">&quot;-j4&quot;</span>
&nbsp;
ac_add_options <span style="color: #660033;">--enable-application</span>=mail
ac_add_options <span style="color: #660033;">--enable-official-branding</span>
ac_add_options <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$USER</span><span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>thunderbird
<span style="color: #666666; font-style: italic;"># required for make package for tbird now?</span>
ac_add_options <span style="color: #660033;">--enable-static</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Optimization</span>
ac_add_options <span style="color: #660033;">--disable-tests</span>
ac_add_options <span style="color: #660033;">--disable-debug</span>
ac_add_options <span style="color: #660033;">--enable-optimize</span>=<span style="color: #ff0000;">&quot;-O2 -funroll-loops -fexpensive-optimizations&quot;</span>
ac_add_options <span style="color: #660033;">--enable-strip</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Features</span>
ac_add_options <span style="color: #660033;">--disable-accessibility</span>
ac_add_options <span style="color: #660033;">--disable-updater</span>
ac_add_options <span style="color: #660033;">--disable-installer</span>
<span style="color: #666666; font-style: italic;">#ac_add_options --enable-safe-browsing</span>
ac_add_options <span style="color: #660033;">--enable-xinerama</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Libraries / Dependencies</span>
ac_add_options <span style="color: #660033;">--disable-libnotify</span>
ac_add_options <span style="color: #660033;">--disable-gnomevfs</span>
ac_add_options <span style="color: #660033;">--enable-default-toolkit</span>=cairo-gtk2
ac_add_options <span style="color: #660033;">--enable-system-cairo</span>
ac_add_options <span style="color: #660033;">--with-system-nss</span>
ac_add_options <span style="color: #660033;">--with-nss-prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$USER</span>
ac_add_options <span style="color: #660033;">--with-system-nspr</span>
ac_add_options <span style="color: #660033;">--with-nspr-prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$USER</span>
ac_add_options <span style="color: #660033;">--enable-system-sqlite</span></pre></div></div>

<h2>Building</h2>
<p>I had to patch firefox to use OSS instead of ALSA because EL4 doesn&#8217;t have a working ALSA by default.  If you have ALSA working, you may not have to do this step.  I got the guts of this patch from somewhere, but I can&#8217;t find it now, thanks whoever you are!</p>
<p>
The patch is on my build firefox page referenced above.
</p>
<p>The following is a fork of my config_gapp script.  There are some tricky bits because I&#8217;ve left off some -L&#8217;s to avoid the NSS and NSPR libs that are installed in /usr/lib64.
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #007800;">LOCAL_HOME</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$USER</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PATH</span>=<span style="color: #007800;">$LOCAL_HOME</span><span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #007800;">$PATH</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">CPPFLAGS</span>=<span style="color: #ff0000;">&quot;-I<span style="color: #007800;">$LOCAL_HOME</span>/include -I<span style="color: #007800;">$LOCAL_HOME</span>/include/nss -I/usr/X11R6/include <span style="color: #007800;">$CPPFLAGS</span>&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">CFLAGS</span>=<span style="color: #ff0000;">&quot;-I<span style="color: #007800;">$LOCAL_HOME</span>/include -I<span style="color: #007800;">$LOCAL_HOME</span>/include/nss -I/usr/X11R6/include <span style="color: #007800;">$CFLAGS</span>&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">CXXFLAGS</span>=<span style="color: #ff0000;">&quot;-I<span style="color: #007800;">$LOCAL_HOME</span>/include -I<span style="color: #007800;">$LOCAL_HOME</span>/include/nss  -I/usr/X11R6/include  <span style="color: #007800;">$CXXFLAGS</span>&quot;</span>
<span style="color: #666666; font-style: italic;">#export LDFLAGS=&quot;-L$LOCAL_HOME/lib -L/usr/lib64 -L/usr/X11R6/lib64 $LDFLAGS&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">LDFLAGS</span>=<span style="color: #ff0000;">&quot;-L<span style="color: #007800;">$LOCAL_HOME</span>/lib -L/usr/X11R6/lib64 <span style="color: #007800;">$LDFLAGS</span>&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PKG_CONFIG</span>=<span style="color: #007800;">$LOCAL_HOME</span><span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>pkg-config
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PKG_CONFIG_PATH</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$LOCAL_HOME</span>/lib/pkgconfig:/usr/lib64/pkgconfig:<span style="color: #007800;">$PKG_CONFIG_PATH</span>&quot;</span>
<span style="color: #666666; font-style: italic;">#export LD_LIBRARY_PATH=&quot;$LOCAL_HOME/lib:/usr/X11R6/lib64:/usr/lib64&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">LD_LIBRARY_PATH</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$LOCAL_HOME</span>/lib:/usr/X11R6/lib64&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># NOTE: I had to hardcode the path for some reason</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">MOZCONFIG</span>=<span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>mozconfig-tbird
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #660033;">-j</span> <span style="color: #000000;">4</span> <span style="color: #660033;">-f</span> client.mk build 
&nbsp;
<span style="color: #666666; font-style: italic;"># make package</span>
<span style="color: #666666; font-style: italic;"># look in dist/*.tar.bz2</span></pre></div></div>

<h2>Installing</h2>
<p>First you make a .tar.bz2, then you go install it.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> objdir-tb-release
<span style="color: #c20cb9; font-weight: bold;">make</span> package
<span style="color: #c20cb9; font-weight: bold;">cp</span> mozilla<span style="color: #000000; font-weight: bold;">/</span>dist<span style="color: #000000; font-weight: bold;">/*</span>.tar.bz2 <span style="color: #000000; font-weight: bold;">/</span>somewhere
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>share
<span style="color: #c20cb9; font-weight: bold;">tar</span> xvfj <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>that<span style="color: #000000; font-weight: bold;">/*</span>.tar.bz2</pre></div></div>

<p>Now make a wrapper script $HOME/bin/thunderbird :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">exec</span> run_gapp <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$USER</span><span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>thunderbird<span style="color: #000000; font-weight: bold;">/</span>thunderbird <span style="color: #ff0000;">&quot;$@&quot;</span></pre></div></div>

<h2>Errors</h2>
<p>Here are some of the error messages I encountered along the way that were solved w/ the prerequisites and patch.  Hopefully this helps future googlers.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">nsUrlClassifierDBService.cpp:<span style="color: #7a0874; font-weight: bold;">&#40;</span>.text+0x678<span style="color: #7a0874; font-weight: bold;">&#41;</span>: undefined reference to <span style="color: #000000; font-weight: bold;">`</span>inflateInit_<span style="color: #ff0000;">'
nsUrlClassifierDBService.cpp:(.text+0x69c): undefined reference to `inflate'</span>
nsUrlClassifierDBService.cpp:<span style="color: #7a0874; font-weight: bold;">&#40;</span>.text+0x6d4<span style="color: #7a0874; font-weight: bold;">&#41;</span>: undefined reference to <span style="color: #000000; font-weight: bold;">`</span>inflateEnd<span style="color: #ff0000;">'</span></pre></div></div>

<p>Changed thunderbird-3.0.4/objdir-tb-release/mozilla/toolkit/components/build/Makefile to add libz to the compile.  I&#8217;m sure there&#8217;s a classier way of doing this.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">EXTRA_DSO_LDOPTS += \
    $<span style="color: #7a0874; font-weight: bold;">&#40;</span>LIBS_DIR<span style="color: #7a0874; font-weight: bold;">&#41;</span> \
    $<span style="color: #7a0874; font-weight: bold;">&#40;</span>EXTRA_DSO_LIBS<span style="color: #7a0874; font-weight: bold;">&#41;</span> \
    $<span style="color: #7a0874; font-weight: bold;">&#40;</span>MOZ_UNICHARUTIL_LIBS<span style="color: #7a0874; font-weight: bold;">&#41;</span> \
    $<span style="color: #7a0874; font-weight: bold;">&#40;</span>MOZ_COMPONENT_LIBS<span style="color: #7a0874; font-weight: bold;">&#41;</span> \
    $<span style="color: #7a0874; font-weight: bold;">&#40;</span>MOZ_JS_LIBS<span style="color: #7a0874; font-weight: bold;">&#41;</span> \
    $<span style="color: #7a0874; font-weight: bold;">&#40;</span>NULL<span style="color: #7a0874; font-weight: bold;">&#41;</span> \
    <span style="color: #660033;">-lz</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>thunderbird-3.0.4<span style="color: #000000; font-weight: bold;">/</span>directory<span style="color: #000000; font-weight: bold;">/</span>c-sdk<span style="color: #000000; font-weight: bold;">/</span>ldap<span style="color: #000000; font-weight: bold;">/</span>libraries<span style="color: #000000; font-weight: bold;">/</span>libprldap<span style="color: #000000; font-weight: bold;">/</span>ldappr-public.c:<span style="color: #000000;">45</span>:<span style="color: #000000;">27</span>: <span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>nss<span style="color: #000000; font-weight: bold;">/</span>private<span style="color: #000000; font-weight: bold;">/</span>pprio.h: Permission denied</pre></div></div>

<p>Fix yer permissions. duh.  </p>
]]></content:encoded>
			<wfw:commentRss>http://warped.org/blog/2010/04/06/ch0wned-building-your-own-thunderbird-3-on-el4-for-x86_64-in-your-homedir/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ch0wned &#8211; Building your own Firefox on EL4 for X86_64 in your homedir</title>
		<link>http://warped.org/blog/2010/04/06/ch0wned-building-your-own-firefox-on-el4-for-x86_64-in-your-homedir/</link>
		<comments>http://warped.org/blog/2010/04/06/ch0wned-building-your-own-firefox-on-el4-for-x86_64-in-your-homedir/#comments</comments>
		<pubDate>Tue, 06 Apr 2010 22:45:10 +0000</pubDate>
		<dc:creator>max</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://warped.org/blog/?p=91</guid>
		<description><![CDATA[ch0wned. adj. This is the state when you are a Linux user and don't have root access. 
Intro
So you want Firefox 3.new on your EL4 workstation and don&#8217;t have root access?  Worse off it&#8217;s an x86_64 machine?   This is not for the faint of heart, and you will run into some snags, [...]]]></description>
			<content:encoded><![CDATA[<p><tt>ch0wned. adj. This is the state when you are a Linux user and don't have root access. </tt></p>
<h1>Intro</h1>
<p>So you want Firefox 3.new on your EL4 workstation and don&#8217;t have root access?  Worse off it&#8217;s an x86_64 machine?   This is not for the faint of heart, and you will run into some snags, but hopefully with my help you can make it work.</p>
<p>
This guide assumes you&#8217;re leaving off from my previous post : <a href="http://warped.org/blog/2009/03/04/chown3d-part-2-gtk-and-glib-in-your-own-home-directory/">http://warped.org/blog/2009/03/04/chown3d-part-2-gtk-and-glib-in-your-own-home-directory/</a>  where you&#8217;ve setup a script called config_gapp.
</p>
<h1>Prerequisites</h1>
<ul>
<li>firefox-3.6.2.source.tar.bz2 </li>
<li>nss-3.12.6-with-nspr-4.8.4.tar.gz</li>
<li>sqlite-amalgamation-3.6.23.1.tar.gz</li>
<li>Python-2.5.5.tar.bz2</li>
<li><a href="http://www.linuxfromscratch.org/blfs/view/svn/general/nspr.html">NSPR Patch from Standalone Linux</a> (READ THIS!)</li>
<li><a href="http://www.linuxfromscratch.org/blfs/view/svn/postlfs/nss.html">NSS Patch from Standalone Linux</a> (READ THIS!)</li>
<li>My Patches</li>
</ul>
<h2>Building</h2>
<ol>
<li>SQL Lite
<p>Make sure you get the &#8220;amalgamation&#8221; package.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">config_gapp
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

</p>
</li>
<li>NSPR
<p>Cheers to the Linux from Scratch gurus.  See above link.<br />
Apply this patch using &#8220;patch -p1 < file.patch" .  You might have to change 1 to another number.  I did this on the above newer version of NSPR/NSS w/out a problem.
</p>

<div class="wp_syntax"><div class="code"><pre class="diff" style="font-family:monospace;">Submitted By: DJ Lucas <span style="">&#40;</span>dj at linuxfromscratch dot org<span style="">&#41;</span>
Date: <span style="">2009</span>-08-<span style="">28</span>
Initial Package Version: <span style="">4.8</span>
Upstream Status: not applicable
Origin: self
Description: Adds pkg-config file for nspr.
&nbsp;
diff -Naur nspr-<span style="">4.8</span>-orig/mozilla/nsprpub/config/config.mk nspr-<span style="">4.8</span>/mozilla/nsprpub/config/config.mk
<span style="color: #888822;">--- nspr-<span style="">4.8</span>-orig/mozilla/nsprpub/config/config.mk	<span style="">2005</span>-04-<span style="">29</span> <span style="">16</span>:02:<span style="">53.000000000</span> -0500</span>
<span style="color: #888822;">+++ nspr-<span style="">4.8</span>/mozilla/nsprpub/config/config.mk	<span style="">2009</span>-08-<span style="">28</span> <span style="">15</span>:<span style="">42</span>:<span style="">46.000000000</span> -0500</span>
<span style="color: #440088;">@@ -<span style="">162</span>,<span style="">3</span> +<span style="">162</span>,<span style="">4</span> @@</span>
 RELEASE_INCLUDE_DIR = $<span style="">&#40;</span>RELEASE_DIR<span style="">&#41;</span>/$<span style="">&#40;</span>BUILD_NUMBER<span style="">&#41;</span>/$<span style="">&#40;</span>OBJDIR_NAME<span style="">&#41;</span>/include
 RELEASE_BIN_DIR = $<span style="">&#40;</span>RELEASE_DIR<span style="">&#41;</span>/$<span style="">&#40;</span>BUILD_NUMBER<span style="">&#41;</span>/$<span style="">&#40;</span>OBJDIR_NAME<span style="">&#41;</span>/bin
 RELEASE_LIB_DIR = $<span style="">&#40;</span>RELEASE_DIR<span style="">&#41;</span>/$<span style="">&#40;</span>BUILD_NUMBER<span style="">&#41;</span>/$<span style="">&#40;</span>OBJDIR_NAME<span style="">&#41;</span>/lib
<span style="color: #00b000;">+RELEASE_PC_DIR = $<span style="">&#40;</span>RELEASE_LIB_DIR<span style="">&#41;</span>/pkgconfig</span>
diff -Naur nspr-<span style="">4.8</span>-orig/mozilla/nsprpub/config/Makefile.in nspr-<span style="">4.8</span>/mozilla/nsprpub/config/Makefile.in
<span style="color: #888822;">--- nspr-<span style="">4.8</span>-orig/mozilla/nsprpub/config/Makefile.in	<span style="">2009</span>-03-03 <span style="">16</span>:04:<span style="">23.000000000</span> -0600</span>
<span style="color: #888822;">+++ nspr-<span style="">4.8</span>/mozilla/nsprpub/config/Makefile.in	<span style="">2009</span>-08-<span style="">28</span> <span style="">15</span>:<span style="">42</span>:<span style="">46.000000000</span> -0500</span>
<span style="color: #440088;">@@ -<span style="">52</span>,<span style="">9</span> +<span style="">52</span>,<span style="">10</span> @@</span>
&nbsp;
 # autoconf.mk must be deleted last <span style="">&#40;</span>from the top-level directory<span style="">&#41;</span>
 # because it is included by every makefile.
<span style="color: #991111;">-DIST_GARBAGE	= nsprincl.mk nsprincl.sh nspr-config</span>
<span style="color: #00b000;">+DIST_GARBAGE	= nsprincl.mk nsprincl.sh nspr-config nspr.pc</span>
&nbsp;
 RELEASE_BINS	= nspr-config
<span style="color: #00b000;">+RELEASE_PC	= nspr.pc</span>
&nbsp;
 include $<span style="">&#40;</span>topsrcdir<span style="">&#41;</span>/config/config.mk
&nbsp;
diff -Naur nspr-<span style="">4.8</span>-orig/mozilla/nsprpub/config/nspr.pc.in nspr-<span style="">4.8</span>/mozilla/nsprpub/config/nspr.pc.in
<span style="color: #888822;">--- nspr-<span style="">4.8</span>-orig/mozilla/nsprpub/config/nspr.pc.in	<span style="">1969</span>-<span style="">12</span>-<span style="">31</span> <span style="">18</span>:00:<span style="">00.000000000</span> -0600</span>
<span style="color: #888822;">+++ nspr-<span style="">4.8</span>/mozilla/nsprpub/config/nspr.pc.in	<span style="">2009</span>-08-<span style="">28</span> <span style="">15</span>:<span style="">43</span>:<span style="">13.000000000</span> -0500</span>
<span style="color: #440088;">@@ -<span style="">0</span>,<span style="">0</span> +<span style="">1</span>,<span style="">11</span> @@</span>
<span style="color: #00b000;">+prefix=@prefix@</span>
<span style="color: #00b000;">+exec_prefix=@exec_prefix@</span>
<span style="color: #00b000;">+libdir=@libdir@</span>
<span style="color: #00b000;">+includedir=@includedir@</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+Name: NSPR</span>
<span style="color: #00b000;">+Description: The Netscape Portable Runtime</span>
<span style="color: #00b000;">+Version: @MOD_MAJOR_VERSION@.@MOD_MINOR_VERSION@.@MOD_PATCH_VERSION@</span>
<span style="color: #00b000;">+Libs: -L$<span style="">&#123;</span>libdir<span style="">&#125;</span> -lplds@MOD_MAJOR_VERSION@ -lplc@MOD_MAJOR_VERSION@ -lnspr@MOD_MAJOR_VERSION@ -lpthread </span>
<span style="color: #00b000;">+Cflags: -I$<span style="">&#123;</span>includedir<span style="">&#125;</span></span>
<span style="color: #00b000;">+</span>
diff -Naur nspr-<span style="">4.8</span>-orig/mozilla/nsprpub/config/rules.mk nspr-<span style="">4.8</span>/mozilla/nsprpub/config/rules.mk
<span style="color: #888822;">--- nspr-<span style="">4.8</span>-orig/mozilla/nsprpub/config/rules.mk	<span style="">2009</span>-05-01 <span style="">18</span>:08:<span style="">01.000000000</span> -0500</span>
<span style="color: #888822;">+++ nspr-<span style="">4.8</span>/mozilla/nsprpub/config/rules.mk	<span style="">2009</span>-08-<span style="">28</span> <span style="">15</span>:<span style="">42</span>:<span style="">46.000000000</span> -0500</span>
<span style="color: #440088;">@@ -<span style="">211</span>,<span style="">7</span> +<span style="">211</span>,<span style="">7</span> @@</span>
 	rm -rf $<span style="">&#40;</span>wildcard *.OBJ *.OBJD<span style="">&#41;</span> dist $<span style="">&#40;</span>ALL_TRASH<span style="">&#41;</span> $<span style="">&#40;</span>DIST_GARBAGE<span style="">&#41;</span>
 	+$<span style="">&#40;</span>LOOP_OVER_DIRS<span style="">&#41;</span>
&nbsp;
<span style="color: #991111;">-install:: $<span style="">&#40;</span>RELEASE_BINS<span style="">&#41;</span> $<span style="">&#40;</span>RELEASE_HEADERS<span style="">&#41;</span> $<span style="">&#40;</span>RELEASE_LIBS<span style="">&#41;</span></span>
<span style="color: #00b000;">+install:: $<span style="">&#40;</span>RELEASE_BINS<span style="">&#41;</span> $<span style="">&#40;</span>RELEASE_HEADERS<span style="">&#41;</span> $<span style="">&#40;</span>RELEASE_LIBS<span style="">&#41;</span> $<span style="">&#40;</span>RELEASE_PC<span style="">&#41;</span></span>
 ifdef RELEASE_BINS
 	$<span style="">&#40;</span>NSINSTALL<span style="">&#41;</span> -t -m 0755 $<span style="">&#40;</span>RELEASE_BINS<span style="">&#41;</span> $<span style="">&#40;</span>DESTDIR<span style="">&#41;</span>$<span style="">&#40;</span>bindir<span style="">&#41;</span>
 endif
<span style="color: #440088;">@@ -<span style="">221</span>,<span style="">6</span> +<span style="">221</span>,<span style="">9</span> @@</span>
 ifdef RELEASE_LIBS
 	$<span style="">&#40;</span>NSINSTALL<span style="">&#41;</span> -t -m 0755 $<span style="">&#40;</span>RELEASE_LIBS<span style="">&#41;</span> $<span style="">&#40;</span>DESTDIR<span style="">&#41;</span>$<span style="">&#40;</span>libdir<span style="">&#41;</span>/$<span style="">&#40;</span>lib_subdir<span style="">&#41;</span>
 endif
<span style="color: #00b000;">+ifdef RELEASE_PC</span>
<span style="color: #00b000;">+	$<span style="">&#40;</span>NSINSTALL<span style="">&#41;</span> -t -m 0644 $<span style="">&#40;</span>RELEASE_PC<span style="">&#41;</span> $<span style="">&#40;</span>DESTDIR<span style="">&#41;</span>$<span style="">&#40;</span>libdir<span style="">&#41;</span>/pkgconfig/</span>
<span style="color: #00b000;">+endif</span>
 	+$<span style="">&#40;</span>LOOP_OVER_DIRS<span style="">&#41;</span>
&nbsp;
 release:: export
<span style="color: #440088;">@@ -<span style="">272</span>,<span style="">6</span> +<span style="">275</span>,<span style="">23</span> @@</span>
 	fi
 	cp $<span style="">&#40;</span>RELEASE_HEADERS<span style="">&#41;</span> $<span style="">&#40;</span>RELEASE_HEADERS_DEST<span style="">&#41;</span>
 endif
<span style="color: #00b000;">+ifdef RELEASE_PC</span>
<span style="color: #00b000;">+	@echo &quot;Copying pkg-config files to release directory&quot;</span>
<span style="color: #00b000;">+	@if test -z &quot;$<span style="">&#40;</span>BUILD_NUMBER<span style="">&#41;</span>&quot;; then \</span>
<span style="color: #00b000;">+		echo &quot;BUILD_NUMBER must be defined&quot;; \</span>
<span style="color: #00b000;">+		false; \</span>
<span style="color: #00b000;">+	else \</span>
<span style="color: #00b000;">+		true; \</span>
<span style="color: #00b000;">+	fi</span>
<span style="color: #00b000;">+	@if test ! -d $<span style="">&#40;</span>RELEASE_PC_DEST<span style="">&#41;</span>; then \</span>
<span style="color: #00b000;">+		rm -rf $<span style="">&#40;</span>RELEASE_PC_DEST<span style="">&#41;</span>; \</span>
<span style="color: #00b000;">+		$<span style="">&#40;</span>NSINSTALL<span style="">&#41;</span> -D $<span style="">&#40;</span>RELEASE_PC_DEST<span style="">&#41;</span>;\</span>
<span style="color: #00b000;">+	else \</span>
<span style="color: #00b000;">+		true; \</span>
<span style="color: #00b000;">+	fi</span>
<span style="color: #00b000;">+	cp $<span style="">&#40;</span>RELEASE_PC<span style="">&#41;</span> $<span style="">&#40;</span>RELEASE_PC_DEST<span style="">&#41;</span></span>
<span style="color: #00b000;">+endif</span>
<span style="color: #00b000;">+</span>
 	+$<span style="">&#40;</span>LOOP_OVER_DIRS<span style="">&#41;</span>
&nbsp;
 alltags:
diff -Naur nspr-<span style="">4.8</span>-orig/mozilla/nsprpub/configure nspr-<span style="">4.8</span>/mozilla/nsprpub/configure
<span style="color: #888822;">--- nspr-<span style="">4.8</span>-orig/mozilla/nsprpub/configure	<span style="">2009</span>-05-08 08:<span style="">12</span>:<span style="">31.000000000</span> -0500</span>
<span style="color: #888822;">+++ nspr-<span style="">4.8</span>/mozilla/nsprpub/configure	<span style="">2009</span>-08-<span style="">28</span> <span style="">15</span>:<span style="">42</span>:<span style="">46.000000000</span> -0500</span>
<span style="color: #440088;">@@ -<span style="">6037</span>,<span style="">6</span> +<span style="">6037</span>,<span style="">7</span> @@</span>
 config/nsprincl.mk
 config/nsprincl.sh
 config/nspr-config
<span style="color: #00b000;">+config/nspr.pc</span>
 lib/Makefile 
 lib/ds/Makefile 
 lib/libc/Makefile 
diff -Naur nspr-<span style="">4.8</span>-orig/mozilla/nsprpub/configure.in nspr-<span style="">4.8</span>/mozilla/nsprpub/configure.in
<span style="color: #888822;">--- nspr-<span style="">4.8</span>-orig/mozilla/nsprpub/configure.in	<span style="">2009</span>-05-01 <span style="">18</span>:08:<span style="">00.000000000</span> -0500</span>
<span style="color: #888822;">+++ nspr-<span style="">4.8</span>/mozilla/nsprpub/configure.in	<span style="">2009</span>-08-<span style="">28</span> <span style="">15</span>:<span style="">42</span>:<span style="">46.000000000</span> -0500</span>
<span style="color: #440088;">@@ -<span style="">2871</span>,<span style="">6</span> +<span style="">2871</span>,<span style="">7</span> @@</span>
 config/nsprincl.mk
 config/nsprincl.sh
 config/nspr-config
<span style="color: #00b000;">+config/nspr.pc</span>
 lib/Makefile 
 lib/ds/Makefile 
 lib/libc/Makefile</pre></div></div>

</p>
<p>Once patched, run this script to configure and build NSPR</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh </span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">cd</span> mozilla<span style="color: #000000; font-weight: bold;">/</span>nsprpub
config_gapp \
            <span style="color: #660033;">--with-mozilla</span> \
            <span style="color: #660033;">--with-pthreads</span> \
            <span style="color: #660033;">--enable-64bit</span> \
            <span style="color: #660033;">--disable-debug</span> \
            <span style="color: #660033;">--enable-optimize</span>=<span style="color: #ff0000;">&quot;-O2&quot;</span>
&nbsp;
run_gapp <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #660033;">-j4</span>
&nbsp;
run_gapp <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span>
<span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-v</span> <span style="color: #660033;">-f</span> <span style="color: #660033;">-LR</span> dist<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>nspr <span style="color: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>include</pre></div></div>

</li>
<li>NSS
<p>Again cheers to DJ for this gem. Apply it.</p>

<div class="wp_syntax"><div class="code"><pre class="diff" style="font-family:monospace;">Submitted By: DJ Lucas <span style="">&#40;</span>dj at linuxfromscratch dot org<span style="">&#41;</span>
Date: <span style="">2009</span>-09-05
Initial Package Version: 3.12.4
Upstream Status: not applicable
Origin: self
Description: Adds auto-generated nss.pc and nss-config script, and allows
             building without nspr in the source tree.
&nbsp;
diff -Naur nss-3.12.4-orig/mozilla/security/nss/config/Makefile nss-3.12.4/mozilla/security/nss/config/Makefile
<span style="color: #888822;">--- nss-3.12.4-orig/mozilla/security/nss/config/Makefile	<span style="">1969</span>-<span style="">12</span>-<span style="">31</span> <span style="">18</span>:00:<span style="">00.000000000</span> -0600</span>
<span style="color: #888822;">+++ nss-3.12.4/mozilla/security/nss/config/Makefile	<span style="">2009</span>-08-<span style="">31</span> <span style="">19</span>:<span style="">15</span>:<span style="">20.000000000</span> -0500</span>
<span style="color: #440088;">@@ -<span style="">0</span>,<span style="">0</span> +<span style="">1</span>,<span style="">40</span> @@</span>
<span style="color: #00b000;">+CORE_DEPTH = ../..</span>
<span style="color: #00b000;">+DEPTH      = ../..</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+include $<span style="">&#40;</span>CORE_DEPTH<span style="">&#41;</span>/coreconf/config.mk</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+NSS_MAJOR_VERSION = `grep &quot;NSS_VMAJOR&quot; ../lib/nss/nss.h | awk '<span style="">&#123;</span>print $$<span style="">3</span><span style="">&#125;</span>'`</span>
<span style="color: #00b000;">+NSS_MINOR_VERSION = `grep &quot;NSS_VMINOR&quot; ../lib/nss/nss.h | awk '<span style="">&#123;</span>print $$<span style="">3</span><span style="">&#125;</span>'`</span>
<span style="color: #00b000;">+NSS_PATCH_VERSION = `grep &quot;NSS_VPATCH&quot; ../lib/nss/nss.h | awk '<span style="">&#123;</span>print $$<span style="">3</span><span style="">&#125;</span>'`</span>
<span style="color: #00b000;">+PREFIX = /usr</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+all: export libs</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+export:</span>
<span style="color: #00b000;">+	# Create the nss.pc file</span>
<span style="color: #00b000;">+	mkdir -p $<span style="">&#40;</span>DIST<span style="">&#41;</span>/lib/pkgconfig</span>
<span style="color: #00b000;">+	sed -e &quot;s,@prefix@,$<span style="">&#40;</span>PREFIX<span style="">&#41;</span>,&quot; \</span>
<span style="color: #00b000;">+	    -e &quot;s,@exec_prefix@,\$$<span style="">&#123;</span>prefix<span style="">&#125;</span>,&quot; \</span>
<span style="color: #00b000;">+	    -e &quot;s,@libdir@,\$$<span style="">&#123;</span>prefix<span style="">&#125;</span>/lib,&quot; \</span>
<span style="color: #00b000;">+	    -e &quot;s,@includedir@,\$$<span style="">&#123;</span>prefix<span style="">&#125;</span>/include/nss,&quot; \</span>
<span style="color: #00b000;">+	    -e &quot;s,@NSS_MAJOR_VERSION@,$<span style="">&#40;</span>NSS_MAJOR_VERSION<span style="">&#41;</span>,g&quot; \</span>
<span style="color: #00b000;">+	    -e &quot;s,@NSS_MINOR_VERSION@,$<span style="">&#40;</span>NSS_MINOR_VERSION<span style="">&#41;</span>,&quot; \</span>
<span style="color: #00b000;">+	    -e &quot;s,@NSS_PATCH_VERSION@,$<span style="">&#40;</span>NSS_PATCH_VERSION<span style="">&#41;</span>,&quot; \</span>
<span style="color: #00b000;">+	    nss.pc.in &gt; nss.pc</span>
<span style="color: #00b000;">+	chmod 0644 nss.pc</span>
<span style="color: #00b000;">+	ln -sf ../../../../security/nss/config/nss.pc $<span style="">&#40;</span>DIST<span style="">&#41;</span>/lib/pkgconfig</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+	# Create the nss-config script</span>
<span style="color: #00b000;">+	mkdir -p $<span style="">&#40;</span>DIST<span style="">&#41;</span>/bin</span>
<span style="color: #00b000;">+	sed -e &quot;s,@prefix@,$<span style="">&#40;</span>PREFIX<span style="">&#41;</span>,&quot; \</span>
<span style="color: #00b000;">+	    -e &quot;s,@NSS_MAJOR_VERSION@,$<span style="">&#40;</span>NSS_MAJOR_VERSION<span style="">&#41;</span>,&quot; \</span>
<span style="color: #00b000;">+	    -e &quot;s,@NSS_MINOR_VERSION@,$<span style="">&#40;</span>NSS_MINOR_VERSION<span style="">&#41;</span>,&quot; \</span>
<span style="color: #00b000;">+	    -e &quot;s,@NSS_PATCH_VERSION@,$<span style="">&#40;</span>NSS_PATCH_VERSION<span style="">&#41;</span>,&quot; \</span>
<span style="color: #00b000;">+	    nss-config.in &gt; nss-config</span>
<span style="color: #00b000;">+	chmod 0755 nss-config</span>
<span style="color: #00b000;">+	ln -sf ../../../security/nss/config/nss-config $<span style="">&#40;</span>DIST<span style="">&#41;</span>/bin</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+libs:</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+dummy: all export libs</span>
<span style="color: #00b000;">+</span>
diff -Naur nss-3.12.4-orig/mozilla/security/nss/config/nss-config.in nss-3.12.4/mozilla/security/nss/config/nss-config.in
<span style="color: #888822;">--- nss-3.12.4-orig/mozilla/security/nss/config/nss-config.in	<span style="">1969</span>-<span style="">12</span>-<span style="">31</span> <span style="">18</span>:00:<span style="">00.000000000</span> -0600</span>
<span style="color: #888822;">+++ nss-3.12.4/mozilla/security/nss/config/nss-config.in	<span style="">2009</span>-08-<span style="">31</span> <span style="">19</span>:<span style="">16</span>:<span style="">56.000000000</span> -0500</span>
<span style="color: #440088;">@@ -<span style="">0</span>,<span style="">0</span> +<span style="">1</span>,<span style="">153</span> @@</span>
<span style="color: #00b000;">+#!/bin/sh</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+prefix=@prefix@</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+major_version=@NSS_MAJOR_VERSION@</span>
<span style="color: #00b000;">+minor_version=@NSS_MINOR_VERSION@</span>
<span style="color: #00b000;">+patch_version=@NSS_PATCH_VERSION@</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+usage<span style="">&#40;</span><span style="">&#41;</span></span>
<span style="color: #00b000;">+<span style="">&#123;</span></span>
<span style="color: #00b000;">+	cat &lt; &lt;EOF</span>
<span style="color: #00b000;">+Usage: nss-config <span style="">&#91;</span>OPTIONS<span style="">&#93;</span> <span style="">&#91;</span>LIBRARIES<span style="">&#93;</span></span>
<span style="color: #00b000;">+Options:</span>
<span style="color: #00b000;">+	<span style="">&#91;</span>--prefix<span style="">&#91;</span>=DIR<span style="">&#93;</span><span style="">&#93;</span></span>
<span style="color: #00b000;">+	<span style="">&#91;</span>--exec-prefix<span style="">&#91;</span>=DIR<span style="">&#93;</span><span style="">&#93;</span></span>
<span style="color: #00b000;">+	<span style="">&#91;</span>--includedir<span style="">&#91;</span>=DIR<span style="">&#93;</span><span style="">&#93;</span></span>
<span style="color: #00b000;">+	<span style="">&#91;</span>--libdir<span style="">&#91;</span>=DIR<span style="">&#93;</span><span style="">&#93;</span></span>
<span style="color: #00b000;">+	<span style="">&#91;</span>--version<span style="">&#93;</span></span>
<span style="color: #00b000;">+	<span style="">&#91;</span>--libs<span style="">&#93;</span></span>
<span style="color: #00b000;">+	<span style="">&#91;</span>--cflags<span style="">&#93;</span></span>
<span style="color: #00b000;">+Dynamic Libraries:</span>
<span style="color: #00b000;">+	nss</span>
<span style="color: #00b000;">+	nssutil</span>
<span style="color: #00b000;">+	smime</span>
<span style="color: #00b000;">+	ssl</span>
<span style="color: #00b000;">+	softokn</span>
<span style="color: #00b000;">+EOF</span>
<span style="color: #00b000;">+	exit $1</span>
<span style="color: #00b000;">+<span style="">&#125;</span></span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+if test $# -eq <span style="">0</span>; then</span>
<span style="color: #00b000;">+	usage <span style="">1</span> <span style="">1</span>&gt;&amp;2</span>
<span style="color: #00b000;">+fi</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+lib_nss=yes</span>
<span style="color: #00b000;">+lib_nssutil=yes</span>
<span style="color: #00b000;">+lib_smime=yes</span>
<span style="color: #00b000;">+lib_ssl=yes</span>
<span style="color: #00b000;">+lib_softokn=yes</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+while test $# -gt <span style="">0</span>; do</span>
<span style="color: #00b000;">+  case &quot;$<span style="">1</span>&quot; in</span>
<span style="color: #00b000;">+  -*=*<span style="">&#41;</span> optarg=`echo &quot;$<span style="">1</span>&quot; | sed 's/<span style="">&#91;</span>-_a-zA-Z0-<span style="">9</span><span style="">&#93;</span>*=//'` ;;</span>
<span style="color: #00b000;">+  *<span style="">&#41;</span> optarg= ;;</span>
<span style="color: #00b000;">+  esac</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+  case $<span style="">1</span> in</span>
<span style="color: #00b000;">+    --prefix=*<span style="">&#41;</span></span>
<span style="color: #00b000;">+      prefix=$optarg</span>
<span style="color: #00b000;">+      ;;</span>
<span style="color: #00b000;">+    --prefix<span style="">&#41;</span></span>
<span style="color: #00b000;">+      echo_prefix=yes</span>
<span style="color: #00b000;">+      ;;</span>
<span style="color: #00b000;">+    --exec-prefix=*<span style="">&#41;</span></span>
<span style="color: #00b000;">+      exec_prefix=$optarg</span>
<span style="color: #00b000;">+      ;;</span>
<span style="color: #00b000;">+    --exec-prefix<span style="">&#41;</span></span>
<span style="color: #00b000;">+      echo_exec_prefix=yes</span>
<span style="color: #00b000;">+      ;;</span>
<span style="color: #00b000;">+    --includedir=*<span style="">&#41;</span></span>
<span style="color: #00b000;">+      includedir=$optarg</span>
<span style="color: #00b000;">+      ;;</span>
<span style="color: #00b000;">+    --includedir<span style="">&#41;</span></span>
<span style="color: #00b000;">+      echo_includedir=yes</span>
<span style="color: #00b000;">+      ;;</span>
<span style="color: #00b000;">+    --libdir=*<span style="">&#41;</span></span>
<span style="color: #00b000;">+      libdir=$optarg</span>
<span style="color: #00b000;">+      ;;</span>
<span style="color: #00b000;">+    --libdir<span style="">&#41;</span></span>
<span style="color: #00b000;">+      echo_libdir=yes</span>
<span style="color: #00b000;">+      ;;</span>
<span style="color: #00b000;">+    --version<span style="">&#41;</span></span>
<span style="color: #00b000;">+      echo $<span style="">&#123;</span>major_version<span style="">&#125;</span>.$<span style="">&#123;</span>minor_version<span style="">&#125;</span>.$<span style="">&#123;</span>patch_version<span style="">&#125;</span></span>
<span style="color: #00b000;">+      ;;</span>
<span style="color: #00b000;">+    --cflags<span style="">&#41;</span></span>
<span style="color: #00b000;">+      echo_cflags=yes</span>
<span style="color: #00b000;">+      ;;</span>
<span style="color: #00b000;">+    --libs<span style="">&#41;</span></span>
<span style="color: #00b000;">+      echo_libs=yes</span>
<span style="color: #00b000;">+      ;;</span>
<span style="color: #00b000;">+    nss<span style="">&#41;</span></span>
<span style="color: #00b000;">+      lib_nss=yes</span>
<span style="color: #00b000;">+      ;;</span>
<span style="color: #00b000;">+    nssutil<span style="">&#41;</span></span>
<span style="color: #00b000;">+      lib_nssutil=yes</span>
<span style="color: #00b000;">+      ;;</span>
<span style="color: #00b000;">+    smime<span style="">&#41;</span></span>
<span style="color: #00b000;">+      lib_smime=yes</span>
<span style="color: #00b000;">+      ;;</span>
<span style="color: #00b000;">+    ssl<span style="">&#41;</span></span>
<span style="color: #00b000;">+      lib_ssl=yes</span>
<span style="color: #00b000;">+      ;;</span>
<span style="color: #00b000;">+    softokn<span style="">&#41;</span></span>
<span style="color: #00b000;">+      lib_softokn=yes</span>
<span style="color: #00b000;">+      ;;</span>
<span style="color: #00b000;">+    *<span style="">&#41;</span></span>
<span style="color: #00b000;">+      usage <span style="">1</span> <span style="">1</span>&gt;&amp;2</span>
<span style="color: #00b000;">+      ;;</span>
<span style="color: #00b000;">+  esac</span>
<span style="color: #00b000;">+  shift</span>
<span style="color: #00b000;">+done</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+# Set variables that may be dependent upon other variables</span>
<span style="color: #00b000;">+if test -z &quot;$exec_prefix&quot;; then</span>
<span style="color: #00b000;">+    exec_prefix=`pkg-config --variable=exec_prefix nss`</span>
<span style="color: #00b000;">+fi</span>
<span style="color: #00b000;">+if test -z &quot;$includedir&quot;; then</span>
<span style="color: #00b000;">+    includedir=`pkg-config --variable=includedir nss`</span>
<span style="color: #00b000;">+fi</span>
<span style="color: #00b000;">+if test -z &quot;$libdir&quot;; then</span>
<span style="color: #00b000;">+    libdir=`pkg-config --variable=libdir nss`</span>
<span style="color: #00b000;">+fi</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+if test &quot;$echo_prefix&quot; = &quot;yes&quot;; then</span>
<span style="color: #00b000;">+    echo $prefix</span>
<span style="color: #00b000;">+fi</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+if test &quot;$echo_exec_prefix&quot; = &quot;yes&quot;; then</span>
<span style="color: #00b000;">+    echo $exec_prefix</span>
<span style="color: #00b000;">+fi</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+if test &quot;$echo_includedir&quot; = &quot;yes&quot;; then</span>
<span style="color: #00b000;">+    echo $includedir</span>
<span style="color: #00b000;">+fi</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+if test &quot;$echo_libdir&quot; = &quot;yes&quot;; then</span>
<span style="color: #00b000;">+    echo $libdir</span>
<span style="color: #00b000;">+fi</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+if test &quot;$echo_cflags&quot; = &quot;yes&quot;; then</span>
<span style="color: #00b000;">+    echo -I$includedir</span>
<span style="color: #00b000;">+fi</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+if test &quot;$echo_libs&quot; = &quot;yes&quot;; then</span>
<span style="color: #00b000;">+      libdirs=&quot;-L$libdir&quot;</span>
<span style="color: #00b000;">+      if test -n &quot;$lib_nss&quot;; then</span>
<span style="color: #00b000;">+	libdirs=&quot;$libdirs -lnss$<span style="">&#123;</span>major_version<span style="">&#125;</span>&quot;</span>
<span style="color: #00b000;">+      fi</span>
<span style="color: #00b000;">+      if test -n &quot;$lib_nssutil&quot;; then</span>
<span style="color: #00b000;">+        libdirs=&quot;$libdirs -lnssutil$<span style="">&#123;</span>major_version<span style="">&#125;</span>&quot;</span>
<span style="color: #00b000;">+      fi</span>
<span style="color: #00b000;">+      if test -n &quot;$lib_smime&quot;; then</span>
<span style="color: #00b000;">+	libdirs=&quot;$libdirs -lsmime$<span style="">&#123;</span>major_version<span style="">&#125;</span>&quot;</span>
<span style="color: #00b000;">+      fi</span>
<span style="color: #00b000;">+      if test -n &quot;$lib_ssl&quot;; then</span>
<span style="color: #00b000;">+	libdirs=&quot;$libdirs -lssl$<span style="">&#123;</span>major_version<span style="">&#125;</span>&quot;</span>
<span style="color: #00b000;">+      fi</span>
<span style="color: #00b000;">+      if test -n &quot;$lib_softokn&quot;; then</span>
<span style="color: #00b000;">+        libdirs=&quot;$libdirs -lsoftokn$<span style="">&#123;</span>major_version<span style="">&#125;</span>&quot;</span>
<span style="color: #00b000;">+      fi</span>
<span style="color: #00b000;">+      echo $libdirs</span>
<span style="color: #00b000;">+fi      </span>
<span style="color: #00b000;">+</span>
diff -Naur nss-3.12.4-orig/mozilla/security/nss/config/nss.pc.in nss-3.12.4/mozilla/security/nss/config/nss.pc.in
<span style="color: #888822;">--- nss-3.12.4-orig/mozilla/security/nss/config/nss.pc.in	<span style="">1969</span>-<span style="">12</span>-<span style="">31</span> <span style="">18</span>:00:<span style="">00.000000000</span> -0600</span>
<span style="color: #888822;">+++ nss-3.12.4/mozilla/security/nss/config/nss.pc.in	<span style="">2009</span>-08-<span style="">31</span> <span style="">19</span>:<span style="">15</span>:<span style="">20.000000000</span> -0500</span>
<span style="color: #440088;">@@ -<span style="">0</span>,<span style="">0</span> +<span style="">1</span>,<span style="">12</span> @@</span>
<span style="color: #00b000;">+prefix=@prefix@</span>
<span style="color: #00b000;">+exec_prefix=@exec_prefix@</span>
<span style="color: #00b000;">+libdir=@libdir@</span>
<span style="color: #00b000;">+includedir=@includedir@</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+Name: NSS</span>
<span style="color: #00b000;">+Description: Network Security Services</span>
<span style="color: #00b000;">+Version: @NSS_MAJOR_VERSION@.@NSS_MINOR_VERSION@.@NSS_PATCH_VERSION@</span>
<span style="color: #00b000;">+Requires: nspr &gt;= 4.8</span>
<span style="color: #00b000;">+Libs: -L@libdir@ -lnss@NSS_MAJOR_VERSION@ -lnssutil@NSS_MAJOR_VERSION@ -lsmime@NSS_MAJOR_VERSION@ -lssl@NSS_MAJOR_VERSION@ -lsoftokn@NSS_MAJOR_VERSION@</span>
<span style="color: #00b000;">+Cflags: -I$<span style="">&#123;</span>includedir<span style="">&#125;</span></span>
<span style="color: #00b000;">+</span>
diff -Naur nss-3.12.4-orig/mozilla/security/nss/Makefile nss-3.12.4/mozilla/security/nss/Makefile
<span style="color: #888822;">--- nss-3.12.4-orig/mozilla/security/nss/Makefile	<span style="">2008</span>-<span style="">12</span>-02 <span style="">17</span>:<span style="">24</span>:<span style="">39.000000000</span> -0600</span>
<span style="color: #888822;">+++ nss-3.12.4/mozilla/security/nss/Makefile	<span style="">2009</span>-08-<span style="">31</span> <span style="">19</span>:<span style="">15</span>:<span style="">20.000000000</span> -0500</span>
<span style="color: #440088;">@@ -<span style="">78</span>,<span style="">7</span> +<span style="">78</span>,<span style="">7</span> @@</span>
 # <span style="">&#40;</span><span style="">7</span><span style="">&#41;</span> Execute &quot;local&quot; rules. <span style="">&#40;</span>OPTIONAL<span style="">&#41;</span>.                              #
 #######################################################################
&nbsp;
<span style="color: #991111;">-nss_build_all: build_coreconf build_nspr build_dbm all</span>
<span style="color: #00b000;">+nss_build_all: build_coreconf build_dbm all</span>
&nbsp;
 nss_clean_all: clobber_coreconf clobber_nspr clobber_dbm clobber
&nbsp;
<span style="color: #440088;">@@ -<span style="">140</span>,<span style="">12</span> +<span style="">140</span>,<span style="">6</span> @@</span>
 	--with-dist-prefix='$<span style="">&#40;</span>NSPR_PREFIX<span style="">&#41;</span>' \
 	--with-dist-includedir='$<span style="">&#40;</span>NSPR_PREFIX<span style="">&#41;</span>/include'
&nbsp;
<span style="color: #991111;">-build_nspr: $<span style="">&#40;</span>NSPR_CONFIG_STATUS<span style="">&#41;</span></span>
<span style="color: #991111;">-	cd $<span style="">&#40;</span>CORE_DEPTH<span style="">&#41;</span>/../nsprpub/$<span style="">&#40;</span>OBJDIR_NAME<span style="">&#41;</span> ; $<span style="">&#40;</span>MAKE<span style="">&#41;</span></span>
<span style="color: #991111;">-</span>
<span style="color: #991111;">-clobber_nspr: $<span style="">&#40;</span>NSPR_CONFIG_STATUS<span style="">&#41;</span></span>
<span style="color: #991111;">-	cd $<span style="">&#40;</span>CORE_DEPTH<span style="">&#41;</span>/../nsprpub/$<span style="">&#40;</span>OBJDIR_NAME<span style="">&#41;</span> ; $<span style="">&#40;</span>MAKE<span style="">&#41;</span> clobber</span>
<span style="color: #991111;">-</span>
 build_dbm:
 ifndef NSS_DISABLE_DBM
 	cd $<span style="">&#40;</span>CORE_DEPTH<span style="">&#41;</span>/dbm ; $<span style="">&#40;</span>MAKE<span style="">&#41;</span> export libs
diff -Naur nss-3.12.4-orig/mozilla/security/nss/manifest.mn nss-3.12.4/mozilla/security/nss/manifest.mn
<span style="color: #888822;">--- nss-3.12.4-orig/mozilla/security/nss/manifest.mn	<span style="">2008</span>-04-04 <span style="">15</span>:<span style="">36</span>:<span style="">59.000000000</span> -0500</span>
<span style="color: #888822;">+++ nss-3.12.4/mozilla/security/nss/manifest.mn	<span style="">2009</span>-08-<span style="">31</span> <span style="">19</span>:<span style="">15</span>:<span style="">20.000000000</span> -0500</span>
<span style="color: #440088;">@@ -<span style="">42</span>,<span style="">6</span> +<span style="">42</span>,<span style="">6</span> @@</span>
&nbsp;
 RELEASE = nss
&nbsp;
<span style="color: #991111;">-DIRS = lib cmd</span>
<span style="color: #00b000;">+DIRS = lib cmd config</span></pre></div></div>

<p>I had to add the following line to nss-3.12.6/mozilla/security/coreconf/location.mk to get it to find the newly installed NSPR.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">INCLUDES += -I<span style="color: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>include</pre></div></div>

<p>Then run this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">BUILD_OPT</span>=<span style="color: #000000;">1</span> 
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">NSS_USE_SYSTEM_SQLITE</span>=<span style="color: #000000;">1</span> 
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">NSPR_INCLUDE_DIR</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$USER</span><span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>nspr 
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">USE_SYSTEM_ZLIB</span>=<span style="color: #000000;">1</span> 
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">ZLIB_LIBS</span>=-lz 
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">USE_64</span>=<span style="color: #000000;">1</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#patch -Np1 -i ../nss-3.12.5-standalone-1.patch </span>
&nbsp;
run_gapp \
    <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #660033;">-C</span> mozilla<span style="color: #000000; font-weight: bold;">/</span>security<span style="color: #000000; font-weight: bold;">/</span>nss nss_build_all</pre></div></div>

<p>Then run this to install it :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #007800;">LOC_HOME</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$USER</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">NSS_LINUXDIR</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">basename</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #660033;">-d</span> <span style="color: #007800;">$PWD</span><span style="color: #000000; font-weight: bold;">/</span>mozilla<span style="color: #000000; font-weight: bold;">/</span>dist<span style="color: #000000; font-weight: bold;">/</span>Linux<span style="color: #000000; font-weight: bold;">*`</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;NSS_LINUXDIR=<span style="color: #007800;">$NSS_LINUXDIR</span>&quot;</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">cd</span> mozilla<span style="color: #000000; font-weight: bold;">/</span>dist
<span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #660033;">-v</span> <span style="color: #660033;">-m755</span> <span style="color: #007800;">$NSS_LINUXDIR</span><span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/*</span>.so <span style="color: #007800;">$LOC_HOME</span><span style="color: #000000; font-weight: bold;">/</span>lib 
<span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #660033;">-v</span> <span style="color: #660033;">-m644</span> <span style="color: #007800;">$NSS_LINUXDIR</span><span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #000000; font-weight: bold;">*</span>.chk,libcrmf.a<span style="color: #7a0874; font-weight: bold;">&#125;</span> <span style="color: #007800;">$LOC_HOME</span><span style="color: #000000; font-weight: bold;">/</span>lib 
<span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #660033;">-v</span> <span style="color: #660033;">-m755</span> <span style="color: #660033;">-d</span> <span style="color: #007800;">$LOC_HOME</span><span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>nss 
<span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #660033;">-v</span> <span style="color: #660033;">-m755</span> <span style="color: #007800;">$NSS_LINUXDIR</span><span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">&#123;</span>certutil,nss-config,pk12util<span style="color: #7a0874; font-weight: bold;">&#125;</span> <span style="color: #007800;">$LOC_HOME</span><span style="color: #000000; font-weight: bold;">/</span>bin 
<span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #660033;">-v</span> <span style="color: #660033;">-m644</span> <span style="color: #007800;">$NSS_LINUXDIR</span><span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>pkgconfig<span style="color: #000000; font-weight: bold;">/</span>nss.pc <span style="color: #007800;">$LOC_HOME</span><span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>pkgconfig 
<span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-v</span> <span style="color: #660033;">-RL</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>public,private<span style="color: #7a0874; font-weight: bold;">&#125;</span><span style="color: #000000; font-weight: bold;">/</span>nss<span style="color: #000000; font-weight: bold;">/*</span> <span style="color: #007800;">$LOC_HOME</span><span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>nss 
<span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">644</span> <span style="color: #007800;">$LOC_HOME</span><span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>nss<span style="color: #000000; font-weight: bold;">/*</span></pre></div></div>

</p>
</li>
<li>Python
<p>See my other post here : <a href="http://warped.org/blog/2010/04/02/ch0wned-installing-taskcoach-and-all-its-depenencies-in-home-for-el4/">http://warped.org/blog/2010/04/02/ch0wned-installing-taskcoach-and-all-its-depenencies-in-home-for-el4/</a>
</p>
</li>
</ol>
<h1>Firefox</h1>
<h2>Configuring</h2>
<p>Make a file called mozconfig-firefox or some such.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">BUILD_OFFICIAL</span>=<span style="color: #000000;">1</span>
mk_add_options <span style="color: #007800;">BUILD_OFFICIAL</span>=<span style="color: #000000;">1</span>
mk_add_options <span style="color: #007800;">MOZ_CO_PROJECT</span>=browser
<span style="color: #666666; font-style: italic;"># the following line uses 4 CPUs to build</span>
<span style="color: #666666; font-style: italic;">#mk_add_options MOZ_MAKE_FLAGS=&quot;-j4&quot;</span>
&nbsp;
ac_add_options <span style="color: #660033;">--enable-application</span>=browser
ac_add_options <span style="color: #660033;">--enable-official-branding</span>
ac_add_options <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$USER</span><span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>firefox
&nbsp;
<span style="color: #666666; font-style: italic;"># Optimization</span>
ac_add_options <span style="color: #660033;">--disable-tests</span>
ac_add_options <span style="color: #660033;">--disable-debug</span>
ac_add_options <span style="color: #660033;">--enable-optimize</span>=<span style="color: #ff0000;">&quot;-O2 -funroll-loops -fexpensive-optimizations&quot;</span>
ac_add_options <span style="color: #660033;">--enable-strip</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Features</span>
ac_add_options <span style="color: #660033;">--disable-accessibility</span>
ac_add_options <span style="color: #660033;">--disable-updater</span>
ac_add_options <span style="color: #660033;">--disable-installer</span>
ac_add_options <span style="color: #660033;">--enable-safe-browsing</span>
ac_add_options <span style="color: #660033;">--enable-xinerama</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Libraries / Dependencies</span>
ac_add_options <span style="color: #660033;">--disable-libnotify</span>
ac_add_options <span style="color: #660033;">--disable-gnomevfs</span>
ac_add_options <span style="color: #660033;">--enable-default-toolkit</span>=cairo-gtk2
ac_add_options <span style="color: #660033;">--enable-system-cairo</span>
ac_add_options <span style="color: #660033;">--with-system-nss</span>
ac_add_options <span style="color: #660033;">--with-nss-prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$USER</span>
ac_add_options <span style="color: #660033;">--with-system-nspr</span>
ac_add_options <span style="color: #660033;">--with-nspr-prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$USER</span>
ac_add_options <span style="color: #660033;">--enable-system-sqlite</span></pre></div></div>

<h2>Building</h2>
<p>I had to patch firefox to use OSS instead of ALSA because EL4 doesn&#8217;t have a working ALSA by default.  If you have ALSA working, you may not have to do this step.  I got the guts of this patch from somewhere, but I can&#8217;t find it now, thanks whoever you are!</p>

<div class="wp_syntax"><div class="code"><pre class="diff" style="font-family:monospace;">diff -ur firefox-3.6.2-orig/media/libsydneyaudio/src/Makefile.in firefox-3.6.2/media/libsydneyaudio/src/Makefile.in
<span style="color: #888822;">--- firefox-3.6.2-orig/media/libsydneyaudio/src/Makefile.in	<span style="">2010</span>-03-<span style="">16</span> 02:<span style="">56</span>:<span style="">36.000000000</span> -0700</span>
<span style="color: #888822;">+++ firefox-3.6.2/media/libsydneyaudio/src/Makefile.in	<span style="">2010</span>-04-01 <span style="">10</span>:<span style="">13</span>:<span style="">27.000000000</span> -0700</span>
<span style="color: #440088;">@@ -<span style="">47</span>,<span style="">7</span> +<span style="">47</span>,<span style="">7</span> @@</span>
&nbsp;
 ifeq <span style="">&#40;</span>$<span style="">&#40;</span>OS_ARCH<span style="">&#41;</span>,Linux<span style="">&#41;</span>
 CSRCS		= \
<span style="color: #991111;">-		sydney_audio_alsa.c \</span>
<span style="color: #00b000;">+		sydney_audio_oss.c \</span>
 		$<span style="">&#40;</span>NULL<span style="">&#41;</span>
 endif
&nbsp;
diff -ur firefox-3.6.2-orig/media/libsydneyaudio/src/sydney_audio_oss.c firefox-3.6.2/media/libsydneyaudio/src/sydney_audio_oss.c
<span style="color: #888822;">--- firefox-3.6.2-orig/media/libsydneyaudio/src/sydney_audio_oss.c	<span style="">2010</span>-03-<span style="">16</span> 02:<span style="">56</span>:<span style="">36.000000000</span> -0700</span>
<span style="color: #888822;">+++ firefox-3.6.2/media/libsydneyaudio/src/sydney_audio_oss.c	<span style="">2010</span>-04-01 <span style="">10</span>:<span style="">15</span>:<span style="">40.000000000</span> -0700</span>
<span style="color: #440088;">@@ -<span style="">47</span>,<span style="">11</span> +<span style="">47</span>,<span style="">11</span> @@</span>
 #include &quot;sydney_audio.h&quot;
&nbsp;
 // for versions newer than 3.6.1
<span style="color: #991111;">-#define OSS_VERSION<span style="">&#40;</span>x, y, z<span style="">&#41;</span> <span style="">&#40;</span>x &lt; &lt; <span style="">16</span> | y &lt;&lt; <span style="">8</span> | z<span style="">&#41;</span></span>
<span style="color: #00b000;">+#define OSS_VERSION_<span style="">&#40;</span>x, y, z<span style="">&#41;</span> <span style="">&#40;</span>x &lt;&lt; <span style="">16</span> | y &lt;&lt; <span style="">8</span> | z<span style="">&#41;</span></span>
 // support only versions newer than 3.6.1
<span style="color: #991111;">-#define SUPP_OSS_VERSION OSS_VERSION<span style="">&#40;</span><span style="">3</span>,<span style="">6</span>,<span style="">1</span><span style="">&#41;</span></span>
<span style="color: #00b000;">+#define SUPP_OSS_VERSION OSS_VERSION_<span style="">&#40;</span><span style="">3</span>,<span style="">6</span>,<span style="">1</span><span style="">&#41;</span></span>
&nbsp;
<span style="color: #991111;">-#if <span style="">&#40;</span>SOUND_VERSION &lt; SUPP_OSS_VERSION<span style="">&#41;</span></span>
<span style="color: #00b000;">+#if <span style="">&#40;</span>SOUND_VERSION &lt; SUPP_OSS_VERSION_<span style="">&#41;</span></span>
 #error Unsupported OSS Version
 #else
&nbsp;
<span style="color: #440088;">@@ -<span style="">127</span>,<span style="">7</span> +<span style="">127</span>,<span style="">7</span> @@</span>
         case SA_PCM_FORMAT_S16_BE:
             *fmt = AFMT_S16_BE;
             break;
<span style="color: #991111;">-#if SOUND_VERSION &gt;= OSS_VERSION<span style="">&#40;</span><span style="">4</span>,<span style="">0</span>,<span style="">0</span><span style="">&#41;</span></span>
<span style="color: #00b000;">+#if SOUND_VERSION &gt;= OSS_VERSION_<span style="">&#40;</span><span style="">4</span>,<span style="">0</span>,<span style="">0</span><span style="">&#41;</span></span>
         /* <span style="">24</span>-bit formats <span style="">&#40;</span>LSB aligned in <span style="">32</span> bit word<span style="">&#41;</span> */
         case SA_PCM_FORMAT_S24_LE:
             *fmt = AFMT_S24_LE;
<span style="color: #440088;">@@ -<span style="">563</span>,<span style="">6</span> +<span style="">563</span>,<span style="">8</span> @@</span>
 #if <span style="">0</span> /* TODO */
   AudioOutputUnitStop<span style="">&#40;</span>s-&gt;output_unit<span style="">&#41;</span>;
 #endif
<span style="color: #00b000;">+  close<span style="">&#40;</span>s-&gt;output_fd<span style="">&#41;</span>;</span>
<span style="color: #00b000;">+  s-&gt;output_fd = -<span style="">1</span>;</span>
   pthread_mutex_unlock<span style="">&#40;</span>&amp;s-&gt;mutex<span style="">&#41;</span>;
   return SA_SUCCESS;
 <span style="">&#125;</span>
<span style="color: #440088;">@@ -<span style="">581</span>,<span style="">10</span> +<span style="">583</span>,<span style="">11</span> @@</span>
    * The audio device resets its mSampleTime counter after pausing,
    * so we need to clear our tracking value to keep that in sync.
    */
<span style="color: #991111;">-  s-&gt;bytes_played = <span style="">0</span>;</span>
<span style="color: #00b000;">+  //s-&gt;bytes_played = <span style="">0</span>;</span>
 #if <span style="">0</span> /* TODO */
   AudioOutputUnitStart<span style="">&#40;</span>s-&gt;output_unit<span style="">&#41;</span>;
 #endif
<span style="color: #00b000;">+  sa_stream_open<span style="">&#40;</span>s<span style="">&#41;</span>;</span>
   pthread_mutex_unlock<span style="">&#40;</span>&amp;s-&gt;mutex<span style="">&#41;</span>;
   return SA_SUCCESS;
 <span style="">&#125;</span>
<span style="color: #440088;">@@ -<span style="">615</span>,<span style="">7</span> +<span style="">618</span>,<span style="">7</span> @@</span>
   if <span style="">&#40;</span>s == NULL || s-&gt;output_fd == -<span style="">1</span><span style="">&#41;</span> <span style="">&#123;</span>
     return SA_ERROR_NO_INIT;
   <span style="">&#125;</span>
<span style="color: #991111;">-#if SOUND_VERSION &gt;= OSS_VERSION<span style="">&#40;</span><span style="">4</span>,<span style="">0</span>,<span style="">0</span><span style="">&#41;</span></span>
<span style="color: #00b000;">+#if SOUND_VERSION &gt;= OSS_VERSION_<span style="">&#40;</span><span style="">4</span>,<span style="">0</span>,<span style="">0</span><span style="">&#41;</span></span>
   int mvol = <span style="">&#40;</span><span style="">&#40;</span>int<span style="">&#41;</span><span style="">&#40;</span><span style="">100</span>*vol<span style="">&#41;</span><span style="">&#41;</span> | <span style="">&#40;</span><span style="">&#40;</span>int<span style="">&#41;</span><span style="">&#40;</span><span style="">100</span>*vol<span style="">&#41;</span> &lt; &lt; <span style="">8</span><span style="">&#41;</span>;
   if <span style="">&#40;</span>ioctl<span style="">&#40;</span>s-&gt;output_fd, SNDCTL_DSP_SETPLAYVOL, &amp;mvol<span style="">&#41;</span> &lt; <span style="">0</span><span style="">&#41;</span><span style="">&#123;</span>
     return SA_ERROR_SYSTEM;
<span style="color: #440088;">@@ -<span style="">637</span>,<span style="">7</span> +<span style="">640</span>,<span style="">7</span> @@</span>
   if <span style="">&#40;</span>s == NULL || s-&gt;output_fd == -<span style="">1</span><span style="">&#41;</span> <span style="">&#123;</span>
     return SA_ERROR_NO_INIT;
   <span style="">&#125;</span>
<span style="color: #991111;">-#if SOUND_VERSION &gt;= OSS_VERSION<span style="">&#40;</span><span style="">4</span>,<span style="">0</span>,<span style="">0</span><span style="">&#41;</span></span>
<span style="color: #00b000;">+#if SOUND_VERSION &gt;= OSS_VERSION_<span style="">&#40;</span><span style="">4</span>,<span style="">0</span>,<span style="">0</span><span style="">&#41;</span></span>
   int mvol;
   if <span style="">&#40;</span>ioctl<span style="">&#40;</span>s-&gt;output_fd, SNDCTL_DSP_SETPLAYVOL, &amp;mvol<span style="">&#41;</span> &lt; <span style="">0</span><span style="">&#41;</span><span style="">&#123;</span>
     return SA_ERROR_SYSTEM;</pre></div></div>

<p>The following is a fork of my config_gapp script.  There are some tricky bits because I&#8217;ve left off some -L&#8217;s to avoid the NSS and NSPR libs that are installed in /usr/lib64.</p>
</pre>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #007800;">LOCAL_HOME</span>=<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$USER</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PATH</span>=<span style="color: #007800;">$LOCAL_HOME</span><span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #007800;">$PATH</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">CPPFLAGS</span>=<span style="color: #ff0000;">&quot;-I<span style="color: #007800;">$LOCAL_HOME</span>/include -I<span style="color: #007800;">$LOCAL_HOME</span>/include/nss -I/usr/X11R6/include <span style="color: #007800;">$CPPFLAGS</span>&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">CFLAGS</span>=<span style="color: #ff0000;">&quot;-I<span style="color: #007800;">$LOCAL_HOME</span>/include -I<span style="color: #007800;">$LOCAL_HOME</span>/include/nss -I/usr/X11R6/include <span style="color: #007800;">$CFLAGS</span>&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">CXXFLAGS</span>=<span style="color: #ff0000;">&quot;-I<span style="color: #007800;">$LOCAL_HOME</span>/include -I<span style="color: #007800;">$LOCAL_HOME</span>/include/nss  -I/usr/X11R6/include  <span style="color: #007800;">$CXXFLAGS</span>&quot;</span>
<span style="color: #666666; font-style: italic;">#export LDFLAGS=&quot;-L$LOCAL_HOME/lib -L/usr/lib64 -L/usr/X11R6/lib64 $LDFLAGS&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">LDFLAGS</span>=<span style="color: #ff0000;">&quot;-L<span style="color: #007800;">$LOCAL_HOME</span>/lib -L/usr/X11R6/lib64 <span style="color: #007800;">$LDFLAGS</span>&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PKG_CONFIG</span>=<span style="color: #007800;">$LOCAL_HOME</span><span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>pkg-config
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PKG_CONFIG_PATH</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$LOCAL_HOME</span>/lib/pkgconfig:/usr/lib64/pkgconfig:<span style="color: #007800;">$PKG_CONFIG_PATH</span>&quot;</span>
<span style="color: #666666; font-style: italic;">#export LD_LIBRARY_PATH=&quot;$LOCAL_HOME/lib:/usr/X11R6/lib64:/usr/lib64&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">LD_LIBRARY_PATH</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$LOCAL_HOME</span>/lib:/usr/X11R6/lib64&quot;</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">MOZCONFIG</span>=..<span style="color: #000000; font-weight: bold;">/</span>mozconfig-firefox
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #660033;">-j</span> <span style="color: #000000;">4</span> <span style="color: #660033;">-f</span> client.mk build</pre></div></div>

<h2>Installing</h2>
<p>First you make a .tar.bz2, then you go install it.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">make</span> package
<span style="color: #c20cb9; font-weight: bold;">cp</span> dist<span style="color: #000000; font-weight: bold;">/*</span>.tar.bz2 <span style="color: #000000; font-weight: bold;">/</span>somewhere
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>share
<span style="color: #c20cb9; font-weight: bold;">tar</span> xvfj <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>that<span style="color: #000000; font-weight: bold;">/*</span>.tar.bz2</pre></div></div>

<p>Now make a wrapper script $HOME/bin/firefox :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">exec</span> run_gapp <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$USER</span><span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>firefox<span style="color: #000000; font-weight: bold;">/</span>firefox <span style="color: #ff0000;">&quot;$@&quot;</span></pre></div></div>

<h2>Errors</h2>
<p>Here are some of the error messages I encountered along the way that were solved w/ the prerequisites and patch.  Hopefully this helps future googlers.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>staticlib<span style="color: #000000; font-weight: bold;">/</span>components<span style="color: #000000; font-weight: bold;">/</span>libpipnss.a<span style="color: #7a0874; font-weight: bold;">&#40;</span>nsNSSCallbacks.o<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>.text+0x150a<span style="color: #7a0874; font-weight: bold;">&#41;</span>: In <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #000000; font-weight: bold;">`</span>RegisterMyOCSPAIAInfoCallback<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #ff0000;">':
: undefined reference to `CERT_RegisterAlternateOCSPAIAInfoCallBack'</span>
..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>staticlib<span style="color: #000000; font-weight: bold;">/</span>components<span style="color: #000000; font-weight: bold;">/</span>libpipnss.a<span style="color: #7a0874; font-weight: bold;">&#40;</span>nsNSSCallbacks.o<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>.text+0x154d<span style="color: #7a0874; font-weight: bold;">&#41;</span>: In <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #000000; font-weight: bold;">`</span>UnregisterMyOCSPAIAInfoCallback<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #ff0000;">':
: undefined reference to `CERT_RegisterAlternateOCSPAIAInfoCallBack'</span>
..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>staticlib<span style="color: #000000; font-weight: bold;">/</span>components<span style="color: #000000; font-weight: bold;">/</span>libpipnss.a<span style="color: #7a0874; font-weight: bold;">&#40;</span>nsNSSCallbacks.o<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>.text+0x2aa9<span style="color: #7a0874; font-weight: bold;">&#41;</span>: In <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #000000; font-weight: bold;">`</span>HandshakeCallback<span style="color: #7a0874; font-weight: bold;">&#40;</span>PRFileDesc<span style="color: #000000; font-weight: bold;">*</span>, void<span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #ff0000;">':
: undefined reference to `SSL_HandshakeNegotiatedExtension'</span>
collect2: <span style="color: #c20cb9; font-weight: bold;">ld</span> returned <span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">exit</span> status
<span style="color: #c20cb9; font-weight: bold;">make</span><span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">4</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: <span style="color: #000000; font-weight: bold;">***</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>libxul.so<span style="color: #7a0874; font-weight: bold;">&#93;</span> Error <span style="color: #000000;">1</span>
<span style="color: #c20cb9; font-weight: bold;">make</span><span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">4</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: Leaving directory <span style="color: #000000; font-weight: bold;">`/</span>opt<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>mbaker<span style="color: #000000; font-weight: bold;">/</span>firefox-3.6.2<span style="color: #000000; font-weight: bold;">/</span>toolkit<span style="color: #000000; font-weight: bold;">/</span>library<span style="color: #ff0000;">'
make[3]: *** [libs_tier_toolkit] Error 2
make[3]: Leaving directory `/opt/local/mbaker/firefox-3.6.2'</span>
<span style="color: #c20cb9; font-weight: bold;">make</span><span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: <span style="color: #000000; font-weight: bold;">***</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>tier_toolkit<span style="color: #7a0874; font-weight: bold;">&#93;</span> Error <span style="color: #000000;">2</span>
<span style="color: #c20cb9; font-weight: bold;">make</span><span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: Leaving directory <span style="color: #000000; font-weight: bold;">`/</span>opt<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>mbaker<span style="color: #000000; font-weight: bold;">/</span>firefox-3.6.2<span style="color: #ff0000;">'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/opt/local/mbaker/firefox-3.6.2'</span>
<span style="color: #c20cb9; font-weight: bold;">make</span>: <span style="color: #000000; font-weight: bold;">***</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>build<span style="color: #7a0874; font-weight: bold;">&#93;</span> Error <span style="color: #000000;">2</span></pre></div></div>

<p>That one was solved by installing NSS and NSPR separately with the linux-from-scratch patches.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">error: system NSPR does not support PR_STATIC_ASSERT</pre></div></div>

<p>Look in config.log and then fix your permissions in $HOME/include/nss.  </p>
]]></content:encoded>
			<wfw:commentRss>http://warped.org/blog/2010/04/06/ch0wned-building-your-own-firefox-on-el4-for-x86_64-in-your-homedir/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>ch0wned &#8211; Building Amarok 1.4.10 in $HOME on Redhat EL4</title>
		<link>http://warped.org/blog/2010/04/05/ch0wned-building-amarok-1-4-10-in-home-on-redhat-el4/</link>
		<comments>http://warped.org/blog/2010/04/05/ch0wned-building-amarok-1-4-10-in-home-on-redhat-el4/#comments</comments>
		<pubDate>Tue, 06 Apr 2010 00:49:40 +0000</pubDate>
		<dc:creator>max</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://warped.org/blog/?p=94</guid>
		<description><![CDATA[ch0wned. adj. This is the state when you are a linux user and don't have root access. 
Intro
All I wanted to do was play Internet radio via a SOCKS proxy.  Is that too much to ask for on Redhat EL4?  Apparently so.  So after many hours of frustration, here is how you [...]]]></description>
			<content:encoded><![CDATA[<p><tt>ch0wned. adj. This is the state when you are a linux user and don't have root access. </tt></p>
<h1>Intro</h1>
<p>All I wanted to do was play Internet radio via a SOCKS proxy.  Is that too much to ask for on Redhat EL4?  Apparently so.  So after many hours of frustration, here is how you get Amarok 1.x (1.4.10 was the last one made) to compile and run from your homedir on Linux 2.ANCIENT.  </p>
<p>
This guide assumes you&#8217;re leaving off from my previous post : <a href="http://warped.org/blog/2009/03/04/chown3d-part-2-gtk-and-glib-in-your-own-home-directory/">http://warped.org/blog/2009/03/04/chown3d-part-2-gtk-and-glib-in-your-own-home-directory/</a>  where you&#8217;ve setup a script called config_gapp.
</p>
<h1>Prerequisites</h1>
<ul>
<li>amarok-1.4.10.tar.bz2</li>
<li>binutils-2.20.1.tar.bz2</li>
<li>xine-lib-1.1.18.1.tar.bz2</li>
<li>taglib-1.6.1.tar.gz</li>
<li>ffmpeg-0.5.1.tar.bz2</li>
<li>My Patch</li>
</ul>
<h1>Building</h1>
<p>For taglib, ffmpeg, and binutils:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">config_gapp
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p>For xine-lib :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">config_gapp <span style="color: #660033;">--without-speex</span>
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p>For amarok:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">config_gapp</pre></div></div>

<p>Then apply this patch :</p>

<div class="wp_syntax"><div class="code"><pre class="diff" style="font-family:monospace;">diff -ru amarok-1.4.10/amarok/src/mediadevice/generic/genericmediadevice.cpp amarok-1.4.10-max/amarok/src/mediadevice/generic/genericmediadevice.cpp
<span style="color: #888822;">--- amarok-1.4.10/amarok/src/mediadevice/generic/genericmediadevice.cpp	<span style="">2008</span>-08-<span style="">13</span> <span style="">14</span>:<span style="">21</span>:<span style="">51.000000000</span> -0700</span>
<span style="color: #888822;">+++ amarok-1.4.10-max/amarok/src/mediadevice/generic/genericmediadevice.cpp	<span style="">2010</span>-04-05 <span style="">16</span>:<span style="">21</span>:<span style="">11.000000000</span> -0700</span>
<span style="color: #440088;">@@ -<span style="">557</span>,<span style="">7</span> +<span style="">557</span>,<span style="">7</span> @@</span>
     args<span style="">&#91;</span>&quot;artist&quot;<span style="">&#93;</span> = artist;
     args<span style="">&#91;</span>&quot;albumartist&quot;<span style="">&#93;</span> = albumartist;
     args<span style="">&#91;</span>&quot;initial&quot;<span style="">&#93;</span> = albumartist.mid<span style="">&#40;</span> <span style="">0</span>, <span style="">1</span> <span style="">&#41;</span>.upper<span style="">&#40;</span><span style="">&#41;</span>;
<span style="color: #991111;">-    args<span style="">&#91;</span>&quot;filetype&quot;<span style="">&#93;</span> = mb.url<span style="">&#40;</span><span style="">&#41;</span>.pathOrURL<span style="">&#40;</span><span style="">&#41;</span>.section<span style="">&#40;</span> &quot;.&quot;, -<span style="">1</span> <span style="">&#41;</span>.lower<span style="">&#40;</span><span style="">&#41;</span>;</span>
<span style="color: #00b000;">+    args<span style="">&#91;</span>&quot;filetype&quot;<span style="">&#93;</span> = mb.url<span style="">&#40;</span><span style="">&#41;</span>.url<span style="">&#40;</span><span style="">&#41;</span>.section<span style="">&#40;</span> &quot;.&quot;, -<span style="">1</span> <span style="">&#41;</span>.lower<span style="">&#40;</span><span style="">&#41;</span>;</span>
     QString track;
     if <span style="">&#40;</span> mb.track<span style="">&#40;</span><span style="">&#41;</span> <span style="">&#41;</span>
         track.sprintf<span style="">&#40;</span> &quot;%02d&quot;, mb.track<span style="">&#40;</span><span style="">&#41;</span> <span style="">&#41;</span>;
<span style="color: #440088;">@@ -<span style="">657</span>,<span style="">7</span> +<span style="">657</span>,<span style="">7</span> @@</span>
&nbsp;
     if<span style="">&#40;</span> !kioCopyTrack<span style="">&#40;</span> bundle.url<span style="">&#40;</span><span style="">&#41;</span>, desturl <span style="">&#41;</span> <span style="">&#41;</span>
     <span style="">&#123;</span>
<span style="color: #991111;">-        debug<span style="">&#40;</span><span style="">&#41;</span> &lt; &lt; &quot;Failed to copy track: &quot; &lt;&lt; bundle.url<span style="">&#40;</span><span style="">&#41;</span>.pathOrURL<span style="">&#40;</span><span style="">&#41;</span> &lt;&lt; &quot; to &quot; &lt;&lt; desturl.pathOrURL<span style="">&#40;</span><span style="">&#41;</span> &lt;&lt; endl;</span>
<span style="color: #00b000;">+        debug<span style="">&#40;</span><span style="">&#41;</span> &lt;&lt; &quot;Failed to copy track: &quot; &lt;&lt; bundle.url<span style="">&#40;</span><span style="">&#41;</span>.url<span style="">&#40;</span><span style="">&#41;</span> &lt;&lt; &quot; to &quot; &lt;&lt; desturl.url<span style="">&#40;</span><span style="">&#41;</span> &lt;&lt; endl;</span>
         return <span style="">0</span>;
     <span style="">&#125;</span>
&nbsp;
<span style="color: #440088;">@@ -<span style="">833</span>,<span style="">7</span> +<span style="">833</span>,<span style="">7</span> @@</span>
 void
 GenericMediaDevice::dirListerClear<span style="">&#40;</span> const KURL &amp;url <span style="">&#41;</span>
 <span style="">&#123;</span>
<span style="color: #991111;">-    QString directory = url.pathOrURL<span style="">&#40;</span><span style="">&#41;</span>;</span>
<span style="color: #00b000;">+    QString directory = url.path<span style="">&#40;</span><span style="">&#41;</span>;</span>
     GenericMediaFile *vmf = m_mfm<span style="">&#91;</span>directory<span style="">&#93;</span>;
     if<span style="">&#40;</span> vmf <span style="">&#41;</span>
         vmf-&gt;deleteAll<span style="">&#40;</span> false <span style="">&#41;</span>;
<span style="color: #440088;">@@ -<span style="">842</span>,<span style="">7</span> +<span style="">842</span>,<span style="">7</span> @@</span>
 void
 GenericMediaDevice::dirListerDeleteItem<span style="">&#40;</span> KFileItem *fileitem <span style="">&#41;</span>
 <span style="">&#123;</span>
<span style="color: #991111;">-    QString filename = fileitem-&gt;url<span style="">&#40;</span><span style="">&#41;</span>.pathOrURL<span style="">&#40;</span><span style="">&#41;</span>;</span>
<span style="color: #00b000;">+    QString filename = fileitem-&gt;url<span style="">&#40;</span><span style="">&#41;</span>.path<span style="">&#40;</span><span style="">&#41;</span>;</span>
     GenericMediaFile *vmf = m_mfm<span style="">&#91;</span>filename<span style="">&#93;</span>;
     if<span style="">&#40;</span> vmf <span style="">&#41;</span>
         vmf-&gt;deleteAll<span style="">&#40;</span> true <span style="">&#41;</span>;
diff -ru amarok-1.4.10/amarok/src/plugin/plugin.h amarok-1.4.10-max/amarok/src/plugin/plugin.h
<span style="color: #888822;">--- amarok-1.4.10/amarok/src/plugin/plugin.h	<span style="">2008</span>-08-<span style="">13</span> <span style="">14</span>:<span style="">21</span>:<span style="">51.000000000</span> -0700</span>
<span style="color: #888822;">+++ amarok-1.4.10-max/amarok/src/plugin/plugin.h	<span style="">2010</span>-04-05 <span style="">16</span>:07:<span style="">18.000000000</span> -0700</span>
<span style="color: #440088;">@@ -<span style="">9</span>,<span style="">9</span> +<span style="">9</span>,<span style="">11</span> @@</span>
&nbsp;
 #define AMAROK_EXPORT_PLUGIN<span style="">&#40;</span> classname <span style="">&#41;</span> \
     extern &quot;C&quot; <span style="">&#123;</span> \
<span style="color: #991111;">-          KDE_EXPORT Amarok::Plugin* create_plugin<span style="">&#40;</span><span style="">&#41;</span> <span style="">&#123;</span> return new classname; <span style="">&#125;</span> \</span>
<span style="color: #00b000;">+           __attribute__ <span style="">&#40;</span><span style="">&#40;</span>visibility<span style="">&#40;</span>&quot;default&quot;<span style="">&#41;</span><span style="">&#41;</span><span style="">&#41;</span> Amarok::Plugin* create_plugin<span style="">&#40;</span><span style="">&#41;</span> <span style="">&#123;</span> return new classname; <span style="">&#125;</span> \</span>
     <span style="">&#125;</span>
&nbsp;
<span style="color: #00b000;">+          //KDE_EXPORT Amarok::Plugin* create_plugin<span style="">&#40;</span><span style="">&#41;</span> <span style="">&#123;</span> return new classname; <span style="">&#125;</span> </span>
<span style="color: #00b000;">+</span>
 #include &lt;qmap .h&gt;
 #include &lt;qstring .h&gt;
&nbsp;
<span style="color: #888822;">--- amarok-1.4.10/amarok/src/amarokcore/amarokconfig.cpp	<span style="">2010</span>-04-05 <span style="">17</span>:<span style="">19</span>:<span style="">09.000000000</span> -0700</span>
<span style="color: #888822;">+++ amarok-1.4.10-max/amarok/src/amarokcore/amarokconfig.cpp	<span style="">2010</span>-04-05 <span style="">15</span>:<span style="">46</span>:<span style="">37.000000000</span> -0700</span>
<span style="color: #440088;">@@ -<span style="">465</span>,<span style="">8</span> +<span style="">465</span>,<span style="">8</span> @@</span>
   KConfigSkeleton::ItemBool  *itemMonitorChanges;
   itemMonitorChanges = new KConfigSkeleton::ItemBool<span style="">&#40;</span> currentGroup<span style="">&#40;</span><span style="">&#41;</span>, QString::fromLatin1<span style="">&#40;</span> &quot;Monitor Changes&quot; <span style="">&#41;</span>, mMonitorChanges, true <span style="">&#41;</span>;
   addItem<span style="">&#40;</span> itemMonitorChanges, QString::fromLatin1<span style="">&#40;</span> &quot;MonitorChanges&quot; <span style="">&#41;</span> <span style="">&#41;</span>;
<span style="color: #991111;">-  KConfigSkeleton::ItemPathList  *itemCollectionFolders;</span>
<span style="color: #991111;">-  itemCollectionFolders = new KConfigSkeleton::ItemPathList<span style="">&#40;</span> currentGroup<span style="">&#40;</span><span style="">&#41;</span>, QString::fromLatin1<span style="">&#40;</span> &quot;Collection Folders&quot; <span style="">&#41;</span>, mCollectionFolders <span style="">&#41;</span>;</span>
<span style="color: #00b000;">+  KConfigSkeleton::ItemString *itemCollectionFolders;</span>
<span style="color: #00b000;">+  itemCollectionFolders = new KConfigSkeleton::ItemString <span style="">&#40;</span> currentGroup<span style="">&#40;</span><span style="">&#41;</span>, QString::fromLatin1<span style="">&#40;</span> &quot;Collection Folders&quot; <span style="">&#41;</span>, mCollectionFolders <span style="">&#41;</span>;</span>
   addItem<span style="">&#40;</span> itemCollectionFolders, QString::fromLatin1<span style="">&#40;</span> &quot;CollectionFolders&quot; <span style="">&#41;</span> <span style="">&#41;</span>;
&nbsp;
   setCurrentGroup<span style="">&#40;</span> QString::fromLatin1<span style="">&#40;</span> &quot;MySql&quot; <span style="">&#41;</span> <span style="">&#41;</span>;
&nbsp;
<span style="color: #991111;">&lt;/qstring&gt;&lt;/qmap&gt;</span></pre></div></div>

<p>Then go ahead with:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<h2>Errors</h2>
<p>Here are some of the error messages I encountered along the way that were solved w/ the prerequisites and patch.  Hopefully this helps future googlers.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">ld</span>: .libs<span style="color: #000000; font-weight: bold;">/</span>xine.o: relocation R_X86_64_PC32 against <span style="color: #000000; font-weight: bold;">`</span>xine_event_send<span style="color: #ff0000;">' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value</span></pre></div></div>

<p>Needs a newer version of binutils that handles X86_64 better.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">amarokconfig.cpp: In constructor <span style="color: #000000; font-weight: bold;">`</span>AmarokConfig::AmarokConfig<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #ff0000;">':
amarokconfig.cpp:468: error: `ItemPathList'</span> is not a member of <span style="color: #000000; font-weight: bold;">`</span>KConfigSkeleton<span style="color: #ff0000;">'
amarokconfig.cpp:468: error: `itemCollectionFolders'</span> was not declared <span style="color: #000000; font-weight: bold;">in</span> this scope
amarokconfig.cpp:<span style="color: #000000;">469</span>: error: <span style="color: #000000; font-weight: bold;">`</span>class KConfigSkeleton::ItemPathList<span style="color: #ff0000;">' has not been declared</span></pre></div></div>

<p>This is due to the old version of KDE 3.3 on EL4.  Needs the patch above to amarokconfig.cpp.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">void-engine.cpp:<span style="color: #000000;">22</span>: error: visibility arg must be one of <span style="color: #ff0000;">&quot;default&quot;</span>, <span style="color: #ff0000;">&quot;hidden&quot;</span>, <span style="color: #ff0000;">&quot;protected&quot;</span> or <span style="color: #ff0000;">&quot;internal&quot;</span></pre></div></div>

<p>Again, some ancient KDE 3.3 bug that is fixed by the patch above.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">genericmediadevice.cpp: In member <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #000000; font-weight: bold;">`</span>QString GenericMediaDevice::buildDestination<span style="color: #7a0874; font-weight: bold;">&#40;</span>const QString<span style="color: #000000; font-weight: bold;">&amp;</span>, const MetaBundle<span style="color: #000000; font-weight: bold;">&amp;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #ff0000;">':
genericmediadevice.cpp:560: error: '</span>const class KURL<span style="color: #ff0000;">' has no member named '</span>pathOrURL<span style="color: #ff0000;">'
genericmediadevice.cpp: In member function `virtual MediaItem* GenericMediaDevice::copyTrackToDevice(const MetaBundle&amp;)'</span>:
genericmediadevice.cpp:<span style="color: #000000;">660</span>: error: <span style="color: #ff0000;">'const class KURL'</span> has no member named <span style="color: #ff0000;">'pathOrURL'</span>
genericmediadevice.cpp:<span style="color: #000000;">660</span>: error: <span style="color: #ff0000;">'const class KURL'</span> has no member named <span style="color: #ff0000;">'pathOrURL'</span>
genericmediadevice.cpp: In member <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #000000; font-weight: bold;">`</span>void GenericMediaDevice::dirListerClear<span style="color: #7a0874; font-weight: bold;">&#40;</span>const KURL<span style="color: #000000; font-weight: bold;">&amp;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #ff0000;">':
genericmediadevice.cpp:836: error: '</span>const class KURL<span style="color: #ff0000;">' has no member named '</span>pathOrURL<span style="color: #ff0000;">'
genericmediadevice.cpp: In member function `void GenericMediaDevice::dirListerDeleteItem(KFileItem*)'</span>:
genericmediadevice.cpp:<span style="color: #000000;">845</span>: error: <span style="color: #ff0000;">'const class KURL'</span> has no member named <span style="color: #ff0000;">'pathOrURL'</span></pre></div></div>

<p>More ancient KDE 3.3 stuff &#8212; pathOrURL() doesn&#8217;t exist yet, so we use either url() or path().</p>
<p>
Last thing : doc/ was giving me issue, so I removed it from the Makefile under TOPSUBDIRS.</p>
<h1>Running</h1>
<p>I kept getting errors about &#8220;no sound-engine plugins found&#8221; until I added the two paths to $KDEDIRS as below :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">KDEDIRS</span>=<span style="color: #000000; font-weight: bold;">/</span>usr:<span style="color: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>lib64<span style="color: #000000; font-weight: bold;">/</span>kde3:<span style="color: #007800;">$HOME</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">exec</span> run_gapp amarok <span style="color: #ff0000;">&quot;$@&quot;</span></pre></div></div>
</p>
]]></content:encoded>
			<wfw:commentRss>http://warped.org/blog/2010/04/05/ch0wned-building-amarok-1-4-10-in-home-on-redhat-el4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ch0wned &#8211; Installing TaskCoach and all its depenencies in $HOME for EL4</title>
		<link>http://warped.org/blog/2010/04/02/ch0wned-installing-taskcoach-and-all-its-depenencies-in-home-for-el4/</link>
		<comments>http://warped.org/blog/2010/04/02/ch0wned-installing-taskcoach-and-all-its-depenencies-in-home-for-el4/#comments</comments>
		<pubDate>Fri, 02 Apr 2010 21:48:37 +0000</pubDate>
		<dc:creator>max</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://warped.org/blog/?p=96</guid>
		<description><![CDATA[ch0wned. adj. This is the state when you are a linux user and don't have root access. 
Installing TaskCoach and its dependencies in $HOME for EL4
This guide assumes you&#8217;re leaving off from my previous post : http://warped.org/blog/2009/03/04/chown3d-part-2-gtk-and-glib-in-your-own-home-directory/  where you&#8217;ve setup a script called config_gapp.
Requirements

Python-2.5.5.tar.bz2

wxPython-src-2.8.10.1.tar.bz2

TaskCoach-1.0.1.tar.gz


Directions

Python
Install it like normal unless you have a modern distro that [...]]]></description>
			<content:encoded><![CDATA[<p><tt>ch0wned. adj. This is the state when you are a linux user and don't have root access. </tt></p>
<h1>Installing TaskCoach and its dependencies in $HOME for EL4</h1>
<p>This guide assumes you&#8217;re leaving off from my previous post : <a href="http://warped.org/blog/2009/03/04/chown3d-part-2-gtk-and-glib-in-your-own-home-directory/">http://warped.org/blog/2009/03/04/chown3d-part-2-gtk-and-glib-in-your-own-home-directory/</a>  where you&#8217;ve setup a script called config_gapp.</p>
<h2>Requirements</h2>
<ul>
<li>Python-2.5.5.tar.bz2
</li>
<li>wxPython-src-2.8.10.1.tar.bz2
</li>
<li>TaskCoach-1.0.1.tar.gz
</li>
</ul>
<h2>Directions</h2>
<ol>
<li>Python
<p>Install it like normal unless you have a modern distro that has a decent install of Python 2.5, in which case you will need to install the following things into $HOME.  Not sure how to do that in Python, so you might as well have your own local version.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">config_gapp
<span style="color: #c20cb9; font-weight: bold;">make</span> 
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<li>wxWidgets (included w/ wxPython)<br />
Install the following patch from <a href="http://groups.google.com/group/wxPython-users/browse_thread/thread/129ba27e2f868c3c?pli=1">This Thread</a> :</p>

<div class="wp_syntax"><div class="code"><pre class="diff" style="font-family:monospace;">--- wxPython/src/gtk/_gdi_wrap.cpp.orig <span style="">2009</span>-08-08 <span style="">16</span>:<span style="">26</span>:<span style="">48.000000000</span> +0200
<span style="color: #888822;">+++ wxPython/src/gtk/_gdi_wrap.cpp      <span style="">2009</span>-08-08 <span style="">16</span>:<span style="">32</span>:<span style="">50.000000000</span> +0200</span>
<span style="color: #440088;">@@ -<span style="">4195</span>,<span style="">6</span> +<span style="">4195</span>,<span style="">10</span> @@</span>
     virtual wxGraphicsBrush CreateRadialGradientBrush<span style="">&#40;</span>wxDouble , wxDouble , wxDouble , wxDouble , wxDouble ,
                                                       const wxColour &amp;, const wxColour &amp;<span style="">&#41;</span>  <span style="">&#123;</span> return wxNullGraphicsBrush; <span style="">&#125;</span>
     virtual wxGraphicsFont CreateFont<span style="">&#40;</span> const wxFont &amp; , const wxColour &amp; <span style="">&#41;</span> <span style="">&#123;</span> return wxNullGraphicsFont; <span style="">&#125;</span>
<span style="color: #00b000;">+</span>
<span style="color: #00b000;">+    // patch required as explained in</span>
<span style="color: #00b000;">+    // http://groups.google.com/group/wxPython-users/browse_thread/thread/129ba27e2f<span style="color: #440088;">868c3</span>c?pli=1</span>
<span style="color: #00b000;">+    wxGraphicsBitmap CreateBitmap<span style="">&#40;</span> const wxBitmap &amp;bitmap <span style="">&#41;</span> const <span style="">&#123;</span> return wxNullGraphicsBitmap; <span style="">&#125;</span> </span>
 <span style="">&#125;</span>;</pre></div></div>

<p>Then run :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">config_gapp <span style="color: #660033;">--enable-unicode</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span>
<span style="color: #7a0874; font-weight: bold;">cd</span> contrib<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>gizmos <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

</li>
<li>wxPython

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> wxPython
<span style="color: #c20cb9; font-weight: bold;">vim</span> config.py
   <span style="color: #666666; font-style: italic;"># Turn off all the contrib features except gizmos</span>
run_gapp python2.5 setup.py build_ext
run_gapp python2.5 setup.py <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

</li>
<li>TaskCoach

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">run_gapp python2.5 setup.py build
run_gapp python2.5 setup.py <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

</li>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://warped.org/blog/2010/04/02/ch0wned-installing-taskcoach-and-all-its-depenencies-in-home-for-el4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spam / Ham Learning folders for VirtualMin / Maildir-based systems</title>
		<link>http://warped.org/blog/2009/12/17/spam-ham-learning-folders-for-virtualmin-maildir-based-systems/</link>
		<comments>http://warped.org/blog/2009/12/17/spam-ham-learning-folders-for-virtualmin-maildir-based-systems/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 19:56:51 +0000</pubDate>
		<dc:creator>max</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://warped.org/blog/?p=88</guid>
		<description><![CDATA[I&#8217;ve created a simple script that will monitor folders called &#8216;ham&#8217; and &#8217;spam&#8217; for new entries.   Once found, the &#8216;ham&#8217; folder will send the message to sa-learn --ham, strip off the headers, and return it to the inbox.   The spam folder will simply run sa-learn --spam on the message.
Any additions are [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve created a simple script that will monitor folders called &#8216;ham&#8217; and &#8217;spam&#8217; for new entries.   Once found, the &#8216;ham&#8217; folder will send the message to <tt>sa-learn --ham</tt>, strip off the headers, and return it to the inbox.   The spam folder will simply run <tt>sa-learn --spam</tt> on the message.</p>
<p>Any additions are welcome!<br />
<a href='http://warped.org/linux/spam_folders' >Download : spam_folders script</a>.</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/usr/bin/perl -w</span>
<span style="color: #666666; font-style: italic;"># spam_folder - Turns the 'ham' and 'spam' folders </span>
<span style="color: #666666; font-style: italic;">#               into training folders for spam assassin</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># For VirtualMin</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># Max Baker &lt;max @warped.org&gt; 12/17/09</span>
<span style="color: #666666; font-style: italic;"># No license retained, distribute and modify freely</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">use</span> File<span style="color: #339933;">::</span><span style="color: #006600;">Glob</span> <span style="color: #009966; font-style: italic;">qw/bsd_glob/</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> File<span style="color: #339933;">::</span><span style="color: #006600;">Temp</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> File<span style="color: #339933;">::</span><span style="color: #006600;">Copy</span> <span style="color: #009966; font-style: italic;">qw/copy/</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Config</span>
<span style="color: #0000ff;">$sa_learn</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">'/usr/bin/sa-learn'</span><span style="color: #339933;">;</span>
<span style="color: #0000ff;">$sa</span>       <span style="color: #339933;">=</span> <span style="color: #ff0000;">'/usr/bin/spamassassin'</span><span style="color: #339933;">;</span>
<span style="color: #0000ff;">@spam</span>  <span style="color: #339933;">=</span> bsd_glob<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;/home/*/homes/*/Maildir/.spam/cur/*&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #0000ff;">@ham</span>   <span style="color: #339933;">=</span> bsd_glob<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;/home/*/homes/*/Maildir/.ham/cur/*&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Mark everything in spam folder that's not already marked as spam</span>
<span style="color: #666666; font-style: italic;">#  (trust spamassassin header)</span>
<span style="color: #b1b100;">foreach</span> <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$s</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">@spam</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">next</span> <span style="color: #b1b100;">if</span> is_marked<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$s</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000066;">system</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;$sa_learn --spam <span style="color: #000099; font-weight: bold;">\&quot;</span>$s<span style="color: #000099; font-weight: bold;">\&quot;</span> &gt; /dev/null&quot;</span><span style="color: #009900;">&#41;</span> 
        <span style="color: #b1b100;">and</span> <span style="color: #000066;">warn</span> <span style="color: #ff0000;">&quot;sa-learn errored on $s<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Mark everything in ham folder as ham, strip off junk and move into</span>
<span style="color: #666666; font-style: italic;"># inbox</span>
<span style="color: #b1b100;">foreach</span> <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$h</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">@ham</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;"># Strip off headers</span>
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$tmp</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> File<span style="color: #339933;">::</span><span style="color: #006600;">Temp</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$tmp_file</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$tmp</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">filename</span><span style="color: #339933;">;</span>
    <span style="color: #000066;">system</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;$sa -d <span style="color: #000099; font-weight: bold;">\&quot;</span>$h<span style="color: #000099; font-weight: bold;">\&quot;</span> &gt; $tmp_file&quot;</span><span style="color: #009900;">&#41;</span> 
        <span style="color: #b1b100;">and</span> <span style="color: #000066;">die</span> <span style="color: #ff0000;">&quot;$sa errored on $h<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;"># Unmark as spam</span>
    <span style="color: #000066;">system</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;$sa_learn --ham $tmp_file &gt; /dev/null&quot;</span><span style="color: #009900;">&#41;</span> 
        <span style="color: #b1b100;">and</span> <span style="color: #000066;">warn</span> <span style="color: #ff0000;">&quot;$sa_learn errored on $tmp_file<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;"># Remove from ham</span>
    <span style="color: #000066;">unlink</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$h</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">or</span> <span style="color: #000066;">die</span> <span style="color: #ff0000;">&quot;Can't remove $h. $!<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;"># Move to inbox</span>
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$new_h</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$h</span><span style="color: #339933;">;</span>
    <span style="color: #0000ff;">$new_h</span> <span style="color: #339933;">=~</span> <span style="color: #000066;">s</span><span style="color: #339933;">,</span>Maildir<span style="color: #339933;">/.</span><span style="color: #0000ff;">*cur</span><span style="color: #339933;">/,</span>Maildir<span style="color: #339933;">/</span>cur<span style="color: #339933;">/,;</span>
    copy<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$tmp_file</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$new_h</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">or</span> <span style="color: #000066;">die</span> <span style="color: #ff0000;">&quot;Can't move message to inbox. $tmpfile -&gt; $new_h.  $!<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># is_marked() - Looks to see if spam assassin has already tagged this,</span>
<span style="color: #000000; font-weight: bold;">sub</span> is_marked <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$s</span> <span style="color: #339933;">=</span> <span style="color: #000066;">shift</span><span style="color: #339933;">;</span>
    <span style="color: #000066;">open</span> <span style="color: #009900;">&#40;</span>S<span style="color: #339933;">,</span><span style="color: #ff0000;">&quot;&lt; $s&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">or</span> <span style="color: #000066;">return</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$is</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #009999;">&lt;S&gt;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/^X-Spam-Flag: YES/i</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #0000ff;">$is</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
            <span style="color: #b1b100;">last</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #000066;">close</span> S<span style="color: #339933;">;</span>
    <span style="color: #000066;">return</span> <span style="color: #0000ff;">$is</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #339933;">&lt;/</span>max<span style="color: #339933;">&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://warped.org/blog/2009/12/17/spam-ham-learning-folders-for-virtualmin-maildir-based-systems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mythdora 10 / MythTV + Antec Fusion 430 VFD LCD + lircd + LCDd</title>
		<link>http://warped.org/blog/2009/11/22/mythdora-10-mythtv-antec-fusion-430-vfd-lcd-lircd-lcdd/</link>
		<comments>http://warped.org/blog/2009/11/22/mythdora-10-mythtv-antec-fusion-430-vfd-lcd-lircd-lcdd/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 05:47:22 +0000</pubDate>
		<dc:creator>max</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[antec]]></category>
		<category><![CDATA[LCDd]]></category>
		<category><![CDATA[lcdproc]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[lirc]]></category>
		<category><![CDATA[myth]]></category>
		<category><![CDATA[mythtv]]></category>

		<guid isPermaLink="false">http://warped.org/blog/?p=80</guid>
		<description><![CDATA[Problem
This guide is how to setup the Antec Fusion 430 Case to work with Mythdora 10 and MythTV.   I found a lot of guides on how to setup the drivers, but they were all out of date.
Pieces
There are three things you need to get running :

lirc_imon kernel driver
LCDd daemon
mythlcdserver daemon

All of these things [...]]]></description>
			<content:encoded><![CDATA[<h1>Problem</h1>
<p>This guide is how to setup the Antec Fusion 430 Case to work with Mythdora 10 and MythTV.   I found a lot of guides on how to setup the drivers, but they were all out of date.</p>
<h1>Pieces</h1>
<p>There are three things you need to get running :</p>
<ol>
<li>lirc_imon kernel driver</li>
<li>LCDd daemon</li>
<li>mythlcdserver daemon</li>
</ol>
<p>All of these things came installed w/ Myth and didn&#8217;t require any additional patching or compiling.</p>
<p>To see the exact device we&#8217;re working with, run <strong>lsusb</strong> :</p>
<pre lang=sh>
Bus 003 Device 002: ID 15c2:ffdc SoundGraph Inc. iMON PAD Remote Controller
</pre>
<p>This is all for the &#8220;Old&#8221; imon, or 1st generation, or &#8220;FFDC&#8221; version of the LCD device.</p>
<h2>1. LIRC lirc_imon kernel driver</h2>
<pre lang=sh>
yum install lirc lirc-libs
</pre>
<p>Edit /etc/modprob.conf and add this line :</p>
<pre lang=conf>
options lirc_imon display_type=1
</pre>
<p>The <strong>display_type=1</strong> option was not documented well, but that was the key in making the module work.  Without it I was seeing the following in the /var/log/messages after adding <strong>debug=1</strong> to the above.  I also was missing /dev/lcd0 even though the kernel driver was loading!</p>
<pre>
Nov 22 21:18:09 localhost kernel: lirc_imon: imon_probe: found IMON device
Nov 22 21:18:09 localhost kernel: lirc_imon: imon_probe: found IR endpoint
Nov 22 21:18:09 localhost kernel: lirc_imon: imon_probe: found VFD endpoint
Nov 22 21:18:09 localhost kernel: lirc_imon: imon_probe: device has no display
Nov 22 21:18:09 localhost kernel: lirc_imon: ir_onboard_decode: 1
Nov 22 21:18:09 localhost kernel: lirc_dev: lirc_register_plugin: sample_rate: 0
Nov 22 21:18:09 localhost kernel: lirc_imon: imon_probe: Registered iMON plugin(minor:1)
Nov 22 21:18:09 localhost kernel: lirc_imon: imon_probe: iMON device on usb&lt;3:2> initialized
</pre>
<p>That &#8220;device has no display&#8221; line is cured by the &#8220;display_type=1&#8243; option.   /var/log/messages now looks like this (with debug=1) :</p>
<pre>
Nov 22 21:21:55 localhost kernel: lirc_imon: Driver for Soundgraph iMON MultiMedia IR/VFD, v0.4
Nov 22 21:21:55 localhost kernel: lirc_imon: Venky Raju <dev @venky.ws>
Nov 22 21:21:55 localhost kernel: lirc_imon: imon_probe: found IMON device
Nov 22 21:21:55 localhost kernel: lirc_imon: imon_probe: found IR endpoint
Nov 22 21:21:55 localhost kernel: lirc_imon: imon_probe: found VFD endpoint
Nov 22 21:21:55 localhost kernel: lirc_imon: ir_onboard_decode: 1
Nov 22 21:21:55 localhost kernel: lirc_imon: vfd_proto_6p: 1
Nov 22 21:21:55 localhost kernel: lirc_dev: lirc_register_plugin: sample_rate: 0
Nov 22 21:21:55 localhost kernel: lirc_imon: imon_probe: Registered iMON plugin(minor:1)
Nov 22 21:21:55 localhost kernel: lirc_imon: Registering VFD with sysfs
Nov 22 21:21:55 localhost kernel: lirc_imon: imon_probe: iMON device on usb&lt;3:2> initialized
Nov 22 21:21:55 localhost kernel: usbcore: registered new interface driver lirc_imon
</dev></pre>
<p>At this point you should have a /dev/lcd0 and you can test it with this command : </p>
<pre lang=shell>
echo "hello world" > /dev/lcd0
</pre>
<p>OK, now that we have a working kernel driver, let&#8217;s move on to the LCD daemon</p>
<h2>2. LCDd Daemon</h2>
<ol>
<li>yum install lcdproc</li>
<li>Edit /etc/sysconfig/lcdproc/LCD.conf to look like this :
<pre code=conf>
[server]
Driver=imon
Bind=127.0.0.1
Port=13666

# Sets the reporting level; defaults to 2 (warnings and errors only).
#ReportLevel=3

# Should we report to syslog instead of stderr ? Default: no
ReportToSyslog=yes

# Sets the default time in seconds to displays a screen.
WaitTime=5

# User to run as.  LCDd will drop its root priviledges,
# if any, and run as this user instead.
User=nobody

# If yes, the the serverscreen will be rotated as a usual info screen. If no,
# it will be a background screen, only visible when no other screens are
# active.
ServerScreen=no

# The server will stay in the foreground if set to true.
#Foreground=no

DriverPath=/usr/lib/lcdproc/

# GoodBye message: each entry represents a display line; default: builtin
GoodBye=""
GoodBye=""

ToggleRotateKey=Enter
PrevScreenKey=Left
NextScreenKey=Right

[menu]
MenuKey=Escape
EnterKey=Enter
UpKey=Up
DownKey=Down

[imon]
Device=/dev/lcd0
Size=16x2
</pre>
<p>Note that you want the <strong>imon</strong> driver, not <strong>imon_lcd</strong> or any other one.
</li>
<li>Boot the driver
<pre lang=sh>
service LCDd restart
tail /var/log/messages
dmesg | tail
</pre>
</li>
</ol>
<p>At this point you should see the output of LCDd on the VFD display.    If not, rinse and repeat.</p>
<h2>3. mythlcdserver</h2>
<p>Follow <a href="http://www.mythtv.org/wiki/Mythlcdserver">these directions on mythtv.org</a> to turn on the LCD settings in MythTV from the front-end in the Appearance menu.   Restart the front-end and it should launch mythlcdserver.  If not, you can launch mythlcdserver as the same user as the front-end.</p>
]]></content:encoded>
			<wfw:commentRss>http://warped.org/blog/2009/11/22/mythdora-10-mythtv-antec-fusion-430-vfd-lcd-lircd-lcdd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updating your BIOS in DOS w/ Window 7 / Vista using a USB Drive</title>
		<link>http://warped.org/blog/2009/11/22/updating-your-bios-in-dos-w-window-7-vista-using-a-usb-drive/</link>
		<comments>http://warped.org/blog/2009/11/22/updating-your-bios-in-dos-w-window-7-vista-using-a-usb-drive/#comments</comments>
		<pubDate>Sun, 22 Nov 2009 22:55:58 +0000</pubDate>
		<dc:creator>max</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://warped.org/blog/?p=76</guid>
		<description><![CDATA[Problem
You need to update your BIOS using a DOS boot disk and you&#8217;re running Windows 7, or Vista.   Chances are you haven&#8217;t seen a DOS floppy, much less the floppy drive to put it in, since 1985.  
Solution
I found many sites telling you how to make a USB stick bootable for installing [...]]]></description>
			<content:encoded><![CDATA[<h1>Problem</h1>
<p>You need to update your BIOS using a DOS boot disk and you&#8217;re running Windows 7, or Vista.   Chances are you haven&#8217;t seen a DOS floppy, much less the floppy drive to put it in, since 1985.  </p>
<h1>Solution</h1>
<p>I found many sites telling you how to make a USB stick bootable for installing Windows 7, but none on how to make it bootable for DOS for upgrading the BIOS or other diag.</p>
<p>Here is one solution I found :</p>
<ol>
<li>Download a Windows 98 Bootable CD image from <a href="http://www.allbootdisks.com/download/iso.html">http://www.allbootdisks.com/download/iso.html</a> and burn it to a CD.
</li>
<li>Download the HP Flash Drive Format program that you will find mentioned on tons of differents sites : <a href="http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?lang=en&#038;cc=us&#038;swItem=MTX-UNITY-I23839&#038;jumpid=reg_R1002_USEN">http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?lang=en&#038;cc=us&#038;swItem=MTX-UNITY-I23839&#038;jumpid=reg_R1002_USEN</a>  and install it.</li>
<li>Using that utility, format your flash drive with FAT32,  Make it Bootable, and point the utility to your CDROM drive with the CD you made in Step 1.</li>
<li>Copy your BIOS and flash utility to the USB drive</li>
<li>Boot the computer using the USB stick.  This may require entering a Boot Menu w/ F11 or F12, and/or changing some settings in the BIOS such as &#8220;Enable Legacy USB Support&#8221;.   Chances are it will just work by putting the USB stick in and rebooting.</li>
<li>Follow the motherboard manufacturer instructions on how to flash the BIOS.</li>
</ol>
<p>Good luck and enjoy!<br />
-m</p>
]]></content:encoded>
			<wfw:commentRss>http://warped.org/blog/2009/11/22/updating-your-bios-in-dos-w-window-7-vista-using-a-usb-drive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting Accents / UTF8 in Mutt using Xterm with TrueType</title>
		<link>http://warped.org/blog/2009/06/08/getting-accents-utf8-in-mutt-using-xterm-with-truetype/</link>
		<comments>http://warped.org/blog/2009/06/08/getting-accents-utf8-in-mutt-using-xterm-with-truetype/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 21:43:16 +0000</pubDate>
		<dc:creator>max</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[mutt]]></category>
		<category><![CDATA[perl6]]></category>
		<category><![CDATA[truetype]]></category>
		<category><![CDATA[utf8]]></category>
		<category><![CDATA[vim]]></category>
		<category><![CDATA[xterm]]></category>

		<guid isPermaLink="false">http://warped.org/blog/?p=68</guid>
		<description><![CDATA[Overview
I&#8217;m starting to adopt Unicode/UTF-8 into my world to allow for more internationalization in my projects.  Someday I might play with Perl6&#8217;s UTF-8 stuff too.  I also want to be able have different charactersets render correctly while using Mutt.  I often get email from people in Western Europe, Eastern Europe, and SouthEast [...]]]></description>
			<content:encoded><![CDATA[<h1>Overview</h1>
<p>I&#8217;m starting to adopt Unicode/UTF-8 into my world to allow for more internationalization in my projects.  Someday I might play with Perl6&#8217;s UTF-8 stuff too.  I also want to be able have different charactersets render correctly while using Mutt.  I often get email from people in Western Europe, Eastern Europe, and SouthEast Asia, and they are all using different character sets.  UTF-8 is the &#8220;universal&#8221; one.</p>
<div id="attachment_73" class="wp-caption alignnone" style="width: 509px"><a href="http://warped.org/blog/wp-content/uploads/2009/06/mutt_utf8.png"><img src="http://warped.org/blog/wp-content/uploads/2009/06/mutt_utf8.png" alt="Shows Hebrew, Chinese and Western European characters all at the same time." title="Mutt in UTF-8 Mode" width="499" height="388" class="size-full wp-image-73" /></a><p class="wp-caption-text">Shows Hebrew, Chinese and Western European characters all at the same time.</p></div>
<h1>The Components</h1>
<h2>Xterm</h2>
<p>In order to have a nice playing Xterm with UTF-8, 256-colors and TrueType, I have to roll my own.</p>
<ol>
<li>Download the latest one from <a href="ftp://invisible-island.net/xterm/xterm.tar.gz">ftp://invisible-island.net/xterm/xterm.tar.gz</a>.
</li>
<li>Compile it

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/</span>configure \
     <span style="color: #660033;">--disable-desktop</span> \
     <span style="color: #660033;">--with-x</span> \
     <span style="color: #660033;">--enable-<span style="color: #000000;">256</span>-color</span> \
     <span style="color: #660033;">--enable-load-vt-fonts</span> \
     <span style="color: #660033;">--enable-paste64</span> \
     <span style="color: #660033;">--enable-readline-mouse</span> \
     <span style="color: #660033;">--enable-tcap-fkeys</span> \
     <span style="color: #660033;">--enable-tcap-query</span> \
     <span style="color: #660033;">--enable-wide-chars</span> \
     <span style="color: #660033;">--with-Xaw3d</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p>Note the crucial <b>&#8211;enable-wide-chars</b> needed for UTF-8.  Your xterm may already be compiled with some or all of these options.
</li>
</ol>
<p>Once I have that, I create a small shell script that I call <b>xt</b> that launches it for me :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
<span style="color: #666666; font-style: italic;"># None of these have extended charsets :-(</span>
<span style="color: #007800;">font</span>=<span style="color: #ff0000;">&quot;Consolas&quot;</span>
<span style="color: #666666; font-style: italic;">#font=&quot;DejaVu Sans Mono&quot;</span>
<span style="color: #666666; font-style: italic;">#font=&quot;Bitstream Vera Sans Mono&quot;</span>
<span style="color: #666666; font-style: italic;">#font=&quot;luxi mono&quot;</span>
<span style="color: #666666; font-style: italic;">#font=&quot;Andale Mono&quot;</span>
<span style="color: #666666; font-style: italic;">#font=&quot;courier&quot;</span>
<span style="color: #007800;">font_size</span>=<span style="color: #000000;">12</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">exec</span> xterm <span style="color: #660033;">-bg</span> black <span style="color: #660033;">-fg</span> white \
    <span style="color: #660033;">-fa</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$font</span>&quot;</span> \
    <span style="color: #660033;">-fd</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$font</span>&quot;</span> \
    <span style="color: #660033;">-fs</span> <span style="color: #007800;">$font_size</span> \
    <span style="color: #660033;">-j</span> <span style="color: #660033;">-s</span> \
    <span style="color: #660033;">-sb</span> <span style="color: #660033;">-si</span> <span style="color: #660033;">-sk</span> <span style="color: #660033;">-vb</span> <span style="color: #660033;">-sl</span> <span style="color: #000000;">1024</span> <span style="color: #660033;">-rightbar</span> \
    +sf +<span style="color: #c20cb9; font-weight: bold;">dc</span> <span style="color: #660033;">-cr</span> darkgreen  \
    <span style="color: #660033;">-u8</span> <span style="color: #660033;">-geometry</span> 100x40 \
    $<span style="color: #000000; font-weight: bold;">@</span> <span style="color: #000000; font-weight: bold;">&amp;</span> 
<span style="color: #7a0874; font-weight: bold;">exit</span></pre></div></div>

<p>The important options here are <b>-u8</b>, <b>-fa</b> and <b>-fd</b>.   This would be perfect, except that I can&#8217;t find a good mono-spaced TrueType font that has all of the character sets.  More on that in the font section.</p>
<p>If you want support for all character sets, you can use the &#8220;fixed&#8221; font built in to X, which has a very<br />
complete character set.  I use this script inspired by <a href="http://www.maruko.ca/i18n/">Marjan Parsa</a> instead :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">exec</span> xterm <span style="color: #660033;">-bg</span> black <span style="color: #660033;">-fg</span> white \
    <span style="color: #660033;">-j</span> <span style="color: #660033;">-s</span> \
    <span style="color: #660033;">-sb</span> <span style="color: #660033;">-si</span> <span style="color: #660033;">-sk</span> <span style="color: #660033;">-vb</span> <span style="color: #660033;">-sl</span> <span style="color: #000000;">1024</span> <span style="color: #660033;">-rightbar</span> \
    +sf +<span style="color: #c20cb9; font-weight: bold;">dc</span> <span style="color: #660033;">-cr</span> darkgreen  \
    <span style="color: #660033;">-u8</span> <span style="color: #660033;">-geometry</span> 100x40 \
    <span style="color: #660033;">-xrm</span> <span style="color: #ff0000;">&quot;xterm*font:-misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1&quot;</span>  \
    <span style="color: #660033;">-xrm</span> <span style="color: #ff0000;">&quot;xterm*wideFont:-misc-fixed-medium-r-normal-ja-18-120-100-100-c-180-iso10646-1&quot;</span>  \
    $<span style="color: #000000; font-weight: bold;">@</span> <span style="color: #000000; font-weight: bold;">&amp;</span> 
<span style="color: #7a0874; font-weight: bold;">exit</span></pre></div></div>

<h2>Fonts</h2>
<p>You have two choices here : Fixed fonts and TrueType fonts.    In my experience, the TrueType fonts look better, and the Fixed fonts have more characters supported.</p>
<h3>TrueType</h3>
<p>I can&#8217;t seem to find a perfect TrueType &#8220;Console&#8221; font that is fixed-width, looks great, and supports all the Unicode (UTF-8) character sets like Europe, Hebrew, Japanese, Chinese, etc.    So I compromise the character set support and just get the pretty one.   So far I am most happy with Microsoft&#8217;s &#8220;Consolas&#8221;.  Yes, Microsoft!</p>
<p>Here are some good ones to check out:</p>
<ul>
<li><a href="http://www.microsoft.com/downloads/details.aspx?familyid=22e69ae4-7e40-4807-8a86-b3d36fab68d3&#038;displaylang=en">Consolas</a>
</li>
<li><a href="http://dejavu-fonts.org/wiki/index.php?title=Download">DejaVu Sans Mono</a>
</li>
<li>luxi mono
</li>
</ul>
<p>If you would like to add TrueType fonts to your account / home directory locally, just create a ~/.fonts directory and then copy the .ttf fonts into it.   Try these command to explore what fonts you have :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">fc-list                 <span style="color: #666666; font-style: italic;">#  see what fonts are loaded.</span>
xfd <span style="color: #660033;">-fa</span> <span style="color: #ff0000;">&quot;DejaVu Sans Mono&quot;</span>  <span style="color: #666666; font-style: italic;">#  explore a certain font</span></pre></div></div>

<h3>Fixed / System Fonts</h3>
<p>I use the following two options when launching Xterm to specify the system fonts :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #660033;">-xrm</span> <span style="color: #ff0000;">&quot;xterm*font:-misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1&quot;</span>
<span style="color: #660033;">-xrm</span> <span style="color: #ff0000;">&quot;xterm*wideFont:-misc-fixed-medium-r-normal-ja-18-120-100-100-c-180-iso10646-1&quot;</span></pre></div></div>

<p>Try these commands to see what UTF-8 fonts you have and what&#8217;s in them :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">xlsfonts <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #000000;">10646</span>
xfd <span style="color: #660033;">-fn</span> <span style="color: #ff0000;">&quot;-ibm-courier-medium-r-normal--0-0-0-0-m-0-iso10646-1&quot;</span></pre></div></div>

<p>This is the settings / fonts I used for the above screen shot.  See also this <a href="http://www.yolinux.com/TUTORIALS/LinuxListOfFonts.html">Linux Font Tutorial</a>.</p>
<h2>Shell / Environment Variables</h2>
<p>Key to all of this is that you have your LANG environment variable set correctly</p>
<p>Edit ~/.bashrc and make sure this line is happening :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">LANG</span>=en_US.utf8</pre></div></div>

<p>Remember, you will need this on two machines : the machine you are creating the X-Term window on, and the machine that you are launching mutt on.  These may be the same machine, maybe not.</p>
<p>To get a list of the locales available use this command :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">locale <span style="color: #660033;">-a</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-i</span> utf</pre></div></div>

<p>Note that these are case-sensitive, so if you have it set to <b>en_US.UTF8</b> instead of <b>en_US.utf8</b> you will get some wanky errors.</p>
<h2>Mutt</h2>
<p>Mutt works pretty well out of the box w/ UTF8.   For reference see <a href="http://wiki.mutt.org/?MuttFaq/Charset">The Mutt FAQ</a>.</p>
<p>I used these options in my .muttrc:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">set</span> allow_8bit
<span style="color: #000000; font-weight: bold;">set</span> <span style="color: #007800;">allow_ansi</span>=<span style="color: #c20cb9; font-weight: bold;">yes</span>                  <span style="color: #666666; font-style: italic;"># in msgs</span>
charset-hook us-ascii iso-<span style="color: #000000;">8859</span>-<span style="color: #000000;">1</span>
<span style="color: #000000; font-weight: bold;">set</span> <span style="color: #007800;">send_charset</span>=<span style="color: #ff0000;">&quot;us-ascii:iso-8859-1&quot;</span></pre></div></div>

<p>So what this is doing is still using UTF-8 as my LANG setting and encoding for the terminal, but it&#8217;s sending my messages out as iso-8859-1.   It also is assuming that anything that comes in as &#8220;us-ascii&#8221; is actually iso-8859-1.</p>
]]></content:encoded>
			<wfw:commentRss>http://warped.org/blog/2009/06/08/getting-accents-utf8-in-mutt-using-xterm-with-truetype/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
