/[gentoo-x86]/dev-libs/pwlib/pwlib-1.10.10-r3.ebuild
Gentoo

Contents of /dev-libs/pwlib/pwlib-1.10.10-r3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Sun Dec 15 11:49:42 2013 UTC (9 months, 2 weeks ago) by moult
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
dev-libs/pwlib removal (pending 11 July 2013), see #290062 and #290063 for reference.

1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-libs/pwlib/pwlib-1.10.10-r3.ebuild,v 1.3 2011/10/31 16:35:33 ssuominen Exp $
4
5 EAPI="1"
6
7 inherit eutils flag-o-matic multilib autotools toolchain-funcs
8
9 IUSE="alsa debug ipv6 ldap oss sasl sdl ssl v4l xml"
10
11 DESCRIPTION="Portable Multiplatform Class Libraries used by several VoIP applications"
12 HOMEPAGE="http://www.ekiga.org"
13 SRC_URI="http://www.ekiga.org/admin/downloads/latest/sources/sources/${P}.tar.gz"
14
15 LICENSE="MPL-1.1"
16 SLOT="0"
17 KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86"
18
19 RDEPEND="alsa? ( media-libs/alsa-lib )
20 ldap? ( >=net-nds/openldap-2.3.35 )
21 sasl? ( dev-libs/cyrus-sasl )
22 sdl? ( media-libs/libsdl )
23 ssl? ( dev-libs/openssl )
24 xml? ( dev-libs/expat )"
25 DEPEND="${RDEPEND}
26 >=sys-devel/bison-1.28
27 >=sys-devel/flex-2.5.4a
28 >=sys-apps/sed-4"
29
30 src_unpack() {
31 unpack ${A}
32 cd "${S}"
33
34 # use videodev2.h in v4l2 headers
35 sed -i -e 's:videodev.h:videodev2.h:' \
36 plugins/vidinput_v4l2/vidinput_v4l2.h \
37 include/ptlib/unix/ptlib/videoio.h || die
38
39 # filter out -O3, -Os and -mcpu embedded compiler flags
40 sed -i \
41 -e "s:-mcpu=\$(CPUTYPE)::" \
42 -e "s:-O3 -DNDEBUG:-DNDEBUG:" \
43 -e "s:-Os::" \
44 make/unix.mak
45
46 # don't break make install if there are no plugins to install
47 epatch "${FILESDIR}"/pwlib-1.8.7-instplugins.diff
48
49 # use sdl-config to query required libraries
50 epatch "${FILESDIR}"/pwlib-1.9.3-sdl-configure.patch
51
52 # this patch fixes bugs: #145424 and #140358
53 epatch "${FILESDIR}"/${PN}-1.10.2-asm.patch
54
55 # security - we obviousl need to patch..
56 epatch "${FILESDIR}"/pwlib-1.10.1-vsprintf.patch
57
58 epatch "${FILESDIR}"/${P}-openssl-1.patch
59
60 eautoconf
61 }
62
63 src_compile() {
64 tc-export CC CXX
65 local myconf=""
66 # may cause ICE (bug #70638)
67 filter-flags -fstack-protector
68 # disable-alsa breaks oss, see bug 127677
69 use alsa && myconf="--enable-alsa"
70
71 # disabling avc, bug 272848 and dc, bug 367085
72 econf \
73 --enable-plugins \
74 --disable-avc \
75 $(use_enable v4l v4l2) \
76 --disable-v4l \
77 --disable-dc \
78 $(use_enable oss) \
79 $(use_enable ipv6) \
80 $(use_enable sdl) \
81 $(use_enable ssl openssl) \
82 $(use_enable debug exceptions) \
83 $(use_enable debug memcheck) \
84 $(use_enable ldap openldap) \
85 $(use_enable sasl) \
86 $(use_enable xml expat) \
87 ${myconf}
88
89 # Horrible hack to strip out -L/usr/lib to allow upgrades
90 # problem is it adds -L/usr/lib before -L${S} when SSL is
91 # enabled. Same thing for -I/usr/include.
92 # sed -i -e "s:^\(LDFLAGS.*\)-L/usr/lib:\1:" \
93 # -e "s:^\(STDCCFLAGS.*\)-I/usr/include:\1:" \
94 # ${S}/make/ptbuildopts.mak
95
96 # sed -i -e "s:^\(LDFLAGS[\s]*=.*\) -L/usr/lib:\1:" \
97 # -e "s:^\(LDFLAGS[\s]*=.*\) -I/usr/include:\1:" \
98 # -e "s:^\(CCFLAGS[\s]*=.*\) -I/usr/include:\1:" \
99 # ${S}/make/ptlib-config
100
101 emake -j1 opt || die "make failed"
102 }
103
104 src_install() {
105 local libdir libname
106
107 libdir=$(get_libdir)
108
109 # makefile doesn't create ${D}/usr/bin
110 make PREFIX=/usr DESTDIR="${D}" install || die "install failed"
111
112 ## vv will try to fix the mess below, requires a lot of patching though...
113
114 # update 2005/08/22:
115 #
116 # locations in *.mak files haven been fixed
117 # directories have been replaced w/ symlinks
118 # (left to not break things, doing some testing atm)
119
120 # Note: reactivating this seems to be the only easy solution to slot pwlib ebuild
121 # and keep applications happy (e.g. gnomemeeting / ekiga)
122
123 # dosym /usr/include /usr/share/pwlib/include
124 # dosym /usr/${libdir} /usr/share/pwlib/${libdir}
125 #
126 # # just in case...
127 # if [[ "${libdir}" = "lib64" ]]; then
128 # dosym /usr/share/pwlib/lib64 /usr/share/pwlib/lib
129 # fi
130
131 ## ^^ bad stuff
132
133 # fix symlink
134 libname=$(basename "`ls "${D}"/usr/${libdir}/libpt_*_*_r.so.${PV}`")
135 rm "${D}"/usr/${libdir}/libpt.so
136 dosym ${libname} /usr/${libdir}/libpt.so
137
138 # fix makefiles to use headers from /usr/include and libs from /usr/lib
139 # instead of /usr/share/pwlib
140 # Note: change to /usr/include/pwlib-${PV} (or whereever includes will be)
141 # once pwlib ebuilds get slotted
142 sed -i -e "s:-I\$(PWLIBDIR)\(/include[a-zA-Z0-9_/-]\+\):-I/usr/include\1:g" \
143 -e "s:-I\$(PWLIBDIR)/include::g" \
144 -e "s:^\(PW_LIBDIR[ \t]\+=\).*:\1 /usr/${libdir}:" \
145 "${D}"/usr/share/pwlib/make/*.mak
146
147 # dodgy configure/makefiles forget to expand this
148 # Note: change to /usr/share/pwlib/${PV} (or whatever PWLIBDIR should point to)
149 # once pwlib ebuilds get slotted
150 sed -i -e "s:\${exec_prefix}:/usr:" \
151 "${D}"/usr/bin/ptlib-config \
152 "${D}"/usr/share/pwlib/make/ptlib-config
153
154 # copy version.h
155 insinto /usr/share/pwlib
156 doins version.h
157
158 dodoc ReadMe.txt ReadMe_QOS.txt History.txt
159 dohtml mpl-1.0.htm
160 }

  ViewVC Help
Powered by ViewVC 1.1.20