Ubuntu TVやってみる(11) ubuntu-tv(unity2d改)のビルド

どーせなら、PPAで、ubuntu-tv(専用のunity2d)も、unity-lens-videoも、パッケージで提供してくれるといいのに。
ないの?

linaro@linaro-ubuntu-desktop:~$ apt-cache search ubuntu-tv

ない。

linaro@linaro-ubuntu-desktop:~$ apt-cache search unity-lens-video
unity-lens-video - Video lens for unity

をや、あるよ。

unity-lens-video (0.5+51+201201160324~oneiric1 Linaro Overlay PPA:11.10/oneiric [armel])

使えそう。
ちょっと楽ができそう。


前にやったときには、ubuntu-tvの実体であるunity2d改変版のビルドに必要なパッケージを入れると、依存関係でOMAPのOpenGL/ES関係のパッケージである、hwpack-linaro-lt-panda-x11-base, libegl1-sgx-omap4, libgles2-sgx-omap4が削除されてしまう。その問題については、*-devを事前にインストールしておくと問題がないという情報もあるようなので、それも試す。


OMAP用パッケージが削除されないように、事前にdevパッケージを入れておいてみる。

linaro@linaro-ubuntu-desktop:~$ sudo apt-get install libegl1-sgx-omap4-dev libgles2-sgx-omap4-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libswscale2 libavutil51 libxcb-xfixes0 libpostproc52 libavformat53
  libschroedinger-1.0-0 libgbm1 libvpx0 libgsm1 libwayland0 libavcodec53
  libxcb-dri2-0 libva1
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libpthread-stubs0 libpthread-stubs0-dev libx11-dev libxau-dev libxcb1-dev
  libxdmcp-dev x11proto-core-dev x11proto-input-dev x11proto-kb-dev
  xorg-sgml-doctools xtrans-dev
The following NEW packages will be installed:
  libegl1-sgx-omap4-dev libgles2-sgx-omap4-dev libpthread-stubs0
  libpthread-stubs0-dev libx11-dev libxau-dev libxcb1-dev libxdmcp-dev
  x11proto-core-dev x11proto-input-dev x11proto-kb-dev xorg-sgml-doctools
  xtrans-dev
0 upgraded, 13 newly installed, 0 to remove and 2 not upgraded.
Need to get 41.7 kB/3815 kB of archives.
After this operation, 15.6 MB of additional disk space will be used.
(snip)


ビルドに必要なパッケージを導入する。

linaro@linaro-ubuntu-desktop:~$ sudo apt-get build-dep unity-2d
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  autoconf automake autotools-dev cmake cmake-data debhelper dh-translations
  emacsen-common gettext gettext-base gir1.2-gee-1.0 html2text intltool
  intltool-debian libatk1.0-dev libboost1.46-dev libcairo-script-interpreter2
  libcairo2-dev libcurl3 libdbus-1-dev libdbus-glib-1-dev libdbusmenu-glib-dev
  libdbusmenu-qt-dev libdconf-dbus-1-dev libdconf-qt-dev libdee-dev
  libencode-locale-perl libexpat1-dev libfile-listing-perl libfontconfig1-dev
  libfreetype6-dev libgdk-pixbuf2.0-dev libgee-dev libglib2.0-dev
  libglib2.0-dev-bin libgtk-3-dev libgtk2.0-dev libhtml-parser-perl
  libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl libhttp-date-perl
  libhttp-message-perl libhttp-negotiate-perl libice-dev libindicator-dev
  libindicator3-dev libio-socket-ssl-perl liblwp-mediatypes-perl
  liblwp-protocol-https-perl libnet-http-perl libnet-ssleay-perl
  libnux-1.0-dev libpango1.0-dev libpcre3-dev libpcrecpp0 libpixman-1-dev
  libpng12-dev libqt4-designer libqt4-dev libqt4-help libqt4-opengl-dev
  libqt4-qt3support libqt4-scripttools libqt4-test libqtbamf-dev libqtdee-dev
  libqtgconf-dev libsigc++-2.0-dev libsm-dev libstartup-notification0-dev
  libunistring0 libunity-core-4.0-dev libunity-dev liburi-perl
  libutouch-geis-dev libwnck-3-dev libwww-perl libwww-robotrules-perl
  libxcb-render0-dev libxcb-shm0-dev libxcomposite-dev libxcursor-dev
  libxdamage-dev libxext-dev libxfixes-dev libxft-dev libxi-dev
  libxinerama-dev libxml-parser-perl libxml2-utils libxmlrpc-core-c3-0
  libxrandr-dev libxrender-dev libxres-dev libxxf86vm-dev m4 po-debconf
  qt4-linguist-tools qt4-qmake x11proto-composite-dev x11proto-damage-dev
  x11proto-fixes-dev x11proto-randr-dev x11proto-render-dev
  x11proto-resource-dev x11proto-xext-dev x11proto-xf86vidmode-dev
  x11proto-xinerama-dev zlib1g-dev
0 upgraded, 110 newly installed, 0 to remove and 2 not upgraded.
Need to get 37.9 MB/45.4 MB of archives.
After this operation, 219 MB of additional disk space will be used.
(snip)

