mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-06 15:08:57 +02:00
103 lines
3.0 KiB
Bash
103 lines
3.0 KiB
Bash
SUMMARY="A document formating system"
|
|
DESCRIPTION="Lout is a document formatting system designed and implemented by Jeffrey Kingston at \
|
|
the Basser Department of Computer Science, University of Sydney, Australia.
|
|
|
|
The system reads a high-level description of a document similar in style to LaTeX and produces a \
|
|
PostScript file which can be printed on most laser printers and graphic display devices.
|
|
Plain text output is also available, PDF output is limited but working (e.g. no graphics).
|
|
Lout is inherently multilingual. Adding new languages is easy.
|
|
|
|
The Lout package for Haiku includes includes documentation in PDF format, so people new to Lout \
|
|
have an easier time learning how to use it. The files will be located under:
|
|
|
|
/boot/system/documentation/packages/$portName/
|
|
|
|
* slides.pdf serves as a short introduction to Lout's capabilities.
|
|
* user.pdf offers a very complete documentation. \"Appendix A\" contains a nice quick-reference guide!
|
|
* expert.pdf and design.pdf will serve well the more advanced users.
|
|
|
|
When working with Lout files under Haiku, using the Pe editor can be convenient, as it includes \
|
|
special supports for them (syntax coloring, content navigation, etc)."
|
|
HOMEPAGE="https://github.com/william8000/lout"
|
|
COPYRIGHT="1991-2008 Jeffrey H. Kingston"
|
|
LICENSE="GNU GPL v3"
|
|
REVISION="3"
|
|
SOURCE_URI="https://github.com/william8000/lout/archive/refs/tags/$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="b95f1d0d75f31d3a59fd9ab6d15901e49155b94f000b5798b45c47b63eac6407"
|
|
|
|
ARCHITECTURES="all !x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
PROVIDES="
|
|
lout$secondaryArchSuffix = $portVersion
|
|
cmd:lout = $portVersion
|
|
cmd:prg2lout = $portVersion
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
lib:libz$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
devel:libz$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:make
|
|
cmd:ps2pdf
|
|
"
|
|
|
|
BUILD()
|
|
{
|
|
sed -i "s/USELOC\t= 1/USELOC\t= 0/" makefile
|
|
|
|
make PDF_COMPRESSION=1 ZLIB=-lz \
|
|
PREFIX=$prefix \
|
|
LOUTLIBDIR=$dataDir/lout \
|
|
LOUTDOCDIR=$docDir \
|
|
MANDIR=$manDir/man1 \
|
|
all $jobArgs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
make PREFIX=$prefix \
|
|
LOUTLIBDIR=$dataDir/lout \
|
|
LOUTDOCDIR=$docDir \
|
|
MANDIR=$manDir/man1 \
|
|
allinstall
|
|
|
|
# Now that lout is "installed" in the chroot... use it to generate .ps files
|
|
# from the docs and use GhostScript's ps2pdf to generate PDF files form them.
|
|
cd doc
|
|
|
|
DOC_DIRS=(design expert slides user)
|
|
# Each "doc dir" has a README that specifies a number for "lout -rN". Those numbers are:
|
|
NUM_RUNS=(3 4 2 5)
|
|
|
|
# Make sure lout can find /bin/prg2lout, and that we can call "lout" without $prefix/bin/.
|
|
export PATH=$prefix/bin:$PATH
|
|
|
|
for i in "${!DOC_DIRS[@]}"; do
|
|
doc=${DOC_DIRS[i]}
|
|
runs=${NUM_RUNS[i]}
|
|
|
|
cd $doc
|
|
|
|
# Just in case we run repeated builds after some failure:
|
|
rm -f *.ld lout.li $doc.ps
|
|
|
|
lout -r$runs all > $doc.ps
|
|
|
|
ps2pdf $doc.ps $docDir/$doc.pdf
|
|
|
|
# Clean up temp files
|
|
rm -f *.ld lout.li $doc.ps
|
|
cd ..
|
|
done
|
|
|
|
# cleanup empty directory
|
|
rmdir $dataDir/lout/locale
|
|
}
|