diff options
author | dinoex <dinoex@FreeBSD.org> | 2012-06-03 20:43:04 +0800 |
---|---|---|
committer | dinoex <dinoex@FreeBSD.org> | 2012-06-03 20:43:04 +0800 |
commit | 70e280095150fb7a59a920901fcc0a0ddc8fd4b7 (patch) | |
tree | b414429dabe40474c4b1498a45e2e5b1937b9754 /graphics/openjpeg | |
parent | dd38be6e0131f5f611454ac7d56bdd581ccf2617 (diff) | |
download | freebsd-ports-gnome-70e280095150fb7a59a920901fcc0a0ddc8fd4b7.tar.gz freebsd-ports-gnome-70e280095150fb7a59a920901fcc0a0ddc8fd4b7.tar.zst freebsd-ports-gnome-70e280095150fb7a59a920901fcc0a0ddc8fd4b7.zip |
- update to 1.5.0
- new MASTER_SITE
PR: 166744
Suggested by: Zhihao Yuan
Diffstat (limited to 'graphics/openjpeg')
-rw-r--r-- | graphics/openjpeg/Makefile | 43 | ||||
-rw-r--r-- | graphics/openjpeg/distinfo | 4 | ||||
-rw-r--r-- | graphics/openjpeg/files/patch-CMakeLists.txt | 38 | ||||
-rw-r--r-- | graphics/openjpeg/files/patch-Makefile | 38 | ||||
-rw-r--r-- | graphics/openjpeg/files/patch-jpwl-Makefile | 35 | ||||
-rw-r--r-- | graphics/openjpeg/files/patch-jpwl.c | 149 | ||||
-rw-r--r-- | graphics/openjpeg/files/patch-jpwl.h | 11 | ||||
-rw-r--r-- | graphics/openjpeg/files/patch-jpwl_lib.c | 29 | ||||
-rw-r--r-- | graphics/openjpeg/files/patch-libopenjpeg-CMakeLists.txt | 11 | ||||
-rw-r--r-- | graphics/openjpeg/files/patch-mj2_Makefile | 28 | ||||
-rw-r--r-- | graphics/openjpeg/files/patch-opj_malloc.h | 30 | ||||
-rw-r--r-- | graphics/openjpeg/pkg-descr | 2 | ||||
-rw-r--r-- | graphics/openjpeg/pkg-plist | 16 |
13 files changed, 89 insertions, 345 deletions
diff --git a/graphics/openjpeg/Makefile b/graphics/openjpeg/Makefile index b5fdaf8e75d5..39e3675e8d4e 100644 --- a/graphics/openjpeg/Makefile +++ b/graphics/openjpeg/Makefile @@ -6,49 +6,24 @@ # PORTNAME= openjpeg -PORTVERSION= 1.3 -PORTREVISION= 2 +PORTVERSION= 1.5.0 CATEGORIES= graphics -MASTER_SITES= http://www.openjpeg.org/ \ - http://openjpeg.googlecode.com/files/ -DISTNAME= ${PORTNAME}_v${PORTVERSION:S/./_/g} +MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE} MAINTAINER= dinoex@FreeBSD.org COMMENT= An open-source JPEG 2000 codec -LIB_DEPENDS= tiff.4:${PORTSDIR}/graphics/tiff +LIB_DEPENDS= tiff:${PORTSDIR}/graphics/tiff \ + png15:${PORTSDIR}/graphics/png LICENSE= BSD -LICENSE_FILE= ${WRKSRC}/jp3d/LICENSE.txt -MAKE_JOBS_UNSAFE= yes +LICENSE_FILE= ${WRKSRC}/LICENSE -USE_GMAKE= yes +GNU_CONFIGURE= yes +USE_CMAKE= yes USE_LDCONFIG= yes -WRKSRC= ${WRKDIR}/OpenJPEG_v1_3 -JPWL_BINS= JPWL_image_to_j2k JPWL_j2k_to_image -M2J_BINS= extract_j2k_from_mj2 frames_to_mj2 mj2_to_frames wrap_j2k_in_mj2 -PLIST_FILES= include/openjpeg.h \ - lib/libopenjpeg.a \ - lib/libopenjpeg.so.${SHLIB_VER} \ - lib/libopenjpeg.so \ - ${JPWL_BINS:S|^|bin/|} \ - ${M2J_BINS:S|^|bin/|} - -SHLIB_VER= 2 - -post-patch: .SILENT - ${FIND} ${WRKSRC} -type f -name Makefile -exec ${REINPLACE_CMD} 's|gcc|$$(CC)|g' {} + - -do-install: - ${INSTALL_DATA} ${WRKSRC}/libopenjpeg/openjpeg.h ${PREFIX}/include/ - ${INSTALL_DATA} ${WRKSRC}/libopenjpeg.a ${PREFIX}/lib/ - ${INSTALL_DATA} ${WRKSRC}/libopenjpeg-2.1.3.0.so \ - ${PREFIX}/lib/libopenjpeg.so.${SHLIB_VER} - cd ${PREFIX}/lib && \ - ${LN} -sf libopenjpeg.so.${SHLIB_VER} libopenjpeg.so -.for file in ${M2J_BINS:S|^|mj2/|} ${JPWL_BINS:S|^|jpwl/|} - ${INSTALL_PROGRAM} ${WRKSRC}/${file} ${PREFIX}/bin/ -.endfor +MAN1= image_to_j2k.1 j2k_dump.1 j2k_to_image.1 +MAN3= libopenjpeg.3 .include <bsd.port.mk> diff --git a/graphics/openjpeg/distinfo b/graphics/openjpeg/distinfo index ab11a7543b75..7568ac6949e6 100644 --- a/graphics/openjpeg/distinfo +++ b/graphics/openjpeg/distinfo @@ -1,2 +1,2 @@ -SHA256 (openjpeg_v1_3.tar.gz) = 3bca2e1e040f9dcbbcb1e0627f17a76eeb95e153bf663d082070c044a21202bd -SIZE (openjpeg_v1_3.tar.gz) = 1004678 +SHA256 (openjpeg-1.5.0.tar.gz) = c9908fab44432a2ed2550c457cb7e736da6d7c326f1203d23d1082d992364ace +SIZE (openjpeg-1.5.0.tar.gz) = 2117572 diff --git a/graphics/openjpeg/files/patch-CMakeLists.txt b/graphics/openjpeg/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..b385bc618c67 --- /dev/null +++ b/graphics/openjpeg/files/patch-CMakeLists.txt @@ -0,0 +1,38 @@ +--- CMakeLists.txt.orig 2012-02-07 11:49:55.000000000 +0100 ++++ CMakeLists.txt 2012-06-03 14:26:55.000000000 +0200 +@@ -36,7 +36,7 @@ + "${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}.${OPENJPEG_VERSION_BUILD}") + SET(OPENJPEG_LIBRARY_PROPERTIES + VERSION "${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}.${OPENJPEG_VERSION_BUILD}" +- SOVERSION "${OPENJPEG_VERSION_MAJOR}" ++ SOVERSION "2" + ) + + # -------------------------------------------------------------------------- +@@ -76,7 +76,7 @@ + # Install directories + + STRING(TOLOWER ${PROJECT_NAME} projectname) +-SET(OPENJPEG_INSTALL_SUBDIR "${projectname}-${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}") ++SET(OPENJPEG_INSTALL_SUBDIR "${projectname}") + + IF(NOT OPENJPEG_INSTALL_BIN_DIR) + SET(OPENJPEG_INSTALL_BIN_DIR "bin") +@@ -99,7 +99,7 @@ + ENDIF(NOT OPENJPEG_INSTALL_INCLUDE_DIR) + + IF(NOT OPENJPEG_INSTALL_MAN_DIR) +- SET(OPENJPEG_INSTALL_MAN_DIR "share/man/") ++ SET(OPENJPEG_INSTALL_MAN_DIR "man/") + ENDIF(NOT OPENJPEG_INSTALL_MAN_DIR) + + IF(NOT OPENJPEG_INSTALL_DOC_DIR) +@@ -146,7 +146,7 @@ + CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/libopenjpeg1.pc.cmake + ${CMAKE_CURRENT_BINARY_DIR}/libopenjpeg1.pc @ONLY) + INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/libopenjpeg1.pc DESTINATION +- ${OPENJPEG_INSTALL_SHARE_DIR}/pkgconfig ) ++ libdata/pkgconfig ) + INSTALL( CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink + \"libopenjpeg1.pc\" + \"\$ENV{DESTDIR}${OPENJPEG_INSTALL_LIB_DIR}/pkgconfig/libopenjpeg.pc\")") diff --git a/graphics/openjpeg/files/patch-Makefile b/graphics/openjpeg/files/patch-Makefile deleted file mode 100644 index 8b64092bddb6..000000000000 --- a/graphics/openjpeg/files/patch-Makefile +++ /dev/null @@ -1,38 +0,0 @@ ---- Makefile.orig 2007-12-21 11:39:41.000000000 +0100 -+++ Makefile 2009-03-21 11:51:26.000000000 +0100 -@@ -8,17 +8,16 @@ - INCLUDE = -Ilibopenjpeg - - # General configuration variables: --CC = gcc --AR = ar - --PREFIX = /usr - INSTALL_LIBDIR = $(PREFIX)/lib - INSTALL_INCLUDE = $(PREFIX)/include - -+SUBDIRS= jpwl mj2 -+ - # Converts cr/lf to just lf - DOS2UNIX = dos2unix - --COMPILERFLAGS = -Wall -O3 -ffast-math -std=c99 -fPIC -+COMPILERFLAGS := $(CFLAGS) -Wall -std=c99 -fPIC - LIBRARIES = -lstdc++ - - MODULES = $(SRCS:.c=.o) -@@ -33,7 +32,13 @@ - - default: all - --all: OpenJPEG -+all: OpenJPEG subdirs -+ -+subdirs: -+ set -e; \ -+ for dir in $(SUBDIRS); do \ -+ $(MAKE) -C $$dir; \ -+ done - - dist: OpenJPEG - install -d dist diff --git a/graphics/openjpeg/files/patch-jpwl-Makefile b/graphics/openjpeg/files/patch-jpwl-Makefile deleted file mode 100644 index e4c1230dcab4..000000000000 --- a/graphics/openjpeg/files/patch-jpwl-Makefile +++ /dev/null @@ -1,35 +0,0 @@ ---- jpwl/Makefile.orig 2007-11-05 14:05:07.000000000 +0100 -+++ jpwl/Makefile 2009-03-21 11:54:55.000000000 +0100 -@@ -9,10 +9,7 @@ - INCLUDE = -Ilibopenjpeg_JPWL
-
- # General configuration variables:
--CC = gcc
--AR = ar
-
--PREFIX = /usr
- INSTALL_LIBDIR = $(PREFIX)/lib
- INSTALL_INCLUDE = $(PREFIX)/include
-
-@@ -23,7 +20,7 @@ - LIBRARIES = -lstdc++
-
- MODULES = $(SRCS:.c=.o)
--CFLAGS = $(COMPILERFLAGS) $(INCLUDE) -DUSE_JPWL
-+CFLAGS += $(COMPILERFLAGS) $(INCLUDE) -DUSE_JPWL
-
- TARGET = openjpeg_JPWL
- STATICLIB = lib$(TARGET).a
-@@ -60,10 +57,10 @@ - $(CC) -s -shared -Wl,-soname,$(LIBNAME) -o $@ $(MODULES) $(LIBRARIES)
-
- JPWL_j2k_to_image: ../codec/j2k_to_image.c
-- gcc $(CFLAGS) ../codec/convert.c ../codec/j2k_to_image.c -o JPWL_j2k_to_image -I ../libopenjpeg/ -L . -lopenjpeg_JPWL -lm -ltiff
-+ gcc $(CFLAGS) ../codec/convert.c ../codec/j2k_to_image.c ../codec/index.c -o JPWL_j2k_to_image -I ../libopenjpeg/ -L . -L$(LOCALBASE)/lib -lopenjpeg_JPWL -lm -ltiff
-
- JPWL_image_to_j2k: ../codec/image_to_j2k.c
-- gcc $(CFLAGS) ../codec/convert.c ../codec/image_to_j2k.c -o JPWL_image_to_j2k -I ../libopenjpeg/ -L . -lopenjpeg_JPWL -lm -ltiff
-+ gcc $(CFLAGS) ../codec/convert.c ../codec/image_to_j2k.c ../codec/index.c -o JPWL_image_to_j2k -I ../libopenjpeg/ -L . -L$(LOCALBASE)/lib -lopenjpeg_JPWL -lm -ltiff
-
- install: OpenJPEG
- install -d '$(DESTDIR)$(INSTALL_LIBDIR)' '$(DESTDIR)$(INSTALL_INCLUDE)'
diff --git a/graphics/openjpeg/files/patch-jpwl.c b/graphics/openjpeg/files/patch-jpwl.c deleted file mode 100644 index d316c3c8de50..000000000000 --- a/graphics/openjpeg/files/patch-jpwl.c +++ /dev/null @@ -1,149 +0,0 @@ ---- jpwl/jpwl.c.orig 2007-11-29 15:38:26.000000000 +0100 -+++ jpwl/jpwl.c 2009-03-21 12:36:53.000000000 +0100 -@@ -122,19 +122,19 @@ - switch (jwmarker[mm].id) {
-
- case J2K_MS_EPB:
-- free(jwmarker[mm].epbmark);
-+ opj_aligned_free(jwmarker[mm].u.epbmark);
- break;
-
- case J2K_MS_EPC:
-- free(jwmarker[mm].epcmark);
-+ opj_aligned_free(jwmarker[mm].u.epcmark);
- break;
-
- case J2K_MS_ESD:
-- free(jwmarker[mm].esdmark);
-+ opj_aligned_free(jwmarker[mm].u.esdmark);
- break;
-
- case J2K_MS_RED:
-- free(jwmarker[mm].redmark);
-+ opj_aligned_free(jwmarker[mm].u.redmark);
- break;
-
- default:
-@@ -213,7 +213,7 @@ - /* Add this marker to the 'insertanda' list */
- if (epc_mark) {
- jwmarker[jwmarker_num].id = J2K_MS_EPC; /* its type */
-- jwmarker[jwmarker_num].epcmark = epc_mark; /* the EPC */
-+ jwmarker[jwmarker_num].u.epcmark = epc_mark; /* the EPC */
- jwmarker[jwmarker_num].pos = soc_pos + socsiz_len; /* after SIZ */
- jwmarker[jwmarker_num].dpos = (double) jwmarker[jwmarker_num].pos + 0.1; /* not so first */
- jwmarker[jwmarker_num].len = epc_mark->Lepc; /* its length */
-@@ -258,7 +258,7 @@ - /* Add this marker to the 'insertanda' list */
- if (jwmarker_num < JPWL_MAX_NO_MARKERS) {
- jwmarker[jwmarker_num].id = J2K_MS_ESD; /* its type */
-- jwmarker[jwmarker_num].esdmark = esd_mark; /* the EPB */
-+ jwmarker[jwmarker_num].u.esdmark = esd_mark; /* the EPB */
- jwmarker[jwmarker_num].pos = soc_pos + socsiz_len; /* we choose to place it after SIZ */
- jwmarker[jwmarker_num].dpos = (double) jwmarker[jwmarker_num].pos + 0.2; /* not first at all! */
- jwmarker[jwmarker_num].len = esd_mark->Lesd; /* its length */
-@@ -352,7 +352,7 @@ - /* Add this marker to the 'insertanda' list */
- if (jwmarker_num < JPWL_MAX_NO_MARKERS) {
- jwmarker[jwmarker_num].id = J2K_MS_ESD; /* its type */
-- jwmarker[jwmarker_num].esdmark = esd_mark; /* the EPB */
-+ jwmarker[jwmarker_num].u.esdmark = esd_mark; /* the EPB */
- /****** jwmarker[jwmarker_num].pos = j2k->cstr_info->tile[tileno].start_pos + sot_len + 2; */ /* after SOT */
- jwmarker[jwmarker_num].pos = j2k->cstr_info->tile[tileno].tp[tpno].tp_start_pos + sot_len + 2; /* after SOT */
- jwmarker[jwmarker_num].dpos = (double) jwmarker[jwmarker_num].pos + 0.2; /* not first at all! */
-@@ -430,7 +430,7 @@ - /* Add this marker to the 'insertanda' list */
- if (jwmarker_num < JPWL_MAX_NO_MARKERS) {
- jwmarker[jwmarker_num].id = J2K_MS_EPB; /* its type */
-- jwmarker[jwmarker_num].epbmark = epb_mark; /* the EPB */
-+ jwmarker[jwmarker_num].u.epbmark = epb_mark; /* the EPB */
- jwmarker[jwmarker_num].pos = soc_pos + socsiz_len; /* after SIZ */
- jwmarker[jwmarker_num].dpos = (double) jwmarker[jwmarker_num].pos; /* first first first! */
- jwmarker[jwmarker_num].len = epb_mark->Lepb; /* its length */
-@@ -528,7 +528,7 @@ - /* Add this marker to the 'insertanda' list */
- if (jwmarker_num < JPWL_MAX_NO_MARKERS) {
- jwmarker[jwmarker_num].id = J2K_MS_EPB; /* its type */
-- jwmarker[jwmarker_num].epbmark = epb_mark; /* the EPB */
-+ jwmarker[jwmarker_num].u.epbmark = epb_mark; /* the EPB */
- /****** jwmarker[jwmarker_num].pos = j2k->cstr_info->tile[tileno].start_pos + sot_len + 2; */ /* after SOT */
- jwmarker[jwmarker_num].pos = j2k->cstr_info->tile[tileno].tp[tpno].tp_start_pos + sot_len + 2; /* after SOT */
- jwmarker[jwmarker_num].dpos = (double) jwmarker[jwmarker_num].pos; /* first first first! */
-@@ -758,15 +758,15 @@ - switch (jwmarker[mm].id) {
-
- case J2K_MS_EPB:
-- jpwl_epb_write(j2k, jwmarker[mm].epbmark, jpwl_buf);
-+ jpwl_epb_write(j2k, jwmarker[mm].u.epbmark, jpwl_buf);
- break;
-
- case J2K_MS_EPC:
-- jpwl_epc_write(j2k, jwmarker[mm].epcmark, jpwl_buf);
-+ jpwl_epc_write(j2k, jwmarker[mm].u.epcmark, jpwl_buf);
- break;
-
- case J2K_MS_ESD:
-- jpwl_esd_write(j2k, jwmarker[mm].esdmark, jpwl_buf);
-+ jpwl_esd_write(j2k, jwmarker[mm].u.esdmark, jpwl_buf);
- break;
-
- case J2K_MS_RED:
-@@ -812,11 +812,11 @@ - unsigned short int mycrc = 0x0000;
-
- /* fix and fill the DL field */
-- jwmarker[mm].epcmark->DL = new_size;
-- orig_buf[epc_pos + 6] = (unsigned char) (jwmarker[mm].epcmark->DL >> 24);
-- orig_buf[epc_pos + 7] = (unsigned char) (jwmarker[mm].epcmark->DL >> 16);
-- orig_buf[epc_pos + 8] = (unsigned char) (jwmarker[mm].epcmark->DL >> 8);
-- orig_buf[epc_pos + 9] = (unsigned char) (jwmarker[mm].epcmark->DL >> 0);
-+ jwmarker[mm].u.epcmark->DL = new_size;
-+ orig_buf[epc_pos + 6] = (unsigned char) (jwmarker[mm].u.epcmark->DL >> 24);
-+ orig_buf[epc_pos + 7] = (unsigned char) (jwmarker[mm].u.epcmark->DL >> 16);
-+ orig_buf[epc_pos + 8] = (unsigned char) (jwmarker[mm].u.epcmark->DL >> 8);
-+ orig_buf[epc_pos + 9] = (unsigned char) (jwmarker[mm].u.epcmark->DL >> 0);
-
- /* compute the CRC field (excluding itself) */
- for (pp = 0; pp < 4; pp++)
-@@ -825,9 +825,9 @@ - jpwl_updateCRC16(&mycrc, orig_buf[epc_pos + pp]);
-
- /* fix and fill the CRC */
-- jwmarker[mm].epcmark->Pcrc = mycrc;
-- orig_buf[epc_pos + 4] = (unsigned char) (jwmarker[mm].epcmark->Pcrc >> 8);
-- orig_buf[epc_pos + 5] = (unsigned char) (jwmarker[mm].epcmark->Pcrc >> 0);
-+ jwmarker[mm].u.epcmark->Pcrc = mycrc;
-+ orig_buf[epc_pos + 4] = (unsigned char) (jwmarker[mm].u.epcmark->Pcrc >> 8);
-+ orig_buf[epc_pos + 5] = (unsigned char) (jwmarker[mm].u.epcmark->Pcrc >> 0);
-
- }
- }
-@@ -842,7 +842,7 @@ - /* remember that they are now in a new position (dpos) */
- int esd_pos = (int) jwmarker[mm].dpos;
-
-- jpwl_esd_fill(j2k, jwmarker[mm].esdmark, &orig_buf[esd_pos]);
-+ jpwl_esd_fill(j2k, jwmarker[mm].u.esdmark, &orig_buf[esd_pos]);
-
- }
-
-@@ -867,16 +867,16 @@ - accum_len = 0;
- for (nn = mm; (nn < jwmarker_num) && (jwmarker[nn].id == J2K_MS_EPB) &&
- (jwmarker[nn].pos == jwmarker[mm].pos); nn++)
-- accum_len += jwmarker[nn].epbmark->Lepb + 2;
-+ accum_len += jwmarker[nn].u.epbmark->Lepb + 2;
-
- /* fill the current (first) EPB with post-data starting from the computed position */
-- jpwl_epb_fill(j2k, jwmarker[mm].epbmark, &orig_buf[(int) jwmarker[mm].dpos],
-+ jpwl_epb_fill(j2k, jwmarker[mm].u.epbmark, &orig_buf[(int) jwmarker[mm].dpos],
- &orig_buf[(int) jwmarker[mm].dpos + accum_len]);
-
- /* fill the remaining EPBs in the header with post-data starting from the last position */
- for (nn = mm + 1; (nn < jwmarker_num) && (jwmarker[nn].id == J2K_MS_EPB) &&
- (jwmarker[nn].pos == jwmarker[mm].pos); nn++)
-- jpwl_epb_fill(j2k, jwmarker[nn].epbmark, &orig_buf[(int) jwmarker[nn].dpos], NULL);
-+ jpwl_epb_fill(j2k, jwmarker[nn].u.epbmark, &orig_buf[(int) jwmarker[nn].dpos], NULL);
-
- /* skip all the processed EPBs */
- mm = nn - 1;
diff --git a/graphics/openjpeg/files/patch-jpwl.h b/graphics/openjpeg/files/patch-jpwl.h deleted file mode 100644 index 2c9b44df5fcd..000000000000 --- a/graphics/openjpeg/files/patch-jpwl.h +++ /dev/null @@ -1,11 +0,0 @@ ---- jpwl/jpwl.h.orig 2007-11-05 14:05:07.000000000 +0100 -+++ jpwl/jpwl.h 2009-03-21 12:21:21.000000000 +0100 -@@ -188,7 +188,7 @@ - jpwl_esd_ms_t *esdmark; - /** pointer to RED marker */ - jpwl_red_ms_t *redmark; -- }; -+ } u; - /** position where the marker should go, in the pre-JPWL codestream */ - unsigned long int pos; - /** same as before, only written as a double, so we can sort it better */ diff --git a/graphics/openjpeg/files/patch-jpwl_lib.c b/graphics/openjpeg/files/patch-jpwl_lib.c deleted file mode 100644 index 0292d8079770..000000000000 --- a/graphics/openjpeg/files/patch-jpwl_lib.c +++ /dev/null @@ -1,29 +0,0 @@ ---- jpwl/jpwl_lib.c.orig 2007-11-29 15:38:26.000000000 +0100 -+++ jpwl/jpwl_lib.c 2009-03-21 12:39:09.000000000 +0100 -@@ -166,7 +166,7 @@ - /* Add this marker to the 'insertanda' list */ - if (*jwmarker_num < JPWL_MAX_NO_MARKERS) { - jwmarker[*jwmarker_num].id = J2K_MS_EPB; /* its type */ -- jwmarker[*jwmarker_num].epbmark = epb_mark; /* the EPB */ -+ jwmarker[*jwmarker_num].u.epbmark = epb_mark; /* the EPB */ - jwmarker[*jwmarker_num].pos = (int) place_pos; /* after SOT */ - jwmarker[*jwmarker_num].dpos = place_pos + 0.0000001 * (double)(*idx); /* not very first! */ - jwmarker[*jwmarker_num].len = epb_mark->Lepb; /* its length */ -@@ -335,7 +335,7 @@ - jpwl_epc_ms_t *epc = NULL; - - /* Alloc space */ -- if (!(epc = (jpwl_epc_ms_t *) malloc((size_t) 1 * sizeof (jpwl_epc_ms_t)))) { -+ if (!(epc = (jpwl_epc_ms_t *) opj_aligned_malloc((size_t) 1 * sizeof (jpwl_epc_ms_t)))) { - opj_event_msg(j2k->cinfo, EVT_ERROR, "Could not allocate room for EPC MS\n"); - return NULL; - }; -@@ -1196,7 +1196,7 @@ - jpwl_esd_ms_t *esd = NULL; - - /* Alloc space */ -- if (!(esd = (jpwl_esd_ms_t *) malloc((size_t) 1 * sizeof (jpwl_esd_ms_t)))) { -+ if (!(esd = (jpwl_esd_ms_t *) opj_aligned_malloc((size_t) 1 * sizeof (jpwl_esd_ms_t)))) { - opj_event_msg(j2k->cinfo, EVT_ERROR, "Could not allocate room for ESD MS\n"); - return NULL; - }; diff --git a/graphics/openjpeg/files/patch-libopenjpeg-CMakeLists.txt b/graphics/openjpeg/files/patch-libopenjpeg-CMakeLists.txt new file mode 100644 index 000000000000..37fd08ce52be --- /dev/null +++ b/graphics/openjpeg/files/patch-libopenjpeg-CMakeLists.txt @@ -0,0 +1,11 @@ +--- libopenjpeg/CMakeLists.txt.orig 2012-02-07 11:49:55.000000000 +0100 ++++ libopenjpeg/CMakeLists.txt 2012-06-03 14:29:44.000000000 +0200 +@@ -55,7 +55,7 @@ + + # Install includes files + INSTALL(FILES openjpeg.h +- DESTINATION ${OPENJPEG_INSTALL_INCLUDE_DIR}/${OPENJPEG_INSTALL_SUBDIR} COMPONENT Headers ++ DESTINATION ${OPENJPEG_INSTALL_INCLUDE_DIR} COMPONENT Headers + ) + + # install man page of the library diff --git a/graphics/openjpeg/files/patch-mj2_Makefile b/graphics/openjpeg/files/patch-mj2_Makefile deleted file mode 100644 index a9a29f73a2b8..000000000000 --- a/graphics/openjpeg/files/patch-mj2_Makefile +++ /dev/null @@ -1,28 +0,0 @@ ---- mj2/Makefile.orig 2007-07-18 07:14:14.000000000 -0400 -+++ mj2/Makefile 2007-07-18 07:14:43.000000000 -0400 -@@ -1,20 +1,20 @@ - # Makefile for the MJ2 codecs of the OpenJPEG library: frames_to_mj2, mj2_to_frames, extract_j2k_from_mj2 and wrap_j2k_in_mj2 - --CFLAGS = -O3 -lstdc++ # -g -p -pg -+CFLAGS += -lstdc++ # -g -p -pg - - all: frames_to_mj2 mj2_to_frames extract_j2k_from_mj2 wrap_j2k_in_mj2 - - frames_to_mj2: frames_to_mj2.c ../libopenjpeg.a -- gcc $(CFLAGS) compat/getopt.c mj2_convert.c mj2.c frames_to_mj2.c -o frames_to_mj2 -L.. -lopenjpeg -I ../libopenjpeg/ -lm -+ $(CC) $(CFLAGS) compat/getopt.c mj2_convert.c mj2.c frames_to_mj2.c -o frames_to_mj2 -L.. -lopenjpeg -I ../libopenjpeg/ -lm - - mj2_to_frames: mj2_to_frames.c ../libopenjpeg.a -- gcc $(CFLAGS) compat/getopt.c mj2_convert.c mj2.c mj2_to_frames.c -o mj2_to_frames -L.. -lopenjpeg -I ../libopenjpeg/ -lm -+ $(CC) $(CFLAGS) compat/getopt.c mj2_convert.c mj2.c mj2_to_frames.c -o mj2_to_frames -L.. -lopenjpeg -I ../libopenjpeg/ -lm - - extract_j2k_from_mj2: extract_j2k_from_mj2.c ../libopenjpeg.a -- gcc $(CFLAGS) mj2.c extract_j2k_from_mj2.c -o extract_j2k_from_mj2 -L.. -lopenjpeg -I ../libopenjpeg/ -lm -+ $(CC) $(CFLAGS) mj2.c extract_j2k_from_mj2.c -o extract_j2k_from_mj2 -L.. -lopenjpeg -I ../libopenjpeg/ -lm - - wrap_j2k_in_mj2: wrap_j2k_in_mj2.c ../libopenjpeg.a -- gcc $(CFLAGS) mj2.c wrap_j2k_in_mj2.c -o wrap_j2k_in_mj2 -L.. -lopenjpeg -I ../libopenjpeg/ -lm -+ $(CC) $(CFLAGS) mj2.c wrap_j2k_in_mj2.c -o wrap_j2k_in_mj2 -L.. -lopenjpeg -I ../libopenjpeg/ -lm - - clean: - rm -f frames_to_mj2 mj2_to_frames extract_j2k_from_mj2 wrap_j2k_in_mj2 diff --git a/graphics/openjpeg/files/patch-opj_malloc.h b/graphics/openjpeg/files/patch-opj_malloc.h index 6fc47351b7a4..d1a620775c93 100644 --- a/graphics/openjpeg/files/patch-opj_malloc.h +++ b/graphics/openjpeg/files/patch-opj_malloc.h @@ -1,18 +1,12 @@ ---- libopenjpeg/opj_malloc.h.orig 2007-12-21 11:19:01.000000000 +0100 -+++ libopenjpeg/opj_malloc.h 2009-03-21 12:02:37.000000000 +0100 -@@ -76,8 +76,15 @@ - #if defined(__sun)
- #define HAVE_MEMALIGN
- #elif defined(__GNUC__)
-+ #if defined(__FreeBSD__)
-+ #include <stdlib.h>
-+ #include <osreldate.h>
-+ #if __FreeBSD_versioni >= 700000
-+ #endif
-+ #else
- #define HAVE_MEMALIGN
- #include <malloc.h>
-+ #endif
- /* Linux x86_64 and OSX always align allocations to 16 bytes */
- #elif !defined(__amd64__) && !defined(__APPLE__)
- /* FIXME: Yes, this is a big assumption */
+--- libopenjpeg/opj_malloc.h.orig 2012-02-07 11:49:55.000000000 +0100 ++++ libopenjpeg/opj_malloc.h 2012-06-02 11:25:56.000000000 +0200 +@@ -85,8 +85,7 @@ + #define HAVE_MEMALIGN
+ /* Linux x86_64 and OSX always align allocations to 16 bytes */
+ #elif !defined(__amd64__) && !defined(__APPLE__)
+- #define HAVE_MEMALIGN
+- #include <malloc.h>
++ #include <stdlib.h>
+ #endif
+ #endif
+
diff --git a/graphics/openjpeg/pkg-descr b/graphics/openjpeg/pkg-descr index b77e2ceda24b..f8d9fd862837 100644 --- a/graphics/openjpeg/pkg-descr +++ b/graphics/openjpeg/pkg-descr @@ -9,4 +9,4 @@ for j2k-images, ... LICENSE: BSD -WWW: http://www.openjpeg.org/ +WWW: http://code.google.com/p/openjpeg/ diff --git a/graphics/openjpeg/pkg-plist b/graphics/openjpeg/pkg-plist new file mode 100644 index 000000000000..4aff4fe8a8d1 --- /dev/null +++ b/graphics/openjpeg/pkg-plist @@ -0,0 +1,16 @@ +bin/image_to_j2k +bin/j2k_dump +bin/j2k_to_image +include/openjpeg.h +lib/libopenjpeg.so +lib/libopenjpeg.so.1.5.0 +lib/libopenjpeg.so.2 +%%DOCSDIR%%/CHANGES +%%DOCSDIR%%/LICENSE +%%DATADIR%%/OpenJPEGConfig.cmake +%%DATADIR%%/OpenJPEGTargets-%%CMAKE_BUILD_TYPE%%.cmake +%%DATADIR%%/OpenJPEGTargets.cmake +libdata/pkgconfig/libopenjpeg1.pc +@dirrm %%DATADIR%% +@dirrm %%DOCSDIR%% +@dirrm include/openjpeg |