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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.20