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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.14 - (show annotations) (download)
Mon Aug 15 19:30:24 2005 UTC (9 years ago) by stkn
Branch: MAIN
CVS Tags: HEAD
Changes since 1.13: +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.5.ebuild,v 1.13 2005/07/10 01:06:25 swegener Exp $
4
5 inherit eutils flag-o-matic
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 MAKEOPTS="${MAKEOPTS} -j1"
25
26 pkg_setup() {
27 # to prevent merge problems with broken makefiles from old
28 # pwlib versions, we double-check here.
29
30 if [ "` fgrep '\$(OPENSSLDIR)/include' /usr/share/pwlib/make/unix.mak`" ]
31 then
32 # patch unix.mak so it doesn't require annoying
33 # unmerge/merge cycle to upgrade
34 einfo "Fixing broken pwlib makefile."
35 cd /usr/share/pwlib/make
36 sed -i \
37 -e "s:-DP_SSL -I\$(OPENSSLDIR)/include -I\$(OPENSSLDIR)/crypto:-DP_SSL:" \
38 -e "s:^LDFLAGS.*\+= -L\$(OPENSSLDIR)/lib -L\$(OPENSSLDIR):LDFLAGS +=:" \
39 unix.mak
40 fi
41
42 if has_version ">=sys-devel/gcc-3.3.2"; then
43 ewarn "If you are experiencing problems emerging openh323 with gcc-3.3.2"
44 ewarn "please try using CFLAGS=\"-O1\" when emergeing"
45 ewarn "we are currently investigating this problem..."
46 ewarn ""
47 ewarn "<sleeping 10 seconds...>"
48 epause 10
49 fi
50 }
51
52 src_unpack() {
53 unpack ${A}
54
55 cd ${S}
56 # fix and enable ffmpeg/h263 support (bug #32754)
57 epatch ${FILESDIR}/openh323-${PV}-ffmpeg.diff
58
59 # fix include order (bug #32522)
60 epatch ${FILESDIR}/openh323-${PV}-include-order.diff
61
62 # fix to compile on gcc-3.4 (bug #56951)
63 epatch ${FILESDIR}/${PN}-1.13.2-gcc34.diff
64 }
65
66 src_compile() {
67 local makeopts
68
69 # remove -fstack-protector, may cause problems (bug #75259)
70 filter-flags -fstack-protector
71
72 export PWLIBDIR=/usr/share/pwlib
73 export PTLIB_CONFIG=/usr/bin/ptlib-config
74 export OPENH323DIR=${S}
75
76 # NOTRACE avoid compilation problems, we disable PTRACING using NOTRACE=1
77 makeopts="${makeopts} ASNPARSER=/usr/bin/asnparser LDFLAGS=-L${S}/lib NOTRACE=1"
78
79 if use ssl; then
80 export OPENSSLFLAG=1
81 export OPENSSLDIR=/usr
82 export OPENSSLLIBS="-lssl -lcrypt"
83 fi
84
85 # use shipped speex version
86 econf \
87 --enable-localspeex || die
88
89 use amd64 && append-flags -fPIC
90
91 emake ${makeopts} opt || die "make failed"
92 }
93
94 src_install() {
95 local OPENH323_ARCH ALT_ARCH
96 # make NOTRACE=1 opt ==> linux_$ARCH_n
97 # make opt ==> linux_$ARCH_r
98
99 # amd64 needs special treatment
100 if [ ${ARCH} = "amd64" ]; then
101 OPENH323_ARCH="linux_x86_64_n"
102 else
103 OPENH323_ARCH="linux_${ARCH}_n"
104 fi
105
106 dodir /usr/bin /usr/lib/ /usr/share
107 make PREFIX=${D}/usr install || die "install failed"
108 dobin ${S}/samples/simple/obj_${OPENH323_ARCH}/simph323
109
110 # remove CVS stuff
111 find ${D} -name 'CVS' -type d | xargs rm -rf
112
113 # mod to keep gnugk happy
114 insinto /usr/share/openh323/src
115 newins ${FILESDIR}/openh323-1.11.7-emptyMakefile Makefile
116
117 # install version.h into $OPENH323DIR
118 insinto /usr/share/openh323
119 doins version.h
120
121 rm ${D}/usr/lib/libopenh323.so
122 dosym /usr/lib/libh323_${OPENH323_ARCH}.so.${PV} /usr/lib/libopenh323.so
123
124 # for backwards compatibility with _r versioned libraries
125 # (this might not work...)
126 ALT_ARCH=${OPENH323_ARCH/_n/_r}
127 for pv in ${PV} ${PV%.[0-9]} ${PV%.[0-9]*.[0-9]}; do
128 einfo "creating /usr/lib/libh323_${ALT_ARCH}.so.${pv} symlink"
129 dosym /usr/lib/libh323_${OPENH323_ARCH}.so.${PV} /usr/lib/libh323_${ALT_ARCH}.so.${pv}
130 done
131 dosym /usr/lib/libh323_${OPENH323_ARCH}.so.${PV} /usr/lib/libh323_${ALT_ARCH}.so
132
133 # these should point to the right directories,
134 # openh323.org apps and others need this
135 dosed "s:^OH323_LIBDIR = \$(OPENH323DIR).*:OH323_LIBDIR = /usr/lib:" \
136 /usr/share/openh323/openh323u.mak
137 dosed "s:^OH323_INCDIR = \$(OPENH323DIR).*:OH323_INCDIR = /usr/include/openh323:" \
138 /usr/share/openh323/openh323u.mak
139 # this is hardcoded now? nice...
140 dosed "s:^\(OPENH323DIR[ \t]\+=\) ${S}:\1 /usr/share/openh323:" \
141 /usr/share/openh323/openh323u.mak
142 }

  ViewVC Help
Powered by ViewVC 1.1.20