Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 308561 | Differences between
and this patch

Collapse All | Expand All

(-)/portdir/portage/net-misc/asterisk/asterisk-1.6.2.6.ebuild (-3 / +76 lines)
Lines 7-20 Link Here
7
7
8
MY_P="${PN}-${PV/_/-}"
8
MY_P="${PN}-${PV/_/-}"
9
9
10
# -r1: now with *really ugly hacks to build imap support*
11
IMAP_SRC_URI=""
12
MY_IMAP_PV=""
13
MY_IMAP_PN=""
14
MY_IMAP_P="" 
15
S_IMAP=""
16
17
if [ $( use_with imap ) ]; then
18
	ewarn "yah we are building with imap support, loo0k out!!!"
19
	MY_IMAP_PV=2007e
20
	MY_IMAP_PN=imap
21
	MY_IMAP_P="${MY_IMAP_PN}-${MY_IMAP_PV}"
22
	S_IMAP=${WORKDIR}/${MY_IMAP_P}
23
24
	IMAP_SRC_URI="ftp://ftp.cac.washington.edu/imap/${MY_IMAP_P}.tar.Z" 
25
fi
26
10
DESCRIPTION="Asterisk: A Modular Open Source PBX System"
27
DESCRIPTION="Asterisk: A Modular Open Source PBX System"
11
HOMEPAGE="http://www.asterisk.org/"
28
HOMEPAGE="http://www.asterisk.org/"
12
SRC_URI="http://downloads.digium.com/pub/telephony/asterisk/releases/${MY_P}.tar.gz"
29
SRC_URI="http://downloads.digium.com/pub/telephony/asterisk/releases/${MY_P}.tar.gz ${IMAP_SRC_URI}"
13
LICENSE="GPL-2"
30
LICENSE="GPL-2"
14
SLOT="0"
31
SLOT="0"
15
KEYWORDS="~amd64 ~x86"
32
KEYWORDS="~amd64 ~x86"
16
33
17
IUSE="alsa +caps curl dahdi debug freetds iconv jabber ldap keepsrc misdn newt nosamples oss postgres radius snmp span speex ssl sqlite static vorbis"
34
IUSE="imap alsa +caps curl dahdi debug freetds iconv jabber ldap keepsrc misdn newt nosamples oss postgres radius snmp span speex ssl sqlite static vorbis"
18
35
19
RDEPEND="sys-libs/ncurses
36
RDEPEND="sys-libs/ncurses
20
	dev-libs/popt
37
	dev-libs/popt
Lines 74-79 Link Here
74
91
75
src_unpack() {
92
src_unpack() {
76
	unpack ${A}
93
	unpack ${A}
94
# this is ripped,  more or less wholesale (less, actually, than is needed)
95
# from the ebuild for c-client. Uneeded afterward, so why depend on it?
96
# it would be cool to just be able to 'ebuild compile' c-client and point to it
97
98
if [ $( use_with imap ) ]; then
99
pushd "${S_IMAP}"
100
101
sed \
102
-e "s:BASECFLAGS=\".*\":BASECFLAGS=:g" \
103
-e 's:SSLDIR=/usr/local/ssl:SSLDIR=/usr:g' \
104
-e 's:SSLCERTS=$(SSLDIR)/certs:SSLCERTS=/etc/ssl/certs:g' \
105
-i src/osdep/unix/Makefile || die "Makefile sed fixing failed"
106
107
sed -e '/^bsf:/,/^$/ s:ACTIVEFILE=.*:ACTIVEFILE=/var/lib/news/active:g' \
108
	-i src/osdep/unix/Makefile || die "Makefile sex fixing failed for FreeBSD"
109
110
sed -e '/read.*exit/d' -i Makefile
111
112
# there is more magic in c-client ebuild to steal for this!
113
# more testing is needed: this just "WFM"
114
# the list of ports and flavors is long, PASSWDTYPE is maybe what is needed
115
# that wasn't already there
116
117
make -j1 lnp SSLTYPE=unix PASSWDTYPE=pam EXTRACFLAGS=" -fPIC"
118
119
popd 
120
121
# this is the trick for changing the makeopts that is recommended by digium folks, I think:
122
123
echo MENUSELECT_OPTS_app_voicemail=IMAP_STORAGE > "${S}/user_makeopts"
124
125
# this is/isn't needed?
126
127
# export USER_MAKEOPTS="${S}/user_makeopts"
128
129
fi;
130
131
77
	cd "${S}"
132
	cd "${S}"
78
133
79
	#
134
	#
Lines 135-141 Link Here
135
	#
190
	#
136
	# start with configure
191
	# start with configure
137
	#
192
	#
193
194
	IMAP_EXTRAS="" 
195
	if [ $( use_with imap ) ]; then
196
		IMAP_EXTRAS="--with-imap=${S_IMAP}"
197
	fi
198
138
	econf \
199
	econf \
200
		${IMAP_EXTRAS} \
139
		--libdir="/usr/$(get_libdir)" \
201
		--libdir="/usr/$(get_libdir)" \
140
		--localstatedir="/var" \
202
		--localstatedir="/var" \
141
		--with-gsm=internal \
203
		--with-gsm=internal \
Lines 179-185 Link Here
179
		###
241
		###
180
		# run menuselect
242
		# run menuselect
181
243
182
		emake menuselect.makeopts || die "emake menuselect.makeopts failed"
244
		emake USER_MAKEOPTS="${S}/user_makeopts" menuselect.makeopts || die "emake menuselect.makeopts failed"
183
245
184
		###
246
		###
185
		# get list of modules with failed dependencies
247
		# get list of modules with failed dependencies
Lines 219-224 Link Here
219
		done
281
		done
220
	fi
282
	fi
221
283
284
# TODO: this is where the makeopts get fixed if you don't use modules. 
285
# it should also go up there in some clean way. I've never been able to get
286
# ASTERISK_MODULES to work for me, but having it set could be a precondition
287
# if this needs moving
288
289
	if [ $(use_with imap) ]; then
290
291
		emake USER_MAKEOPTS="${S}/user_makeopts" menuselect.makeopts || die \
292
			"emake menuselect.makeopts failed"
293
	fi
294
222
	ASTLDFLAGS="${LDFLAGS}" emake || die "emake failed"
295
	ASTLDFLAGS="${LDFLAGS}" emake || die "emake failed"
223
}
296
}
224
297

Return to bug 308561