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

Collapse All | Expand All

(-)/usr/local/gentoo/usr/portage/net-libs/c-client/c-client-2007f-r4.ebuild (-33 / +56 lines)
Lines 18-24 Link Here
18
18
19
LICENSE="Apache-2.0"
19
LICENSE="Apache-2.0"
20
SLOT="0"
20
SLOT="0"
21
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd"
21
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x64-macos ~x86-macos"
22
IUSE="doc +ipv6 kerberos kernel_linux kernel_FreeBSD pam ssl static-libs topal chappa"
22
IUSE="doc +ipv6 kerberos kernel_linux kernel_FreeBSD pam ssl static-libs topal chappa"
23
23
24
RDEPEND="ssl? ( dev-libs/openssl )
24
RDEPEND="ssl? ( dev-libs/openssl )
Lines 27-32 Link Here
27
DEPEND="${RDEPEND}
27
DEPEND="${RDEPEND}
28
	kernel_linux? ( pam? ( >=sys-libs/pam-0.72 ) )"
28
	kernel_linux? ( pam? ( >=sys-libs/pam-0.72 ) )"
29
29
30
pkg_pretend() {
31
	if [[ ${CHOST} == *-darwin* ]] && ! use static-libs ; then
32
		die "Non static build of c-client is not supported yet on darwin platform"
33
	fi
34
}
35
30
src_prepare() {
36
src_prepare() {
31
	# Tarball packed with bad file perms
37
	# Tarball packed with bad file perms
32
	chmod -R u+rwX,go-w .
38
	chmod -R u+rwX,go-w .
Lines 35-77 Link Here
35
	# generally should be built with it anyway.
41
	# generally should be built with it anyway.
36
	append-flags -fPIC
42
	append-flags -fPIC
37
43
38
	# Modifications so we can build it optimally and correctly
44
	if [[ ${CHOST} != *-darwin* ]] ; then
39
	sed \
45
		# Modifications so we can build it optimally and correctly
40
		-e "s:BASECFLAGS=\".*\":BASECFLAGS=:g" \
46
		sed \
41
		-e 's:SSLDIR=/usr/local/ssl:SSLDIR=/usr:g' \
47
			-e "s:BASECFLAGS=\".*\":BASECFLAGS=:g" \
42
		-e 's:SSLCERTS=$(SSLDIR)/certs:SSLCERTS=/etc/ssl/certs:g' \
48
			-e 's:SSLDIR=/usr/local/ssl:SSLDIR=/usr:g' \
43
		-i src/osdep/unix/Makefile || die "Makefile sed fixing failed"
49
			-e 's:SSLCERTS=$(SSLDIR)/certs:SSLCERTS=/etc/ssl/certs:g' \
44
50
			-i src/osdep/unix/Makefile || die "Makefile sed fixing failed"
45
	# Make the build system more multilib aware
51
46
	sed \
52
		# Make the build system more multilib aware
47
		-e "s:^SSLLIB=\$(SSLDIR)/lib:SSLLIB=\$(SSLDIR)/$(get_libdir):" \
53
		sed \
48
		-e "s:^AFSLIB=\$(AFSDIR)/lib:AFSLIB=\$(AFSDIR)/$(get_libdir):" \
54
			-e "s:^SSLLIB=\$(SSLDIR)/lib:SSLLIB=\$(SSLDIR)/$(get_libdir):" \
49
		-i src/osdep/unix/Makefile || die "Makefile sed fixing failed"
55
			-e "s:^AFSLIB=\$(AFSDIR)/lib:AFSLIB=\$(AFSDIR)/$(get_libdir):" \
50
56
			-i src/osdep/unix/Makefile || die "Makefile sed fixing failed"
51
	# Targets should use the Gentoo (ie linux) fs
57
52
	sed -e '/^bsf:/,/^$/ s:ACTIVEFILE=.*:ACTIVEFILE=/var/lib/news/active:g' \
58
		# Targets should use the Gentoo (ie linux) fs
53
		-i src/osdep/unix/Makefile || die "Makefile sex fixing failed for FreeBSD"
59
		sed -e '/^bsf:/,/^$/ s:ACTIVEFILE=.*:ACTIVEFILE=/var/lib/news/active:g' \
54
60
			-i src/osdep/unix/Makefile || die "Makefile sex fixing failed for FreeBSD"
61
	fi
62
	
55
	# Apply a patch to only build the stuff we need for c-client
63
	# Apply a patch to only build the stuff we need for c-client
56
	epatch "${FILESDIR}"/${PN}-2006k_GENTOO_Makefile.patch
64
	epatch "${FILESDIR}"/${PN}-2006k_GENTOO_Makefile.patch
57
65
58
	# Apply patch to add the compilation of a .so for PHP
66
	if [[ ${CHOST} != *-darwin* ]] ; then
59
	# This was previously conditional, but is more widely useful.
67
		# Apply patch to add the compilation of a .so for PHP
60
	epatch "${FILESDIR}"/${PN}-2006k_GENTOO_amd64-so-fix.patch
68
		# This was previously conditional, but is more widely useful.
69
		epatch "${FILESDIR}"/${PN}-2006k_GENTOO_amd64-so-fix.patch
70
	fi
61
71
62
	# Remove the pesky checks about SSL stuff
72
	# Remove the pesky checks about SSL stuff
63
	sed -e '/read.*exit/d' -i Makefile || die
73
	sed -e '/read.*exit/d' -i Makefile || die
64
74
65
	# Respect LDFLAGS
75
	if [[ ${CHOST} != *-darwin* ]] ; then
66
	epatch "${FILESDIR}"/${PN}-2007f-ldflags.patch
76
		# Respect LDFLAGS
67
	sed -e "s/CC=cc/CC=$(tc-getCC)/" \
77
		epatch "${FILESDIR}"/${PN}-2007f-ldflags.patch
68
		-e "s/ARRC=ar/ARRC=$(tc-getAR)/" \
78
		sed -e "s/CC=cc/CC=$(tc-getCC)/" \
69
		-e "s/RANLIB=ranlib/RANLIB=$(tc-getRANLIB)/" \
79
			-e "s/ARRC=ar/ARRC=$(tc-getAR)/" \
70
		-i src/osdep/unix/Makefile || die "Respecting build flags"
80
			-e "s/RANLIB=ranlib/RANLIB=$(tc-getRANLIB)/" \
81
			-i src/osdep/unix/Makefile || die "Respecting build flags"
82
	fi
71
83
72
	use topal && epatch "${FILESDIR}/${P}-topal.patch"
84
	use topal && epatch "${FILESDIR}/${P}-topal.patch"
73
	use chappa && epatch "${DISTDIR}/${P}-chappa-${CHAPPA_PL}-all.patch.gz"
85
	use chappa && epatch "${DISTDIR}/${P}-chappa-${CHAPPA_PL}-all.patch.gz"
74
86
87
	if [[ ${CHOST} == *-darwin* ]] ; then
88
		epatch "${FILESDIR}/c-client-2007f-osx-prefix.patch"
89
	fi
90
75
	elibtoolize
91
	elibtoolize
76
}
92
}
77
93
Lines 85-90 Link Here
85
	elif use kernel_FreeBSD ; then
