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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Tue Nov 20 07:25:56 2007 UTC (6 years, 9 months ago) by leio
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +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.7.ebuild,v 1.2 2007/04/16 14:37:31 drizzt Exp $
4
5 inherit eutils flag-o-matic multilib autotools toolchain-funcs
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.35 )
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 tc-export CC CXX
57 local myconf=""
58 # may cause ICE (bug #70638)
59 filter-flags -fstack-protector
60 # disable-alsa breaks oss, see bug 127677
61 use alsa && myconf="--enable-alsa"
62
63 econf \
64 --enable-plugins \
65 $(use_enable v4l2) \
66 $(use_enable v4l) \
67 $(use_enable ieee1394 dc) \
68 $(use_enable ieee1394 avc) \
69 $(use_enable oss) \
70 $(use_enable ipv6) \
71 $(use_enable sdl) \
72 $(use_enable ssl openssl) \
73 $(use_enable debug exceptions) \
74 $(use_enable debug memcheck) \
75 $(use_enable ldap openldap) \
76 $(use_enable sasl) \
77 $(use_enable xml expat) \
78 ${myconf} \
79 || die "configure failed"
80
81 # Horrible hack to strip out -L/usr/lib to allow upgrades
82 # problem is it adds -L/usr/lib before -L${S} when SSL is
83 # enabled. Same thing for -I/usr/include.
84 # sed -i -e "s:^\(LDFLAGS.*\)-L/usr/lib:\1:" \
85 # -e "s:^\(STDCCFLAGS.*\)-I/usr/include:\1:" \
86 # ${S}/make/ptbuildopts.mak
87
88 # sed -i -e "s:^\(LDFLAGS[\s]*=.*\) -L/usr/lib:\1:" \
89 # -e "s:^\(LDFLAGS[\s]*=.*\) -I/usr/include:\1:" \
90 # -e "s:^\(CCFLAGS[\s]*=.*\) -I/usr/include:\1:" \
91 # ${S}/make/ptlib-config
92
93 emake -j1 opt || die "make failed"
94 }
95
96 src_install() {
97 local libdir libname
98
99 libdir=$(get_libdir)
100
101 # makefile doesn't create ${D}/usr/bin
102 make PREFIX=/usr DESTDIR="${D}" install || die "install failed"
103
104 ## vv will try to fix the mess below, requires a lot of patching though...
105
106 # update 2005/08/22:
107 #
108 # locations in *.mak files haven been fixed
109 # directories have been replaced w/ symlinks
110 # (left to not break things, doing some testing atm)
111
112 # Note: reactivating this seems to be the only easy solution to slot pwlib ebuild
113 # and keep applications happy (e.g. gnomemeeting / ekiga)
114
115 # dosym /usr/include /usr/share/pwlib/include
116 # dosym /usr/${libdir} /usr/share/pwlib/${libdir}
117 #
118 # # just in case...
119 # if [[ "${libdir}" = "lib64" ]]; then
120 # dosym /usr/share/pwlib/lib64 /usr/share/pwlib/lib
121 # fi
122
123 ## ^^ bad stuff
124
125 # fix symlink
126 libname=$(basename "`ls "${D}"/usr/${libdir}/libpt_*_*_r.so.${PV}`")
127 rm "${D}"/usr/${libdir}/libpt.so
128 dosym ${libname} /usr/${libdir}/libpt.so
129
130 # fix makefiles to use headers from /usr/include and libs from /usr/lib
131 # instead of /usr/share/pwlib
132 # Note: change to /usr/include/pwlib-${PV} (or whereever includes will be)
133 # once pwlib ebuilds get slotted
134 sed -i -e "s:-I\$(PWLIBDIR)\(/include[a-zA-Z0-9_/-]\+\):-I/usr/include\1:g" \
135 -e "s:-I\$(PWLIBDIR)/include::g" \
136 -e "s:^\(PW_LIBDIR[ \t]\+=\).*:\1 /usr/${libdir}:" \
137 "${D}"/usr/share/pwlib/make/*.mak
138
139 # dodgy configure/makefiles forget to expand this
140 # Note: change to /usr/share/pwlib/${PV} (or whatever PWLIBDIR should point to)
141 # once pwlib ebuilds get slotted
142 sed -i -e "s:\${exec_prefix}:/usr:" \
143 "${D}"/usr/bin/ptlib-config \
144 "${D}"/usr/share/pwlib/make/ptlib-config
145
146 # copy version.h
147 insinto /usr/share/pwlib
148 doins version.h
149
150 dodoc ReadMe.txt ReadMe_QOS.txt History.txt
151 dohtml mpl-1.0.htm
152 }

  ViewVC Help
Powered by ViewVC 1.1.20