aboutsummaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'graphics')
-rw-r--r--graphics/libraw/Makefile47
-rw-r--r--graphics/libraw/distinfo8
-rw-r--r--graphics/libraw/files/extra-patch-Makefile.in31
-rw-r--r--graphics/libraw/files/patch-Makefile35
-rw-r--r--graphics/libraw/files/patch-configure52
5 files changed, 124 insertions, 49 deletions
diff --git a/graphics/libraw/Makefile b/graphics/libraw/Makefile
index bc6a6b1e349b..79abd4bad196 100644
--- a/graphics/libraw/Makefile
+++ b/graphics/libraw/Makefile
@@ -6,10 +6,11 @@
#
PORTNAME= libraw
-PORTVERSION= 0.11.3
+PORTVERSION= 0.12.2
CATEGORIES= graphics
MASTER_SITES= http://www.libraw.su/data/
DISTNAME= LibRaw-${PORTVERSION}
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= osa@FreeBSD.org
COMMENT= Library for manipulating raw images
@@ -17,13 +18,19 @@ COMMENT= Library for manipulating raw images
LICENSE= LGPL21 CDDL
LICENSE_COMB= dual
-OPTIONS= OPTIMIZED_CFLAGS "Enable optimization" off \
- SHARED_LIBS "Install shared libraries" off
+OPTIONS= DEMOSAIC_PACK_GPL2 "Enable demosaic pack GPL2" off \
+ DEMOSAIC_PACK_GPL3 "Enable demosaic pack GPL3" off \
+ LCMS "Build with lcms" on \
+ OPTIMIZED_CFLAGS "Enable optimization" off \
+ SHARED_LIBS "Install shared libraries" off
.include <bsd.port.pre.mk>
-LIB_DEPENDS= jpeg.11:${PORTSDIR}/graphics/jpeg \
- lcms.1:${PORTSDIR}/graphics/lcms
+LIB_DEPENDS= jpeg.11:${PORTSDIR}/graphics/jpeg
+USE_PKGCONFIG= yes
+HAS_CONFIGURE= yes
+CONFIGURE_ARGS+=--program-prefix=${PREFIX} --disable-examples
+CFLAGS+= -fPIC
.if defined(WITH_OPTIMIZED_CFLAGS)
.if ${ARCH} == "i386"
@@ -31,9 +38,31 @@ CFLAGS+= -O3
.endif
.endif
-MAKE_ENV+= PTHREAD_CFLAGS=${PTHREAD_CFLAGS} PTHREAD_LIBS=${PTHREAD_LIBS}
+.if defined(WITH_LCMS)
+LIB_DEPENDS+= lcms2.2:${PORTSDIR}/graphics/lcms2
+CONFIGURE_ARGS+=--enable-lcms
+.else
+CONFIGURE_ARGS+=--disable-lcms
+.endif
+
+.if defined(WITH_DEMOSAIC_PACK_GPL2)
+LICENSE+= GPLv2
+DISTFILES+= LibRaw-demosaic-pack-GPL2-${PORTVERSION}.tar.gz
+CONFIGURE_ARGS+=--enable-demosaic-pack-gpl2=../LibRaw-demosaic-pack-GPL2-${PORTVERSION}
+.else
+CONFIGURE_ARGS+=--disable-demosaic-pack-gpl2
+.endif
+
+.if defined(WITH_DEMOSAIC_PACK_GPL3)
+LICENSE+= GPLv3
+DISTFILES+= LibRaw-demosaic-pack-GPL3-${PORTVERSION}.tar.gz
+CONFIGURE_ARGS+=--enable-demosaic-pack-gpl3=../LibRaw-demosaic-pack-GPL3-${PORTVERSION}
+.else
+CONFIGURE_ARGS+=--disable-demosaic-pack-gpl3
+.endif
.if defined(WITH_SHARED_LIBS)
+EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-Makefile.in
USE_LDCONFIG= yes
PLIST_SUB+= SHAREDLIBS=""
.else
@@ -51,12 +80,6 @@ PORTDOCS= API-C-eng.html API-C-rus.html API-CXX-eng.html API-CXX-rus.html \
PORTEXAMPLES= 4channels.cpp dcraw_emu.cpp dcraw_half.c half_mt.c mem_image.cpp \
raw-identify.cpp simple_dcraw.cpp unprocessed_raw.cpp
-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
diff --git a/graphics/libraw/distinfo b/graphics/libraw/distinfo
index 7ef41d3b29b8..d78d809ec93c 100644
--- a/graphics/libraw/distinfo
+++ b/graphics/libraw/distinfo
@@ -1,2 +1,6 @@
-SHA256 (LibRaw-0.11.3.tar.gz) = 743705f51c0c7a8d1712934b0aca587ad0ce4cc8a5d4cad54eecd1f44e9c0774
-SIZE (LibRaw-0.11.3.tar.gz) = 574145
+SHA256 (LibRaw-0.12.2.tar.gz) = b7f99d794282067cb1e6b174510032df57e25933f3508a1ef75b8be3d238fc7a
+SIZE (LibRaw-0.12.2.tar.gz) = 767457
+SHA256 (LibRaw-demosaic-pack-GPL2-0.12.2.tar.gz) = 1e6d9aed70308794507068544159abb2397993be833d6a760887e0d0b40ed27b
+SIZE (LibRaw-demosaic-pack-GPL2-0.12.2.tar.gz) = 31034
+SHA256 (LibRaw-demosaic-pack-GPL3-0.12.2.tar.gz) = 8ded0e8b917c99651c82a9bda9580ecb7a448f32125194d41b10f4a21c7e0c68
+SIZE (LibRaw-demosaic-pack-GPL3-0.12.2.tar.gz) = 30486
diff --git a/graphics/libraw/files/extra-patch-Makefile.in b/graphics/libraw/files/extra-patch-Makefile.in
new file mode 100644
index 000000000000..16594e4783ae
--- /dev/null
+++ b/graphics/libraw/files/extra-patch-Makefile.in
@@ -0,0 +1,31 @@
+--- Makefile.in.orig 2011-01-08 21:10:58.000000000 +0300
++++ Makefile.in 2011-01-08 21:17:49.000000000 +0300
+@@ -297,7 +297,7 @@
+ pkgconfig_DATA = libraw.pc libraw_r.pc
+
+ # Libraries
+-lib_LIBRARIES = lib/libraw.a lib/libraw_r.a
++lib_LIBRARIES = lib/libraw.a lib/libraw_r.a lib/libraw.so.0 lib/libraw_r.so.0
+ lib_libraw_a_CPPFLAGS = -DLIBRAW_NOTHREADS -w
+ lib_libraw_a_SOURCES = internal/dcraw_common.cpp \
+ internal/dcraw_fileio.cpp \
+@@ -435,6 +435,9 @@
+ -rm -f lib/libraw.a
+ $(lib_libraw_a_AR) lib/libraw.a $(lib_libraw_a_OBJECTS) $(lib_libraw_a_LIBADD)
+ $(RANLIB) lib/libraw.a
++lib/libraw.so.0: $(lib_libraw_a_OBJECTS) $(lib_libraw_a_DEPENDENCIES) lib/$(am__dirstamp)
++ -rm -f lib/libraw.so.0
++ $(CC) $(CFLAGS) -shared -Wl,-soname,libraw.so.0 -o lib/libraw.so.0 $(lib_libraw_r_a_OBJECTS)
+ internal/lib_libraw_r_a-dcraw_common.$(OBJEXT): \
+ internal/$(am__dirstamp) internal/$(DEPDIR)/$(am__dirstamp)
+ internal/lib_libraw_r_a-dcraw_fileio.$(OBJEXT): \
+@@ -449,6 +452,9 @@
+ -rm -f lib/libraw_r.a
+ $(lib_libraw_r_a_AR) lib/libraw_r.a $(lib_libraw_r_a_OBJECTS) $(lib_libraw_r_a_LIBADD)
+ $(RANLIB) lib/libraw_r.a
++lib/libraw_r.so.0: $(lib_libraw_r_a_OBJECTS) $(lib_libraw_r_a_DEPENDENCIES) lib/$(am__dirstamp)
++ -rm -f lib/libraw_r.so.0
++ $(CC) $(CFLAGS) -shared -Wl,-soname,libraw_r.so.0 -o lib/libraw_r.so.0 $(lib_libraw_r_a_OBJECTS)
+ install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
diff --git a/graphics/libraw/files/patch-Makefile b/graphics/libraw/files/patch-Makefile
deleted file mode 100644
index 6370d51938bf..000000000000
--- a/graphics/libraw/files/patch-Makefile
+++ /dev/null
@@ -1,35 +0,0 @@
---- Makefile.orig 2010-03-28 22:12:12.000000000 +0400
-+++ Makefile 2010-11-12 04:17:16.000000000 +0300
-@@ -1,6 +1,6 @@
--all: library all_samples
-+all: library
-
--CFLAGS=-O4 -I. -w
-+CFLAGS+=-I. -w -fPIC
-
- # 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 bin/mem_image
-
-@@ -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}
-+
-+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 ${LCMS_DEF} ${CFLAGS} -o object/dcraw_common_mt.o internal/dcraw_common.cpp
diff --git a/graphics/libraw/files/patch-configure b/graphics/libraw/files/patch-configure
new file mode 100644
index 000000000000..dd5639056ae2
--- /dev/null
+++ b/graphics/libraw/files/patch-configure
@@ -0,0 +1,52 @@
+--- configure.orig 2010-12-29 18:51:59.000000000 +0300
++++ configure 2010-12-29 18:52:22.000000000 +0300
+@@ -2256,7 +2256,7 @@
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+ esac
+
+-for ac_prog in gawk mawk nawk awk
++for ac_prog in awk
+ do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+ set dummy $ac_prog; ac_word=$2
+@@ -4129,42 +4129,6 @@
+
+
+
+-pkg_failed=no
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
+-$as_echo_n "checking for LCMS... " >&6; }
+-
+-if test -n "$LCMS_CFLAGS"; then
+- pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
+- elif test -n "$PKG_CONFIG"; then
+- if test -n "$PKG_CONFIG" && \
+- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms\""; } >&5
+- ($PKG_CONFIG --exists --print-errors "lcms") 2>&5
+- ac_status=$?
+- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+- test $ac_status = 0; }; then
+- pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms" 2>/dev/null`
+-else
+- pkg_failed=yes
+-fi
+- else
+- pkg_failed=untried
+-fi
+-if test -n "$LCMS_LIBS"; then
+- pkg_cv_LCMS_LIBS="$LCMS_LIBS"
+- elif test -n "$PKG_CONFIG"; then
+- if test -n "$PKG_CONFIG" && \
+- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms\""; } >&5
+- ($PKG_CONFIG --exists --print-errors "lcms") 2>&5
+- ac_status=$?
+- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+- test $ac_status = 0; }; then
+- pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms" 2>/dev/null`
+-else
+- pkg_failed=yes
+-fi
+- else
+- pkg_failed=untried
+-fi
+