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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.12 - (show annotations) (download)
Sat Apr 14 08:16:57 2007 UTC (7 years, 5 months ago) by genstef
Branch: MAIN
CVS Tags: HEAD
Changes since 1.11: +1 -1 lines
FILE REMOVED
remove old
(Portage version: 2.1.2.3)

1 # Copyright 1999-2006 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.1.ebuild,v 1.11 2006/10/20 00:30:58 kloeri Exp $
4
5 inherit eutils flag-o-matic multilib
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 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 !>=media-libs/libdc1394-2.0.0_pre1 )
23 ldap? ( net-nds/openldap )
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 # # fix "command not found" error during configure run
48 # epatch ${FILESDIR}/pwlib-1.9.2-ldap-configure.patch
49
50 # use sdl-config to query required libraries
51 epatch ${FILESDIR}/pwlib-1.9.3-sdl-configure.patch
52
53 autoconf || die "autoconf failed"
54 }
55
56 src_compile() {
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 mpl-1.0.htm
151 }

  ViewVC Help
Powered by ViewVC 1.1.20