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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (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.6: +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.5.2-r2.ebuild,v 1.6 2005/01/08 20:12:42 stkn Exp $
4
5 DESCRIPTION="Portable Multiplatform Class Libraries for OpenH323"
6 HOMEPAGE="http://www.openh323.org/"
7 SRC_URI="http://www.openh323.org/bin/${PN}_${PV}.tar.gz"
8
9 LICENSE="MPL-1.1"
10 SLOT="0"
11 KEYWORDS="~x86 ~ppc ~sparc"
12 IUSE="ldap sdl ssl"
13
14 DEPEND=">=sys-devel/bison-1.28
15 >=sys-devel/flex-2.5.4a
16 dev-libs/expat
17 >=sys-apps/sed-4
18 ldap? ( net-nds/openldap )
19 sdl? ( media-libs/libsdl )
20 ssl? ( dev-libs/openssl )"
21
22 MAKEOPTS="${MAKEOPTS} -j1"
23 S=${WORKDIR}/${PN}
24
25 src_unpack() {
26 unpack ${A}
27 cd ${S}/make
28
29 # filter out -O3 and -mcpu embedded compiler flags
30 sed -i \
31 -e "s:-mcpu=\$(CPUTYPE)::" \
32 -e "s:-O3 -DNDEBUG:-DNDEBUG:" \
33 unix.mak
34 }
35
36 src_compile() {
37 if use ssl; then
38 export OPENSSLFLAG=1
39 export OPENSSLDIR="/usr"
40 export OPENSSLLIBS="-lssl -lcrypt"
41 fi
42
43 econf || die "configure failed"
44
45 # Horrible hack to strip out -L/usr/lib to allow upgrades
46 # problem is it adds -L/usr/lib before -L${S} when SSL is
47 # enabled. Same thing for -I/usr/include.
48 sed -i -e "s:^\(LDFLAGS.*\)-L/usr/lib:\1:" \
49 -e "s:^\(STDCCFLAGS.*\)-I/usr/include:\1:" \
50 ${S}/make/ptbuildopts.mak
51 sed -i -e "s:^\(LDFLAGS[\s]*=.*\) -L/usr/lib:\1:" \
52 -e "s:^\(LDFLAGS[\s]*=.*\) -I/usr/include:\1:" \
53 -e "s:^\(CCFLAGS[\s]*=.*\) -I/usr/include:\1:" \
54 ${S}/make/ptlib-config
55
56 emake opt || die "make failed"
57 }
58
59 src_install() {
60 # make these because the makefile isn't smart enough
61 dodir /usr/bin /usr/lib /usr/share /usr/include
62 make PREFIX=${D}/usr install || die "install failed"
63
64 # these are for compiling openh323
65 # NOTE: symlinks don't work when upgrading
66 # FIXME: probably should fix this with ptlib-config
67 dodir /usr/share/pwlib/include
68 cp -r ${D}/usr/include/* ${D}/usr/share/pwlib/include
69
70 dodir /usr/share/pwlib/lib
71 for x in ${D}/usr/lib/*; do
72 dosym /usr/lib/`basename ${x}` /usr/share/pwlib/lib/`basename ${x}`
73 done
74
75 # remove CVS dirs
76 find ${D} -name CVS -type d | xargs rm -rf
77
78 # fix symlink
79 rm ${D}/usr/lib/libpt.so
80 if [ ${ARCH} = "ppc" ] ; then
81 dosym /usr/lib/libpt_linux_ppc_r.so.${PV} /usr/lib/libpt.so
82 elif [ ${ARCH} = "sparc" ] ; then
83 dosym /usr/lib/libpt_linux_sparc_r.so.${PV} /usr/lib/libpt.so
84 else
85 dosym /usr/lib/libpt_linux_x86_r.so.${PV} /usr/lib/libpt.so
86 fi
87
88 # strip ${S} stuff
89 dosed "s:^PWLIBDIR.*:PWLIBDIR=/usr/share/pwlib:" /usr/bin/ptlib-config
90 dosed "s:^PWLIBDIR.*:PWLIBDIR=/usr/share/pwlib:" /usr/share/pwlib/make/ptbuildopts.mak
91
92 # dodgy configure/makefiles forget to expand this
93 dosed 's:${exec_prefix}:/usr:' /usr/bin/ptlib-config
94
95 # satisfy ptlib.mak's weird definition (should check if true for future versions)
96 cp ${D}/usr/bin/ptlib-config ${D}/usr/share/pwlib/make/ptlib-config
97
98 # copy version.h
99 insinto /usr/share/pwlib
100 doins version.h
101
102 dodoc ReadMe.txt History.txt
103 }

  ViewVC Help
Powered by ViewVC 1.1.20