openjpeg: fix cmake lib detection.

enable x86 secondary arch.
This commit is contained in:
Jerome Duval
2019-05-02 16:32:21 +02:00
parent 89a3bf35f1
commit 19af751ca7

View File

@@ -19,13 +19,13 @@ Universite catholique de Louvain (UCL), Belgium
2011-2012, Centre National d'Etudes Spatiales (CNES), France
2012, CS Systemes d'Information, France"
LICENSE="BSD (2-clause)"
REVISION="1"
REVISION="2"
SOURCE_URI="https://github.com/uclouvain/openjpeg/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="63f5a4713ecafc86de51bfad89cc07bb788e9bba24ebbf0c4ca637621aadb6a9"
SOURCE_FILENAME="openjpeg-$portVersion.tar.gz"
ARCHITECTURES="!x86_gcc2 ?x86 x86_64"
SECONDARY_ARCHITECTURES="?x86"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
openjpeg$secondaryArchSuffix = $portVersion
@@ -69,7 +69,7 @@ BUILD()
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$prefix \
-DOPENJPEG_INSTALL_BIN_DIR=$relativeBinDir \
-DOPENJPEG_INSTALL_LIB_DIR=$relativeLibDir \
-DOPENJPEG_INSTALL_LIB_DIR=$relativeDevelopLibDir \
-DOPENJPEG_INSTALL_INCLUDE_DIR=$relativeIncludeDir \
-DOPENJPEG_INSTALL_MAN_DIR=$relativeManDir \
-DBUILD_TESTING:BOOL=ON
@@ -81,11 +81,20 @@ INSTALL()
cd build
make install
mkdir -p $(dirname $libDir)
mv $developLibDir $libDir
# CMake uses OPENJPEG_INSTALL_LIB_DIR to generate its config file
# the config file ends installed in $libDir instead of $developLibDir
# just remove a path level
sed -i '0,/get_filename_component(_IMPORT_PREFIX "\${_IMPORT_PREFIX}" PATH)/s///' \
$libDir/openjpeg-2.3/OpenJPEGTargets.cmake
prepareInstalledDevelLib libopenjp2
fixPkgconfig
packageEntries devel $developDir
packageEntries devel $developDir $libDir/openjpeg-2.*
}
TEST()