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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.13 - (show annotations) (download)
Mon Aug 15 19:19:36 2005 UTC (9 years ago) by stkn
Branch: MAIN
CVS Tags: HEAD
Changes since 1.12: +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.6.3-r2.ebuild,v 1.12 2005/01/08 20:12:42 stkn Exp $
4
5 IUSE="ssl sdl ieee1394 alsa esd"
6
7 DESCRIPTION="Portable Multiplatform Class Libraries for OpenH323"
8 HOMEPAGE="http://www.openh323.org/"
9 SRC_URI="http://www.gnomemeeting.org/admin/downloads/latest/sources/sources/${P}.tar.gz"
10
11 LICENSE="MPL-1.1"
12 SLOT="0"
13 KEYWORDS="x86 sparc amd64 ppc alpha"
14
15 DEPEND=">=sys-devel/bison-1.28
16 >=sys-devel/flex-2.5.4a
17 dev-libs/expat
18 >=sys-apps/sed-4
19 net-nds/openldap
20 sdl? ( media-libs/libsdl )
21 ssl? ( dev-libs/openssl )
22 alsa? ( media-libs/alsa-lib )
23 ieee1394? ( media-libs/libdv
24 sys-libs/libavc1394
25 sys-libs/libraw1394 )
26 esd? ( media-sound/esound )"
27
28 MAKEOPTS="${MAKEOPTS} -j1"
29 S=${WORKDIR}/${PN}
30
31 src_unpack() {
32 unpack ${A}
33 cd ${S}/make
34
35 # filter out -O3 and -mcpu embedded compiler flags
36 sed -i \
37 -e "s:-mcpu=\$(CPUTYPE)::" \
38 -e "s:-O3 -DNDEBUG:-DNDEBUG:" \
39 unix.mak
40 }
41
42 src_compile() {
43 local plugins
44 local myconf
45
46 if use ssl; then
47 export OPENSSLFLAG=1
48 export OPENSSLDIR="/usr"
49 export OPENSSLLIBS="-lssl -lcrypt"
50 fi
51
52 ## gnomemeeting-1.00 requires pwlib to be built w/ IPV6 support
53 ## (even if itself is built without...)
54 #use ipv6 \
55 # && myconf="${myconf} --enable-ipv6" \
56 # || myconf="${myconf} --disable-ipv6"
57 myconf="${myconf} --enable-ipv6"
58
59 # plugins, oss and v4l are default
60 plugins="oss v4l"
61
62 use ieee1394 \
63 && plugins="${plugins} avc"
64
65 use alsa \
66 && plugins="${plugins} alsa"
67
68 if use esd; then
69 # fixes bug #45059
70 export ESDDIR=/usr
71 fi
72
73 # merge plugin options (safe way if default = "")
74 plugins="`echo ${plugins} | sed -e "y: :,:"`"
75
76 econf ${myconf} \
77 --enable-plugins \
78 --with-plugins=${plugins} || die "configure failed"
79
80 # Horrible hack to strip out -L/usr/lib to allow upgrades
81 # problem is it adds -L/usr/lib before -L${S} when SSL is
82 # enabled. Same thing for -I/usr/include.
83 sed -i -e "s:^\(LDFLAGS.*\)-L/usr/lib:\1:" \
84 -e "s:^\(STDCCFLAGS.*\)-I/usr/include:\1:" \
85 ${S}/make/ptbuildopts.mak
86 sed -i -e "s:^\(LDFLAGS[\s]*=.*\) -L/usr/lib:\1:" \
87 -e "s:^\(LDFLAGS[\s]*=.*\) -I/usr/include:\1:" \
88 -e "s:^\(CCFLAGS[\s]*=.*\) -I/usr/include:\1:" \
89 ${S}/make/ptlib-config
90
91 # remove -fno-rtti, this breaks various things *grr*
92 sed -i -e "s:-fno-rtti::" \
93 make/ptbuildopts.mak
94 sed -i -e "s:-fno-rtti::" \
95 make/ptlib-config
96
97 emake opt || die "make failed"
98 emake PWLIBDIR=${S} -C plugins opt || die "make plugins failed"
99 }
100
101 src_install() {
102 # make these because the makefile isn't smart enough
103 dodir /usr/bin /usr/lib /usr/share /usr/include
104 make PREFIX=${D}/usr install || die "install failed"
105
106 # these are for compiling openh323
107 # NOTE: symlinks don't work when upgrading
108 # FIXME: probably should fix this with ptlib-config
109 dodir /usr/share/pwlib/include
110 cp -r ${D}/usr/include/* ${D}/usr/share/pwlib/include
111
112 dodir /usr/share/pwlib/lib
113 for x in ${D}/usr/lib/*; do
114 dosym /usr/lib/`basename ${x}` /usr/share/pwlib/lib/`basename ${x}`
115 done
116
117 # remove CVS dirs
118 find ${D} -name CVS -type d | xargs rm -rf
119
120 # fix symlink
121 # only amd64 needs special handling, afaiks
122 rm ${D}/usr/lib/libpt.so
123 if [ ${ARCH} = "amd64" ] ; then
124 dosym /usr/lib/libpt_linux_x86_64_r.so.${PV} /usr/lib/libpt.so
125 else
126 dosym /usr/lib/libpt_linux_${ARCH}_r.so.${PV} /usr/lib/libpt.so
127 fi
128
129 # strip ${S} stuff
130 dosed "s:^PWLIBDIR.*:PWLIBDIR=/usr/share/pwlib:" /usr/bin/ptlib-config
131 dosed "s:^PWLIBDIR.*:PWLIBDIR=/usr/share/pwlib:" /usr/share/pwlib/make/ptbuildopts.mak
132
133 # dodgy configure/makefiles forget to expand this
134 dosed 's:${exec_prefix}:/usr:' /usr/bin/ptlib-config
135
136 # satisfy ptlib.mak's weird definition (should check if true for future versions)
137 cp ${D}/usr/bin/ptlib-config ${D}/usr/share/pwlib/make/ptlib-config
138
139 # copy version.h
140 insinto /usr/share/pwlib
141 doins version.h
142
143 dodoc ReadMe.txt History.txt
144 }

  ViewVC Help
Powered by ViewVC 1.1.20