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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10 - (show annotations) (download)
Mon Aug 15 19:19:36 2005 UTC (9 years, 4 months ago) by stkn
Branch: MAIN
CVS Tags: HEAD
Changes since 1.9: +1 -1 lines
FILE REMOVED
Removing obsolete ebuilds.
(Portage version: 2.0.51.22-r2)

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.ebuild,v 1.9 2005/07/27 10:35:08 pvdabeel Exp $
4
5 inherit eutils flag-o-matic
6
7 IUSE="ssl sdl ieee1394 alsa esd"
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"
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-plugins/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
47 src_compile() {
48 local plugins
49 local myconf
50
51 # may cause ICE (bug #70638)
52 filter-flags -fstack-protector
53
54 if use ssl; then
55 export OPENSSLFLAG=1
56 export OPENSSLDIR="/usr"
57 export OPENSSLLIBS="-lssl -lcrypt"
58 fi
59
60 ## gnomemeeting-1.00 requires pwlib to be built w/ IPV6 support
61 ## (even if itself is built without...)
62 #use ipv6 \
63 # && myconf="${myconf} --enable-ipv6" \
64 # || myconf="${myconf} --disable-ipv6"
65 myconf="${myconf} --enable-ipv6"
66
67 # plugins, oss and v4l are default
68 plugins="oss v4l"
69
70 use ieee1394 \
71 && plugins="${plugins} avc dc"
72
73 use alsa \
74 && plugins="${plugins} alsa"
75
76 if use esd; then
77 # fixes bug #45059
78 export ESDDIR=/usr
79
80 # ESD includes are in /usr/include?
81 # remove include path, bad things may happen if we leave it in there
82 sed -i -e "s:-I\$(ESDDIR)/include::" \
83 ${S}/make/unix.mak
84 fi
85
86 # merge plugin options (safe way if default = "")
87 plugins="$(echo ${plugins} | sed -e "y: :,:")"
88
89 econf ${myconf} \
90 --enable-plugins \
91 --with-plugins=${plugins} || die "configure failed"
92
93 # Horrible hack to strip out -L/usr/lib to allow upgrades
94 # problem is it adds -L/usr/lib before -L${S} when SSL is
95 # enabled. Same thing for -I/usr/include.
96 sed -i -e "s:^\(LDFLAGS.*\)-L/usr/lib:\1:" \
97 -e "s:^\(STDCCFLAGS.*\)-I/usr/include:\1:" \
98 ${S}/make/ptbuildopts.mak
99 sed -i -e "s:^\(LDFLAGS[\s]*=.*\) -L/usr/lib:\1:" \
100 -e "s:^\(LDFLAGS[\s]*=.*\) -I/usr/include:\1:" \
101 -e "s:^\(CCFLAGS[\s]*=.*\) -I/usr/include:\1:" \
102 ${S}/make/ptlib-config
103
104 emake -j1 opt || die "make failed"
105 }
106
107 src_install() {
108 # makefile doesn't create ${D}/usr/bin
109 dodir /usr/bin
110 make PREFIX=${D}/usr install || die "install failed"
111
112 ## vv will try to fix the mess below, requires a lot of patching though...
113
114 # these are for compiling openh323
115 # NOTE: symlinks don't work when upgrading
116 # FIXME: probably should fix this with ptlib-config
117 dodir /usr/share/pwlib/include
118 cp -r ${D}/usr/include/* ${D}/usr/share/pwlib/include
119
120 dodir /usr/share/pwlib/lib
121 for x in ${D}/usr/lib/*; do
122 dosym /usr/lib/`basename ${x}` /usr/share/pwlib/lib/`basename ${x}`
123 done
124
125 ## ^^ bad stuff
126
127 # fix symlink
128 # only amd64 needs special handling, afaiks
129 rm ${D}/usr/lib/libpt.so
130 if use amd64; then
131 dosym /usr/lib/libpt_linux_x86_64_r.so.${PV} /usr/lib/libpt.so
132 else
133 dosym /usr/lib/libpt_linux_${ARCH}_r.so.${PV} /usr/lib/libpt.so
134 fi
135
136 # strip ${S} stuff
137 dosed "s:^PWLIBDIR.*:PWLIBDIR=/usr/share/pwlib:" /usr/bin/ptlib-config
138 dosed "s:^PWLIBDIR.*:PWLIBDIR=/usr/share/pwlib:" /usr/share/pwlib/make/ptbuildopts.mak
139
140 # dodgy configure/makefiles forget to expand this
141 dosed 's:${exec_prefix}:/usr:' /usr/bin/ptlib-config
142
143 # copy version.h
144 insinto /usr/share/pwlib
145 doins version.h
146
147 dodoc ReadMe.txt ReadMe_QOS.txt History.txt ChangeLog mpl-1.0.htm
148 }

  ViewVC Help
Powered by ViewVC 1.1.20