Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 07 Apr 2012 19:48:15 -0500
From:      Zhihao Yuan <lichray@gmail.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/166744: [UPDATE] openjpeg to 1.5.0
Message-ID:  <4f80e057.a52a320a.5a56.ffffa14e@mx.google.com>
Resent-Message-ID: <201204080050.q380oAXR065535@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         166744
>Category:       ports
>Synopsis:       [UPDATE] openjpeg to 1.5.0
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Apr 08 00:50:10 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Zhihao Yuan
>Release:        FreeBSD 8.3-PRERELEASE amd64
>Organization:
Northern Illinois University
>Environment:
System: FreeBSD elitebook.hp 8.3-PRERELEASE FreeBSD 8.3-PRERELEASE #5 r233751: Sat Mar 31 18:29:04 CDT 2012 lichray@elitebook.hp:/usr/obj/home/lichray/devel/freebsd-8/sys/HOUKAGO amd64


	
>Description:
	
	openjpeg is upgraded to 1.5.0. This version is based on 1.4.x, which is a bugfix version of the 1.3.x in the ports tree.
	https://code.google.com/p/openjpeg/wiki/WhatsNew?tm=6
	
	The library itself is backward compatible (tested with mupdf, poppler, mtpaint, etc.), but in order to promote the coming openjpeg2, its SO version is decreased from 2 to 1. So we need to bump revision of all of the ports (and change LIB_DEPENDS from openjpeg.2 to openjpeg.1) depends on openjpeg.

	In the patch, I changed the maintainer to myself, since the build system is moved to CMake, and all of the old patches are deprecated. If the original maintainer does not want to pass the maintainership, please change it back before committing.
>How-To-Repeat:
	
>Fix:

	

--- openjpeg-1.5.0.patch begins here ---
diff -ruN --exclude=CVS ../openjpeg.orig/Makefile ./Makefile
--- ../openjpeg.orig/Makefile	2011-08-07 04:33:00.000000000 -0500
+++ ./Makefile	2012-04-07 16:32:22.281070330 -0500
@@ -6,49 +6,32 @@
 #
 
 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
+MAINTAINER=	lichray@gmail.com
 COMMENT=	An open-source JPEG 2000 codec
 
-LIB_DEPENDS=	tiff.4:${PORTSDIR}/graphics/tiff
-
 LICENSE=	BSD
-LICENSE_FILE=	${WRKSRC}/jp3d/LICENSE.txt
-MAKE_JOBS_UNSAFE=	yes
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+LIB_DEPENDS=	png.6:${PORTSDIR}/graphics/png \
+		tiff.4:${PORTSDIR}/graphics/tiff
+
+MAN1=		image_to_j2k.1 j2k_dump.1 j2k_to_image.1
+MAN3=		libopenjpeg.3
 
