From 56bd759df1d0c750a065b8c845e93d5dfa6b549d Mon Sep 17 00:00:00 2001
From: "Robin H. Johnson" <robbat2@gentoo.org>
Date: Sat, 8 Aug 2015 13:49:04 -0700
Subject: proj/gentoo: Initial commit
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.

This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.

Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
---
 app-text/discount/Manifest                         |  2 +
 app-text/discount/discount-2.1.6-r1.ebuild         | 71 ++++++++++++++++++++
 app-text/discount/discount-2.1.8a-r1.ebuild        | 78 ++++++++++++++++++++++
 .../discount-2.1.6-portage-multilib-CFLAGS.patch   | 58 ++++++++++++++++
 app-text/discount/metadata.xml                     |  8 +++
 5 files changed, 217 insertions(+)
 create mode 100644 app-text/discount/Manifest
 create mode 100644 app-text/discount/discount-2.1.6-r1.ebuild
 create mode 100644 app-text/discount/discount-2.1.8a-r1.ebuild
 create mode 100644 app-text/discount/files/discount-2.1.6-portage-multilib-CFLAGS.patch
 create mode 100644 app-text/discount/metadata.xml

(limited to 'app-text/discount')

diff --git a/app-text/discount/Manifest b/app-text/discount/Manifest
new file mode 100644
index 000000000000..3eb722a08df6
--- /dev/null
+++ b/app-text/discount/Manifest
@@ -0,0 +1,2 @@
+DIST discount-2.1.6.tar.bz2 83823 SHA256 702bb29e17e387f82e40fae062d5e4939bc6fb22dcf53e6109982a5faa110796 SHA512 75e2fcc31f670bab77a3658a684054971998e91ad14743814480a4d24a59285dea1fe922d16c8d1c868250c417963a80282b8fe278021240ba424b840dd4df8e WHIRLPOOL 9f519c44df4bc5300729dd0f51fbcb20f957da68d03b670307bfd51c0d994b5d2b765eac6e17bba8119bb095277ce5dfbad185599bdeca834c4982eb813d7a79
+DIST discount-2.1.8a.tar.bz2 85161 SHA256 c01502f4eedba8163dcd30c613ba5ee238a068f75291be127856261727e03526 SHA512 a1eba7076a27da56136b8057189c5474a36bf11f8233cbae270c8a0cf9b070332b4dcdbbbecfbfbe1d8c19961ccaf87cee27ebe855c6bc6558d8ccc423553c96 WHIRLPOOL 5d7148f6c4e9f84a5290fffafa417c4684517df6fce0deec773beb2f89b4416b7849aa50351c27338653b8950b68c3c49ba223d31e347ad7562b0cb040761114
diff --git a/app-text/discount/discount-2.1.6-r1.ebuild b/app-text/discount/discount-2.1.6-r1.ebuild
new file mode 100644
index 000000000000..6bcc944acab2
--- /dev/null
+++ b/app-text/discount/discount-2.1.6-r1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib
+
+DESCRIPTION="An implementation of John Gruber's Markdown text to html language written in C"
+HOMEPAGE="http://www.pell.portland.or.us/~orc/Code/discount/"
+SRC_URI="http://www.pell.portland.or.us/~orc/Code/${PN}/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ia64 ppc ppc64 sparc x86"
+IUSE="minimal"
+
+src_prepare() {
+	epatch "${FILESDIR}"/${P}-portage-multilib-CFLAGS.patch
+
+	# for QA, we remove the Makefile’s usage of install -s.
+	# Drop ldconfig invocation.
+	# Force “librarian.sh” to respect LDFLAGS ($FLAGS should have CFLAGS
+	# at that point).
+	sed -i \
+		-e '/INSTALL_PROGRAM/s,-s ,,' \
+		-e 's/\(LDCONFIG=\).*/\1:/' \
+		-e 's/\(.\)\$FLAGS/& \1$LDFLAGS/' \
+		configure.inc || die "sed configure.inc failed"
+
+	# Add LDFLAGS and CPPFLAGS hackily.
+	sed -i \
+		-e 's/^CC[ \t]*=.*/& $(CPPFLAGS)/' \
+		-e 's/^LFLAGS[ \t]*=.*/& $(LDFLAGS)/' \
+		Makefile.in || die "Cannot fix LDFLAGS and CPPFLAGS"
+}
+
+src_configure() {
+	./configure.sh \
+		--libdir="${EPREFIX}"usr/"$(get_libdir)" \
+		--prefix="${EPREFIX}"usr \
+		--mandir="${EPREFIX}"usr/share/man \
+		--shared \
+		$(usex minimal '' --enable-all-features) \
+		|| die
+}
+
+src_install() {
+	emake DESTDIR="${D}" $(usex minimal install install.everything)
+
+	DISCOUNT_EBUILD_RENAMED_BINARIES=()
+	local bin
+	for bin in "${ED}"usr/bin/*; do
+		[[ ${bin} = */markdown || ${bin} =~ ${PN}[^/]*$ ]] && continue
+		DISCOUNT_EBUILD_RENAMED_BINARIES+=(${bin##*/})
+		mv "${bin}" "${bin%/*}/${PN}-${bin##*/}" || die
+		mv "${ED}"usr/share/man/man1/{,${PN}-}${bin##*/}.1 || die
+	done
+}
+
+pkg_postinst() {
+	if [[ ${DISCOUNT_EBUILD_RENAMED_BINARIES} ]]; then
+		local bin
+		elog "Some discount binaries with overly-generic names have been"
+		elog "prefixed. Please see"
+		elog "https://github.com/Orc/discount/issues/81 for discussion."
+		for bin in "${DISCOUNT_EBUILD_RENAMED_BINARIES[@]}"; do
+			elog "  Renamed '${bin}' to '${PN}-${bin}'."
+		done
+	fi
+}
diff --git a/app-text/discount/discount-2.1.8a-r1.ebuild b/app-text/discount/discount-2.1.8a-r1.ebuild
new file mode 100644
index 000000000000..8a570ab5a33f
--- /dev/null
+++ b/app-text/discount/discount-2.1.8a-r1.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib
+
+DESCRIPTION="An implementation of John Gruber's Markdown text to html language written in C"
+HOMEPAGE="http://www.pell.portland.or.us/~orc/Code/discount/"
+SRC_URI="http://www.pell.portland.or.us/~orc/Code/${PN}/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="minimal"
+
+src_prepare() {
+	# for QA, we remove the Makefile’s usage of install -s.
+	# Drop ldconfig invocation.
+	# Force “librarian.sh” to respect LDFLAGS ($FLAGS should have CFLAGS
+	# at that point).
+	sed -i \
+		-e '/INSTALL_PROGRAM/s,-s ,,' \
+		-e 's/\(LDCONFIG=\).*/\1:/' \
+		-e 's/\(.\)\$FLAGS/& \1$LDFLAGS/' \
+		configure.inc || die "sed configure.inc failed"
+
+	# Add LDFLAGS and CPPFLAGS hackily.
+	sed -i \
+		-e 's/^CC[ \t]*=.*/& $(CPPFLAGS)/' \
+		-e 's/^LFLAGS[ \t]*=.*/& $(LDFLAGS)/' \
+		Makefile.in || die "Cannot fix LDFLAGS and CPPFLAGS"
+}
+
+src_configure() {
+	# How econf() handles quoted whitespace. This should go away next
+	# release of discount.
+	eval "local -a DISCOUNT_EXTRA_CONFIGURE_SH=(${DISCOUNT_EXTRA_CONFIGURE_SH})"
+
+	local configure_call=(
+		./configure.sh
+		--libdir="${EPREFIX}"usr/"$(get_libdir)"
+		--prefix="${EPREFIX}"usr
+		--mandir="${EPREFIX}"usr/share/man
+		--shared
+		$(usex minimal '' --enable-all-features)
+		# Because a lot of discount features are exposed through
+		# ./configure.sh flags that, in the future, won’t be, I will
+		# respect DISCOUNT_EXTRA_CONFIGURE_SH as a workaround pending
+		# upstream https://github.com/Orc/discount/issues/124 for bug
+		# #554520.
+		"${DISCOUNT_EXTRA_CONFIGURE_SH[@]}"
+		# Enable deterministic HTML generation behavior. Otherwise, will
+		# actually call rand() as parse of its serialization code…
+		--debian-glitch
+	)
+	einfo "Running ${configure_call[@]} || die"
+	"${configure_call[@]}" || die
+}
+
+src_install() {
+	emake \
+		DESTDIR="${D}" \
+		$(usex minimal install install.everything) \
+		SAMPLE_PFX="${PN}-"
+}
+
+pkg_postinst() {
+	if ! use minimal; then
+		elog "Sample binaries with overly-generic names have been"
+		elog "prefixed with \"${PN}-\". Please see"
+		elog "https://github.com/Orc/discount/issues/81 for discussion."
+	fi
+	# This should also go away after 2.1.8a…
+	elog "To configure advanced options, use DISCOUNT_EXTRA_CONFIGURE_SH"
+	elog "and see https://bugs.gentoo.org/554520."
+}
diff --git a/app-text/discount/files/discount-2.1.6-portage-multilib-CFLAGS.patch b/app-text/discount/files/discount-2.1.6-portage-multilib-CFLAGS.patch
new file mode 100644
index 000000000000..0abf540cb968
--- /dev/null
+++ b/app-text/discount/files/discount-2.1.6-portage-multilib-CFLAGS.patch
@@ -0,0 +1,58 @@
+From 9b95e9a2dce195a8dfbdbf3206494095b177d405 Mon Sep 17 00:00:00 2001
+From: Nathan Phillip Brink <binki@gentoo.org>
+Date: Thu, 25 Jul 2013 01:14:14 -0400
+Subject: [PATCH] =?UTF-8?q?Fix=20support=20for=20=E2=80=9C$=20CFLAGS=3D-m32=20./configure.sh=E2=80=9D=20by=20using=20CFLAGS=20for=20all=20build=20invokations=20of=20CC.?=
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+---
+ Makefile.in |   14 +++++++-------
+ 1 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index 9bb438a..3bda63d 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -64,7 +64,7 @@ $(DESTDIR)$(LIBDIR):
+ 	@INSTALL_DIR@ $(DESTDIR)$(LIBDIR)
+ 
+ version.o: version.c VERSION
+-	$(CC) -DVERSION=\"`cat VERSION`\" -c version.c
++	$(CC) $(CFLAGS) -DVERSION=\"`cat VERSION`\" -c version.c
+ 
+ VERSION:
+ 	@true
+@@ -76,23 +76,23 @@ blocktags: mktags
+ 
+ # example programs
+ @THEME@theme:  theme.o $(MKDLIB) mkdio.h
+-@THEME@	$(CC) $(LFLAGS) -o theme theme.o pgm_options.o -lmarkdown @LIBS@
++@THEME@	$(CC) $(CFLAGS) $(LFLAGS) -o theme theme.o pgm_options.o -lmarkdown @LIBS@
+ 
+ 
+ mkd2html:  mkd2html.o $(MKDLIB) mkdio.h
+-	$(CC) $(LFLAGS) -o mkd2html mkd2html.o -lmarkdown @LIBS@
++	$(CC) $(CFLAGS) $(LFLAGS) -o mkd2html mkd2html.o -lmarkdown @LIBS@
+ 
+ markdown: main.o pgm_options.o $(MKDLIB)
+-	$(CC) $(LFLAGS) -o markdown main.o pgm_options.o -lmarkdown @LIBS@
++	$(CC) $(CFLAGS) $(LFLAGS) -o markdown main.o pgm_options.o -lmarkdown @LIBS@
+ 	
+ makepage:  makepage.c pgm_options.o $(MKDLIB) mkdio.h
+-	$(CC) $(LFLAGS) -o makepage makepage.c pgm_options.o -lmarkdown @LIBS@
++	$(CC) $(CFLAGS) $(LFLAGS) -o makepage makepage.c pgm_options.o -lmarkdown @LIBS@
+ 
+ pgm_options.o: pgm_options.c mkdio.h config.h
+-	$(CC) -I. -c pgm_options.c
++	$(CC) $(CFLAGS) -I. -c pgm_options.c
+ 
+ main.o: main.c mkdio.h config.h
+-	$(CC) -I. -c main.c
++	$(CC) $(CFLAGS) -I. -c main.c
+ 
+ $(MKDLIB): $(OBJS)
+ 	./librarian.sh make $(MKDLIB) VERSION $(OBJS)
+-- 
+1.7.3.4
+
diff --git a/app-text/discount/metadata.xml b/app-text/discount/metadata.xml
new file mode 100644
index 000000000000..548448307c18
--- /dev/null
+++ b/app-text/discount/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+  <maintainer>
+    <email>binki@gentoo.org</email>
+    <name>Nathan Phillip Brink</name>
+  </maintainer>
+</pkgmetadata>
-- 
cgit v1.2.3-65-gdbad