summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMounir Lamouri <volkmar@gentoo.org>2009-03-03 17:23:29 +0000
committerMounir Lamouri <volkmar@gentoo.org>2009-03-03 17:23:29 +0000
commitcdd0f78d66d8186792c4f0ebcc4e558b4b94a031 (patch)
treeb053e5346b93fdc0d3685d54215c7d1d223ab1e4
parentmask net-libs/ptlib to prevent breaks in ebuilds from the official tree (diff)
downloadvoip-cdd0f78d66d8186792c4f0ebcc4e558b4b94a031.tar.gz
voip-cdd0f78d66d8186792c4f0ebcc4e558b4b94a031.tar.bz2
voip-cdd0f78d66d8186792c4f0ebcc4e558b4b94a031.zip
net-libs/ptlib: add ptlib-2.4.4, see bug 238617
svn path=/trunk/; revision=791
-rw-r--r--net-libs/ptlib/files/ptlib-asm.patch15
-rw-r--r--net-libs/ptlib/metadata.xml25
-rw-r--r--net-libs/ptlib/ptlib-2.4.4.ebuild288
3 files changed, 328 insertions, 0 deletions
diff --git a/net-libs/ptlib/files/ptlib-asm.patch b/net-libs/ptlib/files/ptlib-asm.patch
new file mode 100644
index 0000000..e5d6e9c
--- /dev/null
+++ b/net-libs/ptlib/files/ptlib-asm.patch
@@ -0,0 +1,15 @@
+--- src/ptlib/common/jidctflt.cxx.orig 2008-09-24 09:13:06.000000000 -0400
++++ src/ptlib/common/jidctflt.cxx 2008-09-24 09:11:49.000000000 -0400
+@@ -110,10 +110,10 @@
+ "\tsar %2,%1\n"
+ "\tsub $-128,%1\n"
+ "\tcmovl %5,%1\n" /* Use the sub to compare to 0 */
+- "\tcmpl %4,%1\n"
++ "\tcmp %4,%1\n"
+ "\tcmovg %4,%1\n"
+ : "=r"(x)
+- : "0"(x), "Ir"(shift), "ir"(1UL<<(shift-1)), "r" (0xff), "r" (0)
++ : "0"((unsigned long)x), "c"((char)shift), "ir"(1UL<<(shift-1)), "r" (0xffUL), "r" (0UL)
+ );
+ return x;
+ }
diff --git a/net-libs/ptlib/metadata.xml b/net-libs/ptlib/metadata.xml
new file mode 100644
index 0000000..4207e6c
--- /dev/null
+++ b/net-libs/ptlib/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>voip</herd>
+ <use>
+ <flag name="asn">Enable ASN decoding/encoding support</flag>
+ <flag name="audio">Enable audio support</flag>
+ <flag name="config-file">Enable config file support</flag>
+ <flag name="http">Enable http support</flag>
+ <flag name="http-forms">Enable http forms support</flag>
+ <flag name="http-server">Enable http server support</flag>
+ <flag name="pipechan">Enable pipechannel support</flag>
+ <flag name="plugins">Enable plugin support</flag>
+ <flag name="qos">Enable QOS support</flag>
+ <flag name="resolver">Enable DNS resolver support</flag>
+ <flag name="shmvideo">Enable shared memory video devices</flag>
+ <flag name="tts">Enable Text-To-Speech server support</flag>
+ <flag name="url">Enable url support</flag>
+ <flag name="video">Enable video support</flag>
+ <flag name="video-file">Enable video file support</flag>
+ <flag name="vxml">Enable VXML support</flag>
+ <flag name="wav">Enable WAVFILE support</flag>
+ </use>
+</pkgmetadata>
+
diff --git a/net-libs/ptlib/ptlib-2.4.4.ebuild b/net-libs/ptlib/ptlib-2.4.4.ebuild
new file mode 100644
index 0000000..80eb7b6
--- /dev/null
+++ b/net-libs/ptlib/ptlib-2.4.4.ebuild
@@ -0,0 +1,288 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="2"
+
+inherit eutils flag-o-matic
+
+DESCRIPTION="Network focused portable C++ class library providing high level functions"
+HOMEPAGE="http://www.opalvoip.org/"
+SRC_URI="mirror://sourceforge/opalvoip/${P}.tar.bz2
+ doc? ( mirror://sourceforge/opalvoip/${P}-htmldoc.tar.gz )"
+
+LICENSE="MPL-1.0"
+SLOT="0"
+KEYWORDS="~ppc"
+# default enabled are features from 'minsize', the most used according to ptlib
+IUSE="alsa +asn +audio config-file debug doc esd examples ftp +http http-forms
+http-server ieee1394 ipv6 jabber odbc oss pch pipechan +plugins qos ldap
+resolver sasl sdl shmvideo snmp soap ssl tts +url v4l v4l2 +video +video-file
+vxml wav xml xmlrpc"
+
+RDEPEND="alsa? ( media-libs/alsa-lib )
+ esd? ( media-sound/esound )
+ ieee1394? ( media-libs/libdv
+ sys-libs/libavc1394
+ media-libs/libdc1394:1 )
+ ldap? ( net-nds/openldap )
+ odbc? ( dev-db/unixODBC )
+ sasl? ( dev-libs/cyrus-sasl:2 )
+ sdl? ( media-libs/libsdl )
+ ssl? ( dev-libs/openssl )
+ v4l2? ( media-libs/libv4l )
+ xml? ( dev-libs/expat )"
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig
+ sys-devel/bison
+ sys-devel/flex
+ v4l? ( sys-kernel/linux-headers )
+ v4l2? ( sys-kernel/linux-headers )
+ !!dev-libs/pwlib"
+
+# NOTES:
+# media-libs/libdc1394:2 should be supported but headers location have changed
+# looks to have an auto-magic dep with medialibs, but not in the tree so...
+# tools/ directory seems to be only for windows
+
+pkg_setup() {
+ local warning=false
+
+ # ekiga can't use, at least, alsa plugin with --as-needed
+ # users where experiencing issues with --as-needed, see bug 238617
+ # TODO: should be re-tested and, if possible, fixed in a cleanier way
+ append-ldflags -Wl,--no-as-needed
+
+ # warn user about use flag that are gonna override other ones
+
+ if ! use plugins; then
+ ewarn "disabling plugins will remove a lot of ptlib features"
+ ewarn "it is _not_ recommended"
+ warning=true
+ fi
+
+ if ! use audio; then
+ ewarn "disabling audio will remove all audio support"
+ ewarn "even if other audio features have been enabled"
+ warning=true
+ fi
+
+ if ! use video; then
+ ewarn "disabling video will remove all video support"
+ ewarn "even if other video features have been enabled"
+ warning=true
+ fi
+
+ if use jabber && ! use xml; then
+ ewarn "jabber support needs xml support: jabber has been disabled"
+ ewarn "enable xml support if you want to use the jabber protocol"
+ warning=true
+ fi
+
+ if use http && ! use url; then
+ ewarn "http support needs url support: http support has been disabled"
+ ewarn "enable url support if you want to use the http protocol"
+ warning=true
+ fi
+
+ if use http-forms; then
+ if ! use http; then
+ ewarn "http-forms support needs http support: http-forms support has been disabled"
+ ewarn "enable http support if you want to use http-forms"
+ warning=true
+ fi
+ if ! use config-file; then
+ ewarn "http-forms support needs config-file support: http-forms support has been disabled"
+ ewarn "enable config-file support if you want to use http-forms"
+ warning=true
+ fi
+ fi
+
+ if use http-server && ! use http-forms; then
+ ewarn "http-server support needs http-forms support: http-server support has been disabled"
+ ewarn "enable http-forms support if you want to use http-server"
+ warning=true
+ fi
+
+ if use vxml; then
+ if ! use xml; then
+ ewarn "vxml support needs xml support: vxml support has been disabled"
+ ewarn "enable xml support if you want to use vxml"
+ warning=true
+ fi
+ if ! use http; then
+ ewarn "vxml support needs http support: vxml support has been disabled"
+ ewarn "enable http support if you want to use vxml"
+ warning=true
+ fi
+ fi
+
+ if use xmlrpc; then
+ if ! use xml; then
+ ewarn "xmlrpc support needs xml support: xmlrpc support has been disabled"
+ ewarn "enable xml support if you want to use xmlrpc"
+ warning=true
+ fi
+ if ! use http; then
+ ewarn "xmlrpc support needs http support: xmlrpc support has been disabled"
+ ewarn "enable http support if you want to use xmlrpc"
+ warning=true
+ fi
+ fi
+
+ if use soap; then
+ if ! use xml; then
+ ewarn "soap support needs xml support: soap support has been disabled"
+ ewarn "enable xml support if you want to use soap"
+ warning=true
+ fi
+ if ! use http; then
+ ewarn "soap support needs http support: soap support has been disabled"
+ ewarn "enable http support if you want to use soap"
+ warning=true
+ fi
+ fi
+
+ if ${warning}; then
+ echo
+ ewarn "If one of the warnings above is not volunteer, hit Ctrl+C now"
+ ewarn "and re-emerge ${PN} with the desired USE flags"
+ echo
+ ebeep
+ epause
+ fi
+}
+
+src_prepare() {
+ # move files from ${P}-htmldoc.tar.gz
+ if use doc; then
+ mv ../html . || die "moving doc files failed"
+ fi
+
+ # remove visual studio related files from samples/
+ if use examples; then
+ rm -f samples/*/*.vcproj
+ rm -f samples/*/*.sln
+ rm -f samples/*/*.dsp
+ rm -f samples/*/*.dsw
+ fi
+
+ # this patch fixes bug 145424
+ # upstream have been contacted, see bug 2657924 in upstream bugtracker
+ epatch "${FILESDIR}"/${PN}-asm.patch
+}
+
+src_configure() {
+ # minsize, openh323, opal: presets of features (overwritten by use flags)
+ # ansi-bool, atomicity: there is no reason to disable those features
+ # internalregex: we want to use external one
+ # appshare, vfw: only for windows
+ # sunaudio and bsdvideo are respectively for SunOS and BSD's
+ # dtmf, pop3smtp, remconn, serial, sock, sockagg, stun, telnet
+ # all seem useless (TODO: check when new versions)
+ econf \
+ --disable-minsize \
+ --disable-openh323 \
+ --disable-opal \
+ --enable-ansi-bool \
+ --enable-atomicity \
+ --disable-internalregex \
+ --disable-appshare \
+ --disable-vfw \
+ --disable-sunaudio \
+ --disable-bsdvideo \
+ --disable-dtmf \
+ --disable-pop3smtp \
+ --disable-remconn \
+ --disable-serial \
+ --disable-socks \
+ --disable-sockagg \
+ --disable-stun \
+ --disable-telnet \
+ $(use_enable audio) \
+ $(use_enable alsa) \
+ $(use_enable asn) \
+ $(use_enable config-file configfile) \
+ $(use_enable debug exceptions) \
+ $(use_enable debug memcheck) \
+ $(use_enable debug tracing) \
+ $(use_enable esd) \
+ $(use_enable ftp) \
+ $(use_enable http) \
+ $(use_enable http-forms httpforms) \
+ $(use_enable http-server httpsvc) \
+ $(use_enable ieee1394 avc) \
+ $(use_enable ieee1394 dc) \
+ $(use_enable ipv6) \
+ $(use_enable jabber) \
+ $(use_enable ldap openldap) \
+ $(use_enable odbc) \
+ $(use_enable oss) \
+ $(use_enable pch) \
+ $(use_enable pipechan) \
+ $(use_enable plugins) \
+ $(use_enable qos) \
+ $(use_enable resolver) \
+ $(use_enable sasl) \
+ $(use_enable sdl) \
+ $(use_enable shmvideo) \
+ $(use_enable snmp) \
+ $(use_enable soap) \
+ $(use_enable ssl openssl) \
+ $(use_enable tts) \
+ $(use_enable url) \
+ $(use_enable v4l) \
+ $(use_enable v4l2) \
+ $(use_enable video) \
+ $(use_enable video-file vidfile) \
+ $(use_enable vxml) \
+ $(use_enable wav wavfile) \
+ $(use_enable xml expat) \
+ $(use_enable xmlrpc)
+}
+
+src_compile() {
+ local makeopts=""
+
+ use debug && makeopts="debug"
+
+ emake ${makeopts} || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ if use doc; then
+ dohtml -r html/* || die "dohtml failed"
+ fi
+
+ dodoc ReadMe.txt ReadMe_QOS.txt History.txt || die "dodoc failed"
+
+ # ChangeLog is splitted and other branches ChangeLogs are in the tarball
+ docinto ChangeLogs/
+ dodoc ChangeLog-${PN}-v2_{0,1,2,3,4}_*.txt || die "dodoc failed"
+
+ if use examples; then
+ local exampledir="/usr/share/doc/${PF}/examples"
+ local basedir="samples"
+ local sampledirs="`ls samples --hide=Makefile`"
+
+ # first, install Makefile
+ insinto ${exampledir}/
+ doins ${basedir}/Makefile || die "doins failed"
+
+ # now, all examples
+ for x in ${sampledirs}; do
+ insinto ${exampledir}/${x}/
+ doins ${basedir}/${x}/* || die "doins failed"
+ done
+ fi
+}
+
+pkg_postinst() {
+ if use examples; then
+ ewarn "all examples have been installed, some of them will not work on your system"
+ ewarn "it will depend of the enabled use flags"
+ ewarn "to test examples, you have to run PTLIBDIR=/usr/share/ptlib make"
+ fi
+}