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

Contents of /dev-libs/pwlib/pwlib-1.6.3-r3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (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.3: +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.3-r3.ebuild,v 1.3 2005/09/02 22:47:08 stkn Exp $
4
5 inherit eutils multilib
6
7 IUSE="ssl sdl ieee1394 alsa esd"
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="x86 sparc amd64 ppc alpha"
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 esd? ( media-sound/esound )"
29
30 S=${WORKDIR}/${PN}
31
32 src_unpack() {
33 unpack ${A}
34 cd ${S}/make
35
36 # filter out -O3 and -mcpu embedded compiler flags
37 sed -i \
38 -e "s:-mcpu=\$(CPUTYPE)::" \
39 -e "s:-O3 -DNDEBUG:-DNDEBUG:" \
40 unix.mak
41
42 # newer esound package doesn't install libesd.a anymore,
43 # use dynamic library instead (fixes #100432)
44 epatch ${FILESDIR}/pwlib-1.6.3-dyn-esd.patch
45 }
46
47 src_compile() {
48 local plugins
49 local myconf
50
51 if use ssl; then
52 export OPENSSLFLAG=1
53 export OPENSSLDIR="/usr"
54 export OPENSSLLIBS="-lssl -lcrypt"
55 fi
56
57 ## gnomemeeting-1.00 requires pwlib to be built w/ IPV6 support
58 ## (even if itself is built without...)
59 #use ipv6 \
60 # && myconf="${myconf} --enable-ipv6" \
61 # || myconf="${myconf} --disable-ipv6"
62 myconf="${myconf} --enable-ipv6"
63
64 # plugins, oss and v4l are default
65 plugins="oss v4l"
66
67 use ieee1394 \
68 && plugins="${plugins} avc"
69
70 use alsa \
71 && plugins="${plugins} alsa"
72
73 if use esd; then
74 # fixes bug #45059
75 export ESDDIR=/usr
76 fi
77
78 # merge plugin options (safe way if default = "")
79 plugins="`echo ${plugins} | sed -e "y: :,:"`"
80
81 econf ${myconf} \
82 --enable-plugins \
83 --with-plugins=${plugins} || die "configure failed"
84
85 # Horrible hack to strip out -L/usr/lib to allow upgrades
86 # problem is it adds -L/usr/lib before -L${S} when SSL is
87 # enabled. Same thing for -I/usr/include.
88 sed -i -e "s:^\(LDFLAGS.*\)-L/usr/lib:\1:" \
89 -e "s:^\(STDCCFLAGS.*\)-I/usr/include:\1:" \
90 ${S}/make/ptbuildopts.mak
91 sed -i -e "s:^\(LDFLAGS[\s]*=.*\) -L/usr/lib:\1:" \
92 -e "s:^\(LDFLAGS[\s]*=.*\) -I/usr/include:\1:" \
93 -e "s:^\(CCFLAGS[\s]*=.*\) -I/usr/include:\1:" \
94 ${S}/make/ptlib-config
95
96 # remove -fno-rtti, this breaks various things *grr*
97 sed -i -e "s:-fno-rtti::" \
98 make/ptbuildopts.mak
99 sed -i -e "s:-fno-rtti::" \
100 make/ptlib-config
101
102 emake -j1 opt || die "make failed"
103 emake -j1 PWLIBDIR=${S} -C plugins opt || die "make plugins failed"
104 }
105
106 src_install() {
107 # make these because the makefile isn't smart enough
108 dodir /usr/bin /usr/$(get_libdir) /usr/share /usr/include
109 make PREFIX=/usr DESTDIR=${D} install || die "install failed"
110
111 # these are for compiling openh323
112 # NOTE: symlinks don't work when upgrading
113 # FIXME: probably should fix this with ptlib-config
114 dodir /usr/share/pwlib/include
115 cp -r ${D}/usr/include/* ${D}/usr/share/pwlib/include
116
117 dodir /usr/share/pwlib/$(get_libdir)
118 for x in ${D}/usr/$(get_libdir)/*; do
119 dosym /usr/$(get_libdir)/`basename ${x}` /usr/share/pwlib/$(get_libdir)/`basename ${x}`
120 done
121
122 # just in case...
123 if [[ "$(get_libdir)" = "lib64" ]]; then
124 dosym /usr/share/pwlib/$(get_libdir) /usr/share/pwlib/lib
125 fi
126
127 # remove CVS dirs
128 find ${D} -name CVS -type d | xargs rm -rf
129
130 # fix symlink
131 # only amd64 needs special handling, afaics
132 rm ${D}/usr/$(get_libdir)/libpt.so
133 if [ ${ARCH} = "amd64" ] ; then
134 dosym /usr/$(get_libdir)/libpt_linux_x86_64_r.so.${PV} /usr/$(get_libdir)/libpt.so
135 else
136 dosym /usr/$(get_libdir)/libpt_linux_${ARCH}_r.so.${PV} /usr/$(get_libdir)/libpt.so
137 fi
138
139 # strip ${S} stuff
140 dosed "s:^PWLIBDIR.*:PWLIBDIR=/usr/share/pwlib:" /usr/bin/ptlib-config
141 dosed "s:^PWLIBDIR.*:PWLIBDIR=/usr/share/pwlib:" /usr/share/pwlib/make/ptbuildopts.mak
142
143 # dodgy configure/makefiles forget to expand this
144 dosed 's:${exec_prefix}:/usr:' /usr/bin/ptlib-config
145
146 # satisfy ptlib.mak's weird definition (should check if true for future versions)
147 cp ${D}/usr/bin/ptlib-config ${D}/usr/share/pwlib/make/ptlib-config
148
149 # copy version.h
150 insinto /usr/share/pwlib
151 doins version.h
152
153 dodoc ReadMe.txt History.txt
154 }

  ViewVC Help
Powered by ViewVC 1.1.20