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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Mon Aug 15 19:19:36 2005 UTC (8 years, 11 months ago) by stkn
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +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.ebuild,v 1.5 2005/01/08 20:12:42 stkn Exp $
4
5 IUSE="ssl sdl ieee1394 alsa esd ldap"
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"
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 ldap? ( 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 use esd \
69 && plugins="${plugins} esd"
70
71 # merge plugin options (safe way if default = "")
72 plugins="`echo ${plugins} | sed -e "y: :,:"`"
73
74 econf ${myconf} \
75 --enable-plugins \
76 --with-plugins=${plugins} || die "configure failed"
77
78 # Horrible hack to strip out -L/usr/lib to allow upgrades
79 # problem is it adds -L/usr/lib before -L${S} when SSL is
80 # enabled. Same thing for -I/usr/include.
81 sed -i -e "s:^\(LDFLAGS.*\)-L/usr/lib:\1:" \
82 -e "s:^\(STDCCFLAGS.*\)-I/usr/include:\1:" \
83 ${S}/make/ptbuildopts.mak
84 sed -i -e "s:^\(LDFLAGS[\s]*=.*\) -L/usr/lib:\1:" \
85 -e "s:^\(LDFLAGS[\s]*=.*\) -I/usr/include:\1:" \
86 -e "s:^\(CCFLAGS[\s]*=.*\) -I/usr/include:\1:" \
87 ${S}/make/ptlib-config
88
89 emake opt || die "make failed"
90 emake PWLIBDIR=${S} -C plugins opt || die "make plugins failed"
91 }
92
93 src_install() {
94 # make these because the makefile isn't smart enough
95 dodir /usr/bin /usr/lib /usr/share /usr/include
96 make PREFIX=${D}/usr install || die "install failed"
97
98 # these are for compiling openh323
99 # NOTE: symlinks don't work when upgrading
100 # FIXME: probably should fix this with ptlib-config
101 dodir /usr/share/pwlib/include
102 cp -r ${D}/usr/include/* ${D}/usr/share/pwlib/include
103
104 dodir /usr/share/pwlib/lib
105 for x in ${D}/usr/lib/*; do
106 dosym /usr/lib/`basename ${x}` /usr/share/pwlib/lib/`basename ${x}`
107 done
108
109 # remove CVS dirs
110 find ${D} -name CVS -type d | xargs rm -rf
111
112 # fix symlink
113 rm ${D}/usr/lib/libpt.so
114 if [ ${ARCH} = "ppc" ] ; then
115 dosym /usr/lib/libpt_linux_ppc_r.so.${PV} /usr/lib/libpt.so
116 elif [ ${ARCH} = "sparc" ] ; then
117 dosym /usr/lib/libpt_linux_sparc_r.so.${PV} /usr/lib/libpt.so
118 else
119 dosym /usr/lib/libpt_linux_x86_r.so.${PV} /usr/lib/libpt.so
120 fi
121
122 # strip ${S} stuff
123 dosed "s:^PWLIBDIR.*:PWLIBDIR=/usr/share/pwlib:" /usr/bin/ptlib-config
124 dosed "s:^PWLIBDIR.*:PWLIBDIR=/usr/share/pwlib:" /usr/share/pwlib/make/ptbuildopts.mak
125
126 # dodgy configure/makefiles forget to expand this
127 dosed 's:${exec_prefix}:/usr:' /usr/bin/ptlib-config
128
129 # satisfy ptlib.mak's weird definition (should check if true for future versions)
130 cp ${D}/usr/bin/ptlib-config ${D}/usr/share/pwlib/make/ptlib-config
131
132 # copy version.h
133 insinto /usr/share/pwlib
134 doins version.h
135
136 dodoc ReadMe.txt History.txt
137 }

  ViewVC Help
Powered by ViewVC 1.1.20