summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2019-11-06 11:58:03 -0800
committerRobin H. Johnson <robbat2@gentoo.org>2019-11-06 11:58:13 -0800
commit90f28182cb70c260f1a456a2fa4426c0ed2ee959 (patch)
tree688ee1787133b2f82c66cab80d586c3573439210 /app-text/info2html
parentdev-python/mysqlclient: 1.4.5 bump (diff)
downloadgentoo-90f28182cb70c260f1a456a2fa4426c0ed2ee959.tar.gz
gentoo-90f28182cb70c260f1a456a2fa4426c0ed2ee959.tar.bz2
gentoo-90f28182cb70c260f1a456a2fa4426c0ed2ee959.zip
app-text/info2html: EAPI7 bump
Package-Manager: Portage-2.3.78, Repoman-2.3.17 Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Diffstat (limited to 'app-text/info2html')
-rw-r--r--app-text/info2html/info2html-2.0-r1.ebuild72
1 files changed, 72 insertions, 0 deletions
diff --git a/app-text/info2html/info2html-2.0-r1.ebuild b/app-text/info2html/info2html-2.0-r1.ebuild
new file mode 100644
index 000000000000..3bacec7b49a4
--- /dev/null
+++ b/app-text/info2html/info2html-2.0-r1.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit eutils webapp
+
+DESCRIPTION="Converts GNU .info files to HTML"
+HOMEPAGE="http://info2html.sourceforge.net/"
+SRC_URI="mirror://sourceforge/info2html/${P}.tar"
+
+LICENSE="freedist"
+# webapp.eclass deals with SLOTting
+#SLOT="0"
+IUSE=""
+KEYWORDS="~alpha ~amd64 ~hppa ~sparc ~x86"
+
+RDEPEND="dev-lang/perl"
+PATCHES=(
+ # filter user-provided data to prevent cross-frame/site scripting attacks
+ # bug #91354 (fix from Werner Fink)
+ "${FILESDIR}"/info2html-2.0-xss.patch
+)
+
+src_prepare() {
+ default
+
+ # Fixup INFODIR for paths in /etc/profile.env INFOPATH
+ infos=$(grep "^export INFOPATH=" /etc/profile.env | tail -n 1 |\
+ sed -e "s:^export INFOPATH=:INFOPATH=:;s:'::g")
+ # Default path to /usr/share/info and /usr/local/share/info
+ [[ -z ${infos} ]] && export infos="/usr/share/info"
+ infos=( ${INFOPATH//:/ } )
+ mv "${S}"/info2html.conf "${S}"/info2html.conf.orig
+ touch "${S}"/info2html.conf
+ state="copy"
+ inserted="no"
+ while read line; do
+ [[ ${line} == "@INFODIR = (" ]] && state="insert"
+ [[ ${line} == ");" ]] && state="copy"
+ case ${state} in
+ "copy")
+ echo ${line} >> ${S}/info2html.conf
+ ;;
+ "insert")
+ echo ${line} >> ${S}/info2html.conf
+ for info in "${infos[@]}"; do
+ echo " '${info}'," >> ${S}/info2html.conf
+ done
+ echo " '/usr/local/share/info'" >> ${S}/info2html.conf
+ state="skip"
+ inserted="yes"
+ ;;
+ "skip")
+ ;;
+ esac
+ done < "${S}"/info2html.conf.orig
+ [[ ${state} == "copy" && ${inserted} == "yes" ]] ||
+ die "Setting up info2html.conf failed"
+}
+
+src_install() {
+ webapp_src_preinst
+
+ exeinto ${MY_CGIBINDIR}
+ cp info2html infocat info2html.css info2html.conf "${D}"/${MY_CGIBINDIR}
+ # README zapped by info2html-gentoo.patch; it only listed
+ # the homepage so it doesn't add anything useful.
+ # dodoc README
+
+ webapp_src_install
+}