Date: Wed, 18 Jul 2007 12:43:00 GMT From: Michael Johnson <ahze@FreeBSD.org> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/114694: [PATCH] graphics/openjpeg - Don't strip libs, install some j2k utils Message-ID: <200707181243.l6ICh0X4009617@www.freebsd.org> Resent-Message-ID: <200707181250.l6ICo2DW008576@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 114694 >Category: ports >Synopsis: [PATCH] graphics/openjpeg - Don't strip libs, install some j2k utils >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Jul 18 12:50:02 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Michael Johnson >Release: >Organization: >Environment: >Description: - Don't strip lib - Build and install j2k utils >How-To-Repeat: >Fix: diff -ruN --exclude=CVS openjpeg.orig/Makefile openjpeg/Makefile --- openjpeg.orig/Makefile 2007-07-18 07:31:33.000000000 -0400 +++ openjpeg/Makefile 2007-07-18 07:28:26.000000000 -0400 @@ -7,6 +7,7 @@ PORTNAME= openjpeg PORTVERSION= 1.2 +PORTREVISION= 1 CATEGORIES= graphics MASTER_SITES= http://www.openjpeg.org/ \ ${MASTER_SITE_LOCAL} @@ -16,23 +17,32 @@ MAINTAINER= trasz@FreeBSD.org COMMENT= An open-source JPEG 2000 codec +LIB_DEPENDS= tiff.4:${PORTSDIR}/graphics/tiff + USE_GMAKE= yes USE_LDCONFIG= yes WRKSRC= ${WRKDIR}/trunk +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 + lib/libopenjpeg.so \ + ${JPWL_BINS:S|^|bin/|} \ + ${M2J_BINS:S|^|bin/|} SHLIB_VER= 2 do-install: ${INSTALL_DATA} ${WRKSRC}/libopenjpeg/openjpeg.h ${PREFIX}/include ${INSTALL_DATA} ${WRKSRC}/libopenjpeg.a ${PREFIX}/lib - ${INSTALL_PROGRAM} ${WRKSRC}/libopenjpeg-2.1.2.0.so \ + ${INSTALL_DATA} ${WRKSRC}/libopenjpeg-2.1.2.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 .include <bsd.port.mk> diff -ruN --exclude=CVS openjpeg.orig/files/patch-Makefile openjpeg/files/patch-Makefile --- openjpeg.orig/files/patch-Makefile 2007-07-12 14:43:03.000000000 -0400 +++ openjpeg/files/patch-Makefile 2007-07-18 07:27:10.000000000 -0400 @@ -1,6 +1,6 @@ ---- Makefile.orig Mon Jun 4 15:27:25 2007 -+++ Makefile Wed Jul 4 09:43:14 2007 -@@ -8,17 +8,14 @@ +--- Makefile.orig 2007-06-04 09:27:25.000000000 -0400 ++++ Makefile 2007-07-18 06:51:33.000000000 -0400 +@@ -8,17 +8,16 @@ INCLUDE = -Ilibopenjpeg # General configuration variables: @@ -11,6 +11,8 @@ INSTALL_LIBDIR = $(PREFIX)/lib INSTALL_INCLUDE = $(PREFIX)/include ++SUBDIRS= jpwl mj2 ++ # Converts cr/lf to just lf DOS2UNIX = dos2unix @@ -19,3 +21,17 @@ LIBRARIES = -lstdc++ MODULES = $(SRCS:.c=.o) +@@ -33,7 +32,12 @@ + + default: all + +-all: OpenJPEG ++all: OpenJPEG subdirs ++ ++subdirs: ++ for dir in $(SUBDIRS); do \ ++ $(MAKE) -C $$dir; \ ++ done + + dist: OpenJPEG + install -d dist diff -ruN --exclude=CVS openjpeg.orig/files/patch-jpwl_Makefile openjpeg/files/patch-jpwl_Makefile --- openjpeg.orig/files/patch-jpwl_Makefile 1969-12-31 19:00:00.000000000 -0500 +++ openjpeg/files/patch-jpwl_Makefile 2007-07-18 07:27:10.000000000 -0400 @@ -0,0 +1,27 @@ +--- jpwl/Makefile.orig 2007-02-23 13:24:49.000000000 -0500 ++++ jpwl/Makefile 2007-07-18 07:13:51.000000000 -0400 +@@ -1,10 +1,7 @@ + # Makefile for the main JPWL OpenJPEG codecs: JPWL_ j2k_to_image and JPWL_image_to_j2k + + # General configuration variables: +-CC = gcc +-AR = ar +- +-CFLAGS = -O3 -DUSE_JPWL # -g -p -pg -DUSE_JPWL ++CFLAGS += -DUSE_JPWL # -g -p -pg -DUSE_JPWL + + OPJ_SRCS = ../libopenjpeg/bio.c ../libopenjpeg/cio.c ../libopenjpeg/dwt.c ../libopenjpeg/event.c ../libopenjpeg/image.c ../libopenjpeg/j2k.c ../libopenjpeg/j2k_lib.c ../libopenjpeg/jp2.c ../libopenjpeg/jpt.c ../libopenjpeg/mct.c ../libopenjpeg/mqc.c ../libopenjpeg/openjpeg.c ../libopenjpeg/pi.c ../libopenjpeg/raw.c ../libopenjpeg/t1.c ../libopenjpeg/t2.c ../libopenjpeg/tcd.c ../libopenjpeg/tgt.c + JPWL_SRCS = crc.c jpwl.c jpwl_lib.c rs.c +@@ -23,10 +20,10 @@ + $(AR) r $@ $(MODULES) + + JPWL_j2k_to_image: ../codec/j2k_to_image.c $(STATICLIB) +- gcc $(CFLAGS) ../codec/convert.c ../codec/j2k_to_image.c -o JPWL_j2k_to_image -I ../libopenjpeg/ -L . -lopenjpeg_JPWL -lm -lstdc++ ++ $(CC) $(CFLAGS) ../codec/convert.c ../codec/j2k_to_image.c -o JPWL_j2k_to_image -I ../libopenjpeg/ -ltiff -L$(LOCALBASE)/lib -L . -lopenjpeg_JPWL -lm -lstdc++ + + JPWL_image_to_j2k: ../codec/image_to_j2k.c $(STATICLIB) +- gcc $(CFLAGS) ../codec/convert.c ../codec/image_to_j2k.c -o JPWL_image_to_j2k -I ../libopenjpeg/ -L . -lopenjpeg_JPWL -lm -lstdc++ ++ $(CC) $(CFLAGS) ../codec/convert.c ../codec/image_to_j2k.c -o JPWL_image_to_j2k -I ../libopenjpeg/ -ltiff -L$(LOCALBASE)/lib -L . -lopenjpeg_JPWL -lm -lstdc++ + + clean: + rm -f JPWL_j2k_to_image JPWL_image_to_j2k *.o *.a diff -ruN --exclude=CVS openjpeg.orig/files/patch-mj2_Makefile openjpeg/files/patch-mj2_Makefile --- openjpeg.orig/files/patch-mj2_Makefile 1969-12-31 19:00:00.000000000 -0500 +++ openjpeg/files/patch-mj2_Makefile 2007-07-18 07:27:10.000000000 -0400 @@ -0,0 +1,28 @@ +--- 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 >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200707181243.l6ICh0X4009617>