summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChí-Thanh Christopher Nguyễn <chithanh@gentoo.org>2007-09-15 07:10:58 +0000
committerChí-Thanh Christopher Nguyễn <chithanh@gentoo.org>2007-09-15 07:10:58 +0000
commit7a320b8621dfc66ec8b719037ce5882d4db0d2fb (patch)
tree98f75f792f659c4e3042deb1b954d796f69d5049 /net-voip
parentfix automagic dependencies (diff)
downloadvoip-7a320b8621dfc66ec8b719037ce5882d4db0d2fb.tar.gz
voip-7a320b8621dfc66ec8b719037ce5882d4db0d2fb.tar.bz2
voip-7a320b8621dfc66ec8b719037ce5882d4db0d2fb.zip
move net-im/wengophone to net-voip to avoid renaming to wengophone-bin
svn path=/trunk/; revision=597
Diffstat (limited to 'net-voip')
-rw-r--r--net-voip/wengophone/ChangeLog18
-rw-r--r--net-voip/wengophone/Manifest11
-rw-r--r--net-voip/wengophone/files/alsa-plughw-default.patch68
-rw-r--r--net-voip/wengophone/files/digest-wengophone-2.1.16
-rw-r--r--net-voip/wengophone/files/phapi_newerffmpeg.diff235
-rw-r--r--net-voip/wengophone/files/pixertool_newerffmpeg.diff308
-rw-r--r--net-voip/wengophone/files/wengophone_externavcodec.diff15
-rw-r--r--net-voip/wengophone/wengophone-2.1.1.ebuild114
-rw-r--r--net-voip/wengophone/wengophone-2.1.2-r1.ebuild119
-rw-r--r--net-voip/wengophone/wengophone-2.1.2.ebuild118
10 files changed, 1012 insertions, 0 deletions
diff --git a/net-voip/wengophone/ChangeLog b/net-voip/wengophone/ChangeLog
new file mode 100644
index 0000000..d68b0fe
--- /dev/null
+++ b/net-voip/wengophone/ChangeLog
@@ -0,0 +1,18 @@
+# ChangeLog for net-im/wengophone
+# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/skel.ChangeLog,v 1.2 2006/02/22 02:08:04 hd_brummy Exp $
+
+ 06 Sep 2007; Chi-Thanh Christopher Nguyen <chithanh@cs.tu-berlin.de>
+ +files/alsa-plughw-default.patch, +wengophone-2.1.2-r1.ebuild:
+ Fix automagic dependencies per tester's comment. Add patch to allow
+ selection of ALSA devices
+
+ 28 Aug 2007; Chi-Thanh Christopher Nguyen <chithanh@cs.tu-berlin.de>
+ +wengophone-2.1.2.ebuild:
+ Version bump. Fixes security bug #188748 (CVE-2007-4366)
+
+ 23 Aug 2007; Chi-Thanh Christopher Nguyen <chithanh@cs.tu-berlin.de> +.,
+ +files, +files/phapi_newerffmpeg.diff, +files/pixertool_newerffmpeg.diff,
+ +files/wengophone_externavcodec.diff:
+ Initial commit to voip overlay (bug #180224)
+
diff --git a/net-voip/wengophone/Manifest b/net-voip/wengophone/Manifest
new file mode 100644
index 0000000..337506b
--- /dev/null
+++ b/net-voip/wengophone/Manifest
@@ -0,0 +1,11 @@
+AUX alsa-plughw-default.patch 2214 RMD160 daacb3f4f45bd9146bf31585c960f60607e8a3fd SHA1 969a9d3caafb330247f11363bd6e37701616ab98 SHA256 139d31dea26637da8137336cced9586cd25e4f975a25b7831609c022bda62df6
+AUX phapi_newerffmpeg.diff 7081 RMD160 21ce47c355be6506ebb0f8ae6bdfa294dc7f9ab9 SHA1 aa699703e70425112d8e071032a16970f37ff860 SHA256 4ae8958c1b1d59746c5a5e2ad3e5cbdc4a5062f74590bcb80aa87d26bc3cf312
+AUX pixertool_newerffmpeg.diff 9432 RMD160 54f9c9fd1010bb55a6210b6ce05c8b73e905463b SHA1 08d0a1a8d38da6aa87c1e4a27841dd2b54c3b48e SHA256 d54bb22a3afbd6a49092a1e804bc6effe7d8419e0cba37a05e183df792f5f5e1
+AUX wengophone_externavcodec.diff 438 RMD160 cbd241bad583e63501a0647512cd0ecc99dcb6b8 SHA1 72f276cd5b3a7a98a46c596f15aa4a8fa271b6e1 SHA256 d66bd4e04e63d7a405e75f3bddba33521a77b6da39bda2ba2f06e3207e56e9f5
+DIST wengophone-2.1.1-v4l2-patches.tar.bz2 7889 RMD160 cd233c35be0a5a8168aee1f30d574235e049a450 SHA1 4feac585e56e7976361e55abd05163873c3109ca SHA256 18763293a8d3c36805eaa34a8fd28645929967164aed090c453230011d91f0d3
+DIST wengophone-2.1.1.tar.bz2 25726476 RMD160 17a1c694e3dd27581408bf23372c383e654202c2 SHA1 56e7314147e2de8b25606defc5ae3d674f7de090 SHA256 52338793c0b052e9a53f6f18bbca1ca3b735b53be9966ffcdf78ce0459a94891
+DIST wengophone-2.1.2-source.zip 48210044 RMD160 f9b2a106dcd27c228cca3305bead2c9738ac39c6 SHA1 53839c87efe322879fd416e0111ed70348587116 SHA256 ac9d254f8c4b0146fa4751f2328aab1765a0d27709e883eb46a9f297e155681e
+EBUILD wengophone-2.1.1.ebuild 3023 RMD160 2e7d05b2d085c0517ac7908d79f836ff61774322 SHA1 6b7057188f21519e0cbdf227ce564d6b70ec5d16 SHA256 e6b152f5ab702021c903ba34282e31201357c6ec439283372e5b75b26f03ecf7
+EBUILD wengophone-2.1.2-r1.ebuild 3191 RMD160 b7c81581e4b84bc3440df3e8c8f401bd4205b0a5 SHA1 1ed7cd6484a240e4e212b3d475d594d7016fb513 SHA256 901e93798825f346861a519d7d3c2c64deb812910b5a59a5107e26c354440b34
+EBUILD wengophone-2.1.2.ebuild 3097 RMD160 44573c16bd62993b623ffb0d9c867dfb1455c680 SHA1 29c6c47eb0466b08fd21ac2bf88832b6e7f76fbe SHA256 73701640a252452f7378021c793fadb25a25a752f002a09704e7e35163bbeb84
+MISC ChangeLog 830 RMD160 0097757cb177110c772efebc36e54ae6daddad5d SHA1 3448295335c40ef8ecf75307f659847611596be8 SHA256 5f6a80600eae0b6b0cb9a4c8cd072a41d282da0ff1958a30f5a5170742568109
diff --git a/net-voip/wengophone/files/alsa-plughw-default.patch b/net-voip/wengophone/files/alsa-plughw-default.patch
new file mode 100644
index 0000000..56ed94e
--- /dev/null
+++ b/net-voip/wengophone/files/alsa-plughw-default.patch
@@ -0,0 +1,68 @@
+Index: libs/sound/src/linux/AudioDeviceManager.cpp
+===================================================================
+--- libs/sound/src/linux/AudioDeviceManager.cpp (revision 12047)
++++ libs/sound/src/linux/AudioDeviceManager.cpp (working copy)
+@@ -28,39 +28,19 @@
+ std::list<AudioDevice> AudioDeviceManager::getInputDeviceList() {
+ RecursiveMutex::ScopedLock scopedLock(_mutex);
+
+- //HACK: always return the default one + plughw
+- std::list<AudioDevice> deviceList;
+- deviceList.push_back(getDefaultInputDevice());
++ std::list<AudioDevice> deviceList = find_alsa_devices(1);
++ deviceList.push_front(getDefaultInputDevice());
+
+- StringList data;
+- data += String("ALSA: plughw");
+- data += String("plughw");
+- data += EnumDeviceType::toString(EnumDeviceType::DeviceTypeWaveIn);
+- deviceList.push_back(AudioDevice(data));
+-
+ return deviceList;
+- ////
+-
+- //return find_alsa_devices(1);
+ }
+
+ std::list<AudioDevice> AudioDeviceManager::getOutputDeviceList() {
+ RecursiveMutex::ScopedLock scopedLock(_mutex);
+
+- //HACK: always return the default one + plughw
+- std::list<AudioDevice> deviceList;
+- deviceList.push_back(getDefaultOutputDevice());
++ std::list<AudioDevice> deviceList = find_alsa_devices(0);
++ deviceList.push_front(getDefaultOutputDevice());
+
+- StringList data;
+- data += String("ALSA: plughw");
+- data += String("plughw");
+- data += EnumDeviceType::toString(EnumDeviceType::DeviceTypeWaveOut);
+- deviceList.push_back(AudioDevice(data));
+-
+ return deviceList;
+- ////
+-
+- //return find_alsa_devices(0);
+ }
+
+ AudioDevice AudioDeviceManager::getDefaultOutputDevice() {
+@@ -131,7 +111,7 @@
+ ////
+
+ // open the sound card
+- if( snd_ctl_open(&snd_ctl, alsa_card_name, 0 ) < 0 )
++ if ( snd_ctl_open(&snd_ctl, alsa_card_name, 0 ) < 0 )
+ {
+ LOG_WARN("unable to open card: " + String(alsa_card_name));
+ break;
+@@ -165,8 +145,8 @@
+ int has_playback = 0;
+
+ // compute internal device name
+- snprintf(alsa_device_name, sizeof(alsa_device_name), "%s:%d,%d", "hw",
+- card_index, device_index);
++ snprintf(alsa_device_name, sizeof(alsa_device_name), "%s:%d,%d",
++ "plughw", card_index, device_index);
+ LOG_DEBUG("alsa_device_name: " + String(alsa_device_name));
+ ////
+
diff --git a/net-voip/wengophone/files/digest-wengophone-2.1.1 b/net-voip/wengophone/files/digest-wengophone-2.1.1
new file mode 100644
index 0000000..9c3e8c2
--- /dev/null
+++ b/net-voip/wengophone/files/digest-wengophone-2.1.1
@@ -0,0 +1,6 @@
+MD5 52f3475305c3237156527e65e32d4fd3 wengophone-2.1.1-v4l2-patches.tar.bz2 7889
+RMD160 cd233c35be0a5a8168aee1f30d574235e049a450 wengophone-2.1.1-v4l2-patches.tar.bz2 7889
+SHA256 18763293a8d3c36805eaa34a8fd28645929967164aed090c453230011d91f0d3 wengophone-2.1.1-v4l2-patches.tar.bz2 7889
+MD5 7e386853773a5d7879c5adcb8e3189ed wengophone-2.1.1.tar.bz2 25726476
+RMD160 17a1c694e3dd27581408bf23372c383e654202c2 wengophone-2.1.1.tar.bz2 25726476
+SHA256 52338793c0b052e9a53f6f18bbca1ca3b735b53be9966ffcdf78ce0459a94891 wengophone-2.1.1.tar.bz2 25726476
diff --git a/net-voip/wengophone/files/phapi_newerffmpeg.diff b/net-voip/wengophone/files/phapi_newerffmpeg.diff
new file mode 100644
index 0000000..f680255
--- /dev/null
+++ b/net-voip/wengophone/files/phapi_newerffmpeg.diff
@@ -0,0 +1,235 @@
+Index: wifo/phapi/phcodec-h263.c
+===================================================================
+--- wifo/phapi/phcodec-h263.c (revision 11987)
++++ wifo/phapi/phcodec-h263.c (working copy)
+@@ -29,6 +29,8 @@
+ #include <osipparser2/osip_list.h>
+ #include <webcam/webcam.h>
+
++#include "config.h"
++
+ #include "phcodec.h"
+ #include "phapi.h"
+ #include "phcall.h"
+@@ -113,7 +115,11 @@
+
+ void h263_encoder_cleanup(void *ctx) {
+ ph_h263_encoder_ctx_t * encoder = (ph_h263_encoder_ctx_t *) ctx;
+- img_resample_close(encoder->encoder_ctx.res_ctx);
++#ifndef HAVE_SWSCALE
++ img_resample_close(encoder->encoder_ctx.res_ctx);
++#else
++ //sws_freeContext(encoder->encoder_ctx.sws_ctx);
++#endif
+ //avcodec_flush_buffers(encoder->encoder_ctx.context);
+ avcodec_close(encoder->encoder_ctx.context);
+ av_free(encoder->encoder_ctx.resized_pic);
+Index: wifo/phapi/phcodec-mpeg4.c
+===================================================================
+--- wifo/phapi/phcodec-mpeg4.c (revision 11987)
++++ wifo/phapi/phcodec-mpeg4.c (working copy)
+@@ -30,6 +30,8 @@
+ #include <osipparser2/osip_list.h>
+ #include <webcam/webcam.h>
+
++#include "config.h"
++
+ #include "phcodec.h"
+ #include "phapi.h"
+ #include "phcall.h"
+@@ -116,7 +118,11 @@
+
+ void mpeg4_encoder_cleanup(void *ctx) {
+ ph_mpeg4_encoder_ctx_t * encoder = (ph_mpeg4_encoder_ctx_t *) ctx;
+- img_resample_close(encoder->encoder_ctx.res_ctx);
++#ifndef HAVE_SWSCALE
++ img_resample_close(encoder->encoder_ctx.res_ctx);
++#else
++ //sws_freeContext(encoder->encoder_ctx.sws_ctx);
++#endif
+ av_free(encoder->encoder_ctx.resized_pic);
+ av_free(encoder->encoder_ctx.sampled_frame);
+ av_free(encoder->data_enc);
+Index: wifo/phapi/phcodec-avcodec-wrapper.c
+===================================================================
+--- wifo/phapi/phcodec-avcodec-wrapper.c (revision 11987)
++++ wifo/phapi/phcodec-avcodec-wrapper.c (working copy)
+@@ -43,6 +43,8 @@
+ #include <osipparser2/osip_list.h>
+ #include <webcam/webcam.h>
+
++#include "config.h"
++
+ #include "phcodec.h"
+ #include "phapi.h"
+ #include "phcall.h"
+@@ -128,11 +130,23 @@
+ encoder_t->context->rtp_payload_size = 1000;
+ encoder_t->context->rtp_callback = phcodec_avcodec_video_rtp_callback;
+
+- encoder_t->res_ctx = img_resample_init(
+- dest_width, dest_height,
+- meta_t->frame_width, meta_t->frame_height
++#ifndef HAVE_SWSCALE
++ encoder_t->res_ctx = img_resample_init(
++ dest_width, dest_height,
++ meta_t->frame_width, meta_t->frame_height
++
+ );
+-
++#else
++/*
++ encoder_t->sws_ctx = sws_getContext(
++ meta_t->frame_width, meta_t->frame_height, PIX_FMT_YUV420P,
++ dest_width, dest_height,PIX_FMT_YUV420P,
++ SWS_BICUBIC, NULL, NULL, NULL
++
++ );
++ sws_scale(encoder_t->sws_ctx,
++*/
++#endif
+ encoder_t->resized_pic = avcodec_alloc_frame();
+ encoder_t->sampled_frame = avcodec_alloc_frame();
+
+Index: wifo/phapi/phcodec-avcodec-wrapper.h
+===================================================================
+--- wifo/phapi/phcodec-avcodec-wrapper.h (revision 11987)
++++ wifo/phapi/phcodec-avcodec-wrapper.h (working copy)
+@@ -19,10 +19,15 @@
+ #ifndef PHCODEC_AVCODEC_WRAPPER_H
+ #define PHCODEC_AVCODEC_WRAPPER_H
+
++#include "config.h"
++
+ #include "phapi.h"
+ #include "phcall.h"
+ #include "phmedia.h"
+ #include <avcodec.h>
++#ifdef HAVE_SWSCALE
++#include <swscale.h>
++#endif
+
+ #define PHCODEC_DEFAULT_BITRATE 1000000
+ // 99 = 11*9 = (176/16)*(144/16) = a partition of macroblocs ( 1 MB = four 8x8 squares)
+@@ -49,7 +54,11 @@
+ AVPicture pictureOut;
+ AVFrame *resized_pic, *sampled_frame;
+ AVCodecContext *context;
+- ImgReSampleContext *res_ctx;
++#ifndef HAVE_SWSCALE
++ ImgReSampleContext *res_ctx;
++#else
++ struct SwsContext *sws_ctx;
++#endif
+ AVCodec* encoder;
+ int maxencodesize;
+ };
+Index: wifo/phapi/phcodec-h263flv1.c
+===================================================================
+--- wifo/phapi/phcodec-h263flv1.c (revision 11987)
++++ wifo/phapi/phcodec-h263flv1.c (working copy)
+@@ -29,6 +29,8 @@
+ #include <osipparser2/osip_list.h>
+ #include <webcam/webcam.h>
+
++#include "config.h"
++
+ #include "phcodec.h"
+ #include "phapi.h"
+ #include "phcall.h"
+@@ -113,7 +115,11 @@
+
+ void h263flv1_encoder_cleanup(void *ctx) {
+ ph_h263_encoder_ctx_t * encoder = (ph_h263_encoder_ctx_t *) ctx;
+- img_resample_close(encoder->encoder_ctx.res_ctx);
++#ifndef HAVE_SWSCALE
++ img_resample_close(encoder->encoder_ctx.res_ctx);
++#else
++ //sws_freeContext(encoder->encoder_ctx.sws_ctx);
++#endif
+ //avcodec_flush_buffers(encoder->encoder_ctx.context);
+ avcodec_close(encoder->encoder_ctx.context);
+ av_free(encoder->encoder_ctx.resized_pic);
+Index: wifo/phapi/phcodec-h264.c
+===================================================================
+--- wifo/phapi/phcodec-h264.c (revision 11987)
++++ wifo/phapi/phcodec-h264.c (working copy)
+@@ -27,6 +27,8 @@
+ #include <osipparser2/osip_list.h>
+ #include <webcam/webcam.h>
+
++#include "config.h"
++
+ #include "phcodec.h"
+ #include "phapi.h"
+ #include "phcall.h"
+@@ -98,7 +100,11 @@
+
+ void h264_encoder_cleanup(void *ctx) {
+ ph_h264_encoder_ctx_t * encoder = (ph_h264_encoder_ctx_t *) ctx;
+- img_resample_close(encoder->encoder_ctx.res_ctx);
++#ifndef HAVE_SWSCALE
++ img_resample_close(encoder->encoder_ctx.res_ctx);
++#else
++ //sws_freeContext(encoder->encoder_ctx.sws_ctx);
++#endif
+ av_free(encoder->encoder_ctx.resized_pic);
+ av_free(encoder->encoder_ctx.sampled_frame);
+ av_free(encoder->data_enc);
+Index: wifo/phapi/CMakeLists.txt
+===================================================================
+--- wifo/phapi/CMakeLists.txt (revision 11987)
++++ wifo/phapi/CMakeLists.txt (working copy)
+@@ -29,6 +29,7 @@
+
+ ow_add_public_include_dirs(
+ ${CMAKE_CURRENT_SOURCE_DIR}
++ ${CMAKE_CURRENT_BINARY_DIR}
+ )
+
+ if (WIN32)
+@@ -323,4 +324,7 @@
+
+ ow_set_library_version(0.2.0 0)
+
++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
++
++
+ ow_create_binary()
+Index: wifo/phapi/phcodec-h263plus.c
+===================================================================
+--- wifo/phapi/phcodec-h263plus.c (revision 11987)
++++ wifo/phapi/phcodec-h263plus.c (working copy)
+@@ -22,6 +22,8 @@
+ #include <osipparser2/osip_list.h>
+ #include <webcam/webcam.h>
+
++#include "config.h"
++
+ #include "phcodec.h"
+ #include "phapi.h"
+ #include "phcall.h"
+@@ -106,7 +108,11 @@
+
+ void h263p_encoder_cleanup(void *ctx) {
+ ph_h263_encoder_ctx_t * encoder = (ph_h263_encoder_ctx_t *) ctx;
+- img_resample_close(encoder->encoder_ctx.res_ctx);
++#ifndef HAVE_SWSCALE
++ img_resample_close(encoder->encoder_ctx.res_ctx);
++#else
++ //sws_freeContext(encoder->encoder_ctx.sws_ctx);
++#endif
+ //avcodec_flush_buffers(encoder->encoder_ctx.context);
+ avcodec_close(encoder->encoder_ctx.context);
+ av_free(encoder->encoder_ctx.resized_pic);
+Index: wifo/phapi/config.h.cmake
+===================================================================
+--- wifo/phapi/config.h.cmake (revision 0)
++++ wifo/phapi/config.h.cmake (revision 0)
+@@ -0,0 +1,6 @@
++#ifndef PIXERTOOL_CONFIG_H
++#define PIXERTOOL_CONFIG_H
++
++#cmakedefine HAVE_SWSCALE
++
++#endif
diff --git a/net-voip/wengophone/files/pixertool_newerffmpeg.diff b/net-voip/wengophone/files/pixertool_newerffmpeg.diff
new file mode 100644
index 0000000..4939dbd
--- /dev/null
+++ b/net-voip/wengophone/files/pixertool_newerffmpeg.diff
@@ -0,0 +1,308 @@
+Index: libs/owpixertool/include/pixertool/ffmpeg-pixertool.h
+===================================================================
+--- libs/owpixertool/include/pixertool/ffmpeg-pixertool.h (révision 11987)
++++ libs/owpixertool/include/pixertool/ffmpeg-pixertool.h (copie de travail)
+@@ -22,7 +22,18 @@
+
+ #include <pixertool/pixertool.h>
+
++#include "config.h"
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++#ifdef HAVE_SWSCALE
++#include <swscale.h>
++#endif
+ #include <avcodec.h>
++#ifdef __cplusplus
++}
++#endif
+
+ #ifdef __cplusplus
+ extern "C" {
+Index: libs/owpixertool/src/ffmpeg/ffmpeg-pixertool.c
+===================================================================
+--- libs/owpixertool/src/ffmpeg/ffmpeg-pixertool.c (révision 11987)
++++ libs/owpixertool/src/ffmpeg/ffmpeg-pixertool.c (copie de travail)
+@@ -17,15 +17,23 @@
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
++#include "config.h"
++
+ #include <pixertool/ffmpeg-pixertool.h>
+
++#include <stdlib.h>
++
+ #include <avcodec.h>
++#ifdef HAVE_SWSCALE
++#include <swscale.h>
++#endif
+
+-#include <stdlib.h>
+
+ /** Used by pix_convert_avpicture */
+ static AVPicture * pictureBuffer = NULL;
+
++
++
+ /** Called at program exit */
+ static void pix_ffmpeg_cleanup(void);
+
+@@ -123,8 +131,12 @@
+ }
+
+ pixerrorcode pix_convert_avpicture(int flags, piximage * img_dst, AVPicture * img_src, pixosi src_fmt) {
++#ifdef HAVE_SWSCALE
++ struct SwsContext *convert_context;
++#endif
+ pixosi desiredPalette = pix_ffmpeg_from_pix_osi(img_dst->palette);
+
++
+ if (!pictureBuffer) {
+ pictureBuffer = (AVPicture *) malloc(sizeof(AVPicture));
+ atexit(pix_ffmpeg_cleanup);
+@@ -132,9 +144,19 @@
+
+ avpicture_fill(pictureBuffer, img_dst->data, desiredPalette, img_dst->width, img_dst->height);
+
+- img_convert(pictureBuffer, desiredPalette,
+- img_src, pix_ffmpeg_from_pix_osi(src_fmt),
+- img_dst->width, img_dst->height);
++#ifndef HAVE_SWSCALE
++ img_convert(pictureBuffer, desiredPalette,
++ img_src, pix_ffmpeg_from_pix_osi(src_fmt),
++ img_dst->width, img_dst->height);
++#else
++ convert_context = sws_getContext(img_dst->width, img_dst->height, pix_ffmpeg_from_pix_osi(src_fmt),
++ img_dst->width, img_dst->height, desiredPalette,
++ SWS_BICUBIC, NULL, NULL, NULL);
++ sws_scale(convert_context, img_src->data, img_src->linesize,
++ 0, img_dst->height,
++ pictureBuffer->data, pictureBuffer->linesize);
++ sws_freeContext(convert_context);
++#endif
+
+ //pictureBuffer->data[0] should contain only valid data
+
+Index: libs/owpixertool/src/pixertool.cpp
+===================================================================
+--- libs/owpixertool/src/pixertool.cpp (révision 11987)
++++ libs/owpixertool/src/pixertool.cpp (copie de travail)
+@@ -17,10 +17,24 @@
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
++#include "config.h"
++
+ #include <pixertool/pixertool.h>
+
+ #include <pixertool/ffmpeg-pixertool.h>
+
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++#include <avcodec.h>
++#ifdef HAVE_SWSCALE
++#include <swscale.h>
++#endif
++#ifdef __cplusplus
++}
++#endif
++
+ #include <stdlib.h>
+ #include <string.h>
+
+@@ -73,6 +87,9 @@
+
+ uint8_t * buf_source = img_src->data;
+ int need_avfree = 0;
++#ifdef HAVE_SWSCALE
++ struct SwsContext *convert_context;
++#endif
+
+ //If the format is NV12, transforming it
+ if (img_src->palette == PIX_OSI_NV12) {
+@@ -90,7 +107,7 @@
+ }
+ ////
+
+- int len_target = pix_size(img_dst->palette, img_src->width, img_src->height);
++ //int len_target = pix_size(img_dst->palette, img_src->width, img_src->height);
+
+ int pix_fmt_source = pix_ffmpeg_from_pix_osi(img_src->palette);
+ int pix_fmt_target = pix_ffmpeg_from_pix_osi(img_dst->palette);
+@@ -121,43 +138,66 @@
+ return PIX_NOK;
+ }
+
+- //TODO optimize this part but will need the preparation of contexts
+- ImgReSampleContext * resample_context = img_resample_init(img_dst->width, img_dst->height,
+- img_src->width, img_src->height);
++#ifndef HAVE_SWSCALE
++ //TODO optimize this part but will need the preparation of contexts
++ ImgReSampleContext * resample_context = img_resample_init(img_dst->width, img_dst->height,
++ img_src->width, img_src->height);
+
+- if (!resample_context) {
+- return PIX_NOK;
+- }
++ if (!resample_context) {
++ return PIX_NOK;
++ }
+
+- AVPicture avp_tmp_target;
++ AVPicture avp_tmp_target;
+
+- //we need to prepare a tmp buffer
+- uint8_t * buf_tmp_target = (uint8_t *)av_malloc(avpicture_get_size(pix_fmt_source, img_dst->width, img_dst->height) * sizeof(uint8_t));
+- avpicture_fill(&avp_tmp_target, buf_tmp_target, pix_fmt_source, img_dst->width, img_dst->height);
+- //
++ //we need to prepare a tmp buffer
++ uint8_t * buf_tmp_target = (uint8_t *)av_malloc(avpicture_get_size(pix_fmt_source, img_dst->width, img_dst->height) * sizeof(uint8_t));
++ avpicture_fill(&avp_tmp_target, buf_tmp_target, pix_fmt_source, img_dst->width, img_dst->height);
++ //
+
+- //do the resampling
+- img_resample(resample_context, &avp_tmp_target, &avp_source);
+- img_resample_close(resample_context);
+- //
++ //do the resampling
++ img_resample(resample_context, &avp_tmp_target, &avp_source);
++ img_resample_close(resample_context);
++ //
+
++ //do the conversion
++ if (img_convert(&avp_target, pix_fmt_target,
++ &avp_tmp_target, pix_fmt_source,
++ img_dst->width, img_dst->height) == -1) {
++ av_free(buf_tmp_target);
++ return PIX_NOK;
++ }
++ av_free(buf_tmp_target);
++#else
+ //do the conversion
+- if (img_convert(&avp_target, pix_fmt_target,
+- &avp_tmp_target, pix_fmt_source,
+- img_dst->width, img_dst->height) == -1) {
++ convert_context = sws_getContext(img_src->width, img_src->height, pix_fmt_source, img_dst->width, img_dst->height, pix_fmt_target, SWS_BICUBIC, NULL, NULL, NULL);
++ if (sws_scale(convert_context, avp_source.data, avp_source.linesize,
++ 0, img_src->height,
++ avp_target.data, avp_target.linesize) == -1) {
++ sws_freeContext(convert_context);
+
+- av_free(buf_tmp_target);
+ return PIX_NOK;
+ }
+- av_free(buf_tmp_target);
++ sws_freeContext(convert_context);
+ //
++#endif
+
+ } else {
+- if (img_convert(&avp_target, pix_fmt_target,
+- &avp_source, pix_fmt_source,
+- img_src->width, img_src->height) == -1) {
++#ifndef HAVE_SWSCALE
++ if (img_convert(&avp_target, pix_fmt_target,
++ &avp_source, pix_fmt_source,
++ img_src->width, img_src->height) == -1) {
+ return PIX_NOK;
+ }
++#else
++ convert_context = sws_getContext(img_src->width, img_src->height, pix_fmt_source, img_dst->width, img_dst->height, pix_fmt_target, SWS_BICUBIC, NULL, NULL, NULL);
++ if (sws_scale(convert_context, avp_source.data, avp_source.linesize,
++ 0, img_src->height,
++ avp_target.data, avp_target.linesize) == -1) {
++ sws_freeContext(convert_context);
++ return PIX_NOK;
++ }
++ sws_freeContext(convert_context);
++#endif
+ }
+ ////
+
+Index: libs/owpixertool/config.h.cmake
+===================================================================
+--- libs/owpixertool/config.h.cmake (révision 0)
++++ libs/owpixertool/config.h.cmake (révision 0)
+@@ -0,0 +1,6 @@
++#ifndef PIXERTOOL_CONFIG_H
++#define PIXERTOOL_CONFIG_H
++
++#cmakedefine HAVE_SWSCALE
++
++#endif
+Index: libs/owpixertool/CMakeLists.txt
+===================================================================
+--- libs/owpixertool/CMakeLists.txt (révision 11987)
++++ libs/owpixertool/CMakeLists.txt (copie de travail)
+@@ -17,6 +17,7 @@
+
+ ow_add_public_include_dirs(
+ ${CMAKE_CURRENT_SOURCE_DIR}/include
++ ${CMAKE_CURRENT_BINARY_DIR}
+ )
+
+ ow_add_sources(
+@@ -48,4 +49,6 @@
+ endif(APPLE)
+ endif (UNIX AND NOT WIN32)
+
++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
++
+ ow_create_binary()
+Index: owbuild/FindFFMPEG.cmake
+===================================================================
+--- owbuild/FindFFMPEG.cmake (révision 11987)
++++ owbuild/FindFFMPEG.cmake (copie de travail)
+@@ -21,6 +21,7 @@
+ # use pkg-config to get the directories and then use these values
+ # in the FIND_PATH() and FIND_LIBRARY() calls
+ include(UsePkgConfig)
++ include(CheckFunctionExists)
+
+ pkgconfig(libavcodec _FFMPEGIncDir _FFMPEGLinkDir _FFMPEGLinkFlags _FFMPEGCflags)
+
+@@ -72,6 +73,17 @@
+ /sw/lib
+ )
+
++ find_library(SWSCALE_LIBRARY
++ NAMES
++ swscale
++ PATHS
++ ${_FFMPEGLinkDir}
++ /usr/lib
++ /usr/local/lib
++ /opt/local/lib
++ /sw/lib
++ )
++
+ set(FFMPEG_INCLUDE_DIRS
+ ${FFMPEG_INCLUDE_DIR}
+ )
+@@ -99,6 +111,20 @@
+ )
+ endif (AVFORMAT_LIBRARY)
+
++ if (SWSCALE_LIBRARY)
++ set(FFMPEG_LIBRARIES
++ ${FFMPEG_LIBRARIES}
++ ${SWSCALE_LIBRARY}
++ )
++ endif (SWSCALE_LIBRARY)
++
++ set(CMAKE_REQUIRED_INCLUDES ${FFMPEG_INCLUDE_DIR})
++ set(CMAKE_REQUIRED_LIBRARIES ${FFMPEG_LIBRARIES})
++ check_function_exists(
++ sws_scale HAVE_SWSCALE
++ )
++
++
+ if (FFMPEG_INCLUDE_DIRS AND FFMPEG_LIBRARIES)
+ set(FFMPEG_FOUND TRUE)
+ endif (FFMPEG_INCLUDE_DIRS AND FFMPEG_LIBRARIES)
+
diff --git a/net-voip/wengophone/files/wengophone_externavcodec.diff b/net-voip/wengophone/files/wengophone_externavcodec.diff
new file mode 100644
index 0000000..ca5f590
--- /dev/null
+++ b/net-voip/wengophone/files/wengophone_externavcodec.diff
@@ -0,0 +1,15 @@
+Index: wengophone/src/WengoPhoneBuildId.cpp
+===================================================================
+--- wengophone/src/WengoPhoneBuildId.cpp (révision 11987)
++++ wengophone/src/WengoPhoneBuildId.cpp (copie de travail)
+@@ -27,9 +27,9 @@
+ #include <portaudio.h>
+ #endif
+ #include <boost/version.hpp>
+-#include <avcodec.h>
+ #include <tinyxml.h>
+ extern "C" {
++#include <avcodec.h>
+ #include <glib.h>
+ #include <gaim/core.h>
+ }
diff --git a/net-voip/wengophone/wengophone-2.1.1.ebuild b/net-voip/wengophone/wengophone-2.1.1.ebuild
new file mode 100644
index 0000000..2140f8b
--- /dev/null
+++ b/net-voip/wengophone/wengophone-2.1.1.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Wengophone NG is a VoIP client featuring the SIP protcol"
+HOMEPAGE="http://dev.openwengo.com"
+SRC_URI="http://download.wengo.com/nightlybuilds/universal/sources/openwengo/${PV}/${P}.tar.bz2 http://nguyenchithanh.googlepages.com/${P}-v4l2-patches.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="alsa debug oss portaudio v4l2 xv"
+
+RDEPEND=">=dev-libs/boost-1.34
+ dev-libs/glib
+ dev-libs/openssl
+ alsa? ( media-libs/alsa-lib )
+ media-libs/libsamplerate
+ media-libs/libsndfile
+ media-video/ffmpeg
+ net-libs/gnutls
+ || ( x11-libs/libX11 virtual/x11 )
+ >=x11-libs/qt-4.1
+ xv? ( x11-libs/libXv )"
+
+DEPEND="${RDEPEND}
+ >=dev-util/cmake-2.4.4"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S} || die
+
+ epatch ${FILESDIR}/phapi_newerffmpeg.diff
+ epatch ${FILESDIR}/pixertool_newerffmpeg.diff
+ epatch ${FILESDIR}/wengophone_externavcodec.diff
+
+ if use v4l2; then
+ cd ${S}/libs/owpixertool || die
+ epatch ${WORKDIR}/owpixertool-v4l2.patch
+ cd ${S}/libs/owwebcam || die
+ epatch ${WORKDIR}/owwebcam-v4l2.patch
+ fi
+}
+src_compile() {
+
+ local mycmakeflags
+
+ if ! has_version '>=net-misc/curl-7.16.1'; then
+ elog "curl 7.16.1 or later not installed, using internal curl"
+ mycmakeflags="${mycmakeflags} -DCURL_INTERNAL=ON"
+ fi
+
+ if ! has_version '>=net-libs/libosip-3.0.1'; then
+ elog "libosip 3.0.1 or later not installed, using internal libosip"
+ mycmakeflags="${mycmakeflags} -DOSIP2_INTERNAL=ON"
+ fi
+
+ if ! has_version '>=media-libs/speex-1.1.12'; then
+ elog "speex 1.1.12 or later not installed, using internal speex"
+ mycmakeflags="${mycmakeflags} -DSPEEX_INTERNAL=ON"
+ fi
+
+ if use debug; then
+ mycmakeflags="${mycmakeflags} -DCMAKE_BUILD_TYPE=Debug"
+ else
+ mycmakeflags="${mycmakeflags} -DCMAKE_BUILD_TYPE=Release"
+ fi
+
+ if use portaudio; then
+ mycmakeflags="${mycmakeflags} -DOWSOUND_PORTAUDIO_SUPPORT=ON"
+ else
+ mycmakeflags="${mycmakeflags} -DOWSOUND_PORTAUDIO_SUPPORT=OFF"
+ fi
+
+ if use alsa; then
+ mycmakeflags="${mycmakeflags} -DPHAPI_AUDIO_ALSA_SUPPORT=ON \
+ -DPORTAUDIO_ALSA_SUPPORT=ON"
+ else
+ mycmakeflags="${mycmakeflags} -DPHAPI_AUDIO_ALSA_SUPPORT=OFF \
+ -DPORTAUDIO_ALSA_SUPPORT=OFF"
+ fi
+
+ if use oss; then
+ mycmakeflags="${mycmakeflags} -DPHAPI_AUDIO_OSS_SUPPORT=ON \
+ -DPORTAUDIO_OSS_SUPPORT=ON"
+ else
+ mycmakeflags="${mycmakeflags} -DPHAPI_AUDIO_OSS_SUPPORT=OFF \
+ -DPORTAUDIO_OSS_SUPPORT=OFF"
+ fi
+
+ if use xv; then
+ mycmakeflags="${mycmakeflags} -DWENGOPHONE_XV_SUPPORT=ON"
+ else
+ mycmakeflags="${mycmakeflags} -DWENGOPHONE_XV_SUPPORT=OFF"
+ fi
+
+ cd ${S}/build
+ cmake -DCMAKE_INSTALL_PREFIX="/usr" ${mycmakeflags} \
+ .. || die "cmake failed"
+ emake || die "make failed"
+}
+
+src_install() {
+ cd ${S}/build
+ emake DESTDIR=${D} install || die "install failed"
+ domenu ../wengophone/res/wengophone.desktop
+ doicon ../wengophone/res/wengophone_64x64.png
+}
+
+pkg_postinst() {
+ elog 'execute "qtwengophone" to start wengophone'
+}
diff --git a/net-voip/wengophone/wengophone-2.1.2-r1.ebuild b/net-voip/wengophone/wengophone-2.1.2-r1.ebuild
new file mode 100644
index 0000000..fc056c1
--- /dev/null
+++ b/net-voip/wengophone/wengophone-2.1.2-r1.ebuild
@@ -0,0 +1,119 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit eutils toolchain-funcs
+
+MY_V4L2_PATCH_V="2.1.1"
+
+DESCRIPTION="Wengophone NG is a VoIP client featuring the SIP protcol"
+HOMEPAGE="http://dev.openwengo.com"
+SRC_URI="http://download.wengo.com/nightlybuilds/universal/sources/openwengo/${PV}/${P}-source.zip v4l2? ( http://nguyenchithanh.googlepages.com/${PN}-${MY_V4L2_PATCH_V}-v4l2-patches.tar.bz2 )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="alsa debug oss portaudio v4l2 xv"
+
+RDEPEND=">=dev-libs/boost-1.34
+ dev-libs/glib
+ dev-libs/openssl
+ alsa? ( media-libs/alsa-lib )
+ media-libs/libsamplerate
+ media-libs/libsndfile
+ portaudio? ( >=media-libs/portaudio-19_pre061121 )
+ media-video/ffmpeg
+ net-libs/gnutls
+ >=net-misc/curl-7.16.1
+ || ( x11-libs/libX11 virtual/x11 )
+ >=x11-libs/qt-4.1
+ xv? ( x11-libs/libXv )"
+
+DEPEND="${RDEPEND}
+ >=dev-util/cmake-2.4.4"
+
+S=${WORKDIR}/${P}-source
+
+src_unpack() {
+ unpack ${A}
+ cd ${S} || die
+
+ epatch ${FILESDIR}/phapi_newerffmpeg.diff
+ epatch ${FILESDIR}/pixertool_newerffmpeg.diff
+ epatch ${FILESDIR}/wengophone_externavcodec.diff
+ epatch ${FILESDIR}/alsa-plughw-default.patch
+
+ if use v4l2; then
+ cd ${S}/libs/owpixertool || die
+ epatch ${WORKDIR}/owpixertool-v4l2.patch
+ cd ${S}/libs/owwebcam || die
+ epatch ${WORKDIR}/owwebcam-v4l2.patch
+ fi
+}
+src_compile() {
+
+ local mycmakeflags
+
+ # the following are not automagic dependencies, because they do not
+ # change the way the software works and are linked statically
+
+ if ! has_version '>=media-libs/speex-1.1.12'; then
+ elog "speex 1.1.12 or later not installed, using internal speex"
+ mycmakeflags="${mycmakeflags} -DSPEEX_INTERNAL=ON"
+ fi
+
+ if ! has_version '>=net-libs/libosip-3.0.1'; then
+ elog "libosip 3.0.1 or later not installed, using internal libosip"
+ mycmakeflags="${mycmakeflags} -DOSIP2_INTERNAL=ON"
+ fi
+
+ if use debug; then
+ mycmakeflags="${mycmakeflags} -DCMAKE_BUILD_TYPE=Debug"
+ else
+ mycmakeflags="${mycmakeflags} -DCMAKE_BUILD_TYPE=Release"
+ fi
+
+ if use portaudio; then
+ mycmakeflags="${mycmakeflags} -DOWSOUND_PORTAUDIO_SUPPORT=ON"
+ else
+ mycmakeflags="${mycmakeflags} -DOWSOUND_PORTAUDIO_SUPPORT=OFF"
+ fi
+
+ if use alsa; then
+ mycmakeflags="${mycmakeflags} -DPHAPI_AUDIO_ALSA_SUPPORT=ON \
+ -DPORTAUDIO_ALSA_SUPPORT=ON"
+ else
+ mycmakeflags="${mycmakeflags} -DPHAPI_AUDIO_ALSA_SUPPORT=OFF \
+ -DPORTAUDIO_ALSA_SUPPORT=OFF"
+ fi
+
+ if use oss; then
+ mycmakeflags="${mycmakeflags} -DPHAPI_AUDIO_OSS_SUPPORT=ON \
+ -DPORTAUDIO_OSS_SUPPORT=ON"
+ else
+ mycmakeflags="${mycmakeflags} -DPHAPI_AUDIO_OSS_SUPPORT=OFF \
+ -DPORTAUDIO_OSS_SUPPORT=OFF"
+ fi
+
+ if use xv; then
+ mycmakeflags="${mycmakeflags} -DWENGOPHONE_XV_SUPPORT=ON"
+ else
+ mycmakeflags="${mycmakeflags} -DWENGOPHONE_XV_SUPPORT=OFF"
+ fi
+
+ cd ${S}/build
+ cmake -DCMAKE_INSTALL_PREFIX="/usr" ${mycmakeflags} \
+ .. || die "cmake failed"
+ emake || die "make failed"
+}
+
+src_install() {
+ cd ${S}/build
+ emake DESTDIR=${D} install || die "install failed"
+ domenu ../wengophone/res/wengophone.desktop
+ doicon ../wengophone/res/wengophone_64x64.png
+}
+
+pkg_postinst() {
+ elog 'execute "qtwengophone" to start wengophone'
+}
diff --git a/net-voip/wengophone/wengophone-2.1.2.ebuild b/net-voip/wengophone/wengophone-2.1.2.ebuild
new file mode 100644
index 0000000..dd46e08
--- /dev/null
+++ b/net-voip/wengophone/wengophone-2.1.2.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit eutils toolchain-funcs
+
+MY_V4L2_PATCH_V="2.1.1"
+
+DESCRIPTION="Wengophone NG is a VoIP client featuring the SIP protcol"
+HOMEPAGE="http://dev.openwengo.com"
+SRC_URI="http://download.wengo.com/nightlybuilds/universal/sources/openwengo/${PV}/${P}-source.zip http://nguyenchithanh.googlepages.com/${PN}-${MY_V4L2_PATCH_V}-v4l2-patches.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="alsa debug oss portaudio v4l2 xv"
+
+RDEPEND=">=dev-libs/boost-1.34
+ dev-libs/glib
+ dev-libs/openssl
+ alsa? ( media-libs/alsa-lib )
+ media-libs/libsamplerate
+ media-libs/libsndfile
+ media-video/ffmpeg
+ net-libs/gnutls
+ || ( x11-libs/libX11 virtual/x11 )
+ >=x11-libs/qt-4.1
+ xv? ( x11-libs/libXv )"
+
+DEPEND="${RDEPEND}
+ >=dev-util/cmake-2.4.4"
+
+S=${WORKDIR}/${P}-source
+
+src_unpack() {
+ unpack ${A}
+ cd ${S} || die
+
+ epatch ${FILESDIR}/phapi_newerffmpeg.diff
+ epatch ${FILESDIR}/pixertool_newerffmpeg.diff
+ epatch ${FILESDIR}/wengophone_externavcodec.diff
+
+ if use v4l2; then
+ cd ${S}/libs/owpixertool || die
+ epatch ${WORKDIR}/owpixertool-v4l2.patch
+ cd ${S}/libs/owwebcam || die
+ epatch ${WORKDIR}/owwebcam-v4l2.patch
+ fi
+}
+src_compile() {
+
+ local mycmakeflags
+
+ if ! has_version '>=net-misc/curl-7.16.1'; then
+ elog "curl 7.16.1 or later not installed, using internal curl"
+ mycmakeflags="${mycmakeflags} -DCURL_INTERNAL=ON"
+ fi
+
+ if ! has_version '>=net-libs/libosip-3.0.1'; then
+ elog "libosip 3.0.1 or later not installed, using internal libosip"
+ mycmakeflags="${mycmakeflags} -DOSIP2_INTERNAL=ON"
+ fi
+
+ if ! has_version '>=media-libs/speex-1.1.12'; then
+ elog "speex 1.1.12 or later not installed, using internal speex"
+ mycmakeflags="${mycmakeflags} -DSPEEX_INTERNAL=ON"
+ fi
+
+ if use debug; then
+ mycmakeflags="${mycmakeflags} -DCMAKE_BUILD_TYPE=Debug"
+ else
+ mycmakeflags="${mycmakeflags} -DCMAKE_BUILD_TYPE=Release"
+ fi
+
+ if use portaudio; then
+ mycmakeflags="${mycmakeflags} -DOWSOUND_PORTAUDIO_SUPPORT=ON"
+ else
+ mycmakeflags="${mycmakeflags} -DOWSOUND_PORTAUDIO_SUPPORT=OFF"
+ fi
+
+ if use alsa; then
+ mycmakeflags="${mycmakeflags} -DPHAPI_AUDIO_ALSA_SUPPORT=ON \
+ -DPORTAUDIO_ALSA_SUPPORT=ON"
+ else
+ mycmakeflags="${mycmakeflags} -DPHAPI_AUDIO_ALSA_SUPPORT=OFF \
+ -DPORTAUDIO_ALSA_SUPPORT=OFF"
+ fi
+
+ if use oss; then
+ mycmakeflags="${mycmakeflags} -DPHAPI_AUDIO_OSS_SUPPORT=ON \
+ -DPORTAUDIO_OSS_SUPPORT=ON"
+ else
+ mycmakeflags="${mycmakeflags} -DPHAPI_AUDIO_OSS_SUPPORT=OFF \
+ -DPORTAUDIO_OSS_SUPPORT=OFF"
+ fi
+
+ if use xv; then
+ mycmakeflags="${mycmakeflags} -DWENGOPHONE_XV_SUPPORT=ON"
+ else
+ mycmakeflags="${mycmakeflags} -DWENGOPHONE_XV_SUPPORT=OFF"
+ fi
+
+ cd ${S}/build
+ cmake -DCMAKE_INSTALL_PREFIX="/usr" ${mycmakeflags} \
+ .. || die "cmake failed"
+ emake || die "make failed"
+}
+
+src_install() {
+ cd ${S}/build
+ emake DESTDIR=${D} install || die "install failed"
+ domenu ../wengophone/res/wengophone.desktop
+ doicon ../wengophone/res/wengophone_64x64.png
+}
+
+pkg_postinst() {
+ elog 'execute "qtwengophone" to start wengophone'
+}