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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10 - (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.9: +1 -1 lines
FILE REMOVED
remove old
(Portage version: 2.1.2.3)

1 # Copyright 1999-2005 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.4.ebuild,v 1.9 2005/09/12 15:49:52 agriffis Exp $
4
5 inherit eutils flag-o-matic multilib
6
7 IUSE="ssl sdl ieee1394 alsa esd 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 ~sparc ~x86"
16
17 DEPEND=">=sys-devel/bison-1.28
18 >=sys-devel/flex-2.5.4a
19 dev-libs/expat
20 >=sys-apps/sed-4
21 net-nds/openldap
22 sdl? ( media-libs/libsdl )
23 ssl? ( dev-libs/openssl )
24 alsa? ( media-libs/alsa-lib )
25 ieee1394? ( media-libs/libdv
26 sys-libs/libavc1394
27 sys-libs/libraw1394
28 <media-libs/libdc1394-1.9.9
29 !>=media-libs/libdc1394-2.0.0_pre0 )
30 esd? ( media-sound/esound )"
31
32 src_unpack() {
33 unpack ${A}
34
35 cd ${S}
36
37 # filter out -O3 and -mcpu embedded compiler flags
38 sed -i \
39 -e "s:-mcpu=\$(CPUTYPE)::" \
40 -e "s:-O3 -DNDEBUG:-DNDEBUG:" \
41 make/unix.mak
42
43 # newer esound package doesn't install libesd.a anymore,
44 # use dynamic library instead (fixes #100432)
45 epatch ${FILESDIR}/pwlib-1.6.3-dyn-esd.patch
46
47 # gcc-4 patch
48 epatch ${FILESDIR}/pwlib-1.8.4-gcc4.diff
49 }
50
51 src_compile() {
52 local myconf
53
54 # may cause ICE (bug #70638)
55 filter-flags -fstack-protector
56
57 if use ssl; then
58 export OPENSSLFLAG=1
59 export OPENSSLDIR="/usr"
60 export OPENSSLLIBS="-lssl -lcrypt"
61 fi
62
63 ## gnomemeeting-1.00 requires pwlib to be built w/ IPV6 support
64 ## (even if itself is built without...)
65 #use ipv6 \
66 # && myconf="${myconf} --enable-ipv6" \
67 # || myconf="${myconf} --disable-ipv6"
68
69 # enable default plugins and force ipv6 support
70 myconf="--enable-ipv6 --enable-oss --enable-v4l"
71
72 use ieee1394 \
73 && myconf="${myconf} --enable-avc --enable-dc" \
74 || myconf="${myconf} --disable-avc --disable-dc"
75
76 # --disable-alsa breaks configure
77 use alsa \
78 && myconf="${myconf} --enable-alsa"
79
80 if use esd; then
81 # fixes bug #45059
82 export ESDDIR=/usr
83
84 # ESD includes are in /usr/include?
85 # remove include path, bad things may happen if we leave it in there
86 sed -i -e "s:-I\$(ESDDIR)/include::" \
87 ${S}/make/unix.mak
88 fi
89
90 econf \
91 --enable-plugins \
92 $(use_enable v4l2) \
93 $(use_enable sdl) \
94 ${myconf} || die "configure failed"
95
96 # Horrible hack to strip out -L/usr/lib to allow upgrades
97 # problem is it adds -L/usr/lib before -L${S} when SSL is
98 # enabled. Same thing for -I/usr/include.
99 sed -i -e "s:^\(LDFLAGS.*\)-L/usr/lib:\1:" \
100 -e "s:^\(STDCCFLAGS.*\)-I/usr/include:\1:" \
101 ${S}/make/ptbuildopts.mak
102 sed -i -e "s:^\(LDFLAGS[\s]*=.*\) -L/usr/lib:\1:" \
103 -e "s:^\(LDFLAGS[\s]*=.*\) -I/usr/include:\1:" \
104 -e "s:^\(CCFLAGS[\s]*=.*\) -I/usr/include:\1:" \
105 ${S}/make/ptlib-config
106
107 emake -j1 opt || die "make failed"
108 }
109
110 src_install() {
111 # makefile doesn't create ${D}/usr/bin
112 dodir /usr/bin
113 make PREFIX=/usr DESTDIR=${D} install || die "install failed"
114
115 ## vv will try to fix the mess below, requires a lot of patching though...
116
117 # these are for compiling openh323
118 # NOTE: symlinks don't work when upgrading
119 # FIXME: probably should fix this with ptlib-config
120 dodir /usr/share/pwlib/include
121 cp -r ${D}/usr/include/* ${D}/usr/share/pwlib/include
122
123 dodir /usr/share/pwlib/$(get_libdir)
124 for x in ${D}/usr/$(get_libdir)/*; do
125 dosym /usr/$(get_libdir)/`basename ${x}` /usr/share/pwlib/$(get_libdir)/`basename ${x}`
126 done
127
128 # just in case...
129 if [[ "$(get_libdir)" = "lib64" ]]; then
130 dosym /usr/share/pwlib/$(get_libdir) /usr/share/pwlib/lib
131 fi
132
133 ## ^^ bad stuff
134
135 # fix symlink
136 # only amd64 needs special handling, afaics
137 rm ${D}/usr/$(get_libdir)/libpt.so
138 if use amd64; then
139 dosym /usr/$(get_libdir)/libpt_linux_x86_64_r.so.${PV} /usr/$(get_libdir)/libpt.so
140 else
141 dosym /usr/$(get_libdir)/libpt_linux_${ARCH}_r.so.${PV} /usr/$(get_libdir)/libpt.so
142 fi
143
144 # strip ${S} stuff
145 dosed "s:^PWLIBDIR.*:PWLIBDIR=/usr/share/pwlib:" /usr/bin/ptlib-config
146 dosed "s:^PWLIBDIR.*:PWLIBDIR=/usr/share/pwlib:" /usr/share/pwlib/make/ptbuildopts.mak
147
148 # dodgy configure/makefiles forget to expand this
149 dosed 's:${exec_prefix}:/usr:' /usr/bin/ptlib-config
150
151 # copy version.h
152 insinto /usr/share/pwlib
153 doins version.h
154
155 dodoc ReadMe.txt ReadMe_QOS.txt History.txt mpl-1.0.htm
156 }

  ViewVC Help
Powered by ViewVC 1.1.20