mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
jasper: add recipe for version 2.0.12.
* new SONAME, so rename 1.900.5 to jasper1.
This commit is contained in:
106
media-libs/jasper/jasper-2.0.12.recipe
Normal file
106
media-libs/jasper/jasper-2.0.12.recipe
Normal file
@@ -0,0 +1,106 @@
|
||||
SUMMARY="Implementation of the codec specified in the JPEG-2000 Part-1 standard"
|
||||
DESCRIPTION="
|
||||
The JasPer Project is an open-source initiative to provide a free \
|
||||
software-based reference implementation of the codec specified in the \
|
||||
JPEG-2000 Part-1 standard. More details about this software can be found in \
|
||||
the JasPer Software Reference Manual.
|
||||
"
|
||||
HOMEPAGE="http://www.ece.uvic.ca/~frodo/jasper/"
|
||||
COPYRIGHT="1999-2007 Michael D. Adams"
|
||||
LICENSE="JasPer v2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="http://www.ece.uvic.ca/~frodo/jasper/software/jasper-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="5b24faf5ed38670d6286e45ab7516b26458d05e7929b435afe569176765f4dda"
|
||||
PATCHES="jasper-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="?x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
|
||||
|
||||
PROVIDES="
|
||||
jasper$secondaryArchSuffix = $portVersion
|
||||
lib:libjasper$secondaryArchSuffix = 4.0.0 compat >= 4
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libjpeg$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
jasper${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libjasper$secondaryArchSuffix = 4.0.0 compat >= 4
|
||||
"
|
||||
REQUIRES_devel="
|
||||
jasper$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
if [ -z "$secondaryArchSuffix" ]; then
|
||||
SUMMARY_tools="The jasper tools"
|
||||
PROVIDES_tools="
|
||||
jasper${secondaryArchSuffix}_tools = $portVersion
|
||||
cmd:imgcmp$secondaryArchSuffix = $portVersion
|
||||
cmd:imginfo$secondaryArchSuffix = $portVersion
|
||||
cmd:jasper$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_tools="
|
||||
jasper$secondaryArchSuffix == $portVersion base
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libjpeg$secondaryArchSuffix
|
||||
"
|
||||
fi
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libjpeg$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
mkdir -p build-jasper && cd build-jasper
|
||||
cmake .. $cmakeDirArgs \
|
||||
-DJAS_ENABLE_AUTOMATIC_DEPENDENCIES=OFF \
|
||||
-DCMAKE_SKIP_RPATH=ON \
|
||||
-DJAS_ENABLE_OPENGL=OFF \
|
||||
-DOPENGL_INCLUDE_DIR=/system/develop/headers \
|
||||
-DGLUT_INCLUDE_DIR=/system/develop/headers
|
||||
make
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd build-jasper
|
||||
make install
|
||||
|
||||
mv $prefix/lib $prefix/lib2
|
||||
mkdir -p $(dirname $includeDir) $(dirname $libDir) $manDir
|
||||
mv $prefix/include $includeDir
|
||||
mv $prefix/lib2 $libDir
|
||||
mv $prefix/share/man/man1 $manDir/
|
||||
rm -rf $prefix/share
|
||||
|
||||
prepareInstalledDevelLibs libjasper
|
||||
fixPkgconfig
|
||||
|
||||
# devel package
|
||||
packageEntries devel \
|
||||
$developDir
|
||||
|
||||
# tools package
|
||||
if [ -z "$secondaryArchSuffix" ]; then
|
||||
packageEntries tools \
|
||||
$binDir \
|
||||
$documentationDir
|
||||
fi
|
||||
|
||||
# Remove stuff we don't need in the secondary architecture base package.
|
||||
if [ -n "$secondaryArchSuffix" ]; then
|
||||
rm -rf $prefix/bin
|
||||
rm -rf $documentationDir
|
||||
fi
|
||||
}
|
||||
@@ -6,21 +6,53 @@ JPEG-2000 Part-1 standard. More details about this software can be found in \
|
||||
the JasPer Software Reference Manual.
|
||||
"
|
||||
HOMEPAGE="http://www.ece.uvic.ca/~frodo/jasper/"
|
||||
COPYRIGHT="1999-2007 Michael D. Adams"
|
||||
LICENSE="JasPer v2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="http://www.ece.uvic.ca/~frodo/jasper/software/jasper-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="d5082e14a50a7e461863991a8e932fc06a1b2f2688108c4478c400c39e257ebb"
|
||||
REVISION="2"
|
||||
LICENSE="JasPer v2"
|
||||
COPYRIGHT="1999-2007 Michael D. Adams"
|
||||
SOURCE_DIR="jasper-$portVersion"
|
||||
|
||||
ARCHITECTURES="x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
|
||||
|
||||
PROVIDES="
|
||||
jasper$secondaryArchSuffix = $portVersion compat >= 1.0.0
|
||||
jasper1$secondaryArchSuffix = $portVersion compat >= 1.0.0
|
||||
lib:libjasper$secondaryArchSuffix = 1.0.0 compat >= 1
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
jasper1${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libjasper$secondaryArchSuffix = 1.0.0 compat >=1
|
||||
"
|
||||
REQUIRES_devel="
|
||||
jasper1$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
CONFLICTS_devel="
|
||||
jasper${secondaryArchSuffix}_devel
|
||||
"
|
||||
|
||||
if [ -z "$secondaryArchSuffix" ]; then
|
||||
SUMMARY_tools="The jasper tools"
|
||||
PROVIDES_tools="
|
||||
jasper1${secondaryArchSuffix}_tools = $portVersion
|
||||
cmd:imgcmp$secondaryArchSuffix = $portVersion
|
||||
cmd:imginfo$secondaryArchSuffix = $portVersion
|
||||
cmd:jasper$secondaryArchSuffix = $portVersion
|
||||
cmd:tmrdemo$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_tools="
|
||||
jasper1$secondaryArchSuffix == $portVersion base
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
CONFLICTS_tools="
|
||||
jasper${secondaryArchSuffix}_tools
|
||||
"
|
||||
fi
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
"
|
||||
@@ -69,30 +101,3 @@ INSTALL()
|
||||
rm -rf $documentationDir
|
||||
fi
|
||||
}
|
||||
|
||||
# ----- devel package -------------------------------------------------------
|
||||
|
||||
PROVIDES_devel="
|
||||
jasper${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libjasper$secondaryArchSuffix = 1.0.0 compat >=1
|
||||
"
|
||||
REQUIRES_devel="
|
||||
jasper$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
# ----- tools package -------------------------------------------------------
|
||||
|
||||
if [ -z "$secondaryArchSuffix" ]; then
|
||||
SUMMARY_tools="The jasper tools"
|
||||
PROVIDES_tools="
|
||||
jasper_tools$secondaryArchSuffix = $portVersion
|
||||
cmd:imgcmp$secondaryArchSuffix = $portVersion
|
||||
cmd:imginfo$secondaryArchSuffix = $portVersion
|
||||
cmd:jasper$secondaryArchSuffix = $portVersion
|
||||
cmd:tmrdemo$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_tools="
|
||||
jasper$secondaryArchSuffix == $portVersion base
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
fi
|
||||
47
media-libs/jasper/patches/jasper-2.0.12.patchset
Normal file
47
media-libs/jasper/patches/jasper-2.0.12.patchset
Normal file
@@ -0,0 +1,47 @@
|
||||
From 2493e73668f732b954211e3e419cf89c0b6df06d Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Thu, 18 May 2017 20:41:06 +0200
|
||||
Subject: gcc2 build
|
||||
|
||||
|
||||
diff --git a/src/libjasper/base/jas_stream.c b/src/libjasper/base/jas_stream.c
|
||||
index 327ee57..007b068 100644
|
||||
--- a/src/libjasper/base/jas_stream.c
|
||||
+++ b/src/libjasper/base/jas_stream.c
|
||||
@@ -1171,11 +1171,11 @@ long jas_stream_length(jas_stream_t *stream)
|
||||
static int mem_read(jas_stream_obj_t *obj, char *buf, int cnt)
|
||||
{
|
||||
ssize_t n;
|
||||
+ jas_stream_memobj_t *m = (jas_stream_memobj_t *)obj;
|
||||
assert(cnt >= 0);
|
||||
assert(buf);
|
||||
|
||||
JAS_DBGLOG(100, ("mem_read(%p, %p, %d)\n", obj, buf, cnt));
|
||||
- jas_stream_memobj_t *m = (jas_stream_memobj_t *)obj;
|
||||
n = m->len_ - m->pos_;
|
||||
cnt = JAS_MIN(n, cnt);
|
||||
memcpy(buf, &m->buf_[m->pos_], cnt);
|
||||
@@ -1294,8 +1294,8 @@ static long mem_seek(jas_stream_obj_t *obj, long offset, int origin)
|
||||
|
||||
static int mem_close(jas_stream_obj_t *obj)
|
||||
{
|
||||
- JAS_DBGLOG(100, ("mem_close(%p)\n", obj));
|
||||
jas_stream_memobj_t *m = (jas_stream_memobj_t *)obj;
|
||||
+ JAS_DBGLOG(100, ("mem_close(%p)\n", obj));
|
||||
JAS_DBGLOG(100, ("mem_close myalloc=%d\n", m->myalloc_));
|
||||
if (m->myalloc_ && m->buf_) {
|
||||
JAS_DBGLOG(100, ("mem_close freeing buffer %p\n", m->buf_));
|
||||
@@ -1337,9 +1337,9 @@ static long file_seek(jas_stream_obj_t *obj, long offset, int origin)
|
||||
static int file_close(jas_stream_obj_t *obj)
|
||||
{
|
||||
jas_stream_fileobj_t *fileobj;
|
||||
+ int ret;
|
||||
JAS_DBGLOG(100, ("file_close(%p)\n", obj));
|
||||
fileobj = JAS_CAST(jas_stream_fileobj_t *, obj);
|
||||
- int ret;
|
||||
ret = close(fileobj->fd);
|
||||
if (fileobj->flags & JAS_STREAM_FILEOBJ_DELONCLOSE) {
|
||||
unlink(fileobj->pathname);
|
||||
--
|
||||
2.12.2
|
||||
|
||||
Reference in New Issue
Block a user