SUMMARY="A printer driver that writes PDF files"
DESCRIPTION="PDFWriter is a printer driver that saves PDF files \
instead of sending output to a printer."
HOMEPAGE="https://github.com/HaikuArchives/PDFWriter"
COPYRIGHT="2003 Phillipe Houdoin, Michael Pfeiffer, Simon Gauvin"
LICENSE="MIT"
REVISION="4"
srcGitRev="ec11100d870e967d04fd1b89bc6964beddbe0122"
SOURCE_URI="$HOMEPAGE/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="046eacb405b715a2565d5ccd4ad5045f70e9daefc2f85b4e82332fb5401d2423"
SOURCE_DIR="PDFWriter-$srcGitRev"

ARCHITECTURES="all"

PROVIDES="
	PDFWriter = $portVersion
	addon:PDFWriter
	"
REQUIRES="
	haiku
	lib:libpdf
	"

BUILD_REQUIRES="
	haiku_devel
	devel:libpdf
	"
BUILD_PREREQUIRES="
	makefile_engine
	cmd:gcc
	cmd:ld
	cmd:make
	"

BUILD()
{
	make $jobArgs OBJ_DIR=objects
}

INSTALL()
{
	mkdir -p $addOnsDir/Print
	cp -a objects/PDF\ Writer $addOnsDir/Print/
	mkdir -p $dataDir/PDF\ Writer
	cp encoding/* $dataDir/PDF\ Writer/
}
