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

Contents of /dev-libs/pwlib/pwlib-1.6.6-r2.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-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.6.6-r2.ebuild,v 1.4 2005/08/26 16:01:13 seemant Exp $
4
5 inherit eutils flag-o-matic multilib
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 ppc ~amd64 ~sparc ~alpha"
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 unpack ${A}
36 cd ${S}/make
37
38 # filter out -O3 and -mcpu embedded compiler flags
39 sed -i \
40 -e "s:-mcpu=\$(CPUTYPE)::" \
41 -e "s:-O3 -DNDEBUG:-DNDEBUG:" \
42 unix.mak
43
44 # small fix for firewire dc (camera) plugin
45 cd ${S}
46 epatch ${FILESDIR}/${P}-ieee1394dc-fix.diff
47
48 # dmix patch for alsa support (#68553)
49 epatch ${FILESDIR}/${P}-alsa_dmix.diff
50
51 # newer esound package doesn't install libesd.a anymore,
52 # use dynamic library instead (fixes #100432)
53 epatch ${FILESDIR}/pwlib-1.6.3-dyn-esd.patch
54 }
55
56 src_compile() {
57 local plugins
58 local myconf
59
60 # may cause ICE (bug #70638)
61 filter-flags -fstack-protector
62
63 if use ssl; then
64 export OPENSSLFLAG=1
65 export OPENSSLDIR="/usr"
66 export OPENSSLLIBS="-lssl -lcrypt"
67 fi
68
69 ## gnomemeeting-1.00 requires pwlib to be built w/ IPV6 support
70 ## (even if itself is built without...)
71 #use ipv6 \
72 # && myconf="${myconf} --enable-ipv6" \
73 # || myconf="${myconf} --disable-ipv6"
74 myconf="${myconf} --enable-ipv6"
75
76 # plugins, oss and v4l are default
77 plugins="oss v4l"
78
79 use ieee1394 \
80 && plugins="${plugins} avc dc"
81
82 use alsa \
83 && plugins="${plugins} alsa"
84
85 if use esd; then
86 # fixes bug #45059
87 export ESDDIR=/usr
88 fi
89
90 # merge plugin options (safe way if default = "")
91 plugins="`echo ${plugins} | sed -e "y: :,:"`"
92
93 econf ${myconf} \
94 --enable-plugins \
95 --with-plugins=${plugins} || die "configure failed"
96
97 # Horrible hack to strip out -L/usr/lib to allow upgrades
98 # problem is it adds -L/usr/lib before -L${S} when SSL is
99 # enabled. Same thing for -I/usr/include.
100 sed -i -e "s:^\(LDFLAGS.*\)-L/usr/lib:\1:" \
101 -e "s:^\(STDCCFLAGS.*\)-I/usr/include:\1:" \
102 ${S}/make/ptbuildopts.mak
103 sed -i -e "s:^\(LDFLAGS[\s]*=.*\) -L/usr/lib:\1:" \
104 -e "s:^\(LDFLAGS[\s]*=.*\) -I/usr/include:\1:" \
105 -e "s:^\(CCFLAGS[\s]*=.*\) -I/usr/include:\1:" \
106 ${S}/make/ptlib-config
107
108 # remove -fno-rtti, this breaks various things *grr*
109 sed -i -e "s:-fno-rtti::" \
110 make/ptbuildopts.mak
111 sed -i -e "s:-fno-rtti::" \
112 make/ptlib-config
113
114 emake -j1 opt || die "make failed"
115 emake -j1 PWLIBDIR=${S} -C plugins opt || die "make plugins failed"
116 }
117
118 src_install() {
119 # make these because the makefile isn't smart enough
120 dodir /usr/bin /usr/$(get_libdir) /usr/share /usr/include
121 make PREFIX=/usr DESTDIR=${D} install || die "install failed"
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 # fix symlink
140 # only amd64 needs special handling, afaics
141 rm ${D}/usr/$(get_libdir)/libpt.so
142 if use amd64; then
143 dosym /usr/$(get_libdir)/libpt_linux_x86_64_r.so.${PV} /usr/$(get_libdir)/libpt.so
144 else
145 dosym /usr/$(get_libdir)/libpt_linux_${ARCH}_r.so.${PV} /usr/$(get_libdir)/libpt.so
146 fi
147
148 # strip ${S} stuff
149 dosed "s:^PWLIBDIR.*:PWLIBDIR=/usr/share/pwlib:" /usr/bin/ptlib-config
150 dosed "s:^PWLIBDIR.*:PWLIBDIR=/usr/share/pwlib:" /usr/share/pwlib/make/ptbuildopts.mak
151
152 # dodgy configure/makefiles forget to expand this
153 dosed 's:${exec_prefix}:/usr:' /usr/bin/ptlib-config
154
155 # satisfy ptlib.mak's weird definition (should check if true for future versions)
156 cp ${D}/usr/bin/ptlib-config ${D}/usr/share/pwlib/make/ptlib-config
157
158 # copy version.h
159 insinto /usr/share/pwlib
160 doins version.h
161
162 dodoc ReadMe.txt History.txt
163 }

  ViewVC Help
Powered by ViewVC 1.1.20