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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Sat Apr 14 08:16:57 2007 UTC (7 years, 4 months ago) by genstef
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +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.8.7.ebuild,v 1.4 2006/07/12 09:03:46 corsair Exp $
4
5 inherit eutils flag-o-matic multilib
6
7 IUSE="alsa esd ieee1394 oss sdl ssl v4l2"
8
9 DESCRIPTION="Portable Multiplatform Class Libraries for OpenH323"
10 HOMEPAGE="http://www.openh323.org/"
11 SRC_URI="http://www.gnomemeeting.org/admin/downloads/latest/sources/sources/${P}.tar.gz"
12
13 LICENSE="MPL-1.1"
14 SLOT="0"
15 KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86"
16
17 RDEPEND="
18 dev-libs/expat
19 net-nds/openldap
20 esd? ( media-sound/esound )
21 sdl? ( media-libs/libsdl )
22 ssl? ( dev-libs/openssl )
23 alsa? ( media-libs/alsa-lib )
24 ieee1394? ( media-libs/libdv
25 sys-libs/libavc1394
26 sys-libs/libraw1394
27 <media-libs/libdc1394-1.9.9
28 !>=media-libs/libdc1394-2.0.0_pre0 )"
29
30 DEPEND="${REDEPEND}
31 >=sys-devel/bison-1.28
32 >=sys-devel/flex-2.5.4a
33 >=sys-apps/sed-4"
34
35 src_unpack() {
36 unpack ${A}
37
38 cd ${S}
39 # filter out -O3 and -mcpu embedded compiler flags
40 sed -i \
41 -e "s:-mcpu=\$(CPUTYPE)::" \
42 -e "s:-O3 -DNDEBUG:-DNDEBUG:" \
43 make/unix.mak
44
45 # newer esound package doesn't install libesd.a anymore,
46 # use dynamic library instead (fixes #100432)
47 epatch ${FILESDIR}/pwlib-1.6.3-dyn-esd.patch
48
49 # don't break make install if there are no plugins to install
50 epatch ${FILESDIR}/pwlib-1.8.7-instplugins.diff
51
52 # gcc-4 patch
53 epatch ${FILESDIR}/pwlib-1.8.4-gcc4.diff
54 epatch "${FILESDIR}"/${P}-gcc41.patch
55 epatch ${FILESDIR}/${P}-gcc-4.1-v4l2.patch
56
57 }
58
59 src_compile() {
60 local myconf
61
62 # may cause ICE (bug #70638)
63 filter-flags -fstack-protector
64
65 if use ssl; then
66 export OPENSSLFLAG=1
67 export OPENSSLDIR="/usr"
68 export OPENSSLLIBS="-lssl -lcrypt"
69 fi
70
71 ## gnomemeeting-1.00 requires pwlib to be built w/ IPV6 support
72 ## (even if itself is built without...)
73 #use ipv6 \
74 # && myconf="${myconf} --enable-ipv6" \
75 # || myconf="${myconf} --disable-ipv6"
76
77 # enable default plugins and force ipv6
78 myconf="--enable-ipv6 --enable-v4l"
79
80 use ieee1394 \
81 && myconf="${myconf} --enable-avc --enable-dc" \
82 || myconf="${myconf} --disable-avc --disable-dc"
83
84 use alsa \
85 && myconf="${myconf} --enable-alsa"
86
87 if use esd; then
88 # fixes bug #45059
89 export ESDDIR=/usr
90
91 # ESD includes are in /usr/include?
92 # remove include path, bad things may happen if we leave it in there
93 sed -i -e "s:-I\$(ESDDIR)/include::" \
94 ${S}/make/unix.mak
95 fi
96
97 econf \
98 --enable-plugins \
99 $(use_enable v4l2) \
100 $(use_enable sdl) \
101 $(use_enable oss) \
102 ${myconf} || die "configure failed"
103
104 # Horrible hack to strip out -L/usr/lib to allow upgrades
105 # problem is it adds -L/usr/lib before -L${S} when SSL is
106 # enabled. Same thing for -I/usr/include.
107 sed -i -e "s:^\(LDFLAGS.*\)-L/usr/lib:\1:" \
108 -e "s:^\(STDCCFLAGS.*\)-I/usr/include:\1:" \
109 ${S}/make/ptbuildopts.mak
110
111 sed -i -e "s:^\(LDFLAGS[\s]*=.*\) -L/usr/lib:\1:" \
112 -e "s:^\(LDFLAGS[\s]*=.*\) -I/usr/include:\1:" \
113 -e "s:^\(CCFLAGS[\s]*=.*\) -I/usr/include:\1:" \
114 ${S}/make/ptlib-config
115
116 emake -j1 opt || die "make failed"
117 }
118
119 src_install() {
120 local libdir libname
121
122 libdir=$(get_libdir)
123
124 # makefile doesn't create ${D}/usr/bin
125 dodir /usr/bin
126 make PREFIX=/usr DESTDIR=${D} install || die "install failed"
127
128 # fix symlink
129 rm ${D}/usr/${libdir}/libpt.so
130
131 libname=$(basename `ls ${D}/usr/${libdir}/libpt_*_*_r.so.${PV}`)
132 dosym /usr/${libdir}/${libname} /usr/${libdir}/libpt.so
133
134 # strip ${S} stuff
135 sed -i -e "s:^PWLIBDIR.*:PWLIBDIR=/usr/share/pwlib:" \
136 ${D}/usr/bin/ptlib-config \
137 ${D}/usr/share/pwlib/make/ptlib-config \
138 ${D}/usr/share/pwlib/make/ptbuildopts.mak
139
140 # fix makefiles to use headers from /usr/include and libs from /usr/lib
141 # instead of /usr/share/pwlib
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 sed -i -e "s:\${exec_prefix}:/usr:" \
149 ${D}/usr/bin/ptlib-config \
150 ${D}/usr/share/pwlib/make/ptlib-config
151
152 # copy version.h
153 insinto /usr/share/pwlib
154 doins version.h
155
156 dodoc ReadMe.txt ReadMe_QOS.txt History.txt mpl-1.0.htm
157 }

  ViewVC Help
Powered by ViewVC 1.1.20