/[gentoo-x86]/net-libs/openh323/openh323-1.13.5-r1.ebuild
Gentoo

Contents of /net-libs/openh323/openh323-1.13.5-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Tue Oct 3 13:11:05 2006 UTC (8 years ago) by genstef
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
remove unused
(Portage version: 2.1.2_pre2-r2)
 (Unsigned Manifest commit)

1 # Copyright 1999-2005 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-libs/openh323/openh323-1.13.5-r1.ebuild,v 1.2 2005/07/10 01:06:25 swegener Exp $
4
5 inherit eutils flag-o-matic multilib
6
7 MY_P="${PN}-v${PV//./_}"
8
9 S=${WORKDIR}/${PN}
10 DESCRIPTION="Open Source implementation of the ITU H.323 teleconferencing protocol"
11 HOMEPAGE="http://www.openh323.org/"
12 SRC_URI="mirror://sourceforge/openh323/${MY_P}-src.tar.gz"
13
14 IUSE="ssl"
15 SLOT="0"
16 LICENSE="MPL-1.1"
17 KEYWORDS="~x86 ppc ~amd64 ~sparc ~alpha"
18
19 DEPEND=">=sys-apps/sed-4
20 >=dev-libs/pwlib-1.6.6
21 >=media-video/ffmpeg-0.4.7
22 ssl? ( dev-libs/openssl )"
23
24 pkg_setup() {
25 # to prevent merge problems with broken makefiles from old
26 # pwlib versions, we double-check here.
27
28 if [ "` fgrep '\$(OPENSSLDIR)/include' /usr/share/pwlib/make/unix.mak`" ]
29 then
30 # patch unix.mak so it doesn't require annoying
31 # unmerge/merge cycle to upgrade
32 einfo "Fixing broken pwlib makefile."
33 cd /usr/share/pwlib/make
34 sed -i \
35 -e "s:-DP_SSL -I\$(OPENSSLDIR)/include -I\$(OPENSSLDIR)/crypto:-DP_SSL:" \
36 -e "s:^LDFLAGS.*\+= -L\$(OPENSSLDIR)/$(get_libdir) -L\$(OPENSSLDIR):LDFLAGS +=:" \
37 unix.mak
38 fi
39
40 if has_version ">=sys-devel/gcc-3.3.2"; then
41 ewarn "If you are experiencing problems emerging openh323 with gcc-3.3.2"
42 ewarn "please try using CFLAGS=\"-O1\" when emergeing"
43 ewarn "we are currently investigating this problem..."
44 ewarn ""
45 ewarn "<sleeping 10 seconds...>"
46 epause 10
47 fi
48 }
49
50 src_unpack() {
51 unpack ${A}
52
53 cd ${S}
54 # fix and enable ffmpeg/h263 support (bug #32754)
55 epatch ${FILESDIR}/openh323-${PV}-ffmpeg.diff
56
57 # fix include order (bug #32522)
58 epatch ${FILESDIR}/openh323-${PV}-include-order.diff
59
60 # fix to compile on gcc-3.4 (bug #56951)
61 epatch ${FILESDIR}/${PN}-1.13.2-gcc34.diff
62
63 # fix ixjuser.h problems
64 epatch ${FILESDIR}/${PN}-1.13.2-ixjuser.diff
65 }
66
67 src_compile() {
68 local makeopts
69
70 # remove -fstack-protector, may cause problems (bug #75259)
71 filter-flags -fstack-protector
72
73 export PWLIBDIR=/usr/share/pwlib
74 export PTLIB_CONFIG=/usr/bin/ptlib-config
75 export OPENH323DIR=${S}
76
77 # NOTRACE avoid compilation problems, we disable PTRACING using NOTRACE=1
78 makeopts="${makeopts} ASNPARSER=/usr/bin/asnparser LDFLAGS=-L${S}/lib NOTRACE=1"
79
80 if use ssl; then
81 export OPENSSLFLAG=1
82 export OPENSSLDIR=/usr
83 export OPENSSLLIBS="-lssl -lcrypt"
84 fi
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