おお、削除されなかった!
よかった(^^;。
普通なら、以下のような表示が出る。

The following packages will be REMOVED:
  hwpack-linaro-lt-panda-x11-base libegl1-sgx-omap4 libgles2-sgx-omap4
(snip)
0 upgraded, 129 newly installed, 3 to remove and 2 not upgraded.

これは、依存関係のバグで、OpenGL系ではビルドにmesaを必須にしているからのよう。
そのうち直るんだろうか...


ソースコードの取得と、ubuntu-tvの動作に必要な関連ツールをダウンロードする。

linaro@linaro-ubuntu-desktop:~$ sudo apt-get install bzr dconf-tools ffmpeg gnome-common libdeclarative-multimedia
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libxcb-xfixes0 libgbm1 libwayland0 libxcb-dri2-0
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  autopoint bzrtools git git-man libavdevice53 libavfilter2 libdc1394-22
  liberror-perl libltdl-dev libqtmultimediakit1 libtool python-bzrlib
  python-configobj python-paramiko rsync
Suggested packages:
  bzr-doc bzr-gtk bzr-svn python-bzrlib.tests graphviz librsvg2-bin git-doc
  git-el git-arch git-cvs git-svn git-email git-daemon-run git-gui gitk gitweb
  libtool-doc qtmobility-l10n gfortran fortran95-compiler gcj python-kerberos
  python-gpgme python-bzrlib-dbg openssh-server
The following NEW packages will be installed:
  autopoint bzr bzrtools dconf-tools ffmpeg git git-man gnome-common
  libavdevice53 libavfilter2 libdc1394-22 libdeclarative-multimedia
  liberror-perl libltdl-dev libqtmultimediakit1 libtool python-bzrlib
  python-configobj python-paramiko rsync
0 upgraded, 20 newly installed, 0 to remove and 5 not upgraded.
Need to get 9990 kB of archives.
After this operation, 36.7 MB of additional disk space will be used.
(snip)


bzrを使って、ubuntu-tvのソースコードをダウンロードする。

linaro@linaro-ubuntu-desktop:~$ bzr branch lp:~s-team/ubuntutv/trunk ubuntu-tv
You have not informed bzr of your Launchpad ID, and you must do this to
write to Launchpad or access private data.  See "bzr help launchpad-login".
Branched 959 revision(s).   

ビルドする。

linaro@linaro-ubuntu-desktop:~$ cd ubuntu-tv
linaro@linaro-ubuntu-desktop:~/ubuntu-tv$ cmake .
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found.
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found.
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found.
-- Found Qt4: /usr/bin/qmake (found version "4.7.4")
-- Looking for XOpenDisplay in /usr/lib/arm-linux-gnueabi/libX11.so;/usr/lib/arm-linux-gnueabi/libXext.so
-- Looking for XOpenDisplay in /usr/lib/arm-linux-gnueabi/libX11.so;/usr/lib/arm-linux-gnueabi/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/arm-linux-gnueabi/libX11.so
-- checking for module 'glib-2.0'
--   found glib-2.0, version 2.30.0
-- checking for module 'gdk-3.0'
--   found gdk-3.0, version 3.2.0
-- checking for module 'gtk+-3.0'
--   found gtk+-3.0, version 3.2.0
-- checking for module 'gio-2.0'
--   found gio-2.0, version 2.30.0
-- checking for module 'libwnck-3.0'
--   found libwnck-3.0, version 3.2.0
-- checking for module 'libqtgconf'
--   found libqtgconf, version 0.0
-- checking for module 'nux-core-1.0'
--   found nux-core-1.0, version 1.16.0
-- checking for module 'pango'
--   found pango, version 1.29.3
-- checking for module 'dconf-qt'
--   found dconf-qt, version 
-- GSettings schemas will be installed into /usr/local/share/glib-2.0/schemas/
-- checking for module 'libqtbamf'
--   found libqtbamf, version 0.0
-- checking for module 'libqtdee'
--   found libqtdee, version 0.2
-- checking for module 'dbusmenu-qt'
--   found dbusmenu-qt, version 0.9.0
-- checking for module 'libstartup-notification-1.0'
--   found libstartup-notification-1.0, version 0.12
-- checking for module 'indicator3-0.4'
--   found indicator3-0.4, version 0.4.1
-- checking for module 'unity-core-4.0'
--   found unity-core-4.0, version 4.24.0
-- checking for module 'dee-1.0'
--   found dee-1.0, version 0.5.22
-- checking for module 'xi'
--   found xi, version 1.4.3.99.1
-- checking for module 'libutouch-geis'
--   found libutouch-geis, version 2.1.2
-- Configuring done
-- Generating done
-- Build files have been written to: /home/linaro/ubuntu-tv


linaro@linaro-ubuntu-desktop:~/ubuntu-tv$ make
[  0%] Generating radiofilteroptions.moc
[  0%] Generating bfb.moc
[  0%] Generating dashclient.moc
(snip)
[ 74%] Generating af.gmo
[100%] Built target msgfmt


linaro@linaro-ubuntu-desktop:~/ubuntu-tv$ cd ..
linaro@linaro-ubuntu-desktop:~$ 

若干ワーニングが出ているが、ビルドそのものはつつがなく終了した。