{"id":5,"date":"2008-01-23T16:57:14","date_gmt":"2008-01-23T15:57:14","guid":{"rendered":"http:\/\/paguilar.org\/?p=5"},"modified":"2008-01-23T16:57:14","modified_gmt":"2008-01-23T15:57:14","slug":"cross-compiling-swfdec-over-directfb","status":"publish","type":"post","link":"https:\/\/paguilar.org\/?p=5","title":{"rendered":"Cross-compiling swfdec over DirectFB"},"content":{"rendered":"<p>This guide tries to explain how to cross-compile the OSS Flash player <strong>Swfdec<\/strong> for DirectFB.<br \/>\nThis procedure is somehow experimental since it uses <a href=\"http:\/\/swfdec.freedesktop.org\/wiki\/Developers\" title=\"Swfdec\">Swfdec<\/a> and Swfdec-directfb from their git repositories. These are not stable releases, they were git-cloned the 22\/01\/08.<\/p>\n<p>It assumes you already have the following packages installed:<\/p>\n<ul>\n<li> DirectFB-1.0.1<\/li>\n<li> glib-2.14.4<\/li>\n<li> atk-1.20.0<\/li>\n<li> freetype-2.3.5<\/li>\n<li> fontconfig-2.5.0<\/li>\n<li> zlib-1.2.3<\/li>\n<li> pixman from git repository 02\/01\/08<\/li>\n<li> cairo from git repository 02\/01\/08<\/li>\n<li> pango-1.19.2<\/li>\n<li> libmad-0.15.1b<\/li>\n<li> liboil-0.3.12<\/li>\n<li> libsoup-2.1.13<\/li>\n<\/ul>\n<p>For a guide on how to compile stables releases of the above packages you can check the <a href=\"http:\/\/www.directfb.org\/wiki\/index.php\/Projects:GTK_on_DirectFB_for_Embedded_Systems\">GTK+ on DirectFB<\/a> and <a href=\"http:\/\/www.directfb.org\/wiki\/index.php\/OSS_Flash_Player\">Swfdec on DirectFB<\/a>.<\/p>\n<p>Notice that if your root NFS filesystem is <em>\/opt\/STM\/STLinux-2.2\/devkit\/sh4\/target<\/em> and you installed all the above packages including Swfdec in <em>\/opt\/STM\/STLinux-2.2\/devkit\/sh4\/target\/usr\/local<\/em>, you have to decompress and compile swfdec-directfb inside <em>\/opt\/STM\/STLinux-2.2\/devkit\/sh4\/target\/usr\/local<\/em>.<\/p>\n<p>Let&#8217;s start with Swfdec<\/p>\n<p>Set the following environment variables:<\/p>\n<pre lang=\"bash\">\n$ export PREFIX=\/opt\/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 STRIP=sh4-linux-strip\n$ export HOST=sh4-linux\n$ export BUILD=i386-linux<\/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 \n  -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0\" \n  HTTP_CFLAGS=\"-I$PREFIX\/include\/libsoup-2.2 \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.2 -lxml2 -lglib-2.0\" \n  CC=$COMPILER \n  .\/autogen.sh \n  --build=$BUILD \n  --host=$HOST \n  --prefix=$PREFIX \n  --disable-gstreamer \n  --disable-ffmpeg \n  --enable-mad \n  --with-audio=none \n  --disable-vivified \n  --disable-gtk<\/pre>\n<p>Edit all <em>Makefiles<\/em>:<br \/>\nRemove the flag <em>-Werror<\/em> from the variable <em>GLOBAL_CFLAGS<\/em><\/p>\n<p>Edit the <em>Makefile<\/em>:<br \/>\nRemove the directory test from the variable <em>SUBDIRS<\/em><\/p>\n<p>Edit <em> tools\/Makefile<\/em>:<\/p>\n<p>Set the <em>LIBS<\/em> variable to the following value:<\/p>\n<pre lang=\"bash\">\nLIBS = -lfontconfig -lpangoft2-1.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -ldirectfb -ldirect -lfusion<\/pre>\n<p>Compile and install:<\/p>\n<pre lang=\"bash\">\n$ make\n$ make install<\/pre>\n<p>Now, we configure and compile swfdec-directfb:<\/p>\n<p>Configure:<\/p>\n<pre lang=\"bash\">\n$ SWFDEC_CFLAGS=\"-D_REENTRANT \n  -I$PREFIX\/include\/swfdec-0.5 \n  -I$PREFIX\/include\/glib-2.0 \n  -I$PREFIX\/lib\/glib-2.0\/include \n  -I$PREFIX\/include\/liboil-0.3 \n  -I$PREFIX\/include\/cairo \n  -I$PREFIX\/include\/pango-1.0 \n  -I$PREFIX\/include\/freetype2 \n  -I$PREFIX\/include \n  -I$PREFIX\/include\/directfb \n  -I$PREFIX\/include\/libpng12 \n  -I$PREFIX\/include\/pixman-1\" \n  SWFDEC_LIBS=\"-L$PREFIX\/lib \n  -lswfdec-0.5 -loil-0.3 -lm -lpangocairo-1.0 -lpango-1.0 -lcairo \n  -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0\" \n  CC=$COMPILER \n  .\/configure \n  --build=$BUILD \n  --host=$HOST \n  --prefix=$PREFIX<\/pre>\n<p>Edit <em>player\/Makefile<\/em>, <em>swfdec-directfb\/Makefile<\/em> and <em>test\/Makefile<\/em>:<br \/>\nAdd to the <em>LIBS<\/em> variable the following value:<\/p>\n<pre lang=\"bash\">\nLIBS = -lfontconfig<\/pre>\n<p>Compile and install:<\/p>\n<pre lang=\"bash\">\n$ make\n$ make install<\/pre>\n<p>For executing swfdec-directfb, connect to your board:<\/p>\n<pre lang=\"bash\">\n$ cd \/usr\/local\/swfdec-directfb\/player\n$ .\/swfdec-directfb-player sample.swf<\/pre>\n<p>That&#8217;s it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This guide tries to explain how to cross-compile the OSS Flash player Swfdec for DirectFB. This procedure is somehow experimental since it uses Swfdec and Swfdec-directfb from their git repositories. These are not stable releases, they were git-cloned the 22\/01\/08. It assumes you already have the following packages installed: DirectFB-1.0.1 glib-2.14.4 atk-1.20.0 freetype-2.3.5 fontconfig-2.5.0 zlib-1.2.3\u2026 <span class=\"read-more\"><a href=\"https:\/\/paguilar.org\/?p=5\">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":[7],"tags":[53,37],"class_list":["post-5","post","type-post","status-publish","format-standard","hentry","category-directfb","tag-directfb","tag-swfdec"],"_links":{"self":[{"href":"https:\/\/paguilar.org\/index.php?rest_route=\/wp\/v2\/posts\/5","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=5"}],"version-history":[{"count":0,"href":"https:\/\/paguilar.org\/index.php?rest_route=\/wp\/v2\/posts\/5\/revisions"}],"wp:attachment":[{"href":"https:\/\/paguilar.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/paguilar.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/paguilar.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}