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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.11 - (show annotations) (download)
Mon Aug 15 19:19:36 2005 UTC (9 years, 1 month ago) by stkn
Branch: MAIN
CVS Tags: HEAD
Changes since 1.10: +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.6.ebuild,v 1.10 2005/01/08 20:12:42 stkn Exp $
4
5 inherit eutils
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-plugins/libdc1394 )
30 esd? ( media-sound/esound )"
31
32 MAKEOPTS="${MAKEOPTS} -j1"
33 S=${WORKDIR}/${PN}
34
35 src_unpack() {
36 unpack ${A}
37 cd ${S}/make
38
39 # filter out -O3 and -mcpu embedded compiler flags
40 sed -i \
41 -e "s:-mcpu=\$(CPUTYPE)::" \
42 -e "s:-O3 -DNDEBUG:-DNDEBUG:" \
43 unix.mak
44
45 # small fix for firewire dc (camera) plugin
46 cd ${S}
47 epatch ${FILESDIR}/${P}-ieee1394dc-fix.diff
48 }
49
50 src_compile() {
51 local plugins
52 local myconf
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 fi
80
81 # merge plugin options (safe way if default = "")
82 plugins="`echo ${plugins} | sed -e "y: :,:"`"
83
84 econf ${myconf} \
85 --enable-plugins \
86 --with-plugins=${plugins} || die "configure failed"
87
88 # Horrible hack to strip out -L/usr/lib to allow upgrades
89 # problem is it adds -L/usr/lib before -L${S} when SSL is
90 # enabled. Same thing for -I/usr/include.
91 sed -i -e "s:^\(LDFLAGS.*\)-L/usr/lib:\1:" \
92 -e "s:^\(STDCCFLAGS.*\)-I/usr/include:\1:" \
93 ${S}/make/ptbuildopts.mak
94 sed -i -e "s:^\(LDFLAGS[\s]*=.*\) -L/usr/lib:\1:" \
95 -e "s:^\(LDFLAGS[\s]*=.*\) -I/usr/include:\1:" \
96 -e "s:^\(CCFLAGS[\s]*=.*\) -I/usr/include:\1:" \
97 ${S}/make/ptlib-config
98
99 # remove -fno-rtti, this breaks various things *grr*
100 sed -i -e "s:-fno-rtti::" \
101 make/ptbuildopts.mak
102 sed -i -e "s:-fno-rtti::" \
103 make/ptlib-config
104
105 emake opt || die "make failed"
106 emake PWLIBDIR=${S} -C plugins opt || die "make plugins failed"
107 }
108
109 src_install() {
110 # make these because the makefile isn't smart enough
111 dodir /usr/bin /usr/lib /usr/share /usr/include
112 make PREFIX=${D}/usr install || die "install failed"
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 # remove CVS dirs
126 find ${D} -name CVS -type d | xargs rm -rf
127
128 # fix symlink
129 # only amd64 needs special handling, afaiks
130 rm ${D}/usr/lib/libpt.so
131 if [ ${ARCH} = "amd64" ] ; then
132 dosym /usr/lib/libpt_linux_x86_64_r.so.${PV} /usr/lib/libpt.so
133 else
134 dosym /usr/lib/libpt_linux_${ARCH}_r.so.${PV} /usr/lib/libpt.so
135 fi
136
137 # strip ${S} stuff
138 dosed "s:^PWLIBDIR.*:PWLIBDIR=/usr/share/pwlib:" /usr/bin/ptlib-config
139 dosed "s:^PWLIBDIR.*:PWLIBDIR=/usr/share/pwlib:" /usr/share/pwlib/make/ptbuildopts.mak
140
141 # dodgy configure/makefiles forget to expand this
142 dosed 's:${exec_prefix}:/usr:' /usr/bin/ptlib-config
143
144 # satisfy ptlib.mak's weird definition (should check if true for future versions)
145 cp ${D}/usr/bin/ptlib-config ${D}/usr/share/pwlib/make/ptlib-config
146
147 # copy version.h
148 insinto /usr/share/pwlib
149 doins version.h
150
151 dodoc ReadMe.txt History.txt
152 }

  ViewVC Help
Powered by ViewVC 1.1.20