Files
haikuports/app-text/podofo/podofo-0.9.4.recipe
Jerome Duval 0b4449c8a8 podofo: bump version.
* fix build on secondary arch x86.
2016-07-27 18:38:30 +00:00

128 lines
2.9 KiB
Bash

SUMMARY="A library to work with the PDF file format"
DESCRIPTION="
PoDoFo is a library to work with the PDF file format and includes also a few \
tools. The name comes from the first two letters of PDF (Portable Document \
Format.
"
HOMEPAGE="http://sourceforge.net/projects/podofo"
COPYRIGHT="
2005-2014 Dominik Seichter
2008 Craig Ringer
"
LICENSE="
GNU GPL v2
GNU LGPL v2.1
"
SOURCE_URI="http://sourceforge.net/projects/podofo/files/podofo/$portVersion/podofo-$portVersion.tar.gz"
CHECKSUM_SHA256="ccdf505fcb4904617e728b15729da8700ff38442c1dd2f24fbd52934287ff859"
REVISION="1"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
PATCHES="podofo-$portVersion.patchset"
if [ $targetArchitecture != x86_gcc2 ]; then
commandSuffix=
commandBinDir=$prefix/bin
fi
PROVIDES="
podofo$secondaryArchSuffix = $portVersion
lib:libpodofo$secondaryArchSuffix = $portVersion
cmd:podofobox
cmd:podofocolor
cmd:podofocountpages
cmd:podofocrop
cmd:podofoencrypt
cmd:podofogc
cmd:podofoimg2pdf
cmd:podofoimgextract
cmd:podofoimpose
cmd:podofoincrementalupdates
cmd:podofomerge
cmd:podofopages
cmd:podofopdfinfo
cmd:podofotxt2pdf
cmd:podofotxtextract
cmd:podofouncompress
cmd:podofoxmp
"
PROVIDES_devel="
podofo${secondaryArchSuffix}_devel = $portVersion
devel:libpodofo$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libfontconfig$secondaryArchSuffix
lib:libfreetype$secondaryArchSuffix
lib:libjpeg$secondaryArchSuffix
lib:libpng16$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libtiff$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
REQUIRES_devel="
podofo$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libfontconfig$secondaryArchSuffix
devel:libfreetype$secondaryArchSuffix
devel:libjpeg$secondaryArchSuffix
devel:libpng16$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
devel:libtiff$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:cmake
cmd:make
cmd:sed
"
PATCH()
{
headersDir=
if [ -n "$secondaryArchSuffix" ]; then
headersDir=/$effectiveTargetArchitecture
fi
freetypeDir=$portPackageLinksDir/devel~libfreetype$secondaryArchSuffix/develop/headers$headersDir/freetype2
sed -i -e s:/usr/include/freetype2:$freetypeDir: cmake/modules/FindFREETYPE.cmake
}
BUILD()
{
mkdir -p build; cd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=$prefix \
-DPODOFO_BUILD_SHARED=1 \
..
make $jobArgs
}
INSTALL()
{
cd build
make install
mkdir -p $(dirname $includeDir) $manDir
mv $prefix/include $includeDir
mv $prefix/share/man/man1 $manDir
rmdir $prefix/share/man $prefix/share
if [ -n "$secondaryArchSuffix" ]; then
mv $prefix/lib $prefix/lib2
mkdir -p $libDir
mv $prefix/lib2/* $libDir
rmdir $prefix/lib2
fi
prepareInstalledDevelLibs libpodofo
fixPkgconfig
# devel package
packageEntries devel \
$developDir
}