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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (hide annotations) (download)
Thu Jul 22 18:14:47 2010 UTC (4 years ago) by ssuominen
Branch: MAIN
CVS Tags: HEAD
Changes since 1.8: +1 -1 lines
FILE REMOVED
old
(Portage version: 2.2_rc67/cvs/Linux x86_64)

1 genstef 1.1 # Copyright 1999-2007 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 ssuominen 1.9 # $Header: /var/cvsroot/gentoo-x86/dev-libs/pwlib/pwlib-1.10.10-r1.ebuild,v 1.8 2007/10/12 16:28:42 mr_bones_ Exp $
4 genstef 1.1
5     inherit eutils flag-o-matic multilib autotools toolchain-funcs
6    
7     IUSE="alsa debug ieee1394 ipv6 ldap oss sasl sdl ssl v4l v4l2 xml"
8    
9     DESCRIPTION="Portable Multiplatform Class Libraries used by several VoIP applications"
10     HOMEPAGE="http://www.ekiga.org"
11     SRC_URI="http://www.ekiga.org/admin/downloads/latest/sources/sources/${P}.tar.gz"
12    
13     LICENSE="MPL-1.1"
14     SLOT="0"
15 dertobi123 1.7 KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86"
16 genstef 1.1
17     RDEPEND="alsa? ( media-libs/alsa-lib )
18     ieee1394? ( media-libs/libdv
19     sys-libs/libavc1394
20     sys-libs/libraw1394
21     <media-libs/libdc1394-1.9.99 )
22     ldap? ( >=net-nds/openldap-2.3.35 )
23     sasl? ( dev-libs/cyrus-sasl )
24     sdl? ( media-libs/libsdl )
25     ssl? ( dev-libs/openssl )
26     xml? ( dev-libs/expat )"
27     DEPEND="${RDEPEND}
28     >=sys-devel/bison-1.28
29     >=sys-devel/flex-2.5.4a
30     >=sys-apps/sed-4"
31    
32     src_unpack() {
33     unpack ${A}
34     cd "${S}"
35    
36     # filter out -O3, -Os and -mcpu embedded compiler flags
37     sed -i \
38     -e "s:-mcpu=\$(CPUTYPE)::" \
39     -e "s:-O3 -DNDEBUG:-DNDEBUG:" \
40     -e "s:-Os::" \
41     make/unix.mak
42    
43     # don't break make install if there are no plugins to install
44     epatch "${FILESDIR}"/pwlib-1.8.7-instplugins.diff
45    
46     # use sdl-config to query required libraries
47     epatch "${FILESDIR}"/pwlib-1.9.3-sdl-configure.patch
48    
49     # this patch fixes bugs: #145424 and #140358
50     epatch "${FILESDIR}"/${PN}-1.10.2-asm.patch
51 mr_bones_ 1.8
52 genstef 1.1 # security - we obviousl need to patch..
53     epatch "${FILESDIR}"/pwlib-1.10.1-vsprintf.patch
54    
55     eautoconf || die "autoconf failed"
56     }
57    
58     src_compile() {
59     tc-export CC CXX
60     local myconf=""
61     # may cause ICE (bug #70638)
62     filter-flags -fstack-protector
63     # disable-alsa breaks oss, see bug 127677
64     use alsa && myconf="--enable-alsa"
65    
66     econf \
67     --enable-plugins \
68     $(use_enable v4l2) \
69     $(use_enable v4l) \
70     $(use_enable ieee1394 dc) \
71     $(use_enable ieee1394 avc) \
72     $(use_enable oss) \
73     $(use_enable ipv6) \
74     $(use_enable sdl) \
75     $(use_enable ssl openssl) \
76     $(use_enable debug exceptions) \
77     $(use_enable debug memcheck) \
78     $(use_enable ldap openldap) \
79     $(use_enable sasl) \
80     $(use_enable xml expat) \
81     ${myconf} \
82     || die "configure failed"
83    
84     # Horrible hack to strip out -L/usr/lib to allow upgrades
85     # problem is it adds -L/usr/lib before -L${S} when SSL is
86     # enabled. Same thing for -I/usr/include.
87     # sed -i -e "s:^\(LDFLAGS.*\)-L/usr/lib:\1:" \
88     # -e "s:^\(STDCCFLAGS.*\)-I/usr/include:\1:" \
89     # ${S}/make/ptbuildopts.mak
90    
91     # sed -i -e "s:^\(LDFLAGS[\s]*=.*\) -L/usr/lib:\1:" \
92     # -e "s:^\(LDFLAGS[\s]*=.*\) -I/usr/include:\1:" \
93     # -e "s:^\(CCFLAGS[\s]*=.*\) -I/usr/include:\1:" \
94     # ${S}/make/ptlib-config
95    
96     emake -j1 opt || die "make failed"
97     }
98    
99     src_install() {
100     local libdir libname
101    
102     libdir=$(get_libdir)
103    
104     # makefile doesn't create ${D}/usr/bin
105     make PREFIX=/usr DESTDIR="${D}" install || die "install failed"
106    
107     ## vv will try to fix the mess below, requires a lot of patching though...
108    
109     # update 2005/08/22:
110     #
111     # locations in *.mak files haven been fixed
112     # directories have been replaced w/ symlinks
113     # (left to not break things, doing some testing atm)
114    
115     # Note: reactivating this seems to be the only easy solution to slot pwlib ebuild
116     # and keep applications happy (e.g. gnomemeeting / ekiga)
117    
118     # dosym /usr/include /usr/share/pwlib/include
119     # dosym /usr/${libdir} /usr/share/pwlib/${libdir}
120     #
121     # # just in case...
122     # if [[ "${libdir}" = "lib64" ]]; then
123     # dosym /usr/share/pwlib/lib64 /usr/share/pwlib/lib
124     # fi
125    
126     ## ^^ bad stuff
127    
128     # fix symlink
129     libname=$(basename "`ls "${D}"/usr/${libdir}/libpt_*_*_r.so.${PV}`")
130     rm "${D}"/usr/${libdir}/libpt.so
131     dosym ${libname} /usr/${libdir}/libpt.so
132    
133     # fix makefiles to use headers from /usr/include and libs from /usr/lib
134     # instead of /usr/share/pwlib
135     # Note: change to /usr/include/pwlib-${PV} (or whereever includes will be)
136     # once pwlib ebuilds get slotted
137     sed -i -e "s:-I\$(PWLIBDIR)\(/include[a-zA-Z0-9_/-]\+\):-I/usr/include\1:g" \
138     -e "s:-I\$(PWLIBDIR)/include::g" \
139     -e "s:^\(PW_LIBDIR[ \t]\+=\).*:\1 /usr/${libdir}:" \
140     "${D}"/usr/share/pwlib/make/*.mak
141    
142     # dodgy configure/makefiles forget to expand this
143     # Note: change to /usr/share/pwlib/${PV} (or whatever PWLIBDIR should point to)
144     # once pwlib ebuilds get slotted
145     sed -i -e "s:\${exec_prefix}:/usr:" \
146     "${D}"/usr/bin/ptlib-config \
147     "${D}"/usr/share/pwlib/make/ptlib-config
148    
149     # copy version.h
150     insinto /usr/share/pwlib
151     doins version.h
152    
153     dodoc ReadMe.txt ReadMe_QOS.txt History.txt
154     dohtml mpl-1.0.htm
155     }

  ViewVC Help
Powered by ViewVC 1.1.20