{"id":12,"date":"2008-07-30T16:36:43","date_gmt":"2008-07-30T15:36:43","guid":{"rendered":"http:\/\/paguilar.org\/?p=12"},"modified":"2008-07-30T16:36:43","modified_gmt":"2008-07-30T15:36:43","slug":"cross-compiling-swfdec-over-directfb-v02","status":"publish","type":"post","link":"https:\/\/paguilar.org\/?p=12","title":{"rendered":"Cross-compiling Swfdec over DirectFB v0.2"},"content":{"rendered":"<p>This guide describes how to cross-compile the OSS Flash player <a href=\"http:\/\/swfdec.freedesktop.org\/wiki\/\" title=\"Swfdec site\">Swfdec<\/a> for a SH4 processor.<\/p>\n<p><font size=\"3\"><br \/>\n<strong>Intro<\/strong><\/font><\/p>\n<p>Sfwdec 0.6.6 has made significant progress since version 0.5.2. Building it is almost straight forward compared to older versions in which you had to heavily tweak the Makefiles.<\/p>\n<p>Since Swfdec 0.6.6 uses its GTK+ player in order to run in standalone mode, it needs GTK+ and all the libraries below it.<\/p>\n<p>The procedure for compiling GTK+ is described in the post <a href=\"https:\/\/paguilar.org\/?p=11\" title=\"Cross-compiling GTK+ over DirectFB v0.2\">Cross-compiling GTK+ over DirectFB v0.2<\/a> .<\/p>\n<p>There is a DirectFB player for Swfdec 0.5.2, but it needs to be ported to the 0.6.6 and I haven&#8217;t had time for doing it, but when we tested it several months ago, it was significant faster than the GTK+ player. If you are interested in how to compile the DirectFB player check the post\u00a0 <a href=\"https:\/\/paguilar.org\/?cat=5\" title=\"Cross-compiling swfdec over DirectFB\">Cross-compiling swfdec over DirectFB<\/a><\/p>\n<p>Additionally to the GTK+ libs, Sfwdec needs some other libs for working like libsoup.<br \/>\nThese are the packages and their versions used for compiling Swfdec 0.6.6<\/p>\n<ul>\n<li>GTK+ (See the post <a href=\"https:\/\/paguilar.org\/?p=11\" title=\"Cross-compiling GTK+ over DirectFB v0.2\">Cross-compiling GTK+ over DirectFB v0.2<\/a>)<\/li>\n<li>liboil-0.3.15<\/li>\n<li>libsoup-2.4.1<\/li>\n<li>libmad-0.15.1b<\/li>\n<\/ul>\n<p>I tested this procedure in a STMicroelectronics ST40 processor (SH4 architecture). If you\u2019re using this processor, this is the configuration I have:<\/p>\n<ul>\n<li>Board: STB7109 cut 3.0, also called cocoref_gold_7109<\/li>\n<li>Linux distribution: STLinux 2.2<\/li>\n<li>DirectFB driver: stgfb-3.0_stm23_0008-4<\/li>\n<\/ul>\n<p><font size=\"3\"><br \/>\n<strong>Environment configuration<\/strong><\/font><\/p>\n<p>Suppose that Swfdec and its libraries will be installed in \/opt\/oe\/STM\/STLinux-2.2\/devkit\/sh4\/target and that the cross-toolchain (compiler, linker\u2026) is in your path<\/p>\n<p>Set the following environment variables:<\/p>\n<pre lang=\"bash\">\n$ export PREFIX=\/opt\/oe\/STM\/STLinux-2.2\/devkit\/sh4\/target\/usr\/local\n$ export LD_LIBRARY_PATH=$PREFIX\/lib\n$ export PKG_CONFIG_PATH=$LD_LIBRARY_PATH\/pkgconfig\n$ export COMPILER=sh4-linux-gcc\n$ export HOST=sh4-linux\n$ export BUILD=i386-linux<\/pre>\n<p><font size=\"3\"><br \/>\n<strong>Building the requirements<\/strong><\/font><\/p>\n<p><font size=\"2\"><br \/>\n<em>liboil 0.3.15<br \/>\n<\/em><\/font><\/p>\n<p>Configure, compile and install:<\/p>\n<pre lang=\"bash\">\n$ .\/configure --build=$BUILD --host=$HOST --prefix=$PREFIX\n$ make\n$ make install<\/pre>\n<p><font size=\"2\"><br \/>\n<em>libsoup 2.4.1<\/em><\/font><\/p>\n<p>Configure, compile and install:<\/p>\n<pre lang=\"bash\">\n$ .\/configure --build=$BUILD --host=$HOST --prefix=$PREFIX \n\u00a0 --disable-glibtest --disable-ssl --enable-debug=no\n$ make\n$ make install<\/pre>\n<p><font size=\"2\"><br \/>\n<em>libmad 0.15.1b<\/em><\/font><\/p>\n<p>Configure, compile and install:<\/p>\n<pre lang=\"bash\">\n$ .\/configure --build=$BUILD --host=$HOST --prefix=$PREFIX \n\u00a0 --disable-debugging --enable-speed\n$ make\n$ make install<\/pre>\n<p><font size=\"3\"><strong>Building Swfdec 0.6.6<\/strong><\/font><\/p>\n<p>Change to <em>$PREFIX<\/em> and uncompress it:<\/p>\n<pre lang=\"bash\">\n$ cd $PREFIX\n$ tar xvfz swfdec-0.6.6.tar.gz<\/pre>\n<p>Configure:<\/p>\n<pre lang=\"bash\">\n$ PANGO_CFLAGS=\"-I$PREFIX\/include\/pango-1.0 \n    -I$PREFIX\/include\/glib-2.0 \n    -I$PREFIX\/lib\/glib-2.0\/include\" \n  PANGO_LIBS=\"-L$PREFIX\/lib -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0\" \n  GTK_CFLAGS=\"-D_REENTRANT -I$PREFIX\/include\/gtk-2.0 \n    -I$PREFIX\/lib\/gtk-2.0\/include \n    -I$PREFIX\/include\/cairo \n    -I$PREFIX\/include\/freetype2 \n    -I$PREFIX\/include \n    -I$PREFIX\/include\/libpng12 \n    -I$PREFIX\/..\/..\/usr\/include\/directfb \n    -I$PREFIX\/include\/atk-1.0 \n    -I$PREFIX\/include\/pango-1.0 \n    -I$PREFIX\/include\/glib-2.0 \n    -I$PREFIX\/lib\/glib-2.0\/include \n    -I$PREFIX\/include\/libsoup-2.4\" \n  GTK_LIBS=\"-L$PREFIX\/lib \n    -lgtk-directfb-2.0 -lgdk-directfb-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 \n    -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -lsoup-2.4\" \n  HTTP_CFLAGS=\"-I$PREFIX\/include\/libsoup-2.4 \n    -I$PREFIX\/include\/libxml2 \n    -I$PREFIX\/include\/glib-2.0 \n    -I$PREFIX\/lib\/glib-2.0\/include\" \n  HTTP_LIBS=\"-L$PREFIX\/lib \n    -lsoup-2.4 -lxml2 -lglib-2.0\" \n  .\/configure \n  --build=$BUILD \n  --host=$HOST \n  --prefix=$PREFIX \n  --disable-gstreamer \n  --enable-mad \n  --with-audio=none<\/pre>\n<p>Edit <em>tools\/Makefile<\/em>:<br \/>\nSet the <em>LIBS<\/em> variable the following value:<\/p>\n<pre lang=\"bash\">\nLIBS = -ldirectfb -ldirect -lfusion -lfontconfig -lpangocairo-1.0<\/pre>\n<p>Compile and install:<\/p>\n<pre lang=\"bash\">\n$ make\n$ make install<\/pre>\n<p>That&#8217;s it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This guide describes how to cross-compile the OSS Flash player Swfdec for a SH4 processor. Intro Sfwdec 0.6.6 has made significant progress since version 0.5.2. Building it is almost straight forward compared to older versions in which you had to heavily tweak the Makefiles. Since Swfdec 0.6.6 uses its GTK+ player in order to run\u2026 <span class=\"read-more\"><a href=\"https:\/\/paguilar.org\/?p=12\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,7,10],"tags":[52,53,56,37],"class_list":["post-12","post","type-post","status-publish","format-standard","hentry","category-compiling","category-directfb","category-gtk","tag-compiling","tag-directfb","tag-gtk","tag-swfdec"],"_links":{"self":[{"href":"https:\/\/paguilar.org\/index.php?rest_route=\/wp\/v2\/posts\/12","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/paguilar.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/paguilar.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/paguilar.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/paguilar.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=12"}],"version-history":[{"count":0,"href":"https:\/\/paguilar.org\/index.php?rest_route=\/wp\/v2\/posts\/12\/revisions"}],"wp:attachment":[{"href":"https:\/\/paguilar.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=12"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/paguilar.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=12"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/paguilar.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=12"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}