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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (show annotations) (download)
Tue Sep 13 18:21:57 2011 UTC (3 years, 3 months ago) by ssuominen
Branch: MAIN
CVS Tags: HEAD
Changes since 1.8: +1 -1 lines
FILE REMOVED
[This is a placeholder. Please ignore.]

(Portage version: 2.2.0_alpha55/cvs/Linux x86_64)

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

  ViewVC Help
Powered by ViewVC 1.1.20