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

Contents of /dev-libs/pwlib/pwlib-1.10.5.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Tue Nov 20 07:25:56 2007 UTC (7 years ago) by leio
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +1 -1 lines
FILE REMOVED
Remove old security vulnerable versions
(Portage version: 2.1.3.19)

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

  ViewVC Help
Powered by ViewVC 1.1.20