101
	elif use kernel_FreeBSD ; then
86
		target=bsf passwdtype=pam
102
		target=bsf passwdtype=pam
87
	fi
103
	fi
104
	if [[ ${CHOST} == *-darwin* ]] ; then
105
		target=oxp passwdtype=std
106
		use ssl && ssltype=nopwd
107
	fi
88
	use kerberos \
108
	use kerberos \
89
		&& mymake="EXTRAAUTHENTICATORS=gss" \
109
		&& mymake="EXTRAAUTHENTICATORS=gss" \
90
		&& EXTRALIBS="-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err" \
110
		&& EXTRALIBS="-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err" \
Lines 94-100 Link Here
94
		EXTRACFLAGS="${CFLAGS}" \
114
		EXTRACFLAGS="${CFLAGS}" \
95
		EXTRALDFLAGS="${LDFLAGS}" \
115
		EXTRALDFLAGS="${LDFLAGS}" \
96
		EXTRALIBS="${EXTRALIBS}" \
116
		EXTRALIBS="${EXTRALIBS}" \
97
		GSSDIR=/usr
117
		GSSDIR="${EPREFIX}/usr" \
118
		EPREFIX="${EPREFIX}"
98
}
119
}
99
120
100
src_install() {
121
src_install() {
Lines 104-114 Link Here
104
		dosym c-client.a /usr/$(get_libdir)/libc-client.a
125
		dosym c-client.a /usr/$(get_libdir)/libc-client.a
105
	fi
126
	fi
106
127
107
	# Now the shared library
128
	if [[ ${CHOST} != *-darwin* ]] ; then
108
	dolib.so c-client/libc-client.so.1.0.0
129
		# Now the shared library
130
		dolib.so c-client/libc-client.so.1.0.0
109
131
110
	dosym libc-client.so.1.0.0 /usr/$(get_libdir)/libc-client.so
132
		dosym libc-client.so.1.0.0 /usr/$(get_libdir)/libc-client.so
111
	dosym libc-client.so.1.0.0 /usr/$(get_libdir)/libc-client.so.1
133
		dosym libc-client.so.1.0.0 /usr/$(get_libdir)/libc-client.so.1
134
	fi
112
135
113
	# Headers
136
	# Headers
114
	insinto /usr/include/imap
137
	insinto /usr/include/imap
Lines 118-124 Link Here
118
	doins c-client/linkage.c
141
	doins c-client/linkage.c
119
	doins c-client/osdep.h
142
	doins c-client/osdep.h
120
	if use ssl; then
143
	if use ssl; then
121
		echo "  ssl_onceonlyinit ();" >> "${D}"/usr/include/imap/linkage.c || die
144
		echo "  ssl_onceonlyinit ();" >> "${ED}"/usr/include/imap/linkage.c || die
122
	fi
145
	fi
123
	# Docs
146
	# Docs
124
	dodoc README docs/*.txt docs/BUILD docs/CONFIG docs/RELNOTES docs/SSLBUILD
147
	dodoc README docs/*.txt docs/BUILD docs/CONFIG docs/RELNOTES docs/SSLBUILD

Return to bug 520370