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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.18 - (show annotations) (download)
Mon Aug 15 19:30:24 2005 UTC (8 years, 11 months ago) by stkn
Branch: MAIN
CVS Tags: HEAD
Changes since 1.17: +1 -1 lines
FILE REMOVED
Removed 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/net-libs/openh323/openh323-1.13.2-r1.ebuild,v 1.17 2005/01/08 20:15:47 stkn Exp $
4
5 inherit eutils flag-o-matic
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 KEYWORDS="x86 sparc amd64 ppc"
15 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)/lib -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 emergeing"
41 ewarn "we are currently investigating this problem..."
42 ewarn ""
43 ewarn "<sleeping 10 seconds...>"
44 epause 10
45 fi
46 }
47
48 src_unpack() {
49 unpack ${A}
50
51 cd ${S}
52 # fix and enable ffmpeg/h263 support (bug #32754)
53 epatch ${FILESDIR}/openh323-${PV}-ffmpeg.diff
54
55 # fix include order (bug #32522)
56 epatch ${FILESDIR}/openh323-${PV}-include-order.diff
57
58 # fix to compile on gcc-3.4 (bug #56951)
59 epatch ${FILESDIR}/${P}-gcc34.diff
60
61 # fix for 2.6 headers (bug #72448)
62 epatch ${FILESDIR}/${P}-ixjuser.diff
63 }
64
65 src_compile() {
66 local makeopts
67
68 export PWLIBDIR=/usr/share/pwlib
69 export PTLIB_CONFIG=/usr/bin/ptlib-config
70 export OPENH323DIR=${S}
71
72 # NOTRACE avoid compilation problems, we disable PTRACING using NOTRACE=1
73 makeopts="${makeopts} ASNPARSER=/usr/bin/asnparser LDFLAGS=-L${S}/lib NOTRACE=1"
74
75 if use ssl; then
76 export OPENSSLFLAG=1
77 export OPENSSLDIR=/usr
78 export OPENSSLLIBS="-lssl -lcrypt"
79 fi
80
81 # use shipped speex version
82 econf \
83 --enable-localspeex || die
84
85 use amd64 && append-flags -fPIC
86
87 emake -j1 ${makeopts} opt || die "make failed"
88 }
89
90 src_install() {
91 local OPENH323_ARCH ALT_ARCH
92 # make NOTRACE=1 opt ==> linux_$ARCH_n
93 # make opt ==> linux_$ARCH_r
94
95 # amd64 needs special treatment
96 if [ ${ARCH} = "amd64" ]; then
97 OPENH323_ARCH="linux_x86_64_n"
98 else
99 OPENH323_ARCH="linux_${ARCH}_n"
100 fi
101
102 dodir /usr/bin /usr/lib/ /usr/share
103 make PREFIX=${D}/usr install || die "install failed"
104 dobin ${S}/samples/simple/obj_${OPENH323_ARCH}/simph323
105
106 # remove CVS stuff
107 find ${D} -name 'CVS' -type d | xargs rm -rf
108
109 # mod to keep gnugk happy
110 insinto /usr/share/openh323/src
111 newins ${FILESDIR}/openh323-1.11.7-emptyMakefile Makefile
112
113 # install version.h into $OPENH323DIR
114 insinto /usr/share/openh323
115 doins version.h
116
117 rm ${D}/usr/lib/libopenh323.so
118 dosym /usr/lib/libh323_${OPENH323_ARCH}.so.${PV} /usr/lib/libopenh323.so
119
120 # for backwards compatibility with _r versioned libraries
121 # (this might not work...)
122 ALT_ARCH=${OPENH323_ARCH/_n/_r}
123 for pv in ${PV} ${PV%.[0-9]} ${PV%.[0-9]*.[0-9]}; do
124 einfo "creating /usr/lib/libh323_${ALT_ARCH}.so.${pv} symlink"
125 dosym /usr/lib/libh323_${OPENH323_ARCH}.so.${PV} /usr/lib/libh323_${ALT_ARCH}.so.${pv}
126 done
127 dosym /usr/lib/libh323_${OPENH323_ARCH}.so.${PV} /usr/lib/libh323_${ALT_ARCH}.so
128
129 # these should point to the right directories,
130 # openh323.org apps and others need this
131 dosed "s:^OH323_LIBDIR = \$(OPENH323DIR).*:OH323_LIBDIR = /usr/lib:" \
132 /usr/share/openh323/openh323u.mak
133 dosed "s:^OH323_INCDIR = \$(OPENH323DIR).*:OH323_INCDIR = /usr/include/openh323:" \
134 /usr/share/openh323/openh323u.mak
135 # this is hardcoded now? nice...
136 dosed "s:^\(OPENH323DIR[ \t]\+=\) ${S}:\1 /usr/share/openh323:" \
137 /usr/share/openh323/openh323u.mak
138 }

  ViewVC Help
Powered by ViewVC 1.1.20