From ada6c6433a5e882176d5a3882d7760a235e830ec Mon Sep 17 00:00:00 2001 From: Max Brazhnikov Date: Mon, 31 Mar 2014 11:17:32 +0000 Subject: [PATCH] net-im/psimedia: - add upstream patches to fix build with modern gcc, glib, and make -j - add explicit dependence on audio/speex - convert WITH_DEBUG to option - convert to USES=tar:bzip2 --- net-im/psimedia/Makefile | 29 +++---- net-im/psimedia/files/patch-git_a986555ab7 | 88 ++++++++++++++++++++++ net-im/psimedia/files/patch-psimedia.pro | 16 +++- 3 files changed, 111 insertions(+), 22 deletions(-) create mode 100644 net-im/psimedia/files/patch-git_a986555ab7 diff --git a/net-im/psimedia/Makefile b/net-im/psimedia/Makefile index 6dcf9c52bfe7..b2636c2a8ceb 100644 --- a/net-im/psimedia/Makefile +++ b/net-im/psimedia/Makefile @@ -9,10 +9,10 @@ MASTER_SITES= http://delta.affinix.com/download/psimedia/ MAINTAINER= makc@FreeBSD.org COMMENT= Voice and video API for Psi-like IM clients -LIB_DEPENDS= liboil-0.3.so:${PORTSDIR}/devel/liboil +LIB_DEPENDS= liboil-0.3.so:${PORTSDIR}/devel/liboil \ + libspeexdsp.so:${PORTSDIR}/audio/speex -USES= pkgconfig -USE_BZIP2= yes +USES= pkgconfig tar:bzip2 HAS_CONFIGURE= yes USE_QT4= gui qmake_build moc_build uic_build USE_GSTREAMER= jpeg speex theora vorbis @@ -20,31 +20,22 @@ USE_GSTREAMER= jpeg speex theora vorbis QT_NONSTANDARD= yes CONFIGURE_ARGS= --qtdir=${LOCALBASE} \ --verbose -MAKE_JOBS_UNSAFE= yes DESTDIRNAME= INSTALL_ROOT PSI_PLUGIN_DIR= lib/psi/plugins -.if !defined(WITH_DEBUG) -CONFIGURE_ARGS+= --release -PLIST_SUB+= DEBUG="@comment " -.else -CONFIGURE_ARGS+= --debug -PLIST_SUB+= DEBUG="" -.endif +OPTIONS_DEFINE= DEBUG +OPTIONS_SUB= yes +DEBUG_CONFIGURE_ON= --debug +DEBUG_CONFIGURE_OFF= --release -post-patch: - @${REINPLACE_CMD} -e 's|glib/.*\.h>|glib.h>|g' \ - ${WRKSRC}/gstprovider/rwcontrol.h \ - ${WRKSRC}/gstprovider/gstthread.h \ - ${WRKSRC}/gstprovider/gstelements/static/gstelements.h \ - ${WRKSRC}/gstprovider/gstcustomelements/gstcustomelements.h +.include do-install: ${MKDIR} ${STAGEDIR}${PREFIX}/${PSI_PLUGIN_DIR} - ${INSTALL_PROGRAM} ${WRKSRC}/gstprovider/libgstprovider.so \ + ${INSTALL_LIB} ${WRKSRC}/gstprovider/libgstprovider.so \ ${STAGEDIR}${PREFIX}/${PSI_PLUGIN_DIR} -.if defined(WITH_DEBUG) +.if ${PORT_OPTIONS:MDEBUG} ${INSTALL_DATA} ${WRKSRC}/gstprovider/libgstprovider.so.debug \ ${STAGEDIR}${PREFIX}/${PSI_PLUGIN_DIR} .endif diff --git a/net-im/psimedia/files/patch-git_a986555ab7 b/net-im/psimedia/files/patch-git_a986555ab7 new file mode 100644 index 000000000000..050f9216431b --- /dev/null +++ b/net-im/psimedia/files/patch-git_a986555ab7 @@ -0,0 +1,88 @@ +diff --git a/gstprovider/bins.cpp b/gstprovider/bins.cpp +index f91bc7a..5a6880f 100644 +--- gstprovider/bins.cpp ++++ gstprovider/bins.cpp +@@ -20,6 +20,7 @@ + + #include "bins.h" + ++#include + #include + #include + #include +diff --git a/gstprovider/gstcustomelements/gstcustomelements.h b/gstprovider/gstcustomelements/gstcustomelements.h +index 85a7bc5..0bd7ccc 100644 +--- gstprovider/gstcustomelements/gstcustomelements.h ++++ gstprovider/gstcustomelements/gstcustomelements.h +@@ -21,7 +21,7 @@ + #ifndef GSTCUSTOMELEMENTS_H + #define GSTCUSTOMELEMENTS_H + +-#include ++#include + #include + #include + #include +diff --git a/gstprovider/gstelements/static/gstelements.h b/gstprovider/gstelements/static/gstelements.h +index f0fbff9..b6980bd 100644 +--- gstprovider/gstelements/static/gstelements.h ++++ gstprovider/gstelements/static/gstelements.h +@@ -21,7 +21,7 @@ + #ifndef PSI_GSTELEMENTS_H + #define PSI_GSTELEMENTS_H + +-#include ++#include + + G_BEGIN_DECLS + +diff --git a/gstprovider/gstthread.h b/gstprovider/gstthread.h +index aafc833..b13f380 100644 +--- gstprovider/gstthread.h ++++ gstprovider/gstthread.h +@@ -22,7 +22,7 @@ + #define PSI_GSTTHREAD_H + + #include +-#include ++#include + + namespace PsiMedia { + +diff --git a/gstprovider/pipeline.cpp b/gstprovider/pipeline.cpp +index 5005a66..c4281f7 100644 +--- gstprovider/pipeline.cpp ++++ gstprovider/pipeline.cpp +@@ -20,6 +20,7 @@ + + #include "pipeline.h" + ++#include + #include + #include + #include +diff --git a/gstprovider/rtpworker.cpp b/gstprovider/rtpworker.cpp +index 35b51db..35ae41d 100644 +--- gstprovider/rtpworker.cpp ++++ gstprovider/rtpworker.cpp +@@ -20,6 +20,7 @@ + + #include "rtpworker.h" + ++#include + #include + #include + #include "devices.h" +diff --git a/gstprovider/rwcontrol.h b/gstprovider/rwcontrol.h +index 307c3e3..18855c9 100644 +--- gstprovider/rwcontrol.h ++++ gstprovider/rwcontrol.h +@@ -28,7 +28,7 @@ + #include + #include + #include +-#include ++#include + #include "psimediaprovider.h" + #include "rtpworker.h" + diff --git a/net-im/psimedia/files/patch-psimedia.pro b/net-im/psimedia/files/patch-psimedia.pro index b57e0e64f849..5f06bc6e3a37 100644 --- a/net-im/psimedia/files/patch-psimedia.pro +++ b/net-im/psimedia/files/patch-psimedia.pro @@ -1,9 +1,19 @@ --- ./psimedia.pro.orig 2009-03-05 05:01:58.000000000 +0300 +++ ./psimedia.pro 2010-09-05 02:14:12.705470018 +0400 -@@ -1,6 +1,5 @@ +@@ -1,6 +1,13 @@ TEMPLATE = subdirs - SUBDIRS += gstprovider/gstelements/static +-SUBDIRS += gstprovider/gstelements/static -SUBDIRS += demo ++sub_gstelements.subdir = gstprovider/gstelements/static - SUBDIRS += gstprovider +-SUBDIRS += gstprovider ++sub_demo.subdir = demo ++ ++sub_gstprovider.subdir = gstprovider ++sub_gstprovider.depends = sub_gstelements ++ ++SUBDIRS += sub_gstelements ++# SUBDIRS += sub_demo ++ ++SUBDIRS += sub_gstprovider