Commit Graph

43 Commits

Author SHA1 Message Date
Thomas Bracht Laumann Jespersen c7bccf0515
CMake: switch to GNUInstallDirs (#1424)
* Add GNUInstallDirs for standard installation directories

Distributions are given standard variables for already existing hooks.
Multiarch libdirs is taken care of automagically.
Raises minimum cmake version by a little.

* Handle CMAKE_INSTALL_xxx being absolute paths for .pc file generation

In some cases the CMAKE_INSTAL_{BIN,MAN,DOC,LIB,INCLUDE}DIR variables
may turn out to be absolute paths in which case prepending ${prefix} in
the pkg-config .pc files will result in incorrect values.

For .pc file generation, figure out if these variables are absolute and
omit the prefix in the configured file when so.

See: ab25e4b7ed
2022-08-07 16:42:01 +02:00
Biswapriyo Nath 17d1bc7f1a pkgconfig: Define OPJ_STATIC for static linking with pkgconf
allows for the usage of $(pkgconf --static --cflags libopenjp2) to produce
the proper CFLAGS for static linking. Relies on pkgconf rather than pkg-config
2022-05-15 18:11:50 +05:30
Stefan Weil 667149ffa1 Fix some typos (found by codespell)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-12-05 13:14:33 +01:00
Eduardo Barretto 040e142288
jp3d/jpwl/mj2/jpip: Fix resource leaks (#1226)
This issues were found by cppcheck and coverity.
2020-04-17 00:09:40 +02:00
Stefan Weil 4aaf52ec8d Use local type declaration for POSIX standard type only for MS compiler
ssize_t is a POSIX type which is declared in POSIX include files.
Mingw-w64 provides it also for Windows.

Use the local declaration only with MS compilers.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-06-18 14:48:08 +02:00
Andrew Murray 157a3d8408 Changed cmake version test to allow for cmake 2.8.11.x 2017-11-14 21:45:09 +11:00
Even Rouault 5e795d90a1 Spelling fixes (patch by ka7, #890, rebased on top of master) 2017-07-26 21:06:38 +02:00
Even Rouault 3c2972f924 Reformat: apply reformattin on .h files (#128) 2017-05-15 12:21:30 +02:00
Even Rouault 563bd8499e Reformat whole codebase with astyle.options (#128) 2017-05-09 20:46:20 +02:00
Stefan Weil 8715ce2749 Fix some issues reported by Coverity Scan (#846)
* test_tile_decoder: Fix potential buffer overflow (coverity)

CID 1190155 (#1 of 1): Unbounded source buffer (STRING_SIZE)

Using a pointer instead of buffer of fixed size avoids the limit
for the length of the input file name.

Signed-off-by: Stefan Weil <sw@weilnetz.de>

* test_tile_encoder: Fix potential buffer overflow (coverity)

CID 1190154 (#1 of 1): Unbounded source buffer (STRING_SIZE)

Using a pointer instead of buffer of fixed size avoids the limit
for the length of the output file name. This implies that the length
can exceed 255, so the data type for variable len had to be fixed, too.

Signed-off-by: Stefan Weil <sw@weilnetz.de>

* openjpip: Initialize data before returning it

This fixes an error reported by Coverity:

CID 1190143 (#1 of 1): Uninitialized scalar variable (UNINIT)

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-09-21 21:15:25 +02:00
Stefan Weil 045aa4d9f2 Fix potential out-of-bounds read (coverity) (#844)
* query_parser: Fix potential out-of-bounds read (coverity)

CID 1190207 (#1 of 1): Out-of-bounds read (OVERRUN)

Variable i must be checked before testing query_param.box_type.

Signed-off-by: Stefan Weil <sw@weilnetz.de>

* jpip_parser: Fix potential out-of-bounds read (coverity)

CID 1190206 (#1 of 1): Out-of-bounds read (OVERRUN)

Variable i must be checked before testing query_param.box_type.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-09-21 13:17:09 +02:00
Stefan Weil 18da6155b2 Fix dependency for pkg-config (issue #594) (#795)
openjpeg provides libopenjp2.pc, so the require statements must refer to
libopenjp2 instead of openjp2.
Fixes #594 

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-07-12 00:45:51 +02:00
Stefan Weil aae066debc Add missing source for the JPIP library and executables (issue #658) (#659)
They all need opj_malloc and other functions from opc_malloc.c.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-05-10 22:02:49 +02:00
Stefan Weil 05235963d9 Fix typo in variable name
This makes checks with codespell easier.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-09-29 05:57:09 +02:00
Stefan Weil 99fc1ab306 Fix typos in comments and string
Most typos were found by codespell.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-09-29 05:55:43 +02:00
mayeut c5dd6035c9 Correct CMake version requirements
Update uclouvain/openjpeg#488
2015-09-01 20:43:43 +02:00
Rex Dieter e4735c703d better -ffast-math handling
issue #488

See also
http://public.kitware.com/pipermail/cmake/2015-April/060479.html
2015-07-30 09:54:07 -05:00
Mathieu Malaterre 7a77a8047d [trunk] Make sure OpenJPIP compiles on WIN32 2014-04-24 11:24:56 +00:00
Antonin Descampe d8767cbcb7 [trunk] fixed reference to opj_stream_set_user_data_v3 in jpip sources. 2014-04-24 08:51:29 +00:00
Antonin Descampe d19a4ab676 [trunk] updated copyright and added copyright notice required by ISO, in each file; updated AUTHORS, NEWS 2014-04-03 15:30:57 +00:00
Mathieu Malaterre e02ba05034 [trunk] Fix warnings about shadow variables 2014-03-10 08:25:08 +00:00
Mathieu Malaterre b1b17ee264 [trunk] Prefer compile time constant to avoid conversion double -> int 2014-03-03 15:55:06 +00:00
Mathieu Malaterre e92fe4c1a4 [trunk] Remove warning about cast double -> int. Instead use bit-shifting (compile time computation) 2014-03-03 12:01:36 +00:00
Mathieu Malaterre 25255c4ed1 [trunk] remove all api with invalid FILE* parameters which could leads to issues when applications are compiled with different flags from openjpeg.
Fixes issue 198
2014-03-03 11:36:31 +00:00
Mathieu Malaterre b56fb96b1b [trunk] Fix invalid write access in JPIP code.
Fixes issue 261
2014-02-26 09:35:11 +00:00
Rex Dieter 4d7b6374c8 complete openjpeg2 pkgconfig support, bug #68 2013-10-15 19:17:51 +00:00
Mickael Savinaud 82dad8e629 [trunk] add openjpeg.h in some files of openjpip to use some opj type (thanks winfried) 2012-12-04 12:20:30 +00:00
Mickael Savinaud 0e0b892493 [trunk] update some applications with new OPJ_BOOL type 2012-11-15 19:18:43 +00:00
Mickael Savinaud f663042893 [trunk] propagate the new OPJ_ symbol and type to openjpip 2012-11-15 14:43:50 +00:00
Mathieu Malaterre 82d29d4c2a [trunk] Remove bool.h, use opj_bool instead
Fix remaining opj_calloc/malloc/free issues
2012-10-29 16:24:39 +00:00
Mathieu Malaterre 759be64115 [trunk] Fix remainings issues with doxygen doc
Convert DOS files to UNIX eol
2012-10-29 14:35:11 +00:00
Mathieu Malaterre 23a624f73a [trunk] Since r2060 (and r2059) openjpip is now a first class shared library, instead of a local static lib which expose all the symbols.
As such re-apply changes from r2077 which were removed in r2122
Also remove old code for now removed opj_jpip_compress
2012-10-25 07:53:22 +00:00
Mathieu Malaterre f3d7d2f7b1 [trunk] Rework r2077
r2077 did expose too much of the detail implementation of OpenJPEG. Rework dependencies in between JPIP file level details and JPIP client/server arch.
Move JPIP file level functionalities back into OpenJP2 as was the case in openjpeg 1.5.x. Use new cio func.
2012-10-25 07:39:59 +00:00
Mathieu Malaterre d6bcb8b7e0 [trunk] Fix JPIP compilation. Some prototypes were not respected. 2012-10-15 15:47:19 +00:00
Mathieu Malaterre dff377a741 [trunk] Fix compilation:
- using mingw32 compiler (missing exported symbols)
- using -fvisibility=hidden (gcc on UNIX)
2012-10-15 09:44:34 +00:00
Mathieu Malaterre 54c2bcb60f [trunk] Fix compilation in static mode. Prevent duplicate symbols with convert.c implementation 2012-10-15 08:02:30 +00:00
Mathieu Malaterre 9832c911b3 [trunk] Update JPIP (FolderReorgProposal task)
This commit does three things:
- Use opj_malloc/calloc/free instead of the default C ones.
- Update JPIP API to start using cio _v2 API
- Create a new opj_jpip_compress which is the replacement for image_to_j2k -jpip

Update issue 177
2012-10-08 15:59:17 +00:00
Mathieu Malaterre 23f5eeec20 [trunk] Make openjpip a first class shared lib, for future linking 2012-10-05 17:05:06 +00:00
Mathieu Malaterre 16106b2978 [trunk] First step in moving JPIP code out of openjp2 2012-10-05 16:57:30 +00:00
Mathieu Malaterre cffc33a51c [trunk] FolderReorgProposal task: fix jpip doxygen
Update issue 177
2012-10-01 08:43:02 +00:00
Mathieu Malaterre 93761d9ab5 [trunk] FolderReorgProposal task: move source code to source dir 2012-10-01 07:49:52 +00:00
Mathieu Malaterre bb16d8816c [trunk] FolderReorgProposal task: only keep a single build system 2012-10-01 07:33:59 +00:00
Mathieu Malaterre d518970039 [trunk] Start FolderReorgProposal task
Update issue 177
2012-09-28 08:11:41 +00:00