I've since come across attempts to get this thing going on Gentoo, and they seem to be using gecko-sdk instead of xulrunner. The prevailing opinion over there seems to be that the Democracy Linux port is a bit of a mess right now.
Maybe 0.8.3 will move things along a bit - it's due in a few weeks, apparently.
# Contributor: Tom K <tomk>
pkgname=democracy
pkgver=0.8.2
pkgrel=1
pkgdesc="Open source internet TV platform"
depends=('xulrunner' 'boost' 'gnome-python-extras' 'pygtk' 'xine-lib')
makedepends=('pkgconfig' 'pyrex')
source=(ftp://ftp.osuosl.org/pub/pculture.org/$pkgname/src/Democracy-$pkgver-Source.tar.gz)
url="http://www.getdemocracy.com"
license="GPL"
build() {
mv $startdir/src/Democracy-Player-$pkgver $startdir/src/tv
cd $startdir/src/tv/platform/gtk-x11
sed -i 's|boost_python|boost_python-gcc|;s|mozilla-config|xulrunner-config|' setup.py
sed -i 's|nsString.h|nsStringAPI.h|' frontend_implementation/MozillaBrowserXPCOM.cc
python setup.py install --root=$startdir/pkg || return 1
}
It still doesn't work, but I've got it down to the following errors:
/home/tomk/builds/democracy/src/tv/platform/gtk-x11/frontend_implementation/MozillaBrowserXPCOM.cc:215: error: 'nsAutoString' was not declared in this scope
/home/tomk/builds/democracy/src/tv/platform/gtk-x11/frontend_implementation/MozillaBrowserXPCOM.cc:215: error: expected `;' before 'emptyString'
/opt/mozilla/include/xulrunner-1.8.0.1/nsCOMPtr.h: At global scope:
/opt/mozilla/include/xulrunner-1.8.0.1/nsCOMPtr.h: In instantiation of 'nsDerivedSafe<nsIDOMCSSStyleDeclaration>':
/home/tomk/builds/democracy/src/tv/platform/gtk-x11/frontend_implementation/MozillaBrowserXPCOM.cc:216: instantiated from here
/opt/mozilla/include/xulrunner-1.8.0.1/nsCOMPtr.h:197: warning: 'class nsDerivedSafe<nsIDOMCSSStyleDeclaration>' has virtual functions but non-virtual destructor
/home/tomk/builds/democracy/src/tv/platform/gtk-x11/frontend_implementation/MozillaBrowserXPCOM.cc: In function 'nsresult setElementStyle(GtkMozEmbed*, char*, char*,
char*)':
/home/tomk/builds/democracy/src/tv/platform/gtk-x11/frontend_implementation/MozillaBrowserXPCOM.cc:216: error: 'emptyString' was not declared in this scope
/opt/mozilla/include/xulrunner-1.8.0.1/nsCOMPtr.h: At global scope:
/opt/mozilla/include/xulrunner-1.8.0.1/nsCOMPtr.h: In instantiation of 'nsDerivedSafe<nsIDOMEventTarget>':
/home/tomk/builds/democracy/src/tv/platform/gtk-x11/frontend_implementation/MozillaBrowserXPCOM.cc:244: instantiated from here
/opt/mozilla/include/xulrunner-1.8.0.1/nsCOMPtr.h:197: warning: 'class nsDerivedSafe<nsIDOMEventTarget>' has virtual functions but non-virtual destructor
/home/tomk/builds/democracy/src/tv/platform/gtk-x11/frontend_implementation/MozillaBrowserXPCOM.cc: In function 'char* getContextMenu(void*)':
/home/tomk/builds/democracy/src/tv/platform/gtk-x11/frontend_implementation/MozillaBrowserXPCOM.cc:256: error: 'ToNewCString' was not declared in this scope
error: command 'gcc' failed with exit status 1
If I think of anything else to try, I'll post it. Any other ideas would be appreciated too.
]]>In file included from /home/tomk/builds/democracy/src/tv/platform/gtk-x11/frontend_implementation/MozillaBrowser.c:8:
/home/tomk/builds/democracy/src/tv/platform/gtk-x11/frontend_implementation/MozillaBrowser.h:3:25: error: gtkmozembed.h: No such file or directory
/home/tomk/builds/democracy/src/tv/platform/gtk-x11/frontend_implementation/MozillaBrowser.c:9:21: error: nsError.h: No such file or directory
A dirty big symlink (temporary, of course) from /opt/mozilla/include/xulrunner-1.8.0.1 to /opt/mozilla/include/mozilla-1.7.12 gets rid of those errors, but then you have others e.g.
In file included from /opt/mozilla/include/mozilla-1.7.12/nsError.h:42,
from /home/tomk/builds/democracy/src/tv/platform/gtk-x11/frontend_implementation/MozillaBrowser.c:9:
/opt/mozilla/include/mozilla-1.7.12/nscore.h:280: error: syntax error before 'nsresult'
Unfortunately, those kind of errors mean nothing to me, so that's as far as I can go.
Here are the PKGBUILDs I've tried, for whoever wants to take it further:
From tarball
# Contributor: Tom K <tomk>
pkgname=democracy
pkgver=0.8.2
pkgrel=1
pkgdesc="Open source internet TV platform"
depends=('xulrunner' 'boost' 'gnome-python-extras' 'pygtk' 'xine-lib')
makedepends=('pkgconfig' 'pyrex')
source=(ftp://ftp.osuosl.org/pub/pculture.org/$pkgname/src/Democracy-$pkgver-Source.tar.gz)
url="http://www.getdemocracy.com"
license="GPL"
build() {
mv $startdir/src/Democracy-Player-$pkgver $startdir/src/tv
cd $startdir/src/tv/platform/gtk-x11
sed -i 's|boost_python|boost_python-gcc|' setup.py
python setup.py install --root=$startdir/pkg || return 1
}
From SVN
# Contributor: Tom K <tomk>
pkgname=democracy-svn
pkgver=1484
pkgrel=1
pkgdesc="Open source internet TV platform"
depends=('xulrunner' 'boost' 'gnome-python-extras' 'pygtk' 'xine-lib')
makedepends=('subversion' 'pkgconfig')
source=()
md5sums=()
url="http://www.getdemocracy.com"
license="GPL"
_svntrunk=https://svn.participatoryculture.org/svn/dtv/trunk
_svnmod=tv
build() {
cd $startdir/src
echo "t" | svn co $_svntrunk/$_svnmod --config-dir ./ -r $pkgver
cp -r $_svnmod $_svnmod-backup
cd $_svnmod/platform/gtk-x11
sed -i 's|boost_python|boost_python-gcc|;s|mozilla-gtkmozembed|xulrunner-gtkmozembed|;s|mozilla-xpcom|xulrunner-xpcom|' setup.py
python setup.py install --root=$startdir/pkg || return 1
rm -rf ../$_svnmod
mv ../$_svnmod-backup ../$_svnmod
}
Some changes to standard practice are required in both cases, because setup.py aborts if the path to it is anything other than $startdir/src/tv/platform/gtk-x11.
]]>ImportError: /usr/lib/libboost_python.so.1: undefined symbol: PyUnicodeUCS4_FromEncodedObject
/usr/bin/ld: cannot find -lboost_python
Now, I already have the boost package installed, do I need any specific boost python thing for ld to find the archive?
]]>