mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-05 14:38:51 +02:00
Yes, the website is now "xpdfreader", but the Linux packages are still called "xpdf", and as you can see it provides all the same commands (and then some) that the xpdf package does.
105 lines
3.0 KiB
Bash
105 lines
3.0 KiB
Bash
SUMMARY="Open source Portable Document Format (PDF) viewer"
|
|
DESCRIPTION="Xpdf is a free PDF viewer and toolkit, including a text extractor, image \
|
|
converter, HTML converter, and more. Most of the tools are available as \
|
|
open source."
|
|
HOMEPAGE="https://www.xpdfreader.com/"
|
|
COPYRIGHT="1996-2017 Glyph & Cog, LLC."
|
|
LICENSE="GNU GPL v2"
|
|
REVISION="1"
|
|
SOURCE_URI="http://www.xpdfreader.com/dl/xpdf-$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="ff3d92c42166e35b1ba6aec9b5f0adffb5fc05a3eb95dc49505b6e344e4216d6"
|
|
SOURCE_DIR="xpdf-$portVersion"
|
|
ADDITIONAL_FILES="xpdfreader.rdef.in"
|
|
|
|
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/.
|
|
commandSuffix=$secondaryArchSuffix
|
|
commandBinDir=$binDir
|
|
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
|
commandSuffix=
|
|
commandBinDir=$prefix/bin
|
|
fi
|
|
|
|
PROVIDES="
|
|
xpdf$secondaryArchSuffix = $portVersion
|
|
app:XpdfViewer$commandSuffix = $portVersion
|
|
cmd:xpdf$commandSuffix = $portVersion
|
|
cmd:pdfdetach$commandSuffix = $portVersion
|
|
cmd:pdffonts$commandSuffix = $portVersion
|
|
cmd:pdfimages$commandSuffix = $portVersion
|
|
cmd:pdfinfo$commandSuffix = $portVersion
|
|
cmd:pdftopng$commandSuffix = $portVersion
|
|
cmd:pdftoppm$commandSuffix = $portVersion
|
|
cmd:pdftops$commandSuffix = $portVersion
|
|
cmd:pdftohtml$commandSuffix = $portVersion
|
|
cmd:pdftotext$commandSuffix = $portVersion
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
lib:libfreetype$secondaryArchSuffix
|
|
lib:libjpeg$secondaryArchSuffix
|
|
lib:libpng16$secondaryArchSuffix
|
|
lib:libQt5Core$secondaryArchSuffix
|
|
lib:libQt5Gui$secondaryArchSuffix
|
|
lib:libQt5Widgets$secondaryArchSuffix
|
|
lib:libtiff$secondaryArchSuffix
|
|
lib:libz$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
devel:libfreetype$secondaryArchSuffix
|
|
devel:libjpeg$secondaryArchSuffix
|
|
devel:libpng16$secondaryArchSuffix
|
|
devel:libQt5Core$secondaryArchSuffix
|
|
devel:libQt5Gui$secondaryArchSuffix
|
|
devel:libQt5Widgets$secondaryArchSuffix
|
|
devel:libtiff$secondaryArchSuffix
|
|
devel:libz$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:awk
|
|
cmd:cmake
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:ld$secondaryArchSuffix
|
|
cmd:make
|
|
"
|
|
|
|
BUILD()
|
|
{
|
|
mkdir -p build
|
|
cd build
|
|
cmake .. -DCMAKE_INSTALL_PREFIX=$prefix -DCMAKE_BUILD_TYPE=Release -DSPLASH_CMYK=ON
|
|
make $jobArgs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
cd build
|
|
make install
|
|
rm -rf $prefix/man
|
|
|
|
mkdir -p $appsDir
|
|
mv $prefix/bin/xpdf $appsDir/XpdfReader
|
|
ln -s $appsDir/XpdfReader $prefix/bin/xpdf
|
|
|
|
local APP_SIGNATURE="application/x-vnd.xpdf"
|
|
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
|
|
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
|
|
local MINOR="`echo "$portVersion" | cut -d. -f3`"
|
|
local MINOR="01"
|
|
local LONG_INFO="$SUMMARY"
|
|
sed \
|
|
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
|
|
-e "s|@MAJOR@|$MAJOR|" \
|
|
-e "s|@MIDDLE@|$MIDDLE|" \
|
|
-e "s|@MINOR@|$MINOR|" \
|
|
-e "s|@LONG_INFO@|$LONG_INFO|" \
|
|
$portDir/additional-files/xpdfreader.rdef.in > xpdfreader.rdef
|
|
|
|
addResourcesToBinaries xpdfreader.rdef $appsDir/XpdfReader
|
|
addAppDeskbarSymlink $appsDir/XpdfReader
|
|
}
|