Openjpeg: add recipe for 2.1.0.

This commit is contained in:
Adrien Destugues
2014-10-08 21:28:34 +02:00
parent 79e0f0bafd
commit 4e18e454e0
2 changed files with 221 additions and 0 deletions

View File

@@ -0,0 +1,99 @@
SUMMARY="OpenJPEG is 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, ...
"
LICENSE="BSD (2-clause)"
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"
HOMEPAGE="http://www.openjpeg.org/"
SRC_URI="http://sourceforge.net/projects/openjpeg.mirror/files/$portVersion/openjpeg-$portVersion.tar.gz"
CHECKSUM_SHA256="1232bb814fd88d8ed314c94f0bfebb03de8559583a33abbe8c64ef3fc0a8ff03"
REVISION="1"
ARCHITECTURES="x86 x86_64"
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
# x86_gcc2 is fine as primary target architecture as long as we're building
# for a different secondary architecture.
ARCHITECTURES="$ARCHITECTURES x86_gcc2"
else
ARCHITECTURES="$ARCHITECTURES !x86_gcc2"
fi
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
openjpeg$secondaryArchSuffix = $portVersion
cmd:opj_decompress = $portVersion
cmd:opj_compress = $portVersion
cmd:opj_dump = $portVersion
lib:libopenjp2$secondaryArchSuffix = $portVersion compat >= 7
"
REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
lib:libz$secondaryArchSuffix
lib:libpng$secondaryArchSuffix
"
# haiku_x86 doesn't claim to provide lib:libtiff_x86 on gcc2 builds
if [ "$targetArchitecture" != x86_gcc2 ];then
REQUIRES="$REQUIRES lib:libtiff$secondaryArchSuffix"
fi
BUILD_REQUIRES="
devel:libz
devel:libpng
"
#needs devel:libtiff too but that isn't provided by anything
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel >= $haikuVersion
cmd:cmake
cmd:make
cmd:gcc$secondaryArchSuffix
"
PROVIDES_devel="
openjpeg${secondaryArchSuffix}_devel = $portVersion
devel:libopenjp2$secondaryArchSuffix = $portVersion compat >= 7
"
REQUIRES_devel="
openjpeg$secondaryArchSuffix == $portVersion
"
BUILD()
{
mkdir -p build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$prefix -DLIB_SUFFIX=$secondaryArchSubDir \
-DOPENJPEG_INSTALL_LIB_DIR=$relativeLibDir \
-DOPENJPEG_INSTALL_INCLUDE_DIR=$relativeIncludeDir \
-DOPENJPEG_INSTALL_MAN_DIR=$relativeManDir
make $jobArgs
}
INSTALL()
{
cd build
make install
prepareInstalledDevelLibs libopenjp2
fixPkgconfig
packageEntries devel $developDir
}
TEST()
{
make check
}

View File

