Files
haikuports/app-text/podofo/podofo-0.9.5.recipe
alaviss a0fdf8cf1f Add TEST() to various ports (#1832)
* app-crypt/rhash: disable on x86_gcc2, also fixed secondary arch

* dev-lang/tcc: make tcc actually works

  - update patches: define custom haiku definitions, use haiku
    start/end objects

  - make tcc uses haiku custom paths

  - add secondary arch support
  - add x86_64

* dev-lang/tcc: disable on all architectures

  - Haiku's BeBuild.h depends on __GNUC__ macro to select ABI, which
    unfortunately we can't risk to define, so disabling for now

* dev-python/pyqt: use correct name for sip

* dev-lang/spidermonkey: fix build

  - add x86 to snd arch

  - update config.sub and config.guess

  - add missing cmd:js_config
  - add missing cmd:zip

* dev-python/pyqt: clean up the spaces left by previous contributor

* add TEST() for the following ports:
  - sys-devel/flex
  - app-crypt/rhash
  - app-text/podofo
  - app-crypt/qca
  - app-editors/retext
  - app-i18n/mozc
  - dev-lang/tcc
  - dev-lang/yasm
  - dev-lang/spidermonkey
  - dev-libs/glib
  - dev-libs/jsoncpp
  - dev-libs/libtommath
  - dev-libs/libxslt
  - dev-libs/libyajl
  - dev-libs/zziplib
2017-12-10 13:49:50 +01:00

145 lines
3.3 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="854981cb897ebc14bac854ea0f25305372261a48a205363fe1c61659ba7b5304"
REVISION="3"
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 compat >= $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:podofosign
cmd:podofotxt2pdf
cmd:podofotxtextract
cmd:podofouncompress
cmd:podofoxmp
"
PROVIDES_devel="
podofo${secondaryArchSuffix}_devel = $portVersion
devel:libpodofo$secondaryArchSuffix = $portVersion compat >= $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
devel:libssl$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcppunit$secondaryArchSuffix
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
# Taken from Gentoo
# Test name: EncodingTest::testDifferencesEncoding
# equality assertion failed
# - Expected: 1
# - Actual : 0
sed -e 's:CPPUNIT_TEST( testDifferencesEncoding ://\0:' \
-i test/unit/EncodingTest.h
}
BUILD()
{
mkdir -p build; cd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=$prefix \
-DPODOFO_BUILD_SHARED=1 \
-DPODOFO_HAVE_CPPUNIT=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
}
TEST()
{
cd build/test/unit
./podofo-test --selftest
}