1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-21 04:06:46 +00:00

- Don't strip libraries

- Build and install j2k utils

PR:		ports/114694
Submitted by:	ahze
Approved by:	miwi (mentor)
This commit is contained in:
Edward Tomasz Napierala 2007-07-30 15:50:09 +00:00
parent 46f4b3e218
commit 53df5e02b2
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=196730
4 changed files with 86 additions and 5 deletions

View File

@ -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>

View File

@ -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

View File

@ -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

View File

@ -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