@@ -0,0 +1,122 @@
From dcf06de5780b6e73ec5e1ff10a87ead0c265d41a Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@gmail.com>
Date: Wed, 8 Oct 2014 21:27:56 +0200
Subject: Remove hardcoded libm.
diff --git a/src/bin/jp2/CMakeLists.txt b/src/bin/jp2/CMakeLists.txt
index 1c2ef39..33d8c32 100644
--- a/src/bin/jp2/CMakeLists.txt
+++ b/src/bin/jp2/CMakeLists.txt
@@ -43,7 +43,7 @@ foreach(exe opj_decompress opj_compress opj_dump)
# On unix you need to link to the math library:
if(UNIX)
- target_link_libraries(${exe} m)
+ target_link_libraries(${exe})
endif()
# Install exe
install(TARGETS ${exe}
diff --git a/src/bin/jpip/CMakeLists.txt b/src/bin/jpip/CMakeLists.txt
index 821b201..ad39e5c 100644
--- a/src/bin/jpip/CMakeLists.txt
+++ b/src/bin/jpip/CMakeLists.txt
@@ -32,7 +32,7 @@ if(BUILD_JPIP_SERVER)
# On unix you need to link to the math library:
if(UNIX)
- target_link_libraries(opj_server m)
+ target_link_libraries(opj_server)
endif()
# Install exe
diff --git a/src/bin/jpwl/CMakeLists.txt b/src/bin/jpwl/CMakeLists.txt
index 5df225d..1cb52d2 100644
--- a/src/bin/jpwl/CMakeLists.txt
+++ b/src/bin/jpwl/CMakeLists.txt
@@ -53,7 +53,7 @@ foreach(exe decompress compress)
endif()
if(UNIX)
- target_link_libraries(${jpwl_exe} m)
+ target_link_libraries(${jpwl_exe})
endif()
install(TARGETS ${jpwl_exe}
diff --git a/src/bin/mj2/CMakeLists.txt b/src/bin/mj2/CMakeLists.txt
index 78ad754..4ad36fb 100644
--- a/src/bin/mj2/CMakeLists.txt
+++ b/src/bin/mj2/CMakeLists.txt
@@ -39,7 +39,7 @@ foreach(exe
target_link_libraries(${exe} ${LCMS_LIBNAME} openmj2)
if(UNIX)
- target_link_libraries(${exe} m)
+ target_link_libraries(${exe})
endif()
install(TARGETS ${exe}
diff --git a/src/lib/openjp2/CMakeLists.txt b/src/lib/openjp2/CMakeLists.txt
index fcf60ec..1e1fab0 100644
--- a/src/lib/openjp2/CMakeLists.txt
+++ b/src/lib/openjp2/CMakeLists.txt
@@ -51,7 +51,7 @@ if(WIN32)
endif()
add_library(${OPENJPEG_LIBRARY_NAME} ${OPENJPEG_SRCS})
if(UNIX)
- target_link_libraries(${OPENJPEG_LIBRARY_NAME} m)
+ target_link_libraries(${OPENJPEG_LIBRARY_NAME})
endif()
set_target_properties(${OPENJPEG_LIBRARY_NAME} PROPERTIES ${OPENJPEG_LIBRARY_PROPERTIES})
@@ -79,7 +79,7 @@ endif()
# no need to install:
add_executable(t1_generate_luts t1_generate_luts.c)
if(UNIX)
- target_link_libraries(t1_generate_luts m)
+ target_link_libraries(t1_generate_luts)
endif()
# Experimental option; let's how cppcheck performs
diff --git a/src/lib/openjp3d/CMakeLists.txt b/src/lib/openjp3d/CMakeLists.txt
index 8f034ff..2a4f9dc 100644
--- a/src/lib/openjp3d/CMakeLists.txt
+++ b/src/lib/openjp3d/CMakeLists.txt
@@ -24,7 +24,7 @@ endif()
# build jp3d lib:
add_library(${OPENJP3D_LIBRARY_NAME} ${OPENJP3D_SRCS})
if(UNIX)
- target_link_libraries(${OPENJP3D_LIBRARY_NAME} m)
+ target_link_libraries(${OPENJP3D_LIBRARY_NAME})
endif()
set_target_properties(${OPENJP3D_LIBRARY_NAME} PROPERTIES ${OPENJPEG_LIBRARY_PROPERTIES})
diff --git a/src/lib/openjpwl/CMakeLists.txt b/src/lib/openjpwl/CMakeLists.txt
index 616edf5..d1c5704 100644
--- a/src/lib/openjpwl/CMakeLists.txt
+++ b/src/lib/openjpwl/CMakeLists.txt
@@ -47,7 +47,7 @@ if(WIN32)
endif()
add_library(openjpwl ${JPWL_SRCS} ${OPENJPEG_SRCS})
if(UNIX)
- target_link_libraries(openjpwl m)
+ target_link_libraries(openjpwl)
endif()
set_target_properties(openjpwl
PROPERTIES ${OPENJPEG_LIBRARY_PROPERTIES})
diff --git a/src/lib/openmj2/CMakeLists.txt b/src/lib/openmj2/CMakeLists.txt
index 775c931..53f558a 100644
--- a/src/lib/openmj2/CMakeLists.txt
+++ b/src/lib/openmj2/CMakeLists.txt
@@ -43,7 +43,7 @@ add_library(${OPENMJ2_LIBRARY_NAME} ${OPENMJ2_SRCS})
# FIXME: We are using an openjpeg 1.5 copy:
#target_link_libraries(${OPENMJ2_LIBRARY_NAME} openjp2)
if(UNIX)
- target_link_libraries(${OPENMJ2_LIBRARY_NAME} m)
+ target_link_libraries(${OPENMJ2_LIBRARY_NAME})
endif()
set_target_properties(${OPENMJ2_LIBRARY_NAME} PROPERTIES ${OPENJPEG_LIBRARY_PROPERTIES})
--
1.8.3.4