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

Contents of /net-libs/openh323/openh323-1.15.6.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Sat Apr 14 14:49:18 2007 UTC (7 years, 4 months ago) by genstef
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +1 -1 lines
FILE REMOVED
revert dirtyepic commit, old ebuild removal was on purpose
(Portage version: 2.1.2.3)

1 # Copyright 1999-2007 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.15.6.ebuild,v 1.5 2007/04/14 14:20:24 dirtyepic Exp $
4
5 inherit eutils flag-o-matic multilib
6
7 MY_P="${PN}-v${PV//./_}"
8
9 DESCRIPTION="Open Source implementation of the ITU H.323 teleconferencing protocol"
10 HOMEPAGE="http://www.openh323.org/"
11 SRC_URI="http://www.gnomemeeting.org/admin/downloads/latest/sources/sources/${P}.tar.gz"
12
13 IUSE="ssl novideo noaudio debug"
14 SLOT="0"
15 LICENSE="MPL-1.1"
16 KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86"
17
18 RDEPEND="
19 ~dev-libs/pwlib-1.8.7
20 >=media-video/ffmpeg-0.4.7
21 ssl? ( dev-libs/openssl )"
22
23 DEPEND="${RDEPEND}
24 >=sys-apps/sed-4"
25
26 src_unpack() {
27 unpack ${A}
28
29 cd ${S}
30 # Makefile is currently broken with NOTRACE=1, fix that
31 epatch "${FILESDIR}"/${PN}-1.15.2-notrace.diff
32 epatch "${FILESDIR}"/${P}-gcc4.diff
33 }
34
35 src_compile() {
36 local makeopts
37 local myconf
38
39 # remove -fstack-protector, may cause problems (bug #75259)
40 filter-flags -fstack-protector
41
42 export PWLIBDIR=/usr/share/pwlib
43 export PTLIB_CONFIG=/usr/bin/ptlib-config
44 export OPENH323DIR=${S}
45
46 makeopts="ASNPARSER=/usr/bin/asnparser LDFLAGS=-L${S}/lib"
47
48 # NOTRACE avoid compilation problems, we disable PTRACING using NOTRACE=1
49 # compile with PTRACING if the user wants to debug stuff
50 if ! use debug; then
51 makeopts="${makeopts} NOTRACE=1"
52 fi
53
54 if use ssl; then
55 export OPENSSLFLAG=1
56 export OPENSSLDIR=/usr
57 export OPENSSLLIBS="-lssl -lcrypt"
58 fi
59
60 use novideo \
61 && myconf="${myconf} --disable-video"
62
63 use noaudio \
64 && myconf="${myconf} --disable-audio"
65
66 econf ${myconf} || die "configure failed"
67 emake ${makeopts} opt || die "make failed"
68 }
69
70 src_install() {
71 local OPENH323_ARCH ALT_ARCH OPENH323_SUFFIX
72 local makeopts libdir
73
74 # make NOTRACE=1 opt ==> linux_$ARCH_n
75 # make opt ==> linux_$ARCH_r
76 if ! use debug; then
77 OPENH323_SUFFIX="n"
78 makeopts="NOTRACE=1"
79 else
80 OPENH323_SUFFIX="r"
81 fi
82
83 # use ptlib-config to get the right values here (for hppa, amd64 ...)
84 OPENH323_ARCH="$(ptlib-config --ostype)_$(ptlib-config --machtype)_${OPENH323_SUFFIX}"
85
86 # set ALT_ARCH
87 if use debug; then
88 ALT_ARCH=${OPENH323_ARCH/_r/_n}
89 else
90 ALT_ARCH=${OPENH323_ARCH/_n/_r}
91 fi
92
93 ###
94 # Install stuff
95 #
96 make PREFIX=/usr DESTDIR=${D} \
97 OH323_FILE="libh323_${OPENH323_ARCH}.so.${PV}" \
98 ${makeopts} install || die "install failed"
99
100 libdir=$(get_libdir)
101
102 # fix openh323's bogus symlinks
103 for pv in ${PV%.[0-9]} ${PV%.[0-9]*.[0-9]}; do
104 rm -f ${D}/usr/${libdir}/libh323_${OPENH323_ARCH}.so.${pv}
105
106 dosym /usr/${libdir}/libh323_${OPENH323_ARCH}.so.${PV} \
107 /usr/${libdir}/libh323_${OPENH323_ARCH}.so.${pv}
108 done
109 rm -f ${D}/usr/${libdir}/libh323_${OPENH323_ARCH}.so
110 dosym /usr/${libdir}/libh323_${OPENH323_ARCH}.so.${PV} \
111 /usr/${libdir}/libh323_${OPENH323_ARCH}.so
112
113 # create backwards compatibility with _r versioned libraries
114 for pv in ${PV} ${PV%.[0-9]} ${PV%.[0-9]*.[0-9]}; do
115 # compat symlink
116 dosym /usr/${libdir}/libh323_${OPENH323_ARCH}.so.${PV} \
117 /usr/${libdir}/libh323_${ALT_ARCH}.so.${pv}
118 done
119 dosym /usr/${libdir}/libh323_${OPENH323_ARCH}.so.${PV} \
120 /usr/${libdir}/libh323_${ALT_ARCH}.so
121
122 ###
123 # Compatibility "hacks"
124 #
125
126 # mod to keep gnugk happy (still needed?)
127 insinto /usr/share/openh323/src
128 newins ${FILESDIR}/openh323-1.11.7-emptyMakefile Makefile
129
130 # install version.h into $OPENH323DIR
131 insinto /usr/share/openh323
132 doins version.h
133
134 # should try to get rid of this one
135 rm -f ${D}/usr/${libdir}/libopenh323.so
136 dosym /usr/${libdir}/libh323_${OPENH323_ARCH}.so.${PV} /usr/${libdir}/libopenh323.so
137
138 # these should point to the right directories,
139 # openh323.org apps and others need this
140 dosed "s:^OH323_LIBDIR = \$(OPENH323DIR).*:OH323_LIBDIR = /usr/${libdir}:" \
141 /usr/share/openh323/openh323u.mak
142 dosed "s:^OH323_INCDIR = \$(OPENH323DIR).*:OH323_INCDIR = /usr/include/openh323:" \
143 /usr/share/openh323/openh323u.mak
144
145 # this is hardcoded now?
146 dosed "s:^\(OPENH323DIR[ \t]\+=\) ${S}:\1 /usr/share/openh323:" \
147 /usr/share/openh323/openh323u.mak
148 }

  ViewVC Help
Powered by ViewVC 1.1.20