aboutsummaryrefslogtreecommitdiff
path: root/graphics/hdr_tools
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2015-08-30 15:25:26 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2015-08-30 15:25:26 +0000
commit87acaf3a1949d4964876b9fdcbdc8c5b61592e7e (patch)
tree4a5d9ea373adc166aa7432fbd6961ccb6afa8fae /graphics/hdr_tools
parentaa413543d26e958330dac2ea67405f7dd5387caf (diff)
downloadports-87acaf3a1949d4964876b9fdcbdc8c5b61592e7e.tar.gz
ports-87acaf3a1949d4964876b9fdcbdc8c5b61592e7e.zip
Add a port of HDR tools, a set of command-line utilities for creating and
manipulating High Dynamic Range (HDR) images. WWW: http://ttic.uchicago.edu/~cotter/projects/hdr_tools/
Notes
Notes: svn path=/head/; revision=395622
Diffstat (limited to 'graphics/hdr_tools')
-rw-r--r--graphics/hdr_tools/Makefile52
-rw-r--r--graphics/hdr_tools/distinfo2
-rw-r--r--graphics/hdr_tools/files/patch-Makefile47
-rw-r--r--graphics/hdr_tools/pkg-descr11
4 files changed, 112 insertions, 0 deletions
diff --git a/graphics/hdr_tools/Makefile b/graphics/hdr_tools/Makefile
new file mode 100644
index 000000000000..f8f562051aff
--- /dev/null
+++ b/graphics/hdr_tools/Makefile
@@ -0,0 +1,52 @@
+# Created by: Alexey Dokuchaev <danfe@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= hdr_tools
+PORTVERSION= 0.0.2010.11.23 # unspecified by the author, so use the date
+CATEGORIES= graphics
+MASTER_SITES= http://ttic.uchicago.edu/~cotter/projects/hdr_tools/archives/ \
+ http://freebsd.nsu.ru/distfiles/
+DISTNAME= hdr_src
+
+MAINTAINER= danfe@FreeBSD.org
+COMMENT= Command-line tools for creating and manipulating HDR images
+
+LICENSE= GPLv3
+
+LIB_DEPENDS= libpopt.so:${PORTSDIR}/devel/popt \
+ libtiff.so:${PORTSDIR}/graphics/tiff \
+ libIlmImf.so:${PORTSDIR}/graphics/OpenEXR \
+ libMagick++-6.so:${PORTSDIR}/graphics/ImageMagick
+
+USES= compiler:features gmake pkgconfig tar:tgz
+NO_WRKSUBDIR= yes
+
+PROGRAMS= hdr_adjust hdr_convert hdr_create hdr_denoise hdr_fix_ca \
+ hdr_squish
+
+PLIST_FILES= ${PROGRAMS:S,^,bin/,}
+
+.include <bsd.port.pre.mk>
+
+.if ${MACHINE_CPU:Msse2}
+CXXFLAGS+= -msse2 -mfpmath=sse
+.endif
+
+.if ${COMPILER_FEATURES:Mopenmp}
+CXXFLAGS+= -fopenmp
+.endif
+
+# NB: `math/ldouble' port provides these functions, but does not export
+# them correctly; as a result linking with C++ code is currently broken
+.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1000034
+BROKEN= requires logl(), expl(), log2l()
+.endif
+
+post-patch:
+ @${REINPLACE_CMD} -e 's,RGBColorspace,s&,' ${WRKSRC}/image.cc
+
+do-install:
+ ${INSTALL_PROGRAM} ${PROGRAMS:S,^,${WRKSRC}/,} \
+ ${STAGEDIR}/${PREFIX}/bin
+
+.include <bsd.port.post.mk>
diff --git a/graphics/hdr_tools/distinfo b/graphics/hdr_tools/distinfo
new file mode 100644
index 000000000000..707c674c9c77
--- /dev/null
+++ b/graphics/hdr_tools/distinfo
@@ -0,0 +1,2 @@
+SHA256 (hdr_src.tgz) = 8df65c7198552f33040c6400759b3849bd3212c04d434cda8a2b86f99694eb01
+SIZE (hdr_src.tgz) = 38943
diff --git a/graphics/hdr_tools/files/patch-Makefile b/graphics/hdr_tools/files/patch-Makefile
new file mode 100644
index 000000000000..cefbf82256e5
--- /dev/null
+++ b/graphics/hdr_tools/files/patch-Makefile
@@ -0,0 +1,47 @@
+--- Makefile.orig 2010-11-23 21:27:55 UTC
++++ Makefile
+@@ -31,8 +31,12 @@ DEPENDENCY_HEADERS = \
+
+
+ ifeq (${PLATFORM},linux)
+-CFLAGS = -pthread -fopenmp -Wall -msse2 -mfpmath=sse -I/usr/include/ImageMagick -I/usr/include/OpenEXR
+-LDFLAGS = -lIlmImf -lMagick++ -ltiff -lpopt -lstdc++ -lm
++CXX?= c++
++CXXFLAGS+= -Wall
++CPPFLAGS+= `pkg-config --cflags popt` `pkg-config --cflags OpenEXR` \
++ `Magick++-config --cppflags`
++LDFLAGS+= `pkg-config --libs popt` `pkg-config --libs libtiff-4` \
++ `pkg-config --libs OpenEXR` `Magick++-config --libs`
+ EXECUTABLES = ${TARGET_SOURCES:%.cc=%}
+ endif
+
+@@ -64,14 +68,24 @@ CFLAGS := -O3 -funroll-loops -fomit-fram
+ endif
+
+
++TARGET_OBJS = $(TARGET_SOURCES:%.cc=%.o)
++DEPENDENCY_OBJS = $(DEPENDENCY_SOURCES:%.cc=%.o)
++
+ .PHONY : all
+-all : ${TARGET_SOURCES:%.cc=%}
++all : $(EXECUTABLES)
+
+-% : %.cc $(DEPENDENCY_HEADERS) $(DEPENDENCY_SOURCES) Makefile
+- @echo "---- building \"$@\" from \"$<\" ($(PLATFORM)/$(BUILD)) ----"
+- g++ $(CFLAGS) $< $(DEPENDENCY_SOURCES) -o $@ $(LDFLAGS)
+- @echo
++$(TARGET_OBJS) $(DEPENDENCY_OBJS) : $(DEPENDENCY_HEADERS)
++$(EXECUTABLES) : $(DEPENDENCY_OBJS)
++$(foreach prog,$(EXECUTABLES),$(eval $$prog : $$prog.o))
++
++%.o : %.cc
++# Clang cannot compile image.cc and squish_luminance.cc with -O2 and above
++ $(CXX) $(if $(and $(shell $(CXX) -v 2>&1 | grep clang),$(filter \
++ image.cc squish_luminance.cc,$<)),$(CXXFLAGS:-O%=-O1), \
++ $(CXXFLAGS)) $(CPPFLAGS) -o $@ -c $<
+
++% : %.o
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) $^ -o $@
+
+ .PHONY : strip
+ strip : all
diff --git a/graphics/hdr_tools/pkg-descr b/graphics/hdr_tools/pkg-descr
new file mode 100644
index 000000000000..7f72c77d808f
--- /dev/null
+++ b/graphics/hdr_tools/pkg-descr
@@ -0,0 +1,11 @@
+HDR Tools is a set of command-line tools for creating and manipulating High
+Dynamic Range (HDR) images. It consists of six programs: hdr_create,
+hdr_fix_ca, hdr_denoise, hdr_squish, hdr_adjust, and hdr_convert.
+
+Together, they can convert a set of bracketed photographs to HDR image (in
+EXR format), fix chromatic aberrations and CCD noise, perform tone mapping
+and some simple color manipulations, apply gamma correction and optionally
+adjusts the exposure, crop, and finally convert the result into a "normal"
+image (a JPG, for example).
+
+WWW: http://ttic.uchicago.edu/~cotter/projects/hdr_tools/