diff options
author | osa <osa@FreeBSD.org> | 2008-12-16 18:22:27 +0800 |
---|---|---|
committer | osa <osa@FreeBSD.org> | 2008-12-16 18:22:27 +0800 |
commit | 3b7090b7d1783e87e731d2f8ca7a64ee6981564d (patch) | |
tree | 2f269e4bb1696edcf11d131945ea6c13d74186f8 /graphics/libraw | |
parent | 37fddde54416abbe28160b8f1c167ab73d4c142e (diff) | |
download | freebsd-ports-gnome-3b7090b7d1783e87e731d2f8ca7a64ee6981564d.tar.gz freebsd-ports-gnome-3b7090b7d1783e87e731d2f8ca7a64ee6981564d.tar.zst freebsd-ports-gnome-3b7090b7d1783e87e731d2f8ca7a64ee6981564d.zip |
Update from 0.5.3 to 0.6.3.
OPTIONify.
NOTE: don't install shared libraries by default.
Diffstat (limited to 'graphics/libraw')
-rw-r--r-- | graphics/libraw/Makefile | 57 | ||||
-rw-r--r-- | graphics/libraw/distinfo | 6 | ||||
-rw-r--r-- | graphics/libraw/files/patch-Makefile | 98 | ||||
-rw-r--r-- | graphics/libraw/pkg-plist | 10 |
4 files changed, 58 insertions, 113 deletions
diff --git a/graphics/libraw/Makefile b/graphics/libraw/Makefile index 2d010c1d0820..44e920a708cb 100644 --- a/graphics/libraw/Makefile +++ b/graphics/libraw/Makefile @@ -6,8 +6,7 @@ # PORTNAME= libraw -PORTVERSION= 0.5.3 -PORTREVISION= 2 +PORTVERSION= 0.6.3 CATEGORIES= graphics MASTER_SITES= http://www.libraw.su/data/ DISTNAME= LibRaw-${PORTVERSION} @@ -15,48 +14,64 @@ DISTNAME= LibRaw-${PORTVERSION} MAINTAINER= osa@FreeBSD.org COMMENT= Library for manipulating raw images +OPTIONS= OPTIMIZED_CFLAGS "Enable optimization" off \ + SHARED_LIBS "Install shared libraries" off + +.include <bsd.port.pre.mk> + LIB_DEPENDS= jpeg.9:${PORTSDIR}/graphics/jpeg \ lcms.1:${PORTSDIR}/graphics/lcms +.if defined(WITH_OPTIMIZED_CFLAGS) +.if ${ARCH} == "i386" +CFLAGS+= -O3 +.endif +.endif + MAKE_ENV+= PTHREAD_CFLAGS=${PTHREAD_CFLAGS} PTHREAD_LIBS=${PTHREAD_LIBS} +.if defined(WITH_SHARED_LIBS) USE_LDCONFIG= yes +PLIST_SUB+= SHAREDLIBS="" +.else +PLIST_SUB+= SHAREDLIBS="@comment " +.endif PORTDOCS= API-C-eng.html API-C-rus.html API-CXX-eng.html API-CXX-rus.html \ API-datastruct-eng.html API-datastruct-rus.html API-notes-eng.html \ API-notes-rus.html API-overview-eng.html API-overview-rus.html \ - Install-LibRaw-eng.html Install-LibRaw-rus.html Samples-LibRaw-eng.html \ - Samples-LibRaw-rus.html Why-LibRaw-eng.html Why-LibRaw-rus.html \ - index-eng.html index-rus.html index.html + Install-LibRaw-eng.html Install-LibRaw-rus.html \ + Samples-LibRaw-eng.html Samples-LibRaw-rus.html \ + Why-LibRaw-eng.html Why-LibRaw-rus.html index-eng.html \ + index-rus.html index.html -PORTEXAMPLES= dcraw_emu.cpp dcraw_half.c half_mt.c identify.cpp simple_dcraw.cpp +PORTEXAMPLES= dcraw_emu.cpp dcraw_half.c half_mt.c identify.cpp mem_image.cpp \ + simple_dcraw.cpp -.include <bsd.port.pre.mk> - -.if ${ARCH} == "i386" -.if defined(WITH_OPTIMIZED_CFLAGS) -CFLAGS+= -O4 -.else -pre-everything:: - @${ECHO_CMD} "" - @${ECHO_CMD} "The following options are available:" - @${ECHO_CMD} " WITH_OPTIMIZED_CFLAGS - build port with optimization support" - @${ECHO_CMD} "" -.endif -.endif +post-patch: + @${REINPLACE_CMD} -i.bak -e 's|-pthread|${PTHREAD_LIBS}|' \ + -e 's|gcc|${CC}|' \ + -e 's|g++|${CXX}|' \ + ${WRKSRC}/Makefile do-install: @${MKDIR} ${PREFIX}/include/libraw -.for f in libraw.h libraw_alloc.h libraw_const.h libraw_internal.h libraw_io.h libraw_types.h +.for f in libraw.h libraw_alloc.h libraw_const.h libraw_internal.h libraw_types.h libraw_version.h @${INSTALL_DATA} ${WRKSRC}/${PORTNAME}/${f} ${PREFIX}/include/libraw .endfor -.for f in libraw.a libraw.so.0 libraw_r.a libraw_r.so.0 +.for f in libraw.a libraw_r.a + @${INSTALL_DATA} ${WRKSRC}/lib/${f} ${PREFIX}/lib +.endfor + +.if defined(WITH_SHARED_LIBS) +.for f in libraw.so.0 libraw_r.so.0 @${INSTALL_DATA} ${WRKSRC}/lib/${f} ${PREFIX}/lib .endfor .for f in libraw libraw_r @ cd ${PREFIX}/lib ; ${LN} -sf ${f}.so.0 ${f}.so .endfor +.endif .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} diff --git a/graphics/libraw/distinfo b/graphics/libraw/distinfo index 4a9e19afdfd9..bd65576589aa 100644 --- a/graphics/libraw/distinfo +++ b/graphics/libraw/distinfo @@ -1,3 +1,3 @@ -MD5 (LibRaw-0.5.3.tar.gz) = ff482295f68a5dfd8609485dfee89ab4 -SHA256 (LibRaw-0.5.3.tar.gz) = f0c784df471f88867e141508d9a934d8c728eeafe9f05801383d040f85da0cfd -SIZE (LibRaw-0.5.3.tar.gz) = 160389 +MD5 (LibRaw-0.6.3.tar.gz) = 4add9bafaf0faa7e400f2629bfc85042 +SHA256 (LibRaw-0.6.3.tar.gz) = cf4a947e856427f1b729a2e4ab5bc62b8eb11b1ec2d0f9b254d22cb2762e6e01 +SIZE (LibRaw-0.6.3.tar.gz) = 178141 diff --git a/graphics/libraw/files/patch-Makefile b/graphics/libraw/files/patch-Makefile index 0ea054184868..06fa001b59ed 100644 --- a/graphics/libraw/files/patch-Makefile +++ b/graphics/libraw/files/patch-Makefile @@ -1,77 +1,27 @@ ---- Makefile.orig Sat Apr 19 17:21:37 2008 -+++ Makefile Wed May 7 10:20:57 2008 -@@ -1,12 +1,12 @@ +--- Makefile.orig Fri Nov 14 15:28:17 2008 ++++ Makefile Fri Nov 14 15:30:48 2008 +@@ -1,6 +1,6 @@ all: library all_samples - -CFLAGS=-O4 -I. -w +CFLAGS+=-I. -w -fPIC - DCRAW_LIB_OBJECTS=object/dcraw_common.o object/foveon.o object/io.o object/libraw_cxx.o object/libraw_c_api.o - DCRAW_LIB_MT_OBJECTS=object/dcraw_common_mt.o object/foveon_mt.o object/io_mt.o object/libraw_cxx_mt.o object/libraw_c_api_mt.o + # OpenMP support + #CFLAGS=-O4 -I. -w -fopenmp +@@ -13,7 +13,7 @@ + DCRAW_LIB_OBJECTS=object/dcraw_common.o object/foveon.o object/libraw_cxx.o object/libraw_c_api.o + DCRAW_LIB_MT_OBJECTS=object/dcraw_common_mt.o object/foveon_mt.o object/libraw_cxx_mt.o object/libraw_c_api_mt.o -library: lib/libraw.a lib/libraw_r.a +library: lib/libraw.a lib/libraw_r.a lib/libraw.so.0 lib/libraw_r.so.0 - all_samples: bin/identify bin/simple_dcraw bin/dcraw_emu bin/dcraw_half bin/half_mt - -@@ -18,40 +18,40 @@ - @if [ -d /usr/local/bin ] ; then cp bin/[a-z]* /usr/local/bin/ ; else echo 'no /usr/local/bin' ; fi - - bin/identify: lib/libraw.a samples/identify.cpp -- g++ ${CFLAGS} -o bin/identify samples/identify.cpp -L./lib -lraw -lm -+ ${CXX} ${CFLAGS} -o bin/identify samples/identify.cpp -L./lib -lraw -lm - - bin/simple_dcraw: lib/libraw.a samples/simple_dcraw.cpp -- g++ ${CFLAGS} -o bin/simple_dcraw samples/simple_dcraw.cpp -L./lib -lraw -lm -+ ${CXX} ${CFLAGS} -o bin/simple_dcraw samples/simple_dcraw.cpp -L./lib -lraw -lm - - bin/dcraw_half: lib/libraw.a object/dcraw_half.o -- gcc ${CFLAGS} -o bin/dcraw_half object/dcraw_half.o -L./lib -lraw -lm -lstdc++ -+ ${CC} ${CFLAGS} -o bin/dcraw_half object/dcraw_half.o -L./lib -lraw -lm -lstdc++ - - bin/half_mt: lib/libraw_r.a object/half_mt.o -- gcc -pthread ${CFLAGS} -o bin/half_mt object/half_mt.o -L./lib -lraw_r -lm -lstdc++ -+ ${CC} ${PTHREAD_LIBS} ${CFLAGS} -o bin/half_mt object/half_mt.o -L./lib -lraw_r -lm -lstdc++ - - bin/dcraw_emu: lib/libraw.a samples/dcraw_emu.cpp -- g++ ${CFLAGS} -o bin/dcraw_emu samples/dcraw_emu.cpp -L./lib -lraw -lm -+ ${CXX} ${CFLAGS} -o bin/dcraw_emu samples/dcraw_emu.cpp -L./lib -lraw -lm - - object/dcraw_common.o: internal/dcraw_common.cpp -- g++ -c ${CFLAGS} -o object/dcraw_common.o internal/dcraw_common.cpp -+ ${CXX} -c ${CFLAGS} -o object/dcraw_common.o internal/dcraw_common.cpp - - object/foveon.o: internal/foveon.cpp -- g++ -c ${CFLAGS} -o object/foveon.o internal/foveon.cpp -+ ${CXX} -c ${CFLAGS} -o object/foveon.o internal/foveon.cpp - - object/io.o: src/io.c -- gcc -c ${CFLAGS} -DUSE_MMAP_IO -o object/io.o src/io.c -+ ${CC} -c ${CFLAGS} -DUSE_MMAP_IO -o object/io.o src/io.c - - object/libraw_cxx.o: src/libraw_cxx.cpp -- g++ -c ${CFLAGS} -o object/libraw_cxx.o src/libraw_cxx.cpp -+ ${CXX} -c ${CFLAGS} -o object/libraw_cxx.o src/libraw_cxx.cpp - - object/libraw_c_api.o: src/libraw_c_api.cpp -- g++ -c ${CFLAGS} -o object/libraw_c_api.o src/libraw_c_api.cpp -+ ${CXX} -c ${CFLAGS} -o object/libraw_c_api.o src/libraw_c_api.cpp + all_samples: bin/identify bin/simple_dcraw bin/dcraw_emu bin/dcraw_half bin/half_mt bin/mem_image - object/dcraw_half.o: samples/dcraw_half.c -- gcc -c ${CFLAGS} -o object/dcraw_half.o samples/dcraw_half.c -+ ${CC} -c ${CFLAGS} -o object/dcraw_half.o samples/dcraw_half.c - - object/half_mt.o: samples/half_mt.c -- gcc -c -pthread ${CFLAGS} -DLIBRAW_THREADS -o object/half_mt.o samples/half_mt.c -+ ${CC} -c ${PTHREAD_CFLAGS} ${CFLAGS} -DLIBRAW_THREADS -o object/half_mt.o samples/half_mt.c - - - lib/libraw.a: ${DCRAW_LIB_OBJECTS} -@@ -64,20 +64,28 @@ +@@ -75,6 +75,14 @@ + rm -f lib/libraw_r.a ar crv lib/libraw_r.a ${DCRAW_LIB_MT_OBJECTS} ranlib lib/libraw_r.a - ++ +lib/libraw.so.0: ${DCRAW_LIB_OBJECTS} + rm -f lib/libraw.so.0 + ${CC} ${CFLAGS} -shared -Wl,-soname,libraw.so.0 -o lib/libraw.so.0 ${DCRAW_LIB_OBJECTS} @@ -79,26 +29,6 @@ +lib/libraw_r.so.0: ${DCRAW_LIB_MT_OBJECTS} + rm -f lib/libraw_r.so.0 + ${CC} ${CFLAGS} -shared -Wl,-soname,libraw_r.so.0 -o lib/libraw_r.so.0 ${DCRAW_LIB_MT_OBJECTS} -+ - object/dcraw_common_mt.o: internal/dcraw_common.cpp -- g++ -c -pthread -DLIBRAW_THREADS ${CFLAGS} -o object/dcraw_common_mt.o internal/dcraw_common.cpp -+ ${CXX} -c ${PTHREAD_CFLAGS} -DLIBRAW_THREADS ${CFLAGS} -o object/dcraw_common_mt.o internal/dcraw_common.cpp - - object/foveon_mt.o: internal/foveon.cpp -- g++ -c -DLIBRAW_THREADS -pthread ${CFLAGS} -o object/foveon_mt.o internal/foveon.cpp -+ ${CXX} -c -DLIBRAW_THREADS ${PTHREAD_CFLAGS} ${CFLAGS} -o object/foveon_mt.o internal/foveon.cpp - - object/io_mt.o: src/io.c -- gcc -c -DLIBRAW_THREADS -pthread ${CFLAGS} -DUSE_MMAP_IO -o object/io_mt.o src/io.c -+ ${CC} -c -DLIBRAW_THREADS ${PTHREAD_CFLAGS} ${CFLAGS} -DUSE_MMAP_IO -o object/io_mt.o src/io.c - object/libraw_cxx_mt.o: src/libraw_cxx.cpp -- g++ -c -DLIBRAW_THREADS -pthread ${CFLAGS} -o object/libraw_cxx_mt.o src/libraw_cxx.cpp -+ ${CXX} -c -DLIBRAW_THREADS ${PTHREAD_CFLAGS} ${CFLAGS} -o object/libraw_cxx_mt.o src/libraw_cxx.cpp - - object/libraw_c_api_mt.o: src/libraw_c_api.cpp -- g++ -c -DLIBRAW_THREADS -pthread ${CFLAGS} -o object/libraw_c_api_mt.o src/libraw_c_api.cpp -+ ${CXX} -c -DLIBRAW_THREADS ${PTHREAD_CFLAGS} ${CFLAGS} -o object/libraw_c_api_mt.o src/libraw_c_api.cpp - - clean: - rm -fr bin/*.dSYM + object/dcraw_common_mt.o: internal/dcraw_common.cpp + g++ -c -pthread ${LCMS_DEF} ${CFLAGS} -o object/dcraw_common_mt.o internal/dcraw_common.cpp diff --git a/graphics/libraw/pkg-plist b/graphics/libraw/pkg-plist index 7e3266cbc3ec..817ce8543437 100644 --- a/graphics/libraw/pkg-plist +++ b/graphics/libraw/pkg-plist @@ -2,12 +2,12 @@ include/libraw/libraw.h include/libraw/libraw_alloc.h include/libraw/libraw_const.h include/libraw/libraw_internal.h -include/libraw/libraw_io.h include/libraw/libraw_types.h +include/libraw/libraw_version.h lib/libraw.a -lib/libraw.so -lib/libraw.so.0 +%%SHAREDLIBS%%lib/libraw.so +%%SHAREDLIBS%%lib/libraw.so.0 lib/libraw_r.a -lib/libraw_r.so -lib/libraw_r.so.0 +%%SHAREDLIBS%%lib/libraw_r.so +%%SHAREDLIBS%%lib/libraw_r.so.0 @dirrm include/libraw |