Files
haikuports/media-libs/lensfun/lensfun-0.3.2.recipe
2016-12-03 10:12:46 +01:00

100 lines
2.8 KiB
Bash

SUMMARY="Library to access a database of photographic lenses"
DESCRIPTION="
The lensfun library not only provides a way to read the database \
and search for specific things in it, but also provides a set of \
algorithms for correcting images based on detailed knowledge of \
lens properties. Right now lensfun is designed to correct \
distortion, transversal (also known as lateral) chromatic aberrations, \
vignetting and colour contribution of the lens (e.g. when sometimes \
people says one lens gives "yellowish" images and another, say, "bluish").
"
HOMEPAGE="http://lensfun.sourceforge.net"
COPYRIGHT="
2007-2008 Andrew Zabolotny
"
LICENSE="GNU LGPL v3"
REVISION="1"
SOURCE_URI="http://sourceforge.net/projects/lensfun/files/$portVersion/lensfun-$portVersion.tar.gz"
CHECKSUM_SHA256="ae8bcad46614ca47f5bda65b00af4a257a9564a61725df9c74cb260da544d331"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="!x86_gcc2 x86"
PROVIDES="
lensfun$secondaryArchSuffix = $portVersion compat >= 0.2
lib:liblensfun$secondaryArchSuffix = $portVersion compat >= 0
"
PROVIDES_devel="
lensfun${secondaryArchSuffix}_devel = $portVersion compat >= 0.2
cmd:g_lensfun_update_data$secondaryArchSuffix
cmd:lensfun_add_adapter$secondaryArchSuffix
cmd:lensfun_update_data$secondaryArchSuffix
devel:liblensfun$secondaryArchSuffix = $portVersion compat >= 0
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libpng16$secondaryArchSuffix
lib:libintl$secondaryArchSuffix
lib:libz$secondaryArchSuffix
lib:libglib_2.0${secondaryArchSuffix}
"
REQUIRES_devel="
lensfun$secondaryArchSuffix == $portVersion base
haiku$secondaryArchSuffix
lib:libglib_2.0${secondaryArchSuffix}
lib:libintl$secondaryArchSuffix
lib:libpng16$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libpng16$secondaryArchSuffix
devel:libz$secondaryArchSuffix
devel:libglib_2.0${secondaryArchSuffix} >= 0.4000
devel:libintl$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:cmake
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
BUILD()
{
mkdir -p cmake_build
cd cmake_build
cmake -DCMAKE_INSTALL_PREFIX=$prefix -DDOCDIR=$docDir \
-DINCLUDEDIR=$includeDir -DDATADIR=$dataDir/lensfun \
-DCMAKE_INSTALL_DATAROOTDIR=$dataRootDir ..
make $jobArgs
}
INSTALL()
{
cd cmake_build
make install
mkdir -p $includeDir
mv $prefix/include/* $includeDir
rmdir $prefix/include
if [ -n "$secondaryArchSuffix" ]; then
mv $prefix/bin $prefix/bin2
mv $prefix/lib $prefix/lib2
mkdir -p $binDir $libDir
mv $prefix/bin2/* $binDir
mv $prefix/lib2/* $libDir
rmdir $prefix/bin2 $prefix/lib2
fi
rm -f $binDir/example
prepareInstalledDevelLibs liblensfun
fixPkgconfig
# devel package
packageEntries devel \
$binDir \
$developDir
}