Subject: [alpine-aports] [PATCH 1/3] community/xpdf: move from testing

From: Isaac Dunham <[email-masked]>
Date: Tue, 19 Jan 2016 22:07:41 -0800

It's been working well for quite a while.
---
 community/xpdf/APKBUILD                   | 65 ++++++++++++++++++++++
 community/xpdf/xpdf-3.04-protection.patch | 84 ++++++++++++++++++++++++++++
 community/xpdf/xpdfrc                     | 91 +++++++++++++++++++++++++++++++
 testing/xpdf/APKBUILD                     | 65 ----------------------
 testing/xpdf/xpdf-3.04-protection.patch   | 84 ----------------------------
 testing/xpdf/xpdfrc                       | 91 -------------------------------
 6 files changed, 240 insertions(+), 240 deletions(-)
 create mode 100644 community/xpdf/APKBUILD
 create mode 100644 community/xpdf/xpdf-3.04-protection.patch
 create mode 100644 community/xpdf/xpdfrc
 delete mode 100644 testing/xpdf/APKBUILD
 delete mode 100644 testing/xpdf/xpdf-3.04-protection.patch
 delete mode 100644 testing/xpdf/xpdfrc

diff --git a/community/xpdf/APKBUILD b/community/xpdf/APKBUILD
new file mode 100644
index 0000000..bb4ec6f
--- /dev/null
+++ b/community/xpdf/APKBUILD
@@ -0,0 +1,65 @@
+# Contributor: Isaac Dunham <[email-masked]>
+# Maintainer:  Isaac Dunham <[email-masked]>
+pkgname=xpdf
+pkgver="3.04"
+pkgrel=2
+pkgdesc="The classic X11 PDF viewer"
+url="http://foolabs.com/xpdf"
+arch="all"
+license="GPL2/GPL3"
+depends="ghostscript-fonts"
+depends_dev=""
+makedepends="motif-dev freetype-dev libpng-dev"
+install=""
+subpackages="$pkgname-doc"
+source="ftp://ftp.foolabs.com/pub/xpdf/$pkgname-$pkgver.tar.gz
+	xpdf-3.04-protection.patch
+	xpdfrc"
+
+_builddir="$srcdir/$pkgname-$pkgver"
+prepare() {
+	local i
+	cd "$_builddir"
+	for i in $source; do
+		case $i in
+		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+		esac
+	done
+}
+
+build() {
+	echo "$_builddir"
+	cd "$_builddir"
+	./configure \
+		--with-x \
+		--with-freetype2-includes=/usr/include/freetype2 \
+		--build=$CBUILD \
+		--host=$CHOST \
+		--prefix=/usr \
+		--sysconfdir=/etc \
+		--mandir=/usr/share/man \
+		--infodir=/usr/share/info \
+		--localstatedir=/var \
+		|| return 1
+	make || return 1
+}
+
+package() {
+	cd "$_builddir"
+	make DESTDIR="$pkgdir" install || return 1
+	#delete pdf* utils that conflict with poppler-utils.
+	rm -f "$pkgdir"/usr/bin/pdf*
+	rm -f "$pkgdir"/usr/share/man/man1/pdf*
+	#install xpdfrc so fonts get picked up
+	cp "$srcdir"/xpdfrc "$pkgdir"/etc/xpdfrc
+}
+
+md5sums="3bc86c69c8ff444db52461270bef3f44  xpdf-3.04.tar.gz
+11bd32802d9e600ad028f5b84194178d  xpdf-3.04-protection.patch
+957ead33031ea7ddffe73e8af5658998  xpdfrc"
+sha256sums="11390c74733abcb262aaca4db68710f13ffffd42bfe2a0861a5dfc912b2977e5  xpdf-3.04.tar.gz
+5a12a1781eb29f83b3f0e3c1484e6c99537f84e42aa3dda9bb9c4a5befd83217  xpdf-3.04-protection.patch
+61177490dcfae9cb65af16486ab6567b81653f51f0279ee06a56516dd9a890d5  xpdfrc"
+sha512sums="3fb3c380fdbd13d937449ae3f7d7a163815cc85296d30be7b9907687884385d6171bb48ee5d5c13368d6bba87740b678f491bdcf61b38d130809e9afa260f6cf  xpdf-3.04.tar.gz
+4c6360731ad60ed45e0612b016116a9588f293267ee3e2c1f7cd2f046f045f165334c6e7fceb6b51b3181adb7a74087036a28fcec0e04b23e6374ffc421c1f54  xpdf-3.04-protection.patch
+7e8404fa5432bad578c29cf3ccd276bb64cd0316b700e40ce606b6b6261c497125e8689c6e545cab2adb04d69b1ed25d1e0d07155add9837e6bb44d5f18d82d3  xpdfrc"
diff --git a/community/xpdf/xpdf-3.04-protection.patch b/community/xpdf/xpdf-3.04-protection.patch
new file mode 100644
index 0000000..677db00
--- /dev/null
+++ b/community/xpdf/xpdf-3.04-protection.patch
@@ -0,0 +1,84 @@
+Port Johannes Bauer's protection patch to 3.04.
+This does NOT disable the error messages, since the user should
+be aware of the author's intent.
+
+Also, this does not deal with permission to print.
+
+diff --git a/xpdf/PDFCore.cc b/xpdf/PDFCore.cc
+index 34b6483..e93fe52 100644
+--- a/xpdf/PDFCore.cc
++++ b/xpdf/PDFCore.cc
+@@ -1677,9 +1677,6 @@ GString *PDFCore::extractText(int pg, double xMin, double yMin,
+   int x0, y0, x1, y1, t;
+   GString *s;
+ 
+-  if (!doc->okToCopy()) {
+-    return NULL;
+-  }
+   if ((page = findPage(pg))) {
+     cvtUserToDev(pg, xMin, yMin, &x0, &y0);
+     cvtUserToDev(pg, xMax, yMax, &x1, &y1);
+diff --git a/xpdf/XPDFCore.cc b/xpdf/XPDFCore.cc
+index 9a3725f..1562c7a 100644
+--- a/xpdf/XPDFCore.cc
++++ b/xpdf/XPDFCore.cc
+@@ -384,9 +384,8 @@ void XPDFCore::endSelection(int wx, int wy) {
+ #ifndef NO_TEXT_SELECT
+       if (selectULX != selectLRX &&
+ 	  selectULY != selectLRY) {
+-	if (doc->okToCopy()) {
+ 	  copySelection();
+-	} else {
++	if (!doc->okToCopy()) {
+ 	  error(errNotAllowed, -1,
+ 		"Copying of text from this document is not allowed.");
+ 	}
+@@ -408,9 +407,6 @@ void XPDFCore::copySelection() {
+   int pg;
+   double ulx, uly, lrx, lry;
+ 
+-  if (!doc->okToCopy()) {
+-    return;
+-  }
+   if (getSelection(&pg, &ulx, &uly, &lrx, &lry)) {
+     //~ for multithreading: need a mutex here
+     if (currentSelection) {
+diff --git a/xpdf/pdfimages.cc b/xpdf/pdfimages.cc
+index dc79443..9aaa811 100644
+--- a/xpdf/pdfimages.cc
++++ b/xpdf/pdfimages.cc
+@@ -122,8 +122,6 @@ int main(int argc, char *argv[]) {
+   if (!doc->okToCopy()) {
+     error(errNotAllowed, -1,
+ 	  "Copying of images from this document is not allowed.");
+-    exitCode = 3;
+-    goto err1;
+   }
+ 
+   // get page range
+diff --git a/xpdf/pdftohtml.cc b/xpdf/pdftohtml.cc
+index f1fe691..824233e 100644
+--- a/xpdf/pdftohtml.cc
++++ b/xpdf/pdftohtml.cc
+@@ -134,8 +134,6 @@ int main(int argc, char *argv[]) {
+   if (!doc->okToCopy()) {
+     error(errNotAllowed, -1,
+ 	  "Copying of text from this document is not allowed.");
+-    exitCode = 3;
+-    goto err1;
+   }
+ 
+   // get page range
+diff --git a/xpdf/pdftotext.cc b/xpdf/pdftotext.cc
+index 758413e..e6779fa 100644
+--- a/xpdf/pdftotext.cc
++++ b/xpdf/pdftotext.cc
+@@ -192,8 +192,6 @@ int main(int argc, char *argv[]) {
+   if (!doc->okToCopy()) {
+     error(errNotAllowed, -1,
+ 	  "Copying of text from this document is not allowed.");
+-    exitCode = 3;
+-    goto err2;
+   }
+ 
+   // construct text file name
diff --git a/community/xpdf/xpdfrc b/community/xpdf/xpdfrc
new file mode 100644
index 0000000..b51b522
--- /dev/null
+++ b/community/xpdf/xpdfrc
@@ -0,0 +1,91 @@
+#========================================================================
+#
+# Sample xpdfrc file
+#
+# The Xpdf tools look for a config file in two places:
+# 1. ~/.xpdfrc
+# 2. in a system-wide directory, typically /usr/local/etc/xpdfrc
+#
+# This sample config file demonstrates some of the more common
+# configuration options.  Everything here is commented out.  You
+# should edit things (especially the file/directory paths, since
+# they'll likely be different on your system), and uncomment whichever
+# options you want to use.  For complete details on config file syntax
+# and available options, please see the xpdfrc(5) man page.
+#
+# Also, the Xpdf language support packages each include a set of
+# options to be added to the xpdfrc file.
+#
+# http://www.foolabs.com/xpdf/
+#
+#========================================================================
+
+#----- display fonts
+
+# These map the Base-14 fonts to the Type 1 fonts that ship with
+# ghostscript.  You'll almost certainly want to use something like
+# this, but you'll need to adjust this to point to wherever
+# ghostscript is installed on your system.  (But if the fonts are
+# installed in a "standard" location, xpdf will find them
+# automatically.)
+
+fontFile Times-Roman		/usr/share/fonts/Type1/n021003l.pfb
+fontFile Times-Italic		/usr/share/fonts/Type1/n021023l.pfb
+fontFile Times-Bold		/usr/share/fonts/Type1/n021004l.pfb
+fontFile Times-BoldItalic	/usr/share/fonts/Type1/n021024l.pfb
+fontFile Helvetica		/usr/share/fonts/Type1/n019003l.pfb
+fontFile Helvetica-Oblique	/usr/share/fonts/Type1/n019023l.pfb
+fontFile Helvetica-Bold		/usr/share/fonts/Type1/n019004l.pfb
+fontFile Helvetica-BoldOblique	/usr/share/fonts/Type1/n019024l.pfb
+fontFile Courier		/usr/share/fonts/Type1/n022003l.pfb
+fontFile Courier-Oblique	/usr/share/fonts/Type1/n022023l.pfb
+fontFile Courier-Bold		/usr/share/fonts/Type1/n022004l.pfb
+fontFile Courier-BoldOblique	/usr/share/fonts/Type1/n022024l.pfb
+fontFile Symbol			/usr/share/fonts/Type1/s050000l.pfb
+fontFile ZapfDingbats		/usr/share/fonts/Type1/d050000l.pfb
+
+# If you need to display PDF files that refer to non-embedded fonts,
+# you should add one or more fontDir options to point to the
+# directories containing the font files.  Xpdf will only look at .pfa,
+# .pfb, .ttf, and .ttc files in those directories (other files will
+# simply be ignored).
+
+#fontDir		/usr/local/fonts/bakoma
+
+#----- PostScript output control
+
+# Set the default PostScript file or command.
+
+#psFile			"|lpr -Pmyprinter"
+
+# Set the default PostScript paper size -- this can be letter, legal,
+# A4, or A3.  You can also specify a paper size as width and height
+# (in points).
+
+psPaperSize		letter
+
+#----- text output control
+
+# Choose a text encoding for copy-and-paste and for pdftotext output.
+# The Latin1, ASCII7, and UTF-8 encodings are built into Xpdf.  Other
+# encodings are available in the language support packages.
+
+textEncoding		UTF-8
+
+# Choose the end-of-line convention for multi-line copy-and-past and
+# for pdftotext output.  The available options are unix, mac, and dos.
+
+#textEOL		unix
+
+#----- misc settings
+
+# Enable FreeType, and anti-aliased text.
+
+enableFreeType		yes
+antialias		yes
+
+# Set the command used to run a web browser when a URL hyperlink is
+# clicked.
+
+#launchCommand  viewer-script
+urlCommand	"firefox '%s'"
diff --git a/testing/xpdf/APKBUILD b/testing/xpdf/APKBUILD
deleted file mode 100644
index bb4ec6f..0000000
--- a/testing/xpdf/APKBUILD
+++ /dev/null
@@ -1,65 +0,0 @@
-# Contributor: Isaac Dunham <[email-masked]>
-# Maintainer:  Isaac Dunham <[email-masked]>
-pkgname=xpdf
-pkgver="3.04"
-pkgrel=2
-pkgdesc="The classic X11 PDF viewer"
-url="http://foolabs.com/xpdf"
-arch="all"
-license="GPL2/GPL3"
-depends="ghostscript-fonts"
-depends_dev=""
-makedepends="motif-dev freetype-dev libpng-dev"
-install=""
-subpackages="$pkgname-doc"
-source="ftp://ftp.foolabs.com/pub/xpdf/$pkgname-$pkgver.tar.gz
-	xpdf-3.04-protection.patch
-	xpdfrc"
-
-_builddir="$srcdir/$pkgname-$pkgver"
-prepare() {
-	local i
-	cd "$_builddir"
-	for i in $source; do
-		case $i in
-		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
-		esac
-	done
-}
-
-build() {
-	echo "$_builddir"
-	cd "$_builddir"
-	./configure \
-		--with-x \
-		--with-freetype2-includes=/usr/include/freetype2 \
-		--build=$CBUILD \
-		--host=$CHOST \
-		--prefix=/usr \
-		--sysconfdir=/etc \
-		--mandir=/usr/share/man \
-		--infodir=/usr/share/info \
-		--localstatedir=/var \
-		|| return 1
-	make || return 1
-}
-
-package() {
-	cd "$_builddir"
-	make DESTDIR="$pkgdir" install || return 1
-	#delete pdf* utils that conflict with poppler-utils.
-	rm -f "$pkgdir"/usr/bin/pdf*
-	rm -f "$pkgdir"/usr/share/man/man1/pdf*
-	#install xpdfrc so fonts get picked up
-	cp "$srcdir"/xpdfrc "$pkgdir"/etc/xpdfrc
-}
-
-md5sums="3bc86c69c8ff444db52461270bef3f44  xpdf-3.04.tar.gz
-11bd32802d9e600ad028f5b84194178d  xpdf-3.04-protection.patch
-957ead33031ea7ddffe73e8af5658998  xpdfrc"
-sha256sums="11390c74733abcb262aaca4db68710f13ffffd42bfe2a0861a5dfc912b2977e5  xpdf-3.04.tar.gz
-5a12a1781eb29f83b3f0e3c1484e6c99537f84e42aa3dda9bb9c4a5befd83217  xpdf-3.04-protection.patch
-61177490dcfae9cb65af16486ab6567b81653f51f0279ee06a56516dd9a890d5  xpdfrc"
-sha512sums="3fb3c380fdbd13d937449ae3f7d7a163815cc85296d30be7b9907687884385d6171bb48ee5d5c13368d6bba87740b678f491bdcf61b38d130809e9afa260f6cf  xpdf-3.04.tar.gz
-4c6360731ad60ed45e0612b016116a9588f293267ee3e2c1f7cd2f046f045f165334c6e7fceb6b51b3181adb7a74087036a28fcec0e04b23e6374ffc421c1f54  xpdf-3.04-protection.patch
-7e8404fa5432bad578c29cf3ccd276bb64cd0316b700e40ce606b6b6261c497125e8689c6e545cab2adb04d69b1ed25d1e0d07155add9837e6bb44d5f18d82d3  xpdfrc"
diff --git a/testing/xpdf/xpdf-3.04-protection.patch b/testing/xpdf/xpdf-3.04-protection.patch
deleted file mode 100644
index 677db00..0000000
--- a/testing/xpdf/xpdf-3.04-protection.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-Port Johannes Bauer's protection patch to 3.04.
-This does NOT disable the error messages, since the user should
-be aware of the author's intent.
-
-Also, this does not deal with permission to print.
-
-diff --git a/xpdf/PDFCore.cc b/xpdf/PDFCore.cc
-index 34b6483..e93fe52 100644
---- a/xpdf/PDFCore.cc
-+++ b/xpdf/PDFCore.cc
-@@ -1677,9 +1677,6 @@ GString *PDFCore::extractText(int pg, double xMin, double yMin,
-   int x0, y0, x1, y1, t;
-   GString *s;
- 
--  if (!doc->okToCopy()) {
--    return NULL;
--  }
-   if ((page = findPage(pg))) {
-     cvtUserToDev(pg, xMin, yMin, &x0, &y0);
-     cvtUserToDev(pg, xMax, yMax, &x1, &y1);
-diff --git a/xpdf/XPDFCore.cc b/xpdf/XPDFCore.cc
-index 9a3725f..1562c7a 100644
---- a/xpdf/XPDFCore.cc
-+++ b/xpdf/XPDFCore.cc
-@@ -384,9 +384,8 @@ void XPDFCore::endSelection(int wx, int wy) {
- #ifndef NO_TEXT_SELECT
-       if (selectULX != selectLRX &&
- 	  selectULY != selectLRY) {
--	if (doc->okToCopy()) {
- 	  copySelection();
--	} else {
-+	if (!doc->okToCopy()) {
- 	  error(errNotAllowed, -1,
- 		"Copying of text from this document is not allowed.");
- 	}
-@@ -408,9 +407,6 @@ void XPDFCore::copySelection() {
-   int pg;
-   double ulx, uly, lrx, lry;
- 
--  if (!doc->okToCopy()) {
--    return;
--  }
-   if (getSelection(&pg, &ulx, &uly, &lrx, &lry)) {
-     //~ for multithreading: need a mutex here
-     if (currentSelection) {
-diff --git a/xpdf/pdfimages.cc b/xpdf/pdfimages.cc
-index dc79443..9aaa811 100644
---- a/xpdf/pdfimages.cc
-+++ b/xpdf/pdfimages.cc
-@@ -122,8 +122,6 @@ int main(int argc, char *argv[]) {
-   if (!doc->okToCopy()) {
-     error(errNotAllowed, -1,
- 	  "Copying of images from this document is not allowed.");
--    exitCode = 3;
--    goto err1;
-   }
- 
-   // get page range
-diff --git a/xpdf/pdftohtml.cc b/xpdf/pdftohtml.cc
-index f1fe691..824233e 100644
---- a/xpdf/pdftohtml.cc
-+++ b/xpdf/pdftohtml.cc
-@@ -134,8 +134,6 @@ int main(int argc, char *argv[]) {
-   if (!doc->okToCopy()) {
-     error(errNotAllowed, -1,
- 	  "Copying of text from this document is not allowed.");
--    exitCode = 3;
--    goto err1;
-   }
- 
-   // get page range
-diff --git a/xpdf/pdftotext.cc b/xpdf/pdftotext.cc
-index 758413e..e6779fa 100644
---- a/xpdf/pdftotext.cc
-+++ b/xpdf/pdftotext.cc
-@@ -192,8 +192,6 @@ int main(int argc, char *argv[]) {
-   if (!doc->okToCopy()) {
-     error(errNotAllowed, -1,
- 	  "Copying of text from this document is not allowed.");
--    exitCode = 3;
--    goto err2;
-   }
- 
-   // construct text file name
diff --git a/testing/xpdf/xpdfrc b/testing/xpdf/xpdfrc
deleted file mode 100644
index b51b522..0000000
--- a/testing/xpdf/xpdfrc
+++ /dev/null
@@ -1,91 +0,0 @@
-#========================================================================
-#
-# Sample xpdfrc file
-#
-# The Xpdf tools look for a config file in two places:
-# 1. ~/.xpdfrc
-# 2. in a system-wide directory, typically /usr/local/etc/xpdfrc
-#
-# This sample config file demonstrates some of the more common
-# configuration options.  Everything here is commented out.  You
-# should edit things (especially the file/directory paths, since
-# they'll likely be different on your system), and uncomment whichever
-# options you want to use.  For complete details on config file syntax
-# and available options, please see the xpdfrc(5) man page.
-#
-# Also, the Xpdf language support packages each include a set of
-# options to be added to the xpdfrc file.
-#
-# http://www.foolabs.com/xpdf/
-#
-#========================================================================
-
-#----- display fonts
-
-# These map the Base-14 fonts to the Type 1 fonts that ship with
-# ghostscript.  You'll almost certainly want to use something like
-# this, but you'll need to adjust this to point to wherever
-# ghostscript is installed on your system.  (But if the fonts are
-# installed in a "standard" location, xpdf will find them
-# automatically.)
-
-fontFile Times-Roman		/usr/share/fonts/Type1/n021003l.pfb
-fontFile Times-Italic		/usr/share/fonts/Type1/n021023l.pfb
-fontFile Times-Bold		/usr/share/fonts/Type1/n021004l.pfb
-fontFile Times-BoldItalic	/usr/share/fonts/Type1/n021024l.pfb
-fontFile Helvetica		/usr/share/fonts/Type1/n019003l.pfb
-fontFile Helvetica-Oblique	/usr/share/fonts/Type1/n019023l.pfb
-fontFile Helvetica-Bold		/usr/share/fonts/Type1/n019004l.pfb
-fontFile Helvetica-BoldOblique	/usr/share/fonts/Type1/n019024l.pfb
-fontFile Courier		/usr/share/fonts/Type1/n022003l.pfb
-fontFile Courier-Oblique	/usr/share/fonts/Type1/n022023l.pfb
-fontFile Courier-Bold		/usr/share/fonts/Type1/n022004l.pfb
-fontFile Courier-BoldOblique	/usr/share/fonts/Type1/n022024l.pfb
-fontFile Symbol			/usr/share/fonts/Type1/s050000l.pfb
-fontFile ZapfDingbats		/usr/share/fonts/Type1/d050000l.pfb
-
-# If you need to display PDF files that refer to non-embedded fonts,
-# you should add one or more fontDir options to point to the
-# directories containing the font files.  Xpdf will only look at .pfa,
-# .pfb, .ttf, and .ttc files in those directories (other files will
-# simply be ignored).
-
-#fontDir		/usr/local/fonts/bakoma
-
-#----- PostScript output control
-
-# Set the default PostScript file or command.
-
-#psFile			"|lpr -Pmyprinter"
-
-# Set the default PostScript paper size -- this can be letter, legal,
-# A4, or A3.  You can also specify a paper size as width and height
-# (in points).
-
-psPaperSize		letter
-
-#----- text output control
-
-# Choose a text encoding for copy-and-paste and for pdftotext output.
-# The Latin1, ASCII7, and UTF-8 encodings are built into Xpdf.  Other
-# encodings are available in the language support packages.
-
-textEncoding		UTF-8
-
-# Choose the end-of-line convention for multi-line copy-and-past and
-# for pdftotext output.  The available options are unix, mac, and dos.
-
-#textEOL		unix
-
-#----- misc settings
-
-# Enable FreeType, and anti-aliased text.
-
-enableFreeType		yes
-antialias		yes
-
-# Set the command used to run a web browser when a URL hyperlink is
-# clicked.
-
-#launchCommand  viewer-script
-urlCommand	"firefox '%s'"
-- 
2.7.0

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Isaac Dunham <[email-masked]>
Date: Tue, 19 Jan 2016 22:07:42 -0800

---
 testing/ted/APKBUILD          | 81 +++++++++++++++++++++++++++++++++++++++++++
 testing/ted/ted-motif.trigger |  4 +++
 2 files changed, 85 insertions(+)
 create mode 100644 testing/ted/APKBUILD
 create mode 100755 testing/ted/ted-motif.trigger

diff --git a/testing/ted/APKBUILD b/testing/ted/APKBUILD
new file mode 100644
index 0000000..1e3eb9c
--- /dev/null
+++ b/testing/ted/APKBUILD
@@ -0,0 +1,81 @@
+# Contributor: Isaac Dunham <[email-masked]>
+# Maintainer: Isaac Dunham <[email-masked]>
+pkgname=ted
+pkgver=2.23
+pkgrel=0
+pkgdesc="An easy Rich Text Processor"
+url="http://www.nllgg.nl/Ted/"
+arch="all"
+license="GPL2+"
+depends="$pkgname-common"
+makedepends="pcre-dev motif-dev gtk+2.0-dev libx11-dev
+	libxpm-dev libpng-dev libjpeg-turbo-dev tiff-dev libpaper-dev "
+install=""
+subpackages="$pkgname-motif $pkgname-common $pkgname-doc"
+source="http://ftp.nluug.nl/pub/editors/ted/ted-$pkgver.src.tar.gz"
+
+_builddir="$srcdir"/Ted-$pkgver
+prepare() {
+	local i
+	cd "$_builddir"
+	for i in $source; do
+		case $i in
+		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+		esac
+	done
+}
+
+build() {
+	cd "$_builddir"
+	make  CONFIGURE_OPTIONS="--with-MOTIF" compile.shared || return 1
+	cp Ted/Ted Ted.motif || return 1
+	make clean || return 1
+	make compile.shared || return 1
+}
+
+package() {
+	cd "$_builddir"
+	mkdir -p "$pkgdir"
+	make DESTDIR="$pkgdir" install || return 1
+	cp Ted.motif "$pkgdir"/usr/bin/ || return 1
+	mv "$pkgdir"/usr/share/Ted/examples/rtf*.sh "$pkgdir"/usr/bin || \
+		return 1
+	mv "$pkgdir"/usr/share/Ted/doc/*.1 "$pkgdir"/usr/share/man/man1/ || \
+		return 1
+}
+
+
+motif() {
+	provides="ted=$pkgver-r$pkgrel"
+	depends="ted-common"
+	triggers="ted-motif.trigger=/usr/bin/Ted"
+	pkgdesc="An easy Rich Text Processor (Motif version)"
+	mkdir -p "$subpkgdir"/usr/bin || return 1
+	mv "$pkgdir"/usr/bin/Ted.motif "$subpkgdir"/usr/bin || return 1
+}
+
+common() {
+	depends=""
+	arch="noarch"
+	mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/usr/share/Ted || return 1
+	mv "$pkgdir"/usr/share/applications "$subpkgdir"/usr/share/ || return 1
+	mv "$pkgdir"/usr/share/Ted/afm/ "$pkgdir"/usr/share/Ted/config/   \
+	   "$pkgdir"/usr/share/Ted/dfa/ "$pkgdir"/usr/share/Ted/Ted*.*    \
+        	"$subpkgdir"/usr/share/Ted/ || return 1
+}
+
+doc() {
+	depends=""
+	mkdir -p "$subpkgdir"/usr/share/ || return 1
+	mv "$pkgdir"/usr/share/Ted "$subpkgdir"/usr/share || return 1
+	default_doc || return 1
+	if test -e "$subpkgdir"/usr/share/man/man1/Ted.1 -a \
+	        -e "$subpkgdir"/usr/share/man/man1/Ted.1.gz
+	then
+	    rm -f "$subpkgdir"/usr/share/man/man1/Ted.1 || return 1
+	fi
+}
+
+md5sums="4199df0deb82a90450135ec3f2b7d915  ted-2.23.src.tar.gz"
+sha256sums="3fa992c2bc96af3ca788ef941cb5314f4a1d843202efd0201b8b4ee9adbf316c  ted-2.23.src.tar.gz"
+sha512sums="c6541e5a07545a08b30cb9b33429d9a7675f9252df32ccca5cdb4f2ff09978085d28d015a42922baf8c95db1ea6379a9d1088541aafd9ce45b8870212496849f  ted-2.23.src.tar.gz"
diff --git a/testing/ted/ted-motif.trigger b/testing/ted/ted-motif.trigger
new file mode 100755
index 0000000..ade36b3
--- /dev/null
+++ b/testing/ted/ted-motif.trigger
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+[ -L /usr/bin/Ted ]  && exit 0
+[ -e /usr/bin/Ted ] || ln -s /usr/bin/Ted.motif /usr/bin/Ted
-- 
2.7.0

---

---

From: Isaac Dunham <[email-masked]>
Date: Tue, 19 Jan 2016 22:07:43 -0800

License is "free for personal/educational/public research only,
no derivatives without permission, binaries can be distributed only
if minimal changes are made for porting only
---
 non-free/xephem/01-use-mandoc.patch | 13 +++++++++
 non-free/xephem/APKBUILD            | 56 +++++++++++++++++++++++++++++++++++++
 2 files changed, 69 insertions(+)
 create mode 100644 non-free/xephem/01-use-mandoc.patch
 create mode 100644 non-free/xephem/APKBUILD

diff --git a/non-free/xephem/01-use-mandoc.patch b/non-free/xephem/01-use-mandoc.patch
new file mode 100644
index 0000000..50797ee
--- /dev/null
+++ b/non-free/xephem/01-use-mandoc.patch
@@ -0,0 +1,13 @@
+diff --git a/GUI/xephem/Makefile b/GUI/xephem/Makefile
+index 6fa4405..33d5085 100644
+--- a/GUI/xephem/Makefile
++++ b/GUI/xephem/Makefile
+@@ -192,7 +192,7 @@ xephem: $(INCS) $(OBJS)
+ 	$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
+ 
+ xephem.1: xephem.man
+-	nroff -man $? > $@
++	mandoc $? > $@
+ 
+ libs:
+ 	cd ../../libastro; make
diff --git a/non-free/xephem/APKBUILD b/non-free/xephem/APKBUILD
new file mode 100644
index 0000000..7ed99ec
--- /dev/null
+++ b/non-free/xephem/APKBUILD
@@ -0,0 +1,56 @@
+# Contributor: Isaac Dunham <[email-masked]>
+# Maintainer:
+pkgname=xephem
+pkgver=3.7.7
+pkgrel=0
+pkgdesc="XEphem, the serious interactive astronomical software ephemeris"
+url="http://www.clearskyinstitute.com/xephem/"
+arch="all"
+license="custom"
+depends=""
+depends_dev=""
+makedepends="$depends_dev mdocml motif-dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://97.74.56.125/free/xephem-$pkgver.tar.gz
+	01-use-mandoc.patch
+	"
+
+_builddir="$srcdir"/xephem-$pkgver
+prepare() {
+	local i
+	cd "$_builddir"
+	for i in $source; do
+		case $i in
+		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+		esac
+	done
+}
+
+build() {
+	cd "$_builddir"/GUI/xephem && \
+	make XLIBS="-lXm -lXt -lXext -lXmu -lX11"
+}
+
+package() {
+	cd "$_builddir"/GUI/xephem 			 &&	\
+	install -d -m 0755 "$pkgdir"/etc/ 		 &&	\
+	install -d -m 0755 "$pkgdir"/usr/bin/ 		 &&	\
+	install -s -m 0755 xephem "$pkgdir"/usr/bin/ 	 &&	\
+	install -d -m 0755 "$pkgdir"/usr/share/licenses/xephem/ && \
+	install -m 0644 ../../Copyright "$pkgdir"/usr/share/licenses/xephem/ && \
+	install -d -m 0755 "$pkgdir"/usr/share/man/man1/ &&	\
+	install -c -m 0644 xephem.1 "$pkgdir"/usr/share/man/man1/ && \
+	install -d -m 0755 "$pkgdir"/usr/share/xephem/	 &&	\
+	cp -R auxil catalogs fifos fits gallery help lo		\
+		"$pkgdir"/usr/share/xephem/		 &&	\
+	echo "XEphem.ShareDir: /usr/share/xephem" >> "$pkgdir"/etc/XEphem || \
+	return 1
+}
+
+md5sums="7b9829864dc09d3e0f5cd054d8030e68  xephem-3.7.7.tar.gz
+256fff0a036e7e8c1e24dbc32283993c  01-use-mandoc.patch"
+sha256sums="d1f8e17cfc5d2e3af5fd5a8bcf34bbf99a79d40f66326c098a819f82af62b4b7  xephem-3.7.7.tar.gz
+4a4ac5e6fc852c946b924415c6e16216150c9540219291991cb58e0aba54f8fc  01-use-mandoc.patch"
+sha512sums="d9cfecf0ce8aa495f66fcf6772ca7df0638cef8b9f18d9d6cbf013846a7575786ae9b5c515abc2058783baa7610320c893ddbc6f68bae28c65661a1c73b88634  xephem-3.7.7.tar.gz
+a2b723608145413bd578d86cdc9c550e0315eb3034ae8a9ed4a430f61f765488353a1107936301cf0d93464e97019fac88c71485c461519ffcb1bdd1fce5be2f  01-use-mandoc.patch"
-- 
2.7.0

---