Add recipe for Ghostscript 8.14.

Apparently the last release for which the BeOS patches were ported.
(this recipe does not include said patches yet).
This commit is contained in:
Adrien Destugues
2019-03-15 08:29:00 +01:00
parent a4b9721266
commit 191d78b85f
2 changed files with 192 additions and 0 deletions

View File

@@ -0,0 +1,142 @@
SUMMARY="An interpreter for the PostScript language and for PDF"
DESCRIPTION="Ghostscript is a suite of software based on an interpreter for \
Adobe Systems' PostScript and Portable Document Format (PDF) page description \
languages. Its main purposes are the rasterization or rendering of such page \
description language files, for the display or printing of document pages, and \
the conversion between PostScript and PDF files."
HOMEPAGE="https://ghostscript.com/"
COPYRIGHT="2001-2018 Artifex Software, Inc."
LICENSE="AGPL-3.0"
REVISION="1"
SOURCE_URI="https://sourceforge.net/projects/ghostscript/files/AFPL%20Ghostscript/$portVersion/ghostscript-$portVersion.tar.gz"
CHECKSUM_SHA256="343aaf45cd52539a04ec2172259c8c39b87f613e1a493c74a275350a1ecc6b6a"
SOURCE_DIR="ghostscript-$portVersion"
PATCHES="ghostscript8-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 ?x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
# On x86_gcc2 we don't want to install the commands in bin/<arch>/, but in bin/.
commandBinDir=$binDir
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandBinDir=$prefix/bin
fi
PROVIDES="
ghostscript_gpl$secondaryArchSuffix = $portVersion
cmd:bdftops
cmd:dvipdf
cmd:eps2eps
cmd:fixmswrd.pl
cmd:font2c
cmd:gs
cmd:gsbj
cmd:gsc
cmd:gsdj
cmd:gsdj500
cmd:gslj
cmd:gslp
cmd:gsnd
cmd:lprsetup.sh
cmd:pfbtopfa
cmd:pdf2dsc
cmd:pdf2ps
cmd:pdfopt
cmd:pf2afm
cmd:printafm
cmd:ps2ascii
cmd:ps2epsi
cmd:ps2pdf
cmd:ps2pdf12
cmd:ps2pdf13
cmd:ps2pdf14
cmd:ps2pdfwr
cmd:ps2ps
cmd:pv.sh
cmd:unix_lpr.sh
cmd:wftopfa
lib:libgs$secondaryArchSuffix = 8.14 compat >= 8
"
REQUIRES="
haiku$secondaryArchSuffix
poppler_data
lib:libfontconfig$secondaryArchSuffix
lib:libfreetype$secondaryArchSuffix
lib:libidn$secondaryArchSuffix
lib:libjbig2dec$secondaryArchSuffix
lib:libjpeg$secondaryArchSuffix
lib:liblcms2$secondaryArchSuffix
lib:libpaper$secondaryArchSuffix
lib:libpng16$secondaryArchSuffix
lib:libtiff$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_devel="
ghostscript_gpl${secondaryArchSuffix}_devel = $portVersion
devel:libgs$secondaryArchSuffix = 8.14 compat >= 8
"
REQUIRES_devel="
ghostscript_gpl$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libfontconfig$secondaryArchSuffix
devel:libfreetype$secondaryArchSuffix
devel:libidn$secondaryArchSuffix
devel:libjbig2dec$secondaryArchSuffix
devel:libjpeg$secondaryArchSuffix
devel:liblcms2$secondaryArchSuffix
devel:libpaper$secondaryArchSuffix
devel:libpng16$secondaryArchSuffix
devel:libtiff$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:autoconf
cmd:awk
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:grep
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:sed
"
defineDebugInfoPackage ghostscript_gpl$secondaryArchSuffix \
"$commandBinDir"/gs \
"$libDir"/libgs.so.8.14
BUILD()
{
# Force configure to use system-libs
rm -rf {freetype,jbig2dec,jpeg,lcms2,libpng,tiff,zlib}
autoconf
# Do configure
runConfigure --omit-dirs binDir ./configure \
--bindir=$commandBinDir \
# Do make
make $jobArgs
make so $jobArgs
}
INSTALL()
{
make install
make soinstall
prepareInstalledDevelLib libgs
packageEntries devel $developDir
}
TEST()
{
make check
}

