Subject: [alpine-aports] [PATCH] testing/lout: new aport

From: Paul Bredbury <[email-masked]>
Date: Sun, 6 Jan 2019 23:42:55 +0000

https://savannah.nongnu.org/projects/lout
Lightweight typesetting and document formatting system.
---
 testing/lout/APKBUILD                 | 40 ++++++++++++++++
 testing/lout/lout-3.40-makefile.patch | 69 +++++++++++++++++++++++++++
 testing/lout/lout.post-install        |  4 ++
 3 files changed, 113 insertions(+)
 create mode 100644 testing/lout/APKBUILD
 create mode 100644 testing/lout/lout-3.40-makefile.patch
 create mode 100644 testing/lout/lout.post-install

diff --git a/testing/lout/APKBUILD b/testing/lout/APKBUILD
new file mode 100644
index 0000000000..242e81f906
--- /dev/null
+++ b/testing/lout/APKBUILD
@@ -0,0 +1,40 @@
+pkgname=lout
+pkgver=3.40
+pkgrel=0
+pkgdesc="Lightweight typesetting and document formatting system"
+url="https://savannah.nongnu.org/projects/lout"
+arch="all"
+license="GPL-3.0-or-later"
+makedepends="zlib-dev"
+install="$pkgname.post-install"
+subpackages="$pkgname-doc"
+source="https://download.savannah.gnu.org/releases/$pkgname/$pkgname-$pkgver.tar.gz
+	lout-3.40-makefile.patch"
+options="!check" # No test suite
+builddir="$srcdir/$pkgname-$pkgver"
+
+build() {
+	cd "$builddir"
+
+	make \
+		PREFIX="/usr" \
+		PDF_COMPRESSION=1 \
+		ZLIB="-lz" \
+		all
+}
+
+package() {
+	cd "$builddir"
+
+	mkdir -p "$pkgdir/usr/bin" \
+		"$pkgdir/usr/share/doc/lout" \
+		"$pkgdir/usr/share/man/man1"
+
+	make \
+		PREFIX="$pkgdir/usr" \
+		allinstall
+}
+
+
+sha512sums="adffbb44b9328f0d64b1c8f08fe0217307b1cca870827ca54e0aaae5a2258f519e3e6f0adc715ba6d192dd731ab26c2cc86aa8611d991d5665503842e599c061  lout-3.40.tar.gz
+a4aa624c6134354e7d26bf70a618bc7f2ad4304eb2c551c124815e8153f0ee554b85ee3537c965e58c4de084716a4a4b7b1faf4ec5a9e58d682a92a52d69b0e6  lout-3.40-makefile.patch"
diff --git a/testing/lout/lout-3.40-makefile.patch b/testing/lout/lout-3.40-makefile.patch
new file mode 100644
index 0000000000..c9bcbfade4
--- /dev/null
+++ b/testing/lout/lout-3.40-makefile.patch
@@ -0,0 +1,69 @@
+diff -Naur a/makefile b/makefile
+--- a/makefile	2012-02-08 07:28:03.000000000 +0000
++++ b/makefile	2019-01-06 23:12:11.464068094 +0000
+@@ -269,11 +269,11 @@
+ # DEBUGGING = 1
+ # TRACING = -g
+ 
+-PREFIX	= /home/jeff
++PREFIX	= /usr
+ BINDIR	= $(PREFIX)/bin
+-LOUTLIBDIR	= $(PREFIX)/lout.lib
+-LOUTDOCDIR	= $(PREFIX)/lout.doc
+-MANDIR	= $(PREFIX)/lout.man
++LOUTLIBDIR	= $(PREFIX)/share/lout
++LOUTDOCDIR	= $(PREFIX)/share/doc/lout
++MANDIR	= $(PREFIX)/share/man/man1
+ 
+ LIBFONT = font
+ LIBMAPS = maps
+@@ -295,11 +295,9 @@
+ ZLIB		=
+ ZLIBPATH	=
+ 
+-CC	= gcc
+-
+ RCOPY	= cp -r
+ 
+-COPTS	= -ansi -pedantic -Wall -O3
++COPTS	+= -ansi -pedantic -Wall
+ 
+ CFLAGS	= -DOS_UNIX=$(OSUNIX)					\
+ 	  -DOS_DOS=$(OSDOS)					\
+@@ -333,7 +331,7 @@
+ 	  z49.o z50.o z51.o z52.o
+ 
+ lout:	$(OBJS)
+-	$(CC) -o lout $(OBJS) $(ZLIB) -lm
++	$(CC) $(COPTS) $(LDFLAGS) -o lout $(OBJS) $(ZLIB) -lm
+ 	chmod a+x lout
+ 
+ $(OBJS): externs.h
+@@ -341,7 +339,7 @@
+ externs.h:
+ 
+ prg2lout:	prg2lout.c
+-	$(CC) $(COPTS) -o prg2lout prg2lout.c
++	$(CC) $(COPTS) $(LDFLAGS) -o prg2lout prg2lout.c
+ 	chmod a+x prg2lout
+ 
+ all:	lout prg2lout
+@@ -355,7 +353,7 @@
+ 	chmod 755 $(BINDIR)/prg2lout
+ 	@echo ""
+ 	@echo "(b) Installing library files into LOUTLIBDIR $(LOUTLIBDIR)"
+-	mkdir $(LOUTLIBDIR)
++	mkdir -p $(LOUTLIBDIR)
+ 	chmod 755 $(LOUTLIBDIR)
+ 	@echo ""
+ 	mkdir $(LOUTLIBDIR)/$(LIBINCL)
+@@ -386,9 +384,6 @@
+ 	mkdir $(LOUTLIBDIR)/$(LIBLOCA)
+ 	chmod 755 $(LOUTLIBDIR)/$(LIBLOCA)
+ 	@echo ""
+-	@echo "(c) Initializing run (should be silent, no errors expected)"
+-	$(BINDIR)/lout -x -s $(LOUTLIBDIR)/$(LIBINCL)/init
+-	@echo ""
+ 	@echo "(d) Changing mode of files just created by initializing run"
+ 	chmod 644 $(LOUTLIBDIR)/$(LIBDATA)/*
+ 	chmod 644 $(LOUTLIBDIR)/$(LIBHYPH)/*
diff --git a/testing/lout/lout.post-install b/testing/lout/lout.post-install
new file mode 100644
index 0000000000..033908a551
--- /dev/null
+++ b/testing/lout/lout.post-install
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# Populate /usr/share/lout/hyph/*.lp and /usr/share/lout/data/*.li
+exec lout -x -s /usr/share/lout/include/init
-- 
2.20.1

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