Files
haikuports/media-libs/openjpeg/openjpeg-2.1.2.recipe
2023-04-19 08:40:56 +02:00

96 lines
2.8 KiB
Bash

SUMMARY="An open-source C-Library for JPEG 2000"
DESCRIPTION="The OpenJPEG library is an open-source JPEG 2000 codec written \
in C language. It has been developed in order to promote the use of JPEG \
2000, the new still-image compression standard from the Joint Photographic \
Experts Group (JPEG).
In addition to the basic codec, various other features are under development, \
among them the JP2 and MJ2 (Motion JPEG 2000) file formats, an indexing tool \
useful for the JPIP protocol, JPWL-tools for error-resilience, a Java-viewer \
for j2k-images."
HOMEPAGE="http://www.openjpeg.org/"
COPYRIGHT="2002-2012, Communications and Remote Sensing Laboratory, \
Universite catholique de Louvain (UCL), Belgium
2002-2012 Professor Benoit Macq
2003-2012 Antonin Descampe
2003-2009 Francois-Olivier Devaux
2005 Herve Drolon, FreeImage Team
2002-2003 Yannick Verschueren
2001-2003 David Janssens"
LICENSE="BSD (2-clause)"
REVISION="4"
SOURCE_URI="http://github.com/uclouvain/openjpeg/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="4ce77b6ef538ef090d9bde1d5eeff8b3069ab56c4906f083475517c2c023dfa7"
SOURCE_FILENAME="openjpeg-$portVersion.tar.gz"
PATCHES="openjpeg-$portVersion.patchset"
ARCHITECTURES="all"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
libVersion="7.0.2"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
openjpeg$secondaryArchSuffix = $portVersion
cmd:opj_compress$secondaryArchSuffix = $portVersion
cmd:opj_decompress$secondaryArchSuffix = $portVersion
cmd:opj_dump$secondaryArchSuffix = $portVersion
lib:libopenjp2$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libpng16$secondaryArchSuffix
lib:libtiff$secondaryArchSuffix >= 5
lib:libz$secondaryArchSuffix
"
if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then
REQUIRES="$REQUIRES
lib:liblcms2$secondaryArchSuffix
"
fi
PROVIDES_devel="
openjpeg${secondaryArchSuffix}_devel = $portVersion
devel:libopenjp2$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
openjpeg$secondaryArchSuffix == $portVersion
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libpng$secondaryArchSuffix
devel:libtiff$secondaryArchSuffix >= 5
devel:libz$secondaryArchSuffix
"
if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then
BUILD_REQUIRES="$BUILD_REQUIRES
devel:liblcms2$secondaryArchSuffix
"
fi
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:make
"
BUILD()
{
cmake -Bbuild -S. -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$prefix \
-DOPENJPEG_INSTALL_BIN_DIR=$relativeBinDir \
-DOPENJPEG_INSTALL_LIB_DIR=$relativeLibDir \
-DOPENJPEG_INSTALL_INCLUDE_DIR=$relativeIncludeDir \
-DOPENJPEG_INSTALL_MAN_DIR=$relativeManDir
make -C build $jobArgs
}
INSTALL()
{
make -C build install
prepareInstalledDevelLib libopenjp2
fixPkgconfig
packageEntries devel $developDir
}