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

Contents of /net-libs/openh323/openh323-1.12.2-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.13 - (show annotations) (download)
Tue Oct 3 13:11:05 2006 UTC (8 years, 2 months ago) by genstef
Branch: MAIN
CVS Tags: HEAD
Changes since 1.12: +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.12.2-r2.ebuild,v 1.12 2005/01/08 20:15:47 stkn Exp $
4
5 inherit eutils
6
7 IUSE="ssl"
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="http://www.openh323.org/bin/${PN}_${PV}.tar.gz"
13
14 SLOT="0"
15 LICENSE="MPL-1.1"
16 KEYWORDS="x86 ppc sparc alpha"
17
18 DEPEND=">=sys-apps/sed-4
19 ~dev-libs/pwlib-1.5.2
20 >=media-video/ffmpeg-0.4.7
21 ssl? ( dev-libs/openssl )"
22
23 MAKEOPTS="${MAKEOPTS} -j1"
24
25 pkg_setup() {
26 # to prevent merge problems with broken makefiles from old
27 # pwlib versions, we double-check here.
28
29 if [ "` fgrep '\$(OPENSSLDIR)/include' /usr/share/pwlib/make/unix.mak`" ]
30 then
31 # patch unix.mak so it doesn't require annoying
32 # unmerge/merge cycle to upgrade
33 einfo "Fixing broken pwlib makefile."
34 cd /usr/share/pwlib/make
35 sed -i \
36 -e "s:-DP_SSL -I\$(OPENSSLDIR)/include -I\$(OPENSSLDIR)/crypto:-DP_SSL:" \
37 -e "s:^LDFLAGS.*\+= -L\$(OPENSSLDIR)/lib -L\$(OPENSSLDIR):LDFLAGS +=:" \
38 unix.mak
39 fi
40
41 if has_version ">=sys-devel/gcc-3.3.2"; then
42 ewarn "If you are experiencing problems emerging openh323 with gcc-3.3.x"
43 ewarn "please try using CFLAGS=\"-O1\" when emergeing"
44 ewarn "we are currently investigating this problem..."
45 ewarn ""
46 ewarn "<sleeping 10 seconds...>"
47 epause 10
48 fi
49 }
50
51 src_unpack() {
52 unpack ${A}
53
54 cd ${S}
55 # fix and enable ffmpeg/h263 support (bug #32754)
56 epatch ${FILESDIR}/openh323-${PV}-ffmpeg.diff
57
58 # fix include order (bug #32522)
59 epatch ${FILESDIR}/openh323-${PV}-include-order.diff
60 }
61
62 src_compile() {
63 local makeopts
64
65 export PWLIBDIR=/usr/share/pwlib
66 export PTLIB_CONFIG=/usr/bin/ptlib-config
67 export OPENH323DIR=${S}
68
69 # NOTRACE avoid compilation problems, we disable PTRACING using NOTRACE=1
70 # setting LDFLAGS prevents openh323 from using the wrong libs
71 makeopts="${makeopts} ASNPARSER=/usr/bin/asnparser LDFLAGS=-L${S}/lib NOTRACE=1"
72
73 if use ssl; then
74 export OPENSSLFLAG=1
75 export OPENSSLDIR=/usr
76 export OPENSSLLIBS="-lssl -lcrypt"
77 fi
78
79 econf || die
80 emake ${makeopts} opt || die "make failed"
81 }
82
83 src_install() {
84 local OPENH323_ARCH ALT_ARCH
85 # make NOTRACE=1 opt ==> linux_$ARCH_n
86 # make opt ==> linux_$ARCH_r
87
88 # amd64 needs special treatment
89 if [ ${ARCH} = "amd64" ]; then
90 OPENH323_ARCH="linux_x86_64_n"
91 else
92 OPENH323_ARCH="linux_${ARCH}_n"
93 fi
94
95 dodir /usr/bin /usr/lib/ /usr/share
96 make PREFIX=${D}/usr install || die "install failed"
97 dobin ${S}/samples/simple/obj_${OPENH323_ARCH}/simph323
98
99 find ${D} -name 'CVS' -type d | xargs rm -rf
100
101 # mod to keep gnugk happy
102 insinto /usr/share/openh323/src
103 newins ${FILESDIR}/openh323-1.11.7-emptyMakefile Makefile
104
105 # install version.h into $OPENH323DIR
106 insinto /usr/share/openh323
107 doins version.h
108
109 rm ${D}/usr/lib/libopenh323.so
110 dosym /usr/lib/libh323_${OPENH323_ARCH}.so.${PV} /usr/lib/libopenh323.so
111
112 # for backwards compatibility with _r versioned libraries
113 ALT_ARCH=${OPENH323_ARCH/_n/_r}
114 for pv in ${PV} ${PV%.[0-9]} ${PV%.[0-9]*.[0-9]}; do
115 einfo "creating /usr/lib/libh323_${ALT_ARCH}.so.${pv} symlink"
116 dosym /usr/lib/libh323_${OPENH323_ARCH}.so.${PV} /usr/lib/libh323_${ALT_ARCH}.so.${pv}
117 done
118 dosym /usr/lib/libh323_${OPENH323_ARCH}.so.${PV} /usr/lib/libh323_${ALT_ARCH}.so
119
120 # these should point to the right directories,
121 # openh323.org and other applications need this
122 dosed "s:^OH323_LIBDIR = \$(OPENH323DIR).*:OH323_LIBDIR = /usr/lib:" \
123 /usr/share/openh323/openh323u.mak
124 dosed "s:^OH323_INCDIR = \$(OPENH323DIR).*:OH323_INCDIR = /usr/include/openh323:" \
125 /usr/share/openh323/openh323u.mak
126 }

  ViewVC Help
Powered by ViewVC 1.1.20