diff --git a/net-libs/ptlib/Manifest b/net-libs/ptlib/Manifest new file mode 100644 index 00000000..40ae609d --- /dev/null +++ b/net-libs/ptlib/Manifest @@ -0,0 +1,2 @@ +DIST ptlib-2.10.10-htmldoc.tar.bz2 4504867 SHA256 bce8a9eeb32f5e556acab3a753844500e751cd4a6db6ce88778fba692d24019a SHA512 7db5d169ad107132d2bca945a1269bae0dd0100b7566b1766dda83d0559a6f2044ffc21905520f7f15d218dd0b1290eaa13d5150d81340c6b0a9a464a713741d WHIRLPOOL 1832acdaded357471c5db982195723dfbf30d22359427d7dc7ac880d2a997a73d9963f7003cae70c6d17874daf1984f5c24c3c600656b078edcec3fa6552ce36 +DIST ptlib-2.10.11.tar.bz2 3736259 SHA256 27a8ba1fd147195c0b310897f81d26f73996b77b18147e587638444cfacd681a SHA512 ac8af8962330abf11986ccb863be0990c2e78ae611666d17c68068b72c4a5ea523ba74c55566284c3549e2346e407ccfffb5cc509fbf6ef19f1eb51dcb8b5f15 WHIRLPOOL 3dafe50df538b8d24a20b58252c5dfa578ac81f25d9086f748af928f54658533e1bf28dc1f40cbbeadd5062d57072ad71e243c0275428f155077ee752e26e4ab diff --git a/net-libs/ptlib/files/ptlib-2.10.10-mga-bison-parameter.patch b/net-libs/ptlib/files/ptlib-2.10.10-mga-bison-parameter.patch new file mode 100644 index 00000000..fcc8d0d2 --- /dev/null +++ b/net-libs/ptlib/files/ptlib-2.10.10-mga-bison-parameter.patch @@ -0,0 +1,39 @@ +--- ptlib-2.10.11/./src/ptlib/common/getdate.y 2013-08-15 01:20:26.000000000 +0200 ++++ /mnt/chroot/cauldron/home/dan/rpm/BUILD/ptlib-2.10.11/src/ptlib/common/getdate.y 2013-12-15 00:24:27.866481490 +0100 +@@ -121,9 +121,9 @@ + static int yylex(); + + #ifdef __GNUC__ +-static int yyerror(char const *msg); ++static int yyerror(void *, char const *msg); + #else +-static void yyerror(char const *msg); ++static void yyerror(void *, char const *msg); + #endif + + +@@ -132,7 +132,8 @@ + + %} + +-%pure_parser ++%pure-parser ++%parse-param {void *parseParam} + + %union { + time_t Number; +@@ -1018,12 +1019,12 @@ + #endif + + #ifdef __GNUC__ +-int yyerror(const char * s) ++int yyerror(void *var, const char * s) + { + return 0; + } + #else +-static void yyerror(const char * s) ++static void yyerror(void *var, const char * s) + { + } + #endif diff --git a/net-libs/ptlib/files/ptlib-2.10.10-respect_cflags_cxxflags.patch b/net-libs/ptlib/files/ptlib-2.10.10-respect_cflags_cxxflags.patch new file mode 100644 index 00000000..4442d333 --- /dev/null +++ b/net-libs/ptlib/files/ptlib-2.10.10-respect_cflags_cxxflags.patch @@ -0,0 +1,14 @@ +diff -ur ptlib-2.10.10.orig/make/ptbuildopts.mak.in ptlib-2.10.10/make/ptbuildopts.mak.in +--- ptlib-2.10.10.orig/make/ptbuildopts.mak.in 2014-08-04 18:11:02.000000000 +0000 ++++ ptlib-2.10.10/make/ptbuildopts.mak.in 2014-08-04 18:11:32.000000000 +0000 +@@ -15,8 +15,8 @@ + OSTYPE = @OSTYPE@ + OSRELEASE = @OSRELEASE@ + +-STDCCFLAGS += @STDCCFLAGS@ @CPPFLAGS@ +-STDCXXFLAGS += @STDCXXFLAGS@ @CPPFLAGS@ ++STDCCFLAGS += @STDCCFLAGS@ @CFLAGS@ ++STDCXXFLAGS += @STDCXXFLAGS@ @CXXFLAGS@ + OPTSTDCCFLAGS += @OPTSTDCCFLAGS@ + LDFLAGS += @LDFLAGS@ + ENDLDLIBS += @ENDLDLIBS@ \ No newline at end of file diff --git a/net-libs/ptlib/files/ptlib-2.10.9-disable-telnet-symbols.patch b/net-libs/ptlib/files/ptlib-2.10.9-disable-telnet-symbols.patch new file mode 100644 index 00000000..0a3012c8 --- /dev/null +++ b/net-libs/ptlib/files/ptlib-2.10.9-disable-telnet-symbols.patch @@ -0,0 +1,19 @@ +diff -uNr ptlib-2.10.8.orig/src/ptclib/cli.cxx ptlib-2.10.8/src/ptclib/cli.cxx +--- ptlib-2.10.8.orig/src/ptclib/cli.cxx 2012-10-19 13:45:35.000000000 -0400 ++++ ptlib-2.10.8/src/ptclib/cli.cxx 2012-10-22 16:02:58.000000000 -0400 +@@ -858,6 +858,7 @@ + + /////////////////////////////////////////////////////////////////////////////// + ++#ifdef HAS_TELNET + PCLITelnet::PCLITelnet(WORD port, const char * prompt, bool singleThreadForAll) + : PCLISocket(port, prompt, singleThreadForAll) + { +@@ -868,6 +869,7 @@ + { + return new PTelnetSocket(); + } ++#endif + + + /////////////////////////////////////////////////////////////////////////////// diff --git a/net-libs/ptlib/files/ptlib-2.10.9-pkgconfig_ldflags.patch b/net-libs/ptlib/files/ptlib-2.10.9-pkgconfig_ldflags.patch new file mode 100644 index 00000000..acd53197 --- /dev/null +++ b/net-libs/ptlib/files/ptlib-2.10.9-pkgconfig_ldflags.patch @@ -0,0 +1,11 @@ +diff -uNr ptlib-2.10.8.orig/ptlib.pc.in ptlib-2.10.8/ptlib.pc.in +--- ptlib-2.10.8.orig/ptlib.pc.in 2012-10-19 13:45:35.000000000 -0400 ++++ ptlib-2.10.8/ptlib.pc.in 2012-10-19 14:03:26.000000000 -0400 +@@ -11,7 +11,7 @@ + Name: ptlib + Description: PT Library + Version: @PTLIB_VERSION@ +-Libs: @LDFLAGS@ -L${libdir} -lpt${suffix} ++Libs: @ENDLDLIBS@ -L${libdir} -lpt${suffix} + Libs.private: @ENDLDLIBS@ + Cflags: -I${includedir} @STDCCFLAGS@ diff --git a/net-libs/ptlib/files/ptlib-2.10.9-respect_cxxflags.patch b/net-libs/ptlib/files/ptlib-2.10.9-respect_cxxflags.patch new file mode 100644 index 00000000..dc09f960 --- /dev/null +++ b/net-libs/ptlib/files/ptlib-2.10.9-respect_cxxflags.patch @@ -0,0 +1,10 @@ +diff -uNr ptlib-2.10.8.orig/configure.ac ptlib-2.10.8/configure.ac +--- ptlib-2.10.8.orig/configure.ac 2012-10-19 13:45:35.000000000 -0400 ++++ ptlib-2.10.8/configure.ac 2012-10-23 08:08:57.000000000 -0400 +@@ -538,7 +540,7 @@ + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) +- STDCXXFLAGS="$STDCCFLAGS -frtti" ++ STDCXXFLAGS="$STDCXXFLAGS -frtti" + fi diff --git a/net-libs/ptlib/files/ptlib-2.10.9-svn_revision_override.patch b/net-libs/ptlib/files/ptlib-2.10.9-svn_revision_override.patch new file mode 100644 index 00000000..5531fd9f --- /dev/null +++ b/net-libs/ptlib/files/ptlib-2.10.9-svn_revision_override.patch @@ -0,0 +1,18 @@ +diff -uNr ptlib-2.10.8.orig/src/ptlib/common/osutils.cxx ptlib-2.10.8/src/ptlib/common/osutils.cxx +--- ptlib-2.10.8.orig/src/ptlib/common/osutils.cxx 2012-10-19 13:45:35.000000000 -0400 ++++ ptlib-2.10.8/src/ptlib/common/osutils.cxx 2012-10-19 13:52:50.000000000 -0400 +@@ -43,13 +43,13 @@ + #include + #include + #include "../../../version.h" +-#include "../../../revision.h" ++# define SVN_REVISION 0 ++//#include "../../../revision.h" + + #ifdef _WIN32 + #include + #endif + +- + static const char * const VersionStatus[PProcess::NumCodeStatuses] = { "alpha", "beta", "." }; + static const char DefaultRollOverPattern[] = "_yyyy_MM_dd_hh_mm"; diff --git a/net-libs/ptlib/ptlib-2.10.11.ebuild b/net-libs/ptlib/ptlib-2.10.11.ebuild new file mode 100644 index 00000000..fb6c6e00 --- /dev/null +++ b/net-libs/ptlib/ptlib-2.10.11.ebuild @@ -0,0 +1,230 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-libs/ptlib/Attic/ptlib-2.10.11.ebuild,v 1.4 2014/08/04 18:46:43 armin76 Exp $ + +EAPI="5" + +inherit eutils + +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/${PN}-2.10.10-htmldoc.tar.bz2 )" + +LICENSE="MPL-1.0" +SLOT="0/${PV}" +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86" +# default enabled are features from 'minsize', the most used according to ptlib +IUSE="alsa +asn debug doc +dtmf examples ffmpeg ftp +http ipv6 +jabber ldap lua mail odbc oss pch pulseaudio qos remote sasl sdl serial +shmvideo snmp soap socks +sound ssl static-libs +stun telnet tts v4l +video +vxml wav xml xmlrpc" + +CDEPEND=" + ldap? ( net-nds/openldap ) + lua? ( dev-lang/lua ) + odbc? ( dev-db/unixODBC ) + pulseaudio? ( media-sound/pulseaudio ) + sasl? ( dev-libs/cyrus-sasl:2 ) + sdl? ( media-libs/libsdl ) + sound? ( alsa? ( media-libs/alsa-lib ) ) + ssl? ( dev-libs/openssl ) + video? ( v4l? ( media-libs/libv4l ) ) + xml? ( dev-libs/expat ) + !!dev-libs/pwlib" +RDEPEND="${CDEPEND} + ffmpeg? ( virtual/ffmpeg )" +DEPEND="${CDEPEND} + virtual/pkgconfig + sys-devel/bison + sys-devel/flex + video? ( v4l? ( sys-kernel/linux-headers ) )" + +# NOTES: +# media-libs/libdc1394:2 should be supported but headers location have changed +# tools/ directory is ignored +# avc plugin is disabled to fix bug 276514, see upstream bug 2821744 + +conditional_use_warn_msg() { + ewarn "To enable ${1} USE flag, you need ${2} USE flag to be enabled" + ewarn "Please, enable ${2} or disable ${1}" +} + +REQUIRED_USE="sdl? ( video ) + jabber? ( xml ) + vxml? ( http tts xml ) + xmlrpc? ( http xml ) + soap? ( http xml )" + +src_prepare() { + epatch "${FILESDIR}/${PN}-2.10.9-svn_revision_override.patch" \ + "${FILESDIR}/${PN}-2.10.9-pkgconfig_ldflags.patch" \ + "${FILESDIR}/${PN}-2.10.9-respect_cxxflags.patch" \ + "${FILESDIR}/${PN}-2.10.10-mga-bison-parameter.patch" \ + "${FILESDIR}/${PN}-2.10.10-respect_cflags_cxxflags.patch" + + if ! use telnet; then + epatch "${FILESDIR}/${PN}-2.10.9-disable-telnet-symbols.patch" + 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 + + if [[ ! -z ${TARGET+set} ]]; then + ewarn "TARGET variable is set. Removing as it would break the build, bug #465722." + unset TARGET + fi +} + +src_configure() { + local myconf="" + + # plugins are disabled only if ! sound and ! video + if ! use sound && ! use video; then + myconf="${myconf} --disable-plugins" + else + myconf="${myconf} --enable-plugins" + fi + + # minsize: presets of features (overwritten by use flags) + # ansi-bool, atomicity: there is no reason to disable those features + # internalregex: we want to use system one + # sunaudio and bsdvideo are respectively for SunOS and BSD's + # appshare, vfw: only for windows + # samples: no need to build samples + # avc: disabled, bug 276514, upstream bug 2821744 + # mlib: SUN mediaLibs. Not in tree. + # pipechan, configfile, resolver, url: force enabling + econf ${myconf} \ + --disable-minsize \ + --enable-ansi-bool \ + --enable-atomicity \ + --disable-internalregex \ + --disable-sunaudio \ + --disable-bsdvideo \ + --disable-appshare \ + --disable-vfw \ + --disable-samples \ + --disable-avc \ + --disable-mlib \ + --enable-configfile \ + --enable-pipechan \ + --enable-resolver \ + --enable-url \ + $(use_enable alsa) \ + $(use_enable asn) \ + $(use_enable debug exceptions) \ + $(use_enable debug memcheck) \ + $(use_enable debug tracing) \ + $(use_enable dtmf) \ + --disable-esd \ + $(use_enable ffmpeg ffvdev) \ + $(use_enable ftp) \ + $(use_enable http) \ + $(use_enable http httpforms) \ + $(use_enable http httpsvc) \ + --disable-dc \ + $(use_enable ipv6) \ + $(use_enable jabber) \ + $(use_enable ldap openldap) \ + $(use_enable lua) \ + $(use_enable mail pop3smtp) \ + $(use_enable pulseaudio pulse) \ + $(use_enable odbc) \ + $(use_enable oss) \ + $(use_enable pch) \ + $(use_enable qos) \ + $(use_enable remote remconn) \ + $(use_enable sasl) \ + $(use_enable sdl) \ + $(use_enable serial) \ + $(use_enable shmvideo) \ + $(use_enable snmp) \ + $(use_enable soap) \ + $(use_enable socks) \ + $(use_enable sound audio) \ + $(use_enable ssl openssl) \ + $(use_enable stun) \ + $(use_enable telnet) \ + $(use_enable tts) \ + --disable-v4l \ + $(use_enable v4l v4l2) \ + $(use_enable video) $(use_enable video vidfile) \ + $(use_enable vxml) \ + $(use_enable wav wavfile) \ + $(use_enable xml expat) \ + $(use_enable xmlrpc) +} + +src_compile() { + local makeopts="" + tc-env_build + + use debug && makeopts="debug" + + emake ${makeopts} V=1 || die "emake failed" +} + +src_install() { + local makeopts="" + + use debug && makeopts="DEBUG=1" + + emake DESTDIR="${D}" ${makeopts} install || die "emake install failed" + + # Get rid of static libraries if not requested + # There seems to be no easy way to disable this in the build system + if ! use static-libs; then + rm -v "${D}"/usr/lib*/*.a || die + fi + + if use doc; then + dohtml -r "${WORKDIR}"/html/* || die "dohtml failed" + fi + + dodoc History.txt ReadMe.txt ReadMe_QOS.txt || die "dodoc failed" + + if use sound || use video; then + newdoc plugins/ReadMe.txt ReadMe-Plugins.txt || die "newdoc failed" + fi + + 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 + + if ! use sound || ! use video; then + ewarn "You have disabled sound or video USE flags." + ewarn "Most audio/video have been disabled silently even if enabled via USE flags." + ewarn "Having a feature enabled via use flag but disabled can lead to issues." + fi + + ewarn "If you've just removed pwlib to install ptlib, some packages will be broken." + ewarn "Please use 'revdep-rebuild' from app-portage/gentoolkit to check." + ewarn "If some packages need pwlib, consider removing ptlib and re-installing pwlib" + ewarn "or help us to make them live together." +}