mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-08 21:00:05 +02:00
* vigra, bump to 1.12.3 use cmd:python3 * Update media-libs/vigra/vigra-1.12.3.recipe Co-authored-by: OscarL <oscar.lesta@gmail.com> --------- Co-authored-by: OscarL <oscar.lesta@gmail.com>
147 lines
3.9 KiB
Bash
147 lines
3.9 KiB
Bash
SUMMARY="A image processing and analysis library"
|
|
DESCRIPTION="VIGRA stands for \"Vision with Generic Algorithms\". It's an \
|
|
image processing and analysis library that puts its main emphasis on \
|
|
customizable algorithms and data structures. VIGRA is especially strong for \
|
|
multi-dimensional images, because many algorithms (e.g. filters, feature \
|
|
computation, superpixels) are implemented for arbitrary high dimensions. \
|
|
By using template techniques similar to those in the C++ Standard Template \
|
|
Library, you can easily adapt any VIGRA component to the needs of your \
|
|
application, without thereby giving up execution speed."
|
|
HOMEPAGE="http://ukoethe.github.io/vigra/"
|
|
COPYRIGHT="1998 Ullrich Koethe"
|
|
LICENSE="MIT"
|
|
REVISION="1"
|
|
SOURCE_URI="https://github.com/ukoethe/vigra/archive/Version-${portVersion//./-}.tar.gz"
|
|
CHECKSUM_SHA256="04bd9bcf3d5fd694c8fd25d651a56376f2b8bc2623d41b1805fc84ac5bad0512"
|
|
SOURCE_FILENAME="vigra-$portVersion.tar.gz"
|
|
SOURCE_DIR="vigra-Version-${portVersion//./-}"
|
|
|
|
ARCHITECTURES="?all !x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="?x86"
|
|
|
|
commandSuffix=$secondaryArchSuffix
|
|
commandBinDir=$binDir
|
|
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
|
commandSuffix=
|
|
commandBinDir=$prefix/bin
|
|
fi
|
|
|
|
PROVIDES="
|
|
vigra$secondaryArchSuffix = $portVersion
|
|
lib:libvigraimpex$secondaryArchSuffix = 11.1.11.1 compat >= 11
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
lib:libfftw3$secondaryArchSuffix
|
|
lib:libIex_3_2$secondaryArchSuffix
|
|
lib:libIlmThread_3_2$secondaryArchSuffix
|
|
lib:libImath_3_1$secondaryArchSuffix
|
|
lib:libOpenEXR_3_2$secondaryArchSuffix
|
|
lib:libOpenEXRCore_3_2$secondaryArchSuffix
|
|
lib:libOpenEXRUtil_3_2$secondaryArchSuffix
|
|
lib:libjpeg$secondaryArchSuffix
|
|
lib:libpng16$secondaryArchSuffix
|
|
lib:libtiff$secondaryArchSuffix
|
|
lib:libz$secondaryArchSuffix
|
|
"
|
|
|
|
PROVIDES_devel="
|
|
vigra${secondaryArchSuffix}_devel = $portVersion
|
|
cmd:vigra_config$commandSuffix
|
|
devel:libvigraimpex$secondaryArchSuffix = 11.1.11.1 compat >= 11
|
|
"
|
|
REQUIRES_devel="
|
|
vigra$secondaryArchSuffix == $portVersion base
|
|
cmd:python3 # vigra-config is python script
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
devel:libfftw3$secondaryArchSuffix
|
|
devel:libIex_3_2$secondaryArchSuffix
|
|
devel:libIlmThread_3_2$secondaryArchSuffix
|
|
devel:libImath_3_1$secondaryArchSuffix
|
|
devel:libOpenEXR_3_2$secondaryArchSuffix
|
|
devel:libOpenEXRCore$secondaryArchSuffix
|
|
devel:libOpenEXRCore_3_2$secondaryArchSuffix
|
|
devel:libOpenEXRUtil_3_2$secondaryArchSuffix
|
|
devel:libjpeg$secondaryArchSuffix
|
|
devel:libpng16$secondaryArchSuffix
|
|
devel:libtiff$secondaryArchSuffix
|
|
devel:libz$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
cmd:cmake
|
|
cmd:g++$secondaryArchSuffix
|
|
cmd:ld$secondaryArchSuffix
|
|
cmd:make
|
|
"
|
|
|
|
PATCH()
|
|
{
|
|
sed -i 's,\/lib,/'${relativeLibDir}',g' \
|
|
config/vigra-config.in
|
|
sed -e 's,#!/usr/bin/env python,#!/usr/bin/env python3,' -i \
|
|
config/vigra-config.in
|
|
}
|
|
|
|
BUILD()
|
|
{
|
|
mkdir -p build
|
|
cd build
|
|
cmake -DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_POLICY_VERSION_MINIMUM=4.0 \
|
|
-DCMAKE_INSTALL_PREFIX=$prefix \
|
|
-DWITH_HDF5=0 \
|
|
-DWITH_VIGRANUMPY=0 \
|
|
-DWITH_OPENEXR=1 ../
|
|
make $jobArgs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
cd build
|
|
make install
|
|
|
|
# we did not generate documentation
|
|
rm -rf $prefix/doc
|
|
|
|
# move headers
|
|
mkdir -p $includeDir
|
|
mv $prefix/include/* $includeDir
|
|
|
|
rm -rf $prefix/include
|
|
|
|
# move libs for secondaryArchSuffix
|
|
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
|
mv $prefix/lib $prefix/lib2
|
|
mkdir $(dirname $libDir)
|
|
mv $prefix/lib2 $libDir
|
|
fi
|
|
|
|
#rm -rf $prefix/lib
|
|
|
|
prepareInstalledDevelLib libvigraimpex
|
|
|
|
fixDevelopLibDirReferences $prefix/bin/vigra-config
|
|
sed -i 's,\/include,/'${relativeIncludeDir}',g' \
|
|
$commandBinDir/vigra-config
|
|
|
|
# move CMake scripts...
|
|
# FIXME: ...which probably won't work
|
|
mv $libDir/vigra $developLibDir
|
|
sed -i 's,\/include,/'${relativeIncludeDir}',g' \
|
|
$developLibDir/vigra/VigraConfig.cmake
|
|
|
|
packageEntries devel \
|
|
$developDir \
|
|
$commandBinDir/vigra-config
|
|
}
|
|
|
|
TEST()
|
|
{
|
|
# FIXME: these tests fail, probably due to wrong paths
|
|
cd build
|
|
make test
|
|
}
|