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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Sat Apr 14 14:49:18 2007 UTC (7 years, 3 months ago) by genstef
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +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.3.ebuild,v 1.6 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 ~sparc ~x86"
17
18 DEPEND=">=sys-apps/sed-4
19 >=dev-libs/pwlib-1.8.4
20 >=media-video/ffmpeg-0.4.7
21 ssl? ( dev-libs/openssl )"
22
23 src_unpack() {
24 unpack ${A}
25
26 cd ${S}
27 # Makefile is currently broken with NOTRACE=1, fix that
28 epatch ${FILESDIR}/${PN}-1.15.2-notrace.diff
29 }
30
31 src_compile() {
32 local makeopts
33 local myconf
34
35 # remove -fstack-protector, may cause problems (bug #75259)
36 filter-flags -fstack-protector
37
38 export PWLIBDIR=/usr/share/pwlib
39 export PTLIB_CONFIG=/usr/bin/ptlib-config
40 export OPENH323DIR=${S}
41
42 makeopts="${makeopts} ASNPARSER=/usr/bin/asnparser LDFLAGS=-L${S}/lib"
43
44 # NOTRACE avoid compilation problems, we disable PTRACING using NOTRACE=1
45 # compile with PTRACING if the user wants to debug stuff
46 if ! use debug; then
47 makeopts="${makeopts} NOTRACE=1"
48 fi
49
50 if use ssl; then
51 export OPENSSLFLAG=1
52 export OPENSSLDIR=/usr
53 export OPENSSLLIBS="-lssl -lcrypt"
54 fi
55
56 use novideo \
57 && myconf="${myconf} --disable-video"
58
59 use noaudio \
60 && myconf="${myconf} --disable-audio"
61
62 econf ${myconf} || die "configure failed"
63 emake ${makeopts} opt || die "make failed"
64 }
65
66 src_install() {
67 local OPENH323_ARCH ALT_ARCH OPENH323_SUFFIX
68 local makeopts
69 # make NOTRACE=1 opt ==> linux_$ARCH_n
70 # make opt ==> linux_$ARCH_r
71 if ! use debug; then
72 OPENH323_SUFFIX="n"
73 makeopts="NOTRACE=1"
74 else
75 OPENH323_SUFFIX="r"
76 fi
77
78 # amd64 needs special treatment
79 if use amd64; then
80 OPENH323_ARCH="linux_x86_64_${OPENH323_SUFFIX}"
81 else
82 OPENH323_ARCH="linux_${ARCH}_${OPENH323_SUFFIX}"
83 fi
84
85 # set ALT_ARCH
86 if use debug; then
87 ALT_ARCH=${OPENH323_ARCH/_r/_n}
88 else
89 ALT_ARCH=${OPENH323_ARCH/_n/_r}
90 fi
91
92 ###
93 # Install stuff
94 #
95 make PREFIX=/usr DESTDIR=${D} \
96 OH323_FILE="libh323_${OPENH323_ARCH}.so.${PV}" \
97 ${makeopts} install || die "install failed"
98
99 # workaround: don't install libh323*.so and libh323.so.${PV}
100 if [[ -f ${D}/usr/$(get_libdir)/libh323_${OPENH323_ARCH}.so ]]; then
101 # libh323*.so is a file... replace it w/ a symlink
102 rm -f ${D}/usr/$(get_libdir)/libh323_${OPENH323_ARCH}.so
103
104 dosym /usr/$(get_libdir)/libh323_${OPENH323_ARCH}.so.${PV} \
105 /usr/$(get_libdir)/libh323_${OPENH323_ARCH}.so
106 fi
107
108 ###
109 # Compatibility "hacks"
110 #
111
112 # mod to keep gnugk happy
113 insinto /usr/share/openh323/src
114 newins ${FILESDIR}/openh323-1.11.7-emptyMakefile Makefile
115
116 # install version.h into $OPENH323DIR
117 insinto /usr/share/openh323
118 doins version.h
119
120 rm ${D}/usr/$(get_libdir)/libopenh323.so
121 dosym /usr/$(get_libdir)/libh323_${OPENH323_ARCH}.so.${PV} /usr/$(get_libdir)/libopenh323.so
122
123 # for backwards compatibility with _r versioned libraries
124 for pv in ${PV} ${PV%.[0-9]} ${PV%.[0-9]*.[0-9]}; do
125 einfo "creating /usr/$(get_libdir)/libh323_${ALT_ARCH}.so.${pv} symlink"
126 dosym /usr/$(get_libdir)/libh323_${OPENH323_ARCH}.so.${PV} /usr/$(get_libdir)/libh323_${ALT_ARCH}.so.${pv}
127 done
128 dosym /usr/$(get_libdir)/libh323_${OPENH323_ARCH}.so.${PV} /usr/$(get_libdir)/libh323_${ALT_ARCH}.so
129
130 # these should point to the right directories,
131 # openh323.org apps and others need this
132 dosed "s:^OH323_LIBDIR = \$(OPENH323DIR).*:OH323_LIBDIR = /usr/$(get_libdir):" \
133 /usr/share/openh323/openh323u.mak
134 dosed "s:^OH323_INCDIR = \$(OPENH323DIR).*:OH323_INCDIR = /usr/include/openh323:" \
135 /usr/share/openh323/openh323u.mak
136 # this is hardcoded now?
137 dosed "s:^\(OPENH323DIR[ \t]\+=\) ${S}:\1 /usr/share/openh323:" \
138 /usr/share/openh323/openh323u.mak
139 }

  ViewVC Help
Powered by ViewVC 1.1.20