-USE_GMAKE=	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
+CMAKE_ARGS=	-DBUILD_MJ2=ON
+
+.include <bsd.port.pre.mk>
+
+.if exists(${LOCALBASE}/include/lcms.h) && !exists(${LOCALBASE}/include/lcms2.h)
+LIB_DEPENDS+=	lcms:${PORTSDIR}/graphics/lcms
+.else
+LIB_DEPENDS+=	lcms2:${PORTSDIR}/graphics/lcms2
+.endif
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff -ruN --exclude=CVS ../openjpeg.orig/distinfo ./distinfo
--- ../openjpeg.orig/distinfo	2011-07-03 09:11:44.000000000 -0500
+++ ./distinfo	2012-04-07 15:02:16.280015459 -0500
@@ -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 -ruN --exclude=CVS ../openjpeg.orig/files/patch-CMakeLists.txt ./files/patch-CMakeLists.txt
--- ../openjpeg.orig/files/patch-CMakeLists.txt	1969-12-31 18:00:00.000000000 -0600
+++ ./files/patch-CMakeLists.txt	2012-04-07 15:23:21.837341692 -0500
@@ -0,0 +1,35 @@
+--- CMakeLists.txt.orig	2012-02-07 04:49:55.000000000 -0600
++++ CMakeLists.txt	2012-04-07 15:23:19.749296333 -0500
+@@ -99,7 +99,7 @@ IF(NOT OPENJPEG_INSTALL_INCLUDE_DIR)
+ 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,10 +146,7 @@ IF(UNIX)
+   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 )
+-  INSTALL( CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink
+-  \"libopenjpeg1.pc\"
+-  \"\$ENV{DESTDIR}${OPENJPEG_INSTALL_LIB_DIR}/pkgconfig/libopenjpeg.pc\")")
++    libdata/pkgconfig )
+ ENDIF(UNIX)
+ 
+ #-----------------------------------------------------------------------------
+@@ -252,11 +249,4 @@ INSTALL( FILES ${OPENJPEG_BINARY_DIR}/Op
+   DESTINATION ${OPENJPEG_INSTALL_PACKAGE_DIR}
+ )
+ 
+-#-----------------------------------------------------------------------------
+-# install CHANGES and LICENSE
+-INSTALL(
+-  FILES       CHANGES 
+-              LICENSE
+-  DESTINATION ${OPENJPEG_INSTALL_DOC_DIR})
+-
+ INCLUDE (CMake/OpenJPEGCPack.cmake)
diff -ruN --exclude=CVS ../openjpeg.orig/files/patch-Makefile ./files/patch-Makefile
--- ../openjpeg.orig/files/patch-Makefile	2009-03-21 07:04:30.000000000 -0500
+++ ./files/patch-Makefile	1969-12-31 18:00:00.000000000 -0600
@@ -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 -ruN --exclude=CVS ../openjpeg.orig/files/patch-jpwl-Makefile ./files/patch-jpwl-Makefile
--- ../openjpeg.orig/files/patch-jpwl-Makefile	2009-03-21 07:04:30.000000000 -0500
+++ ./files/patch-jpwl-Makefile	1969-12-31 18:00:00.000000000 -0600
@@ -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 -ruN --exclude=CVS ../openjpeg.orig/files/patch-jpwl.c ./files/patch-jpwl.c
--- ../openjpeg.orig/files/patch-jpwl.c	2009-03-21 07:04:30.000000000 -0500
+++ ./files/patch-jpwl.c	1969-12-31 18:00:00.000000000 -0600
@@ -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 -ruN --exclude=CVS ../openjpeg.orig/files/patch-jpwl.h ./files/patch-jpwl.h
--- ../openjpeg.orig/files/patch-jpwl.h	2009-03-21 07:04:30.000000000 -0500
+++ ./files/patch-jpwl.h	1969-12-31 18:00:00.000000000 -0600
@@ -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 -ruN --exclude=CVS ../openjpeg.orig/files/patch-jpwl_lib.c ./files/patch-jpwl_lib.c
--- ../openjpeg.orig/files/patch-jpwl_lib.c	2009-03-21 07:04:30.000000000 -0500
+++ ./files/patch-jpwl_lib.c	1969-12-31 18:00:00.000000000 -0600
@@ -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 -ruN --exclude=CVS ../openjpeg.orig/files/patch-libopenjpeg1.pc.cmake ./files/patch-libopenjpeg1.pc.cmake
--- ../openjpeg.orig/files/patch-libopenjpeg1.pc.cmake	1969-12-31 18:00:00.000000000 -0600
+++ ./files/patch-libopenjpeg1.pc.cmake	2012-04-07 17:13:40.561831304 -0500
@@ -0,0 +1,15 @@
+--- libopenjpeg1.pc.cmake~	2012-02-07 04:49:55.000000000 -0600
++++ libopenjpeg1.pc.cmake	2012-04-07 17:13:24.589503254 -0500
+@@ -1,8 +1,8 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+-bindir=@OPENJPEG_INSTALL_BIN_DIR@
+-datadir=@OPENJPEG_INSTALL_DATA_DIR@
+-libdir=@OPENJPEG_INSTALL_LIB_DIR@
+-includedir=@OPENJPEG_INSTALL_INCLUDE_DIR@
++bindir=${prefix}/@OPENJPEG_INSTALL_BIN_DIR@
++datadir=${prefix}/@OPENJPEG_INSTALL_DATA_DIR@
++libdir=${prefix}/@OPENJPEG_INSTALL_LIB_DIR@
++includedir=${prefix}/@OPENJPEG_INSTALL_INCLUDE_DIR@
+ 
+ Name: openjpeg
+ Description: JPEG2000 files library
diff -ruN --exclude=CVS ../openjpeg.orig/files/patch-libopenjpeg_CMakeLists.txt ./files/patch-libopenjpeg_CMakeLists.txt
--- ../openjpeg.orig/files/patch-libopenjpeg_CMakeLists.txt	1969-12-31 18:00:00.000000000 -0600
+++ ./files/patch-libopenjpeg_CMakeLists.txt	2012-04-07 16:28:42.317870803 -0500
@@ -0,0 +1,11 @@
+--- libopenjpeg/CMakeLists.txt~	2012-02-07 04:49:55.000000000 -0600
++++ libopenjpeg/CMakeLists.txt	2012-04-07 16:28:11.038275932 -0500
+@@ -55,7 +55,7 @@ INSTALL(TARGETS ${OPENJPEG_LIBRARY_NAME}
+ 
+ # 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 -ruN --exclude=CVS ../openjpeg.orig/files/patch-mj2_Makefile ./files/patch-mj2_Makefile
--- ../openjpeg.orig/files/patch-mj2_Makefile	2007-07-30 10:50:09.000000000 -0500
+++ ./files/patch-mj2_Makefile	1969-12-31 18:00:00.000000000 -0600
@@ -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 -ruN --exclude=CVS ../openjpeg.orig/files/patch-opj_malloc.h ./files/patch-opj_malloc.h
--- ../openjpeg.orig/files/patch-opj_malloc.h	2009-03-21 07:04:30.000000000 -0500
+++ ./files/patch-opj_malloc.h	1969-12-31 18:00:00.000000000 -0600
@@ -1,18 +0,0 @@
---- 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 */
diff -ruN --exclude=CVS ../openjpeg.orig/pkg-plist ./pkg-plist
--- ../openjpeg.orig/pkg-plist	1969-12-31 18:00:00.000000000 -0600
+++ ./pkg-plist	2012-04-07 16:32:03.762716185 -0500
@@ -0,0 +1,16 @@
+bin/extract_j2k_from_mj2
+bin/frames_to_mj2
+bin/image_to_j2k
+bin/j2k_dump
+bin/j2k_to_image
+bin/mj2_to_frames
+bin/wrap_j2k_in_mj2
+include/openjpeg.h
+lib/libopenjpeg.so
+lib/libopenjpeg.so.1
+lib/libopenjpeg.so.1.5.0
+%%DATADIR%%-1.5/OpenJPEGConfig.cmake
+%%DATADIR%%-1.5/OpenJPEGTargets-release.cmake
+%%DATADIR%%-1.5/OpenJPEGTargets.cmake
+libdata/pkgconfig/libopenjpeg1.pc
+@dirrm %%DATADIR%%-1.5
--- openjpeg-1.5.0.patch ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4f80e057.a52a320a.5a56.ffffa14e>