View File

@@ -0,0 +1,50 @@
From e75e1d2f4bb9623cc7bd1c5d49521e7c0554d5be Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Fri, 15 Mar 2019 08:17:45 +0100
Subject: Fix build on Haiku using Unix makefiles.
diff --git a/src/unix-aux.mak b/src/unix-aux.mak
index 6bbf607..76ab802 100644
--- a/src/unix-aux.mak
+++ b/src/unix-aux.mak
@@ -79,7 +79,7 @@ $(GENINIT_XE): $(GLSRC)geninit.c $(AK) $(GENINIT_DEPS)
# The "else true;" is required because Ultrix's implementation of sh -e
# terminates execution of a command if any error occurs, even if the command
# traps the error with ||.
-INCLUDE=/usr/include
+INCLUDE=/system/develop/headers/posix
$(gconfig__h): $(UNIX_AUX_MAK) $(ECHOGS_XE)
$(ECHOGS_XE) -w $(gconfig__h) -x 2f2a -s This file was generated automatically by unix-aux.mak. -s -x 2a2f
if ( test -f $(INCLUDE)/dirent.h ); then $(ECHOGS_XE) -a $(gconfig__h) -x 23 define HAVE_DIRENT_H; else true; fi
diff --git a/src/unix-dll.mak b/src/unix-dll.mak
index 2570d69..8626ba4 100644
--- a/src/unix-dll.mak
+++ b/src/unix-dll.mak
@@ -87,13 +87,13 @@ SODEFS=LDFLAGS='$(LDFLAGS) $(CFLAGS_SO) -shared -Wl,-soname=$(GS_SONAME_MAJOR)'\
# Normal shared object
so: SODIRS
- $(MAKE) $(SODEFS) CFLAGS='$(CFLAGS_STANDARD) $(CFLAGS_SO) $(GCFLAGS) $(XCFLAGS)' prefix=$(prefix) $(GSSOC) $(GSSOX)
+ $(MAKE) $(SODEFS) CFLAGS='$(CFLAGS_STANDARD) $(CFLAGS_SO) $(GCFLAGS) $(XCFLAGS)' prefix=$(prefix) $(GSSOC)
# Debug shared object
# Note that this is in the same directory as the normal shared
# object, so you will need to use 'make soclean', 'make sodebug'
sodebug: SODIRS
- $(MAKE) $(SODEFS) GENOPT='-DDEBUG' CFLAGS='$(CFLAGS_DEBUG) $(CFLAGS_SO) $(GCFLAGS) $(XCFLAGS)' $(GSSOC) $(GSSOX)
+ $(MAKE) $(SODEFS) GENOPT='-DDEBUG' CFLAGS='$(CFLAGS_DEBUG) $(CFLAGS_SO) $(GCFLAGS) $(XCFLAGS)' $(GSSOC)
install-so: so
-mkdir -p $(prefix)
@@ -103,7 +103,6 @@ install-so: so
-mkdir -p $(bindir)
-mkdir -p $(libdir)
$(INSTALL_PROGRAM) $(GSSOC) $(bindir)/$(GSSOC_XENAME)
- $(INSTALL_PROGRAM) $(GSSOX) $(bindir)/$(GSSOX_XENAME)
$(INSTALL_PROGRAM) $(BINDIR)/$(SOBINRELDIR)/$(GS_SONAME_MAJOR_MINOR) $(libdir)/$(GS_SONAME_MAJOR_MINOR)
$(RM_) $(libdir)/$(GS_SONAME)
ln -s $(GS_SONAME_MAJOR_MINOR) $(libdir)/$(GS_SONAME)
--
2.19.1