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

Contents of /dev-libs/pwlib/pwlib-1.8.3-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.20