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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Mon Aug 15 19:19:36 2005 UTC (9 years, 3 months ago) by stkn
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +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-r1.ebuild,v 1.3 2005/01/10 04:43:54 stkn 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 ~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 # dmix patch for alsa support (#68553)
50 epatch ${FILESDIR}/${P}-alsa_dmix.diff
51 }
52
53 src_compile() {
54 local plugins
55 local myconf
56
57 # may cause ICE (bug #70638)
58 filter-flags -fstack-protector
59
60 if use ssl; then
61 export OPENSSLFLAG=1
62 export OPENSSLDIR="/usr"
63 export OPENSSLLIBS="-lssl -lcrypt"
64 fi
65
66 ## gnomemeeting-1.00 requires pwlib to be built w/ IPV6 support
67 ## (even if itself is built without...)
68 #use ipv6 \
69 # && myconf="${myconf} --enable-ipv6" \
70 # || myconf="${myconf} --disable-ipv6"
71 myconf="${myconf} --enable-ipv6"
72
73 # plugins, oss and v4l are default
74 plugins="oss v4l"
75
76 use ieee1394 \
77 && plugins="${plugins} avc dc"
78
79 use alsa \
80 && plugins="${plugins} alsa"
81
82 if use esd; then
83 # fixes bug #45059
84 export ESDDIR=/usr
85 fi
86
87 # merge plugin options (safe way if default = "")
88 plugins="`echo ${plugins} | sed -e "y: :,:"`"
89
90 econf ${myconf} \
91 --enable-plugins \
92 --with-plugins=${plugins} || die "configure failed"
93
94 # Horrible hack to strip out -L/usr/lib to allow upgrades
95 # problem is it adds -L/usr/lib before -L${S} when SSL is
96 # enabled. Same thing for -I/usr/include.
97 sed -i -e "s:^\(LDFLAGS.*\)-L/usr/lib:\1:" \
98 -e "s:^\(STDCCFLAGS.*\)-I/usr/include:\1:" \
99 ${S}/make/ptbuildopts.mak
100 sed -i -e "s:^\(LDFLAGS[\s]*=.*\) -L/usr/lib:\1:" \
101 -e "s:^\(LDFLAGS[\s]*=.*\) -I/usr/include:\1:" \
102 -e "s:^\(CCFLAGS[\s]*=.*\) -I/usr/include:\1:" \
103 ${S}/make/ptlib-config
104
105 # remove -fno-rtti, this breaks various things *grr*
106 sed -i -e "s:-fno-rtti::" \
107 make/ptbuildopts.mak
108 sed -i -e "s:-fno-rtti::" \
109 make/ptlib-config
110
111 emake opt || die "make failed"
112 emake PWLIBDIR=${S} -C plugins opt || die "make plugins failed"
113 }
114
115 src_install() {
116 # make these because the makefile isn't smart enough
117 dodir /usr/bin /usr/lib /usr/share /usr/include
118 make PREFIX=${D}/usr install || die "install failed"
119
120 # these are for compiling openh323
121 # NOTE: symlinks don't work when upgrading
122 # FIXME: probably should fix this with ptlib-config
123 dodir /usr/share/pwlib/include
124 cp -r ${D}/usr/include/* ${D}/usr/share/pwlib/include
125
126 dodir /usr/share/pwlib/lib
127 for x in ${D}/usr/lib/*; do
128 dosym /usr/lib/`basename ${x}` /usr/share/pwlib/lib/`basename ${x}`
129 done
130
131 # remove CVS dirs
132 find ${D} -name CVS -type d | xargs rm -rf
133
134 # fix symlink
135 # only amd64 needs special handling, afaiks
136 rm ${D}/usr/lib/libpt.so
137 if [ ${ARCH} = "amd64" ] ; then
138 dosym /usr/lib/libpt_linux_x86_64_r.so.${PV} /usr/lib/libpt.so
139 else
140 dosym /usr/lib/libpt_linux_${ARCH}_r.so.${PV} /usr/lib/libpt.so
141 fi
142
143 # strip ${S} stuff
144 dosed "s:^PWLIBDIR.*:PWLIBDIR=/usr/share/pwlib:" /usr/bin/ptlib-config
145 dosed "s:^PWLIBDIR.*:PWLIBDIR=/usr/share/pwlib:" /usr/share/pwlib/make/ptbuildopts.mak
146
147 # dodgy configure/makefiles forget to expand this
148 dosed 's:${exec_prefix}:/usr:' /usr/bin/ptlib-config
149
150 # satisfy ptlib.mak's weird definition (should check if true for future versions)
151 cp ${D}/usr/bin/ptlib-config ${D}/usr/share/pwlib/make/ptlib-config
152
153 # copy version.h
154 insinto /usr/share/pwlib
155 doins version.h
156
157 dodoc ReadMe.txt History.txt
158 }

  ViewVC Help
Powered by ViewVC 1.1.20