Update to enblend-enfuse-4.2.
- enable SEPARATE_BUILD while here - drop some patches merged upstream. With some tweaks and OK from sthen@ (MAINTAINER)
This commit is contained in:
parent
6ea2304d39
commit
c1298eedad
@ -1,4 +1,4 @@
|
|||||||
# $OpenBSD: Makefile,v 1.28 2016/10/25 12:25:32 jca Exp $
|
# $OpenBSD: Makefile,v 1.29 2016/11/24 08:16:03 kirby Exp $
|
||||||
|
|
||||||
ONLY_FOR_ARCHS = ${GCC4_ARCHS}
|
ONLY_FOR_ARCHS = ${GCC4_ARCHS}
|
||||||
.if (${MACHINE_ARCH} != "i386" && ${MACHINE_ARCH} != "amd64")
|
.if (${MACHINE_ARCH} != "i386" && ${MACHINE_ARCH} != "amd64")
|
||||||
@ -11,10 +11,7 @@ BROKEN-alpha = enblend-enblend.o: .got subsegment exceeds 64K (size 77816)
|
|||||||
|
|
||||||
COMMENT = blend seams in panoramic image mosaics
|
COMMENT = blend seams in panoramic image mosaics
|
||||||
|
|
||||||
DISTNAME = enblend-enfuse-4.0
|
DISTNAME = enblend-enfuse-4.2
|
||||||
PKGNAME = ${DISTNAME:L}
|
|
||||||
WRKDIST = ${WRKDIR}/enblend-enfuse-4.0-753b534c819d
|
|
||||||
REVISION = 4
|
|
||||||
CATEGORIES = graphics
|
CATEGORIES = graphics
|
||||||
|
|
||||||
HOMEPAGE = http://enblend.sourceforge.net/
|
HOMEPAGE = http://enblend.sourceforge.net/
|
||||||
@ -24,31 +21,30 @@ MAINTAINER = Stuart Henderson <sthen@openbsd.org>
|
|||||||
# GPLv2+, MIT
|
# GPLv2+, MIT
|
||||||
PERMIT_PACKAGE_CDROM = Yes
|
PERMIT_PACKAGE_CDROM = Yes
|
||||||
|
|
||||||
WANTLIB += GL GLEW GLU Half ICE Iex IexMath IlmImf IlmThread Imath
|
WANTLIB += Half Iex IexMath IlmImf IlmThread Imath c gsl gslcblas
|
||||||
WANTLIB += SM X11 Xi Xmu boost_system c glut jpeg lcms m png pthread
|
WANTLIB += jpeg lcms2 m png pthread tiff vigraimpex z
|
||||||
WANTLIB += stdc++ tiff xmi z
|
|
||||||
|
|
||||||
MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=enblend/}
|
MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=enblend/}
|
||||||
|
|
||||||
BUILD_DEPENDS = math/gnuplot \
|
MODULES = gcc4
|
||||||
|
MODGCC4_ARCHS = *
|
||||||
|
MODGCC4_LANGS +=c++
|
||||||
|
BUILD_DEPENDS = devel/help2man\
|
||||||
|
math/gnuplot \
|
||||||
|
print/texlive/base \
|
||||||
print/transfig \
|
print/transfig \
|
||||||
www/tidyp>=1.04p1
|
www/tidyp>=1.04p1
|
||||||
LIB_DEPENDS = devel/boost \
|
LIB_DEPENDS = devel/gsl \
|
||||||
graphics/glew \
|
|
||||||
graphics/freeglut \
|
|
||||||
graphics/ilmbase \
|
graphics/ilmbase \
|
||||||
graphics/lcms \
|
graphics/lcms2 \
|
||||||
graphics/libxmi \
|
graphics/vigra
|
||||||
graphics/openexr \
|
|
||||||
graphics/png \
|
|
||||||
graphics/tiff
|
|
||||||
|
|
||||||
|
SEPARATE_BUILD = Yes
|
||||||
CONFIGURE_STYLE = autoconf
|
CONFIGURE_STYLE = autoconf
|
||||||
AUTOCONF_VERSION = 2.61
|
AUTOCONF_VERSION = 2.69
|
||||||
USE_GMAKE = Yes
|
USE_GMAKE = Yes
|
||||||
|
|
||||||
CPPFLAGS += -I${WRKSRC}/src/vigra_impex \
|
CPPFLAGS += -I${LOCALBASE}/include \
|
||||||
-I${LOCALBASE}/include \
|
|
||||||
-I${X11BASE}/include
|
-I${X11BASE}/include
|
||||||
|
|
||||||
LDFLAGS += -L${LOCALBASE}/lib \
|
LDFLAGS += -L${LOCALBASE}/lib \
|
||||||
@ -58,13 +54,11 @@ LDFLAGS += -L${LOCALBASE}/lib \
|
|||||||
CONFIGURE_ENV = CPPFLAGS="${CPPFLAGS}" \
|
CONFIGURE_ENV = CPPFLAGS="${CPPFLAGS}" \
|
||||||
LDFLAGS="${LDFLAGS}"
|
LDFLAGS="${LDFLAGS}"
|
||||||
|
|
||||||
|
CXXFLAGS += -std=c++11 -pthread
|
||||||
|
|
||||||
# need to fix bashisms in doc/Makefile.in first
|
# need to fix bashisms in doc/Makefile.in first
|
||||||
#post-build:
|
#post-build:
|
||||||
# @cd ${WRKBUILD}/doc && \
|
# @cd ${WRKBUILD}/doc && \
|
||||||
# ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} xhtml
|
# ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} xhtml
|
||||||
|
|
||||||
# Fix with newer GNUplot versions. From Gentoo bz #334331
|
|
||||||
post-extract:
|
|
||||||
@sed -i 's,FreeSans 10,"FreeSans\,10",g' ${WRKSRC}/doc/*.gp.in
|
|
||||||
|
|
||||||
.include <bsd.port.mk>
|
.include <bsd.port.mk>
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
SHA256 (enblend-enfuse-4.0.tar.gz) = oSpEwqB4lPJ+HVoWdXKBdalDyJuRwayauszmLwjCU8Q=
|
SHA256 (enblend-enfuse-4.2.tar.gz) = hwPjJJOevXDXav01DlaAD16iwFOgQKX1IYsqGkMAvUg=
|
||||||
SIZE (enblend-enfuse-4.0.tar.gz) = 1046677
|
SIZE (enblend-enfuse-4.2.tar.gz) = 777747
|
||||||
|
@ -1,33 +0,0 @@
|
|||||||
$OpenBSD: patch-configure_in,v 1.3 2013/03/08 01:30:37 brad Exp $
|
|
||||||
|
|
||||||
adapt patch from http://enblend.hg.sourceforge.net/hgweb/enblend/enblend/diff/57db56afb9a9/configure.in
|
|
||||||
|
|
||||||
--- configure.in.orig Sat Nov 24 14:57:20 2012
|
|
||||||
+++ configure.in Sat Nov 24 15:01:33 2012
|
|
||||||
@@ -196,8 +196,26 @@ AC_CHECK_HEADER(boost/random/mersenne_twister.hpp, [],
|
|
||||||
AC_MSG_ERROR([Boost "mersenne_twister" header file is required to compile Enblend.]))
|
|
||||||
AC_CHECK_HEADER(boost/scoped_ptr.hpp, [],
|
|
||||||
AC_MSG_ERROR([Boost "scoped_ptr" header file is required to compile Enblend.]))
|
|
||||||
+AC_CHECK_HEADER(boost/system/error_code.hpp, [],
|
|
||||||
+ AC_MSG_ERROR([Boost "error code" header file is required to compile Enblend.]))
|
|
||||||
AC_CHECK_HEADER(boost/static_assert.hpp, [],
|
|
||||||
AC_MSG_ERROR([Boost "static_assert" header file is required to compile Enblend.]))
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+LIBS="-lboost_system $LIBS"
|
|
||||||
+AC_MSG_CHECKING([for new Boost system library])
|
|
||||||
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "boost/system/error_code.hpp"]],
|
|
||||||
+ [[boost::system::generic_category();
|
|
||||||
+ boost::system::system_category()]])],
|
|
||||||
+ [AC_MSG_RESULT(yes)],
|
|
||||||
+ [AC_MSG_RESULT(no)
|
|
||||||
+ AC_MSG_CHECKING([for old Boost system library])
|
|
||||||
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "boost/system/error_code.hpp"]],
|
|
||||||
+ [[boost::system::get_generic_category();
|
|
||||||
+ boost::system::get_system_category()]])],
|
|
||||||
+ [AC_MSG_RESULT(yes)],
|
|
||||||
+ [AC_MSG_RESULT(no)
|
|
||||||
+ AC_MSG_ERROR([Boost "system" library is required to compile Enblend.])])])
|
|
||||||
|
|
||||||
AC_ARG_WITH([boost-filesystem],
|
|
||||||
[AS_HELP_STRING([--with-boost-filesystem],
|
|
@ -1,33 +0,0 @@
|
|||||||
$OpenBSD: patch-doc_enblend_texi,v 1.3 2010/07/15 17:01:58 sthen Exp $
|
|
||||||
|
|
||||||
workaround missing @textdegree{}; support was added in texinfo-4.11
|
|
||||||
|
|
||||||
--- doc/enblend.texi.orig Sat Jul 10 11:00:30 2010
|
|
||||||
+++ doc/enblend.texi Sat Jul 10 11:01:55 2010
|
|
||||||
@@ -474,7 +474,7 @@ in.
|
|
||||||
@itemx --wrap=@var{MODE}
|
|
||||||
@opindex -w
|
|
||||||
@opindex --wrap
|
|
||||||
-@cindex 360@textdegree{} panoramas
|
|
||||||
+@cindex 360-degree panoramas
|
|
||||||
@cindex wrap around
|
|
||||||
Blend around the boundaries of the panorama.
|
|
||||||
|
|
||||||
@@ -546,7 +546,7 @@ $$
|
|
||||||
S_P(x, y) = \{P(x + m w, y): m \in Z\}.
|
|
||||||
$$
|
|
||||||
@end tex
|
|
||||||
-This is useful for 360@textdegree{} horizontal panoramas as it
|
|
||||||
+This is useful for 360-degree horizontal panoramas as it
|
|
||||||
eliminates the left and right borders.
|
|
||||||
|
|
||||||
@item vertical
|
|
||||||
@@ -600,7 +600,7 @@ $$
|
|
||||||
S_P(x, y) = \{P(x, y + n h): n \in Z\}.
|
|
||||||
$$
|
|
||||||
@end tex
|
|
||||||
-This is useful for 360@textdegree{} vertical panoramas as it
|
|
||||||
+This is useful for 360-degree vertical panoramas as it
|
|
||||||
eliminates the top and bottom borders.
|
|
||||||
|
|
||||||
@item both
|
|
@ -1,33 +0,0 @@
|
|||||||
$OpenBSD: patch-doc_enfuse_texi,v 1.3 2010/07/15 17:01:58 sthen Exp $
|
|
||||||
|
|
||||||
workaround missing @textdegree{}; support was added in texinfo-4.11
|
|
||||||
|
|
||||||
--- doc/enfuse.texi.orig Sat Jul 10 11:04:11 2010
|
|
||||||
+++ doc/enfuse.texi Sat Jul 10 11:04:22 2010
|
|
||||||
@@ -599,7 +599,7 @@ details, like the extra features that have been compil
|
|
||||||
@itemx --wrap=@var{MODE}
|
|
||||||
@opindex -w
|
|
||||||
@opindex --wrap
|
|
||||||
-@cindex 360@textdegree{} panoramas
|
|
||||||
+@cindex 360-degree panoramas
|
|
||||||
@cindex wrap around
|
|
||||||
Blend around the boundaries of the panorama.
|
|
||||||
|
|
||||||
@@ -672,7 +672,7 @@ $$
|
|
||||||
$$
|
|
||||||
@end tex
|
|
||||||
|
|
||||||
-This is useful for 360@textdegree{} horizontal panoramas as it
|
|
||||||
+This is useful for 360-degree horizontal panoramas as it
|
|
||||||
eliminates the left and right borders.
|
|
||||||
|
|
||||||
@item vertical
|
|
||||||
@@ -727,7 +727,7 @@ $$
|
|
||||||
$$
|
|
||||||
@end tex
|
|
||||||
|
|
||||||
-This is useful for 360@textdegree{} vertical panoramas, as it
|
|
||||||
+This is useful for 360-degree vertical panoramas, as it
|
|
||||||
eliminates the top and bottom borders.
|
|
||||||
|
|
||||||
@item both
|
|
@ -1,16 +0,0 @@
|
|||||||
$OpenBSD: patch-src_DefaultSig_pm,v 1.1 2014/03/21 00:56:09 sthen Exp $
|
|
||||||
|
|
||||||
Fix with perl 5.18
|
|
||||||
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=719867
|
|
||||||
|
|
||||||
--- src/DefaultSig.pm.orig Fri Mar 21 00:54:01 2014
|
|
||||||
+++ src/DefaultSig.pm Fri Mar 21 00:54:11 2014
|
|
||||||
@@ -19,7 +19,7 @@ use Sys::Hostname;
|
|
||||||
|
|
||||||
our %HAVE_MODULE;
|
|
||||||
BEGIN {
|
|
||||||
- foreach my $module qw(Time::Zone) {
|
|
||||||
+ foreach my $module (qw(Time::Zone)) {
|
|
||||||
eval "use $module ()"; # import, but keep module's original name space for clarity
|
|
||||||
$HAVE_MODULE{$module} = $EVAL_ERROR eq '';
|
|
||||||
}
|
|
@ -1,21 +1,21 @@
|
|||||||
$OpenBSD: patch-src_Makefile_in,v 1.2 2010/07/11 20:09:00 sthen Exp $
|
$OpenBSD: patch-src_Makefile_in,v 1.3 2016/11/24 08:16:03 kirby Exp $
|
||||||
--- src/Makefile.in.orig Wed Nov 25 09:16:30 2009
|
--- src/Makefile.in.orig Tue Mar 29 10:56:09 2016
|
||||||
+++ src/Makefile.in Fri Nov 27 23:55:41 2009
|
+++ src/Makefile.in Sun Nov 20 20:24:40 2016
|
||||||
@@ -375,7 +375,7 @@ distclean-compile:
|
@@ -652,7 +652,7 @@ distclean-compile:
|
||||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||||
|
|
||||||
enblend-enblend.o: enblend.cc
|
enblend-enblend.o: enblend.cc
|
||||||
-@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(enblend_CXXFLAGS) $(CXXFLAGS) -MT enblend-enblend.o -MD -MP -MF $(DEPDIR)/enblend-enblend.Tpo -c -o enblend-enblend.o `test -f 'enblend.cc' || echo '$(srcdir)/'`enblend.cc
|
-@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(enblend_CXXFLAGS) $(CXXFLAGS) -MT enblend-enblend.o -MD -MP -MF $(DEPDIR)/enblend-enblend.Tpo -c -o enblend-enblend.o `test -f 'enblend.cc' || echo '$(srcdir)/'`enblend.cc
|
||||||
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(enblend_CXXFLAGS) $(CXXFLAGS) $(CXXNOOPT) -MT enblend-enblend.o -MD -MP -MF $(DEPDIR)/enblend-enblend.Tpo -c -o enblend-enblend.o `test -f 'enblend.cc' || echo '$(srcdir)/'`enblend.cc
|
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(enblend_CXXFLAGS) $(CXXFLAGS) $(CXXNOOPT) -MT enblend-enblend.o -MD -MP -MF $(DEPDIR)/enblend-enblend.Tpo -c -o enblend-enblend.o `test -f 'enblend.cc' || echo '$(srcdir)/'`enblend.cc
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/enblend-enblend.Tpo $(DEPDIR)/enblend-enblend.Po
|
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/enblend-enblend.Tpo $(DEPDIR)/enblend-enblend.Po
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='enblend.cc' object='enblend-enblend.o' libtool=no @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='enblend.cc' object='enblend-enblend.o' libtool=no @AMDEPBACKSLASH@
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
@@ -473,7 +473,7 @@ enblend-tiff_message.obj: tiff_message.cc
|
@@ -848,7 +848,7 @@ enfuse-exposure_weight.obj: exposure_weight.cc
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(enblend_CXXFLAGS) $(CXXFLAGS) -c -o enblend-tiff_message.obj `if test -f 'tiff_message.cc'; then $(CYGPATH_W) 'tiff_message.cc'; else $(CYGPATH_W) '$(srcdir)/tiff_message.cc'; fi`
|
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(enfuse_CXXFLAGS) $(CXXFLAGS) -c -o enfuse-exposure_weight.obj `if test -f 'exposure_weight.cc'; then $(CYGPATH_W) 'exposure_weight.cc'; else $(CYGPATH_W) '$(srcdir)/exposure_weight.cc'; fi`
|
||||||
|
|
||||||
enfuse-enfuse.o: enfuse.cc
|
enfuse-enfuse.o: enfuse.cc
|
||||||
-@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(enfuse_CXXFLAGS) $(CXXFLAGS) -MT enfuse-enfuse.o -MD -MP -MF $(DEPDIR)/enfuse-enfuse.Tpo -c -o enfuse-enfuse.o `test -f 'enfuse.cc' || echo '$(srcdir)/'`enfuse.cc
|
-@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(enfuse_CXXFLAGS) $(CXXFLAGS) -MT enfuse-enfuse.o -MD -MP -MF $(DEPDIR)/enfuse-enfuse.Tpo -c -o enfuse-enfuse.o `test -f 'enfuse.cc' || echo '$(srcdir)/'`enfuse.cc
|
||||||
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(enfuse_CXXFLAGS) $(CXXFLAGS) $(CXXNOOPT) -MT enfuse-enfuse.o -MD -MP -MF $(DEPDIR)/enfuse-enfuse.Tpo -c -o enfuse-enfuse.o `test -f 'enfuse.cc' || echo '$(srcdir)/'`enfuse.cc
|
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(enfuse_CXXFLAGS) $(CXXFLAGS) $(CXXNOOPT) -MT enfuse-enfuse.o -MD -MP -MF $(DEPDIR)/enfuse-enfuse.Tpo -c -o enfuse-enfuse.o `test -f 'enfuse.cc' || echo '$(srcdir)/'`enfuse.cc
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/enfuse-enfuse.Tpo $(DEPDIR)/enfuse-enfuse.Po
|
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/enfuse-enfuse.Tpo $(DEPDIR)/enfuse-enfuse.Po
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='enfuse.cc' object='enfuse-enfuse.o' libtool=no @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='enfuse.cc' object='enfuse-enfuse.o' libtool=no @AMDEPBACKSLASH@
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
|
14
graphics/enblend-enfuse/patches/patch-src_enblend_cc
Normal file
14
graphics/enblend-enfuse/patches/patch-src_enblend_cc
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
$OpenBSD: patch-src_enblend_cc,v 1.5 2016/11/24 08:16:03 kirby Exp $
|
||||||
|
--- src/enblend.cc.orig Sun Nov 20 21:55:15 2016
|
||||||
|
+++ src/enblend.cc Sun Nov 20 21:55:28 2016
|
||||||
|
@@ -1827,10 +1827,6 @@ int main(int argc, char** argv)
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (parameter::as_boolean("dump-global-variables", false)) {
|
||||||
|
- DUMP_GLOBAL_VARIABLES();
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
sig.check();
|
||||||
|
|
||||||
|
for (enblend::TraceableFileNameList::iterator i = inputTraceableFileNameList.begin();
|
14
graphics/enblend-enfuse/patches/patch-src_enfuse_cc
Normal file
14
graphics/enblend-enfuse/patches/patch-src_enfuse_cc
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
$OpenBSD: patch-src_enfuse_cc,v 1.5 2016/11/24 08:16:03 kirby Exp $
|
||||||
|
--- src/enfuse.cc.orig Sun Nov 20 21:54:29 2016
|
||||||
|
+++ src/enfuse.cc Sun Nov 20 21:54:40 2016
|
||||||
|
@@ -2060,10 +2060,6 @@ int main(int argc, char** argv)
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (parameter::as_boolean("dump-global-variables", false)) {
|
||||||
|
- DUMP_GLOBAL_VARIABLES();
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
sig.check();
|
||||||
|
|
||||||
|
for (enblend::TraceableFileNameList::iterator i = inputTraceableFileNameList.begin();
|
@ -1,272 +0,0 @@
|
|||||||
$OpenBSD: patch-src_vigra_impex_png_cxx,v 1.1 2011/07/08 20:37:01 naddy Exp $
|
|
||||||
|
|
||||||
Fix build with png-1.5.
|
|
||||||
http://enblend.hg.sourceforge.net/hgweb/enblend/enblend/diff/9d9b5f3a97cd/src/vigra_impex/png.cxx
|
|
||||||
http://enblend.hg.sourceforge.net/hgweb/enblend/enblend/diff/101796703d73/src/vigra_impex/png.cxx
|
|
||||||
|
|
||||||
--- src/vigra_impex/png.cxx.orig Sun Dec 20 08:32:28 2009
|
|
||||||
+++ src/vigra_impex/png.cxx Tue Jul 5 12:47:50 2011
|
|
||||||
@@ -65,10 +65,20 @@ extern "C"
|
|
||||||
#include <png.h>
|
|
||||||
}
|
|
||||||
|
|
||||||
+#define STRINGIFY(m_argument) #m_argument
|
|
||||||
+
|
|
||||||
#if PNG_LIBPNG_VER < 10201
|
|
||||||
#error "please update your libpng to at least 1.2.1"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+#if PNG_LIBPNG_VER >= 10400
|
|
||||||
+#define PNG_SET_EXPAND_GRAY_1_2_4_TO_8_NAME png_set_expand_gray_1_2_4_to_8
|
|
||||||
+#else
|
|
||||||
+#define PNG_SET_EXPAND_GRAY_1_2_4_TO_8_NAME png_set_gray_1_2_4_to_8
|
|
||||||
+#endif
|
|
||||||
+#define PNG_SET_EXPAND_GRAY_1_2_4_TO_8_FUNCTION_NAME STRINGIFY(PNG_SET_EXPAND_GRAY_1_2_4_TO_8_NAME)
|
|
||||||
+#define PNG_SET_EXPAND_GRAY_1_2_4_TO_8(m_image) PNG_SET_EXPAND_GRAY_1_2_4_TO_8_NAME(m_image)
|
|
||||||
+
|
|
||||||
// TODO: per-scanline reading/writing
|
|
||||||
|
|
||||||
namespace {
|
|
||||||
@@ -81,7 +91,7 @@ extern "C" {
|
|
||||||
static void PngError( png_structp png_ptr, png_const_charp error_msg )
|
|
||||||
{
|
|
||||||
png_error_message = std::string(error_msg);
|
|
||||||
- longjmp( png_ptr->jmpbuf, 1 );
|
|
||||||
+ longjmp( png_jmpbuf(png_ptr), 1 );
|
|
||||||
}
|
|
||||||
|
|
||||||
// called on non-fatal errors
|
|
||||||
@@ -203,9 +213,9 @@ namespace vigra {
|
|
||||||
// check if the file is a png file
|
|
||||||
const unsigned int sig_size = 8;
|
|
||||||
png_byte sig[sig_size];
|
|
||||||
- std::fread( sig, sig_size, 1, file.get() );
|
|
||||||
+ std::size_t readCount = std::fread( sig, sig_size, 1, file.get() );
|
|
||||||
const int no_png = png_sig_cmp( sig, 0, sig_size );
|
|
||||||
- vigra_precondition( !no_png, "given file is not a png file.");
|
|
||||||
+ vigra_precondition( (readCount == 1) && !no_png, "given file is not a png file.");
|
|
||||||
|
|
||||||
// create png read struct with user defined handlers
|
|
||||||
png = png_create_read_struct( PNG_LIBPNG_VER_STRING, NULL,
|
|
||||||
@@ -213,7 +223,7 @@ namespace vigra {
|
|
||||||
vigra_postcondition( png != 0, "could not create the read struct." );
|
|
||||||
|
|
||||||
// create info struct
|
|
||||||
- if (setjmp(png->jmpbuf)) {
|
|
||||||
+ if (setjmp(png_jmpbuf(png))) {
|
|
||||||
png_destroy_read_struct( &png, &info, NULL );
|
|
||||||
vigra_postcondition( false, png_error_message.insert(0, "error in png_create_info_struct(): ").c_str() );
|
|
||||||
}
|
|
||||||
@@ -221,14 +231,14 @@ namespace vigra {
|
|
||||||
vigra_postcondition( info != 0, "could not create the info struct." );
|
|
||||||
|
|
||||||
// init png i/o
|
|
||||||
- if (setjmp(png->jmpbuf)) {
|
|
||||||
+ if (setjmp(png_jmpbuf(png))) {
|
|
||||||
png_destroy_read_struct( &png, &info, NULL );
|
|
||||||
vigra_postcondition( false, png_error_message.insert(0, "error in png_init_io(): ").c_str() );
|
|
||||||
}
|
|
||||||
png_init_io( png, file.get() );
|
|
||||||
|
|
||||||
// specify that the signature was already read
|
|
||||||
- if (setjmp(png->jmpbuf)) {
|
|
||||||
+ if (setjmp(png_jmpbuf(png))) {
|
|
||||||
png_destroy_read_struct( &png, &info, NULL );
|
|
||||||
vigra_postcondition( false, png_error_message.insert(0, "error in png_set_sig_bytes(): ").c_str() );
|
|
||||||
}
|
|
||||||
@@ -244,13 +254,13 @@ namespace vigra {
|
|
||||||
void PngDecoderImpl::init()
|
|
||||||
{
|
|
||||||
// read all chunks up to the image data
|
|
||||||
- if (setjmp(png->jmpbuf))
|
|
||||||
+ if (setjmp(png_jmpbuf(png)))
|
|
||||||
vigra_postcondition( false, png_error_message.insert(0, "error in png_read_info(): ").c_str() );
|
|
||||||
png_read_info( png, info );
|
|
||||||
|
|
||||||
// pull over the header fields
|
|
||||||
int interlace_method, compression_method, filter_method;
|
|
||||||
- if (setjmp(png->jmpbuf))
|
|
||||||
+ if (setjmp(png_jmpbuf(png)))
|
|
||||||
vigra_postcondition( false, png_error_message.insert(0, "error in png_get_IHDR(): ").c_str() );
|
|
||||||
png_get_IHDR( png, info, &width, &height, &bit_depth, &color_type,
|
|
||||||
&interlace_method, &compression_method, &filter_method );
|
|
||||||
@@ -264,7 +274,7 @@ namespace vigra {
|
|
||||||
|
|
||||||
// transform palette to rgb
|
|
||||||
if ( color_type == PNG_COLOR_TYPE_PALETTE) {
|
|
||||||
- if (setjmp(png->jmpbuf))
|
|
||||||
+ if (setjmp(png_jmpbuf(png)))
|
|
||||||
vigra_postcondition( false, png_error_message.insert(0, "error in png_palette_to_rgb(): ").c_str() );
|
|
||||||
png_set_palette_to_rgb(png);
|
|
||||||
color_type = PNG_COLOR_TYPE_RGB;
|
|
||||||
@@ -273,9 +283,9 @@ namespace vigra {
|
|
||||||
|
|
||||||
// expand gray values to at least one byte size
|
|
||||||
if ( color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8 ) {
|
|
||||||
- if (setjmp(png->jmpbuf))
|
|
||||||
- vigra_postcondition( false,png_error_message.insert(0, "error in png_set_gray_1_2_4_to_8(): ").c_str());
|
|
||||||
- png_set_gray_1_2_4_to_8(png);
|
|
||||||
+ if (setjmp(png_jmpbuf(png)))
|
|
||||||
+ vigra_postcondition( false, png_error_message.insert(0, "error in " PNG_SET_EXPAND_GRAY_1_2_4_TO_8_FUNCTION_NAME " (): ").c_str());
|
|
||||||
+ PNG_SET_EXPAND_GRAY_1_2_4_TO_8(png);
|
|
||||||
bit_depth = 8;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -283,7 +293,7 @@ namespace vigra {
|
|
||||||
#if 0
|
|
||||||
// strip alpha channel
|
|
||||||
if ( color_type & PNG_COLOR_MASK_ALPHA ) {
|
|
||||||
- if (setjmp(png->jmpbuf))
|
|
||||||
+ if (setjmp(png_jmpbuf(png)))
|
|
||||||
vigra_postcondition( false, png_error_message.insert(0, "error in png_set_strip_alpha(): ").c_str() );
|
|
||||||
png_set_strip_alpha(png);
|
|
||||||
color_type ^= PNG_COLOR_MASK_ALPHA;
|
|
||||||
@@ -325,9 +335,13 @@ namespace vigra {
|
|
||||||
#if (PNG_LIBPNG_VER > 10008) && defined(PNG_READ_iCCP_SUPPORTED)
|
|
||||||
char * dummyName;
|
|
||||||
int dummyCompType;
|
|
||||||
+#if (PNG_LIBPNG_VER < 10500)
|
|
||||||
char * profilePtr;
|
|
||||||
+#else
|
|
||||||
+ png_byte * profilePtr;
|
|
||||||
+#endif
|
|
||||||
png_uint_32 profileLen;
|
|
||||||
- if (info->valid & PNG_INFO_iCCP) {
|
|
||||||
+ if (png_get_valid( png, info, PNG_INFO_iCCP )) {
|
|
||||||
png_get_iCCP(png, info, &dummyName, &dummyCompType, &profilePtr, &profileLen) ;
|
|
||||||
iccProfilePtr = (unsigned char *) profilePtr;
|
|
||||||
iccProfileLength = profileLen;
|
|
||||||
@@ -340,7 +354,7 @@ namespace vigra {
|
|
||||||
// image gamma
|
|
||||||
double image_gamma = 0.45455;
|
|
||||||
if ( png_get_valid( png, info, PNG_INFO_gAMA ) ) {
|
|
||||||
- if (setjmp(png->jmpbuf))
|
|
||||||
+ if (setjmp(png_jmpbuf(png)))
|
|
||||||
vigra_postcondition( false, png_error_message.insert(0, "error in png_get_gAMA(): ").c_str() );
|
|
||||||
png_get_gAMA( png, info, &image_gamma );
|
|
||||||
}
|
|
||||||
@@ -349,26 +363,26 @@ namespace vigra {
|
|
||||||
double screen_gamma = 2.2;
|
|
||||||
|
|
||||||
// set gamma correction
|
|
||||||
- if (setjmp(png->jmpbuf))
|
|
||||||
+ if (setjmp(png_jmpbuf(png)))
|
|
||||||
vigra_postcondition( false, png_error_message.insert(0, "error in png_set_gamma(): ").c_str() );
|
|
||||||
png_set_gamma( png, screen_gamma, image_gamma );
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// interlace handling, get number of read passes needed
|
|
||||||
- if (setjmp(png->jmpbuf))
|
|
||||||
+ if (setjmp(png_jmpbuf(png)))
|
|
||||||
vigra_postcondition( false,png_error_message.insert(0, "error in png_set_interlace_handling(): ").c_str());
|
|
||||||
n_interlace_passes = png_set_interlace_handling(png);
|
|
||||||
|
|
||||||
// update png library state to reflect any changes that were made
|
|
||||||
- if (setjmp(png->jmpbuf))
|
|
||||||
+ if (setjmp(png_jmpbuf(png)))
|
|
||||||
vigra_postcondition( false, png_error_message.insert(0, "error in png_read_update_info(): ").c_str() );
|
|
||||||
png_read_update_info( png, info );
|
|
||||||
|
|
||||||
- if (setjmp(png->jmpbuf))
|
|
||||||
+ if (setjmp(png_jmpbuf(png)))
|
|
||||||
vigra_postcondition( false,png_error_message.insert(0, "error in png_get_channels(): ").c_str());
|
|
||||||
n_channels = png_get_channels(png, info);
|
|
||||||
|
|
||||||
- if (setjmp(png->jmpbuf))
|
|
||||||
+ if (setjmp(png_jmpbuf(png)))
|
|
||||||
vigra_postcondition( false,png_error_message.insert(0, "error in png_get_rowbytes(): ").c_str());
|
|
||||||
rowsize = png_get_rowbytes(png, info);
|
|
||||||
|
|
||||||
@@ -378,9 +392,10 @@ namespace vigra {
|
|
||||||
|
|
||||||
void PngDecoderImpl::nextScanline()
|
|
||||||
{
|
|
||||||
- for (int i=0; i < n_interlace_passes; i++) {
|
|
||||||
- if (setjmp(png->jmpbuf))
|
|
||||||
- vigra_postcondition( false,png_error_message.insert(0, "error in png_read_row(): ").c_str());
|
|
||||||
+ if (setjmp(png_jmpbuf(png)))
|
|
||||||
+ vigra_postcondition( false,png_error_message.insert(0, "error in png_read_row(): ").c_str());
|
|
||||||
+ for (int i=0; i < n_interlace_passes; i++)
|
|
||||||
+ {
|
|
||||||
png_read_row(png, row_data.begin(), NULL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -545,7 +560,7 @@ namespace vigra {
|
|
||||||
vigra_postcondition( png != 0, "could not create the write struct." );
|
|
||||||
|
|
||||||
// create info struct
|
|
||||||
- if (setjmp(png->jmpbuf)) {
|
|
||||||
+ if (setjmp(png_jmpbuf(png))) {
|
|
||||||
png_destroy_write_struct( &png, &info );
|
|
||||||
vigra_postcondition( false, png_error_message.insert(0, "error in png_info_struct(): ").c_str() );
|
|
||||||
}
|
|
||||||
@@ -556,7 +571,7 @@ namespace vigra {
|
|
||||||
}
|
|
||||||
|
|
||||||
// init png i/o
|
|
||||||
- if (setjmp(png->jmpbuf)) {
|
|
||||||
+ if (setjmp(png_jmpbuf(png))) {
|
|
||||||
png_destroy_write_struct( &png, &info );
|
|
||||||
vigra_postcondition( false, png_error_message.insert(0, "error in png_init_io(): ").c_str() );
|
|
||||||
}
|
|
||||||
@@ -571,7 +586,7 @@ namespace vigra {
|
|
||||||
void PngEncoderImpl::finalize()
|
|
||||||
{
|
|
||||||
// write the IHDR
|
|
||||||
- if (setjmp(png->jmpbuf))
|
|
||||||
+ if (setjmp(png_jmpbuf(png)))
|
|
||||||
vigra_postcondition( false, png_error_message.insert(0, "error in png_set_IHDR(): ").c_str() );
|
|
||||||
png_set_IHDR( png, info, width, height, bit_depth, color_type,
|
|
||||||
PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT,
|
|
||||||
@@ -579,7 +594,7 @@ namespace vigra {
|
|
||||||
|
|
||||||
// set resolution
|
|
||||||
if (x_resolution > 0 && y_resolution > 0) {
|
|
||||||
- if (setjmp(png->jmpbuf))
|
|
||||||
+ if (setjmp(png_jmpbuf(png)))
|
|
||||||
vigra_postcondition( false, png_error_message.insert(0, "error in png_set_pHYs(): ").c_str() );
|
|
||||||
png_set_pHYs(png, info, (png_uint_32) (x_resolution / 0.0254 + 0.5),
|
|
||||||
(png_uint_32) (y_resolution / 0.0254 + 0.5),
|
|
||||||
@@ -588,7 +603,7 @@ namespace vigra {
|
|
||||||
|
|
||||||
// set offset
|
|
||||||
if (position.x > 0 && position.y > 0) {
|
|
||||||
- if (setjmp(png->jmpbuf))
|
|
||||||
+ if (setjmp(png_jmpbuf(png)))
|
|
||||||
vigra_postcondition( false, png_error_message.insert(0, "error in png_set_oFFs(): ").c_str() );
|
|
||||||
png_set_oFFs(png, info, position.x, position.y, PNG_OFFSET_PIXEL);
|
|
||||||
}
|
|
||||||
@@ -596,13 +611,17 @@ namespace vigra {
|
|
||||||
#if (PNG_LIBPNG_VER > 10008) && defined(PNG_WRITE_iCCP_SUPPORTED)
|
|
||||||
// set icc profile
|
|
||||||
if (iccProfile.size() > 0) {
|
|
||||||
- png_set_iCCP(png, info, "icc", 0,
|
|
||||||
- (char *)iccProfile.begin(), iccProfile.size());
|
|
||||||
+ png_set_iCCP(png, info, (png_charp)("icc"), 0,
|
|
||||||
+#if (PNG_LIBPNG_VER < 10500)
|
|
||||||
+ (png_charp)iccProfile.begin(), (png_uint_32)iccProfile.size());
|
|
||||||
+#else
|
|
||||||
+ (png_byte*)iccProfile.begin(), (png_uint_32)iccProfile.size());
|
|
||||||
+#endif
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// write the info struct
|
|
||||||
- if (setjmp(png->jmpbuf))
|
|
||||||
+ if (setjmp(png_jmpbuf(png)))
|
|
||||||
vigra_postcondition( false, png_error_message.insert(0, "error in png_write_info(): ").c_str() );
|
|
||||||
png_write_info( png, info );
|
|
||||||
|
|
||||||
@@ -634,10 +653,10 @@ namespace vigra {
|
|
||||||
}
|
|
||||||
|
|
||||||
// write the whole image
|
|
||||||
- if (setjmp(png->jmpbuf))
|
|
||||||
+ if (setjmp(png_jmpbuf(png)))
|
|
||||||
vigra_postcondition( false, png_error_message.insert(0, "error in png_write_image(): ").c_str() );
|
|
||||||
png_write_image( png, row_pointers.begin() );
|
|
||||||
- if (setjmp(png->jmpbuf))
|
|
||||||
+ if (setjmp(png_jmpbuf(png)))
|
|
||||||
vigra_postcondition( false, png_error_message.insert(0, "error in png_write_end(): ").c_str() );
|
|
||||||
png_write_end(png, info);
|
|
||||||
}
|
|
@ -1,7 +1,5 @@
|
|||||||
@comment $OpenBSD: PLIST,v 1.2 2010/07/11 20:09:00 sthen Exp $
|
@comment $OpenBSD: PLIST,v 1.3 2016/11/24 08:16:03 kirby Exp $
|
||||||
@bin bin/enblend
|
@bin bin/enblend
|
||||||
@bin bin/enfuse
|
@bin bin/enfuse
|
||||||
@info info/enblend.info
|
|
||||||
@info info/enfuse.info
|
|
||||||
@man man/man1/enblend.1
|
@man man/man1/enblend.1
|
||||||
@man man/man1/enfuse.1
|
@man man/man1/enfuse.1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user