/[gentoo-x86]/net-libs/openh323/openh323-1.13.2-r2.ebuild
Gentoo

Contents of /net-libs/openh323/openh323-1.13.2-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Sat Apr 14 08:04:11 2007 UTC (7 years, 5 months ago) by genstef
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
remove old to fix bug 145783
(Portage version: 2.1.2.3)

1 stkn 1.1 # Copyright 1999-2005 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 genstef 1.3 # $Header: /var/cvsroot/gentoo-x86/net-libs/openh323/openh323-1.13.2-r2.ebuild,v 1.2 2005/08/06 19:00:49 kloeri Exp $
4 stkn 1.1
5     inherit eutils flag-o-matic multilib
6    
7     S=${WORKDIR}/${PN}
8     DESCRIPTION="Open Source implementation of the ITU H.323 teleconferencing protocol"
9     HOMEPAGE="http://www.openh323.org/"
10     SRC_URI="http://www.gnomemeeting.org/admin/downloads/latest/sources/sources/${P}.tar.gz"
11    
12     LICENSE="MPL-1.1"
13     SLOT="0"
14 kloeri 1.2 KEYWORDS="alpha amd64 ppc sparc x86"
15 stkn 1.1 IUSE="ssl"
16    
17     DEPEND=">=sys-apps/sed-4
18     ~dev-libs/pwlib-1.6.3
19     >=media-video/ffmpeg-0.4.7
20     ssl? ( dev-libs/openssl )"
21    
22     pkg_setup() {
23     # to prevent merge problems with broken makefiles from old
24     # pwlib versions, we double-check here.
25    
26     if [ "` fgrep '\$(OPENSSLDIR)/include' /usr/share/pwlib/make/unix.mak`" ]
27     then
28     # patch unix.mak so it doesn't require annoying
29     # unmerge/merge cycle to upgrade
30     einfo "Fixing broken pwlib makefile."
31     cd /usr/share/pwlib/make
32     sed -i \
33     -e "s:-DP_SSL -I\$(OPENSSLDIR)/include -I\$(OPENSSLDIR)/crypto:-DP_SSL:" \
34     -e "s:^LDFLAGS.*\+= -L\$(OPENSSLDIR)/$(get_libdir) -L\$(OPENSSLDIR):LDFLAGS +=:" \
35     unix.mak
36     fi
37    
38     if has_version ">=sys-devel/gcc-3.3.2"; then
39     ewarn "If you are experiencing problems emerging openh323 with gcc-3.3.2"
40     ewarn "please try using CFLAGS=\"-O1\" when emerging"
41     ewarn "we are currently investigating this problem..."
42     ewarn ""
43     ewarn "<sleeping 10 seconds...>"
44     fi
45     }
46    
47     src_unpack() {
48     unpack ${A}
49    
50     cd ${S}
51     # fix and enable ffmpeg/h263 support (bug #32754)
52     epatch ${FILESDIR}/openh323-${PV}-ffmpeg.diff
53    
54     # fix include order (bug #32522)
55     epatch ${FILESDIR}/openh323-${PV}-include-order.diff
56    
57     # fix to compile on gcc-3.4 (bug #56951)
58     epatch ${FILESDIR}/${P}-gcc34.diff
59    
60     # fix for 2.6 headers (bug #72448)
61     epatch ${FILESDIR}/${P}-ixjuser.diff
62    
63     # fix a typo
64     sed -i -e "s:\$(DESDIR):\$(DESTDIR):" \
65     Makefile.in
66     }
67    
68     src_compile() {
69     local makeopts
70    
71     export PWLIBDIR=/usr/share/pwlib
72     export PTLIB_CONFIG=/usr/bin/ptlib-config
73     export OPENH323DIR=${S}
74    
75     # NOTRACE avoid compilation problems, we disable PTRACING using NOTRACE=1
76     makeopts="${makeopts} ASNPARSER=/usr/bin/asnparser LDFLAGS=-L${S}/lib NOTRACE=1"
77    
78     if use ssl; then
79     export OPENSSLFLAG=1
80     export OPENSSLDIR=/usr
81     export OPENSSLLIBS="-lssl -lcrypt"
82     fi
83    
84     append-flags -fPIC
85    
86     # use shipped speex version
87     econf \
88     --enable-localspeex || die
89    
90     emake -j1 ${makeopts} opt || die "make failed"
91     }
92    
93     src_install() {
94     local OPENH323_ARCH ALT_ARCH
95     # make NOTRACE=1 opt ==> linux_$ARCH_n
96     # make opt ==> linux_$ARCH_r
97    
98     # amd64 needs special treatment
99     if [ ${ARCH} = "amd64" ]; then
100     OPENH323_ARCH="linux_x86_64_n"
101     else
102     OPENH323_ARCH="linux_${ARCH}_n"
103     fi
104    
105     make PREFIX=/usr DESTDIR=${D} install || die "install failed"
106     dobin ${S}/samples/simple/obj_${OPENH323_ARCH}/simph323
107    
108     # mod to keep gnugk happy
109     insinto /usr/share/openh323/src
110     newins ${FILESDIR}/openh323-1.11.7-emptyMakefile Makefile
111    
112     # install version.h into $OPENH323DIR
113     insinto /usr/share/openh323
114     doins version.h
115    
116     rm ${D}/usr/$(get_libdir)/libopenh323.so
117     dosym /usr/$(get_libdir)/libh323_${OPENH323_ARCH}.so.${PV} /usr/$(get_libdir)/libopenh323.so
118    
119     # for backwards compatibility with _r versioned libraries
120     # (this might not work...)
121     ALT_ARCH=${OPENH323_ARCH/_n/_r}
122     for pv in ${PV} ${PV%.[0-9]} ${PV%.[0-9]*.[0-9]}; do
123     einfo "creating /usr/$(get_libdir)/libh323_${ALT_ARCH}.so.${pv} symlink"
124     dosym /usr/$(get_libdir)/libh323_${OPENH323_ARCH}.so.${PV} /usr/$(get_libdir)/libh323_${ALT_ARCH}.so.${pv}
125     done
126     dosym /usr/$(get_libdir)/libh323_${OPENH323_ARCH}.so.${PV} /usr/$(get_libdir)/libh323_${ALT_ARCH}.so
127    
128     # these should point to the right directories,
129     # openh323.org apps and others need this
130     dosed "s:^OH323_LIBDIR = \$(OPENH323DIR).*:OH323_LIBDIR = /usr/$(get_libdir):" \
131     /usr/share/openh323/openh323u.mak
132     dosed "s:^OH323_INCDIR = \$(OPENH323DIR).*:OH323_INCDIR = /usr/include/openh323:" \
133     /usr/share/openh323/openh323u.mak
134     # this is hardcoded now? nice...
135     dosed "s:^\(OPENH323DIR[ \t]\+=\) ${S}:\1 /usr/share/openh323:" \
136     /usr/share/openh323/openh323u.mak
137     }

  ViewVC Help
Powered by ViewVC 1.1.20