aboutsummaryrefslogtreecommitdiff
path: root/graphics/openjpeg
diff options
context:
space:
mode:
authorEdward Tomasz Napierala <trasz@FreeBSD.org>2007-07-30 15:50:09 +0000
committerEdward Tomasz Napierala <trasz@FreeBSD.org>2007-07-30 15:50:09 +0000
commit53df5e02b21069f693ff527958304e718e7121cf (patch)
tree672db8faa6b60e2a2a44b21d56630560f01712b6 /graphics/openjpeg
parent46f4b3e218f4dbef3e5d0e128444c4c44bfee390 (diff)
downloadports-53df5e02b21069f693ff527958304e718e7121cf.tar.gz
ports-53df5e02b21069f693ff527958304e718e7121cf.zip
- Don't strip libraries
- Build and install j2k utils PR: ports/114694 Submitted by: ahze Approved by: miwi (mentor)
Notes
Notes: svn path=/head/; revision=196730
Diffstat (limited to 'graphics/openjpeg')
-rw-r--r--graphics/openjpeg/Makefile14
-rw-r--r--graphics/openjpeg/files/patch-Makefile22
-rw-r--r--graphics/openjpeg/files/patch-jpwl_Makefile27
-rw-r--r--graphics/openjpeg/files/patch-mj2_Makefile28
4 files changed, 86 insertions, 5 deletions
diff --git a/graphics/openjpeg/Makefile b/graphics/openjpeg/Makefile
index 9d01f1c8ad82..f5b625c4e968 100644
--- a/graphics/openjpeg/Makefile
+++ b/graphics/openjpeg/Makefile
@@ -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 @@ DISTNAME= ${PORTNAME}_v${PORTVERSION:S/./_/g}
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 --git a/graphics/openjpeg/files/patch-Makefile b/graphics/openjpeg/files/patch-Makefile
index 66bab22468d8..b7aafb366c36 100644
--- a/graphics/openjpeg/files/patch-Makefile
+++ b/graphics/openjpeg/files/patch-Makefile
@@ -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 --git a/graphics/openjpeg/files/patch-jpwl_Makefile b/graphics/openjpeg/files/patch-jpwl_Makefile
new file mode 100644
index 000000000000..979d2c6890af
--- /dev/null
+++ b/graphics/openjpeg/files/patch-jpwl_Makefile
@@ -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 --git a/graphics/openjpeg/files/patch-mj2_Makefile b/graphics/openjpeg/files/patch-mj2_Makefile
new file mode 100644
index 000000000000..a9a29f73a2b8
--- /dev/null
+++ b/graphics/openjpeg/files/patch-mj2_Makefile
@@ -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