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

Collapse All | Expand All

(-)openssl-0.9.8l-r2.ebuild (-23 / +25 lines)
Lines 11-17 Link Here
11
LICENSE="openssl"
11
LICENSE="openssl"
12
SLOT="0"
12
SLOT="0"
13
KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
13
KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
14
IUSE="bindist gmp kerberos sse2 test zlib"
14
IUSE="bindist gmp kerberos sse2 test zlib +doc"
15
15
16
RDEPEND="gmp? ( dev-libs/gmp )
16
RDEPEND="gmp? ( dev-libs/gmp )
17
	zlib? ( sys-libs/zlib )
17
	zlib? ( sys-libs/zlib )
Lines 49-57 Link Here
49
		-e '/DIRS/s: fips : :g' \
49
		-e '/DIRS/s: fips : :g' \
50
		-e '/^MANSUFFIX/s:=.*:=ssl:' \
50
		-e '/^MANSUFFIX/s:=.*:=ssl:' \
51
		-e '/^MAKEDEPPROG/s:=.*:=$(CC):' \
51
		-e '/^MAKEDEPPROG/s:=.*:=$(CC):' \
52
		-e $(has noman FEATURES \
52
		-e $(use doc \
53
			&& echo '/^install:/s:install_docs::' \
53
			&& echo '/^MANDIR=/s:=.*:=/usr/share/man:' \
54
			|| echo '/^MANDIR=/s:=.*:=/usr/share/man:') \
54
			|| echo '/^install:/s:install_docs::') \
55
		Makefile{,.org} \
55
		Makefile{,.org} \
56
		|| die
56
		|| die
57
	# show the actual commands in the log
57
	# show the actual commands in the log
Lines 149-174 Link Here
149
	rm -r "${D}"/etc/ssl/certs/{demo,expired}
149
	rm -r "${D}"/etc/ssl/certs/{demo,expired}
150
150
151
	# Namespace openssl programs to prevent conflicts with other man pages
151
	# Namespace openssl programs to prevent conflicts with other man pages
152
	cd "${D}"/usr/share/man
152
	if use doc ; then
153
	local m d s
153
		cd "${D}"/usr/share/man
154
	for m in $(find . -type f | xargs grep -L '#include') ; do
154
		local m d s
155
		d=${m%/*} ; d=${d#./} ; m=${m##*/}
155
		for m in $(find . -type f | xargs grep -L '#include') ; do
156
		[[ ${m} == openssl.1* ]] && continue
156
			d=${m%/*} ; d=${d#./} ; m=${m##*/}
157
		[[ -n $(find -L ${d} -type l) ]] && die "erp, broken links already!"
157
			[[ ${m} == openssl.1* ]] && continue
158
		mv ${d}/{,ssl-}${m}
158
			[[ -n $(find -L ${d} -type l) ]] && die "erp, broken links already!"
159
		# fix up references to renamed man pages
159
			mv ${d}/{,ssl-}${m}
160
		sed -i '/^[.]SH "SEE ALSO"/,/^[.]/s:\([^(, ]*(1)\):ssl-\1:g' ${d}/ssl-${m}
160
			# fix up references to renamed man pages
161
		ln -s ssl-${m} ${d}/openssl-${m}
161
			sed -i '/^[.]SH "SEE ALSO"/,/^[.]/s:\([^(, ]*(1)\):ssl-\1:g' ${d}/ssl-${m}
162
		# locate any symlinks that point to this man page ... we assume
162
			ln -s ssl-${m} ${d}/openssl-${m}
163
		# that any broken links are due to the above renaming
163
			# locate any symlinks that point to this man page ... we assume
164
		for s in $(find -L ${d} -type l) ; do
164
			# that any broken links are due to the above renaming
165
			s=${s##*/}
165
			for s in $(find -L ${d} -type l) ; do
166
			rm -f ${d}/${s}
166
				s=${s##*/}
167
			ln -s ssl-${m} ${d}/ssl-${s}
167
				rm -f ${d}/${s}
168
			ln -s ssl-${s} ${d}/openssl-${s}
168
				ln -s ssl-${m} ${d}/ssl-${s}
169
				ln -s ssl-${s} ${d}/openssl-${s}
170
			done
169
		done
171
		done
170
	done
172
		[[ -n $(find -L ${d} -type l) ]] && die "broken manpage links found :("
171
	[[ -n $(find -L ${d} -type l) ]] && die "broken manpage links found :("
173
	fi
172
174
173
	dodir /etc/sandbox.d #254521
175
	dodir /etc/sandbox.d #254521
174
	echo 'SANDBOX_PREDICT="/dev/crypto"' > "${D}"/etc/sandbox.d/10openssl
176
	echo 'SANDBOX_PREDICT="/dev/crypto"' > "${D}"/etc/sandbox.d/10openssl

Return to bug 278744