svn commit: r358483 - in head/graphics/pfscalibration: . files

Danilo Egea Gondolfo danilo at FreeBSD.org
Fri Jun 20 00:40:46 UTC 2014


Author: danilo
Date: Fri Jun 20 00:40:44 2014
New Revision: 358483
URL: http://svnweb.freebsd.org/changeset/ports/358483
QAT: https://qat.redports.org/buildarchive/r358483/

Log:
  - Update from 1.3 to 1.4
  - Add stage support
  - Convert LIB_DEPENDS to new syntax
  
  PR:		ports/191183
  Submitted by:	ii at any.com.ru

Added:
  head/graphics/pfscalibration/files/patch-configure   (contents, props changed)
  head/graphics/pfscalibration/files/patch-src-responses.cpp   (contents, props changed)
Deleted:
  head/graphics/pfscalibration/files/patch-src-robertson02.cpp
  head/graphics/pfscalibration/files/patch-src-robertson02.h
Modified:
  head/graphics/pfscalibration/Makefile
  head/graphics/pfscalibration/distinfo
  head/graphics/pfscalibration/files/patch-src-jpeg2hdrgen
  head/graphics/pfscalibration/files/patch-src-pfshdrcalibrate.cpp
  head/graphics/pfscalibration/pkg-plist

Modified: head/graphics/pfscalibration/Makefile
==============================================================================
--- head/graphics/pfscalibration/Makefile	Fri Jun 20 00:29:42 2014	(r358482)
+++ head/graphics/pfscalibration/Makefile	Fri Jun 20 00:40:44 2014	(r358483)
@@ -2,10 +2,10 @@
 # $FreeBSD$
 
 PORTNAME=	pfscalibration
-PORTVERSION=	1.3
-PORTREVISION=	4
+PORTVERSION=	1.4
 CATEGORIES=	graphics
-MASTER_SITES=	SF/pfstools/${PORTNAME}/${PORTVERSION}
+MASTER_SITES=	SF
+MASTER_SITE_SUBDIR=	pfstools/${PORTNAME}/${PORTVERSION}
 
 MAINTAINER=	ii at any.com.ru
 COMMENT=	Photometric calibration of cameras and recovery HDR images from the set of LDR exposures
@@ -15,18 +15,16 @@ PFS_LDFLAGS=	-L${LOCALBASE}/lib
 
 USES=		gmake pkgconfig shebangfix perl5
 GNU_CONFIGURE=	yes
-CPPFLAGS+=	${PFS_CPPFLAGS}
-LDFLAGS+=	${PFS_LDFLAGS}
+CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
+CONFIGURE_ENV=	CPPFLAGS="${PFS_CPPFLAGS}" \
+		LDFLAGS="${PFS_LDFLAGS}"
 
-LIB_DEPENDS=	pfs-1.2:${PORTSDIR}/graphics/pfstools
+USE_PERL5=	run
 
-MAN1=		jpeg2hdrgen.1 \
-		dcraw2hdrgen.1 \
-		pfsinhdrgen.1 \
-		pfshdrcalibrate.1
-
-SHEBANG_FILES=	src/dcraw2hdrgen src/jpeg2hdrgen
+SHEBANG_FILES=	src/dcraw2hdrgen src/jpeg2hdrgen src/pfsinhdrgen
 bash_CMD=	${SH}
 
-NO_STAGE=	yes
+LIB_DEPENDS=	libpfs-1.2.so:${PORTSDIR}/graphics/pfstools
+
 .include <bsd.port.mk>
+

Modified: head/graphics/pfscalibration/distinfo
==============================================================================
--- head/graphics/pfscalibration/distinfo	Fri Jun 20 00:29:42 2014	(r358482)
+++ head/graphics/pfscalibration/distinfo	Fri Jun 20 00:40:44 2014	(r358483)
@@ -1,2 +1,2 @@
-SHA256 (pfscalibration-1.3.tar.gz) = 4ced5e1ff45a9e3a02592b002c008c2c974b9d80762198e71e678e4c16e1b754
-SIZE (pfscalibration-1.3.tar.gz) = 306650
+SHA256 (pfscalibration-1.4.tar.gz) = 81982620c6dfd1d790e83f083e8740bfe1f34d25508054b931353d5de671db9e
+SIZE (pfscalibration-1.4.tar.gz) = 338786

Added: head/graphics/pfscalibration/files/patch-configure
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/pfscalibration/files/patch-configure	Fri Jun 20 00:40:44 2014	(r358483)
@@ -0,0 +1,11 @@
+--- configure.orig	2008-08-21 22:57:21.000000000 +0000
++++ configure	2014-06-18 15:27:53.728960364 +0000
+@@ -19337,7 +19337,7 @@
+ 
+ 
+ 
+-CXXFLAGS="-O3 -funroll-loops -fstrength-reduce -fschedule-insns2 -felide-constructors -frerun-loop-opt -fexceptions -fno-strict-aliasing -fexpensive-optimizations -ffast-math -pipe"
++CXXFLAGS="-O3 -funroll-loops -fstrength-reduce -felide-constructors -fexceptions -fno-strict-aliasing -fexpensive-optimizations -ffast-math -pipe"
+ 
+ 
+ 

Modified: head/graphics/pfscalibration/files/patch-src-jpeg2hdrgen
==============================================================================
--- head/graphics/pfscalibration/files/patch-src-jpeg2hdrgen	Fri Jun 20 00:29:42 2014	(r358482)
+++ head/graphics/pfscalibration/files/patch-src-jpeg2hdrgen	Fri Jun 20 00:40:44 2014	(r358483)
@@ -1,6 +1,6 @@
---- src/jpeg2hdrgen.orig	Wed Aug 23 07:25:58 2006
-+++ src/jpeg2hdrgen	Thu Jun 21 14:34:33 2007
-@@ -28,18 +28,25 @@
+--- src/jpeg2hdrgen.orig	2006-08-22 18:34:04.000000000 +0000
++++ src/jpeg2hdrgen	2014-06-18 15:27:14.288956550 +0000
+@@ -28,53 +28,105 @@
  export LC_ALL
  
  
@@ -11,86 +11,125 @@
 -    echo "Program 'jhead' is required to run this script."
 -    echo "Install appropriate software, for example from:"
 -    echo "http://www.sentex.net/~mwandel/jhead/"
-+JHEAD='jhead'                   # program for extracting exif info from jpegs
-+EXIF='exif'                     # another one
-+EXIV2='exiv2'                   # and one more
-+
-+CMD=`which ${JHEAD}`
-+[ -n "${CMD}" ] || CMD=`which ${EXIF}`
-+[ -n "${CMD}" ] || CMD=`which ${EXIV2}`
-+if [ -z "${CMD}" ]
-+then
-+    cat <<MSG
-+One of the following commands are required to run this script:
-+ '${JHEAD}' - stand-alone program (http://www.sentex.net/~mwandel/jhead/)
-+ '${EXIF}'  - part of libexif project (http://sf.net/projects/libexif/)
-+ '${EXIV2}' - part of exiv2 project (http://www.exiv2.org/)
-+MSG
-     exit 1;
- fi
- 
+-    exit 1;
+-fi
+-
 -#Note: Double backslash MUST be put in front of each $ sign
 -AWK_PROGRAM=`cat <<EOF
-+AWK_PROGRAM='
++AWK_PROGRAM_COMMON='
  BEGIN {
    exposure="";
    aperture="";
-@@ -58,23 +65,49 @@
+ }
+ 
+ END {
+-  if( aperture=="" )
++  if (aperture=="")
+     aperture=1;
+ 
+-  if( iso_speed=="" )
++  if (iso_speed=="")
+     iso_speed=100;
+     
+-  if( exposure=="" )
++  if (exposure=="")
+     printf("not recognized exif header!\n");
+   else
      print exposure " " aperture " " iso_speed " 0";
  }
  
++'
 +## jhead output
++AWK_PROGRAM_JHEAD='
  /^Exposure time: ([0-9]*\.[0-9]) */ {
 -  exposure = 1/\\$3;
 +  exposure = 1/$3;
++  next;
  }
 -
  /^Aperture *: f\/([0-9]*\.[0-9]*)/ {
 -  aperture = substr(\\$3,3);
 +  aperture = substr($3,3);
++  next;
  }
 -
  /^ISO equiv. *: ([0-9]*\.?[0-9]*)/ {
 -  iso_speed = \\$4;
 +  iso_speed = $4;
- }
- 
--EOF`
++  next;
++}'
++
 +## exif output
++AWK_PROGRAM_EXIF='
 +/^Exposure Time *\|.+ sec\./ {
 +  if (split(substr($3,2),a,"/") == 2)
 +    exposure = a[2];
 +  else
 +    exposure = 1/a[1];
-+}
++  next;
+ }
 +/^FNumber *\|f\/.+/ {
-+    aperture = substr($2,4);
++  aperture = substr($2,4);
++  next;
 +}
 +/^ISO Speed Ratings *\|.+/ {
-+    iso_speed = substr($4,2);
-+}
++  iso_speed = substr($4,2);
++  next;
++}'
++
++## exiv2 output
++AWK_PROGRAM_EXIV2='
++/^ExposureTime *.+/ {
++  if (split($2,a,"/") == 2)
++    exposure = a[2]/a[1];
++  next;
++}
++/^FNumber *.+/ {
++  if (split($2,a,"/") == 2)
++    aperture = a[1]/a[2];
++  next;
++}
++/^ISOSpeedRatings *.+/ {
++  iso_speed = $2;
++  next;
++}'
++
++JHEAD='jhead'                   # program for extracting exif info from jpegs
++EXIV2='exiv2'                   # another one
++EXIF='exif'                     # and one more
++
++if which ${JHEAD} >/dev/null
++then
++    CMD="$(which ${JHEAD})"
++    AWK_PROGRAM="${AWK_PROGRAM_COMMON}${AWK_PROGRAM_JHEAD}"
++elif which ${EXIV2} >/dev/null
++then
++    CMD="$(which ${EXIV2}) -P nv pr"
++    AWK_PROGRAM="${AWK_PROGRAM_COMMON}${AWK_PROGRAM_EXIV2}"
++elif which ${EXIF} >/dev/null
++then
++    CMD="$(which ${EXIF})"
++    AWK_PROGRAM="${AWK_PROGRAM_COMMON}${AWK_PROGRAM_EXIF}"
++else
++    cat <<MSG
++One of the following commands are required to run this script:
++ '${JHEAD}' - stand-alone program (http://www.sentex.net/~mwandel/jhead/)
++ '${EXIV2}' - part of exiv2 project (http://www.exiv2.org/)
++ '${EXIF}'  - part of libexif project (http://sf.net/projects/libexif/)
++MSG
++    exit 1;
++fi
  
+-EOF`
+-
 -while [ "$1" != "" ]; do
 -    EXPOSURE_INFO=`$JHEAD $1 | awk "$AWK_PROGRAM"`
 -    echo $1 $EXPOSURE_INFO
-+## exiv2 output
-+/^Exposure time *: .+ s/ {
-+  if (split($4,a,"/") == 2)
-+    exposure = a[2];
-+  else
-+    exposure = 1/a[1];
-+}
-+/^Aperture *: F.+/ {
-+    aperture = substr($3,2);
-+}
-+/^ISO speed *: .+/ {
-+    iso_speed = $4;
-+}
-+'
- 
+-
 +while [ ${#} -ne 0 ]
 +do
 +    printf "${1} "
 +    ${CMD} "${1}" | awk "${AWK_PROGRAM}"
      shift
- done 
+-done 
++done

Modified: head/graphics/pfscalibration/files/patch-src-pfshdrcalibrate.cpp
==============================================================================
--- head/graphics/pfscalibration/files/patch-src-pfshdrcalibrate.cpp	Fri Jun 20 00:29:42 2014	(r358482)
+++ head/graphics/pfscalibration/files/patch-src-pfshdrcalibrate.cpp	Fri Jun 20 00:40:44 2014	(r358483)
@@ -1,99 +1,22 @@
---- src/pfshdrcalibrate.cpp.orig	Wed Aug 23 14:49:59 2006
-+++ src/pfshdrcalibrate.cpp	Thu Jun 21 14:40:28 2007
-@@ -108,7 +108,7 @@
-     { "help", no_argument, NULL, 'h' },
-     { "verbose", no_argument, NULL, 'v' },
-     { "luminance", no_argument, NULL, 'Y' },
--    { "fillin-response", no_argument, NULL, 'F' },
-+//    { "fillin-response", no_argument, NULL, 'F' },
-     { "calibration", required_argument, NULL, 'c' },
-     { "gauss", required_argument, NULL, 'g' },
-     { "max-response", required_argument, NULL, 'A' },
-@@ -123,7 +123,7 @@
+--- src/pfshdrcalibrate.cpp.orig	2007-03-28 13:29:43.000000000 +0000
++++ src/pfshdrcalibrate.cpp	2014-06-18 15:27:14.288956550 +0000
+@@ -126,7 +126,7 @@
  
    int optionIndex = 0;
    while( 1 ) {
--    int c = getopt_long (argc, argv, "hvYFc:g:r:f:s:m:b:", cmdLineOptions, &optionIndex);
-+    int c = getopt_long (argc, argv, "hvYFc:g:r:f:s:m:b:S:A:", cmdLineOptions, &optionIndex);
+-    int c = getopt_long (argc, argv, "hvYFc:g:r:f:s:m:b:p:x", cmdLineOptions, &optionIndex);
++    int c = getopt_long (argc, argv, "hvYFc:g:r:f:s:m:b:p:xS:A:", cmdLineOptions, &optionIndex);
      if( c == -1 ) break;
      switch( c ) {
      case 'h':
-@@ -246,8 +246,8 @@
-     throw pfs::Exception("calibration method not set or not supported");
-   }
- 
--  VERBOSE_STR << "interpolate missing parts of response: "
--              << (opt_fillgaps ? "yes" : "no") << endl;
-+//   VERBOSE_STR << "interpolate missing parts of response: "
-+//               << (opt_fillgaps ? "yes" : "no") << endl;
-   
-   if( responseSaveFile!=NULL )
-     VERBOSE_STR << "save response curve to a file (do not generate HDR image)" << endl;
-@@ -434,6 +434,8 @@
-   pfs::Channel *Xj, *Yj, *Zj;
-   frame->createXYZChannels( Xj, Yj, Zj );
- 
-+  // !!! this currently does more bad than good, relevant command line
-+  // option is disabled
-   if( opt_fillgaps )
-   {
-     if( opt_luminance )
-@@ -453,42 +455,50 @@
-   }
- 
-   // calibration
-+  long sp = 0;                  // saturated pixels
-   switch( opt_calibration )
-   {
-   case NONE:
-     if( opt_luminance )
-     {
-       VERBOSE_STR << "applying response to Y channel..." << endl;
--      robertson02_applyResponse( Yj, imgsY, Iy, w, M);
-+      sp = robertson02_applyResponse( Yj, imgsY, Iy, w, M);
-     }
-     else
-     {
-       VERBOSE_STR << "applying response to R channel..." << endl;
--      robertson02_applyResponse( Xj, imgsR, Ir, w, M);
-+      sp = robertson02_applyResponse( Xj, imgsR, Ir, w, M);
-       VERBOSE_STR << "applying response to G channel..." << endl;
--      robertson02_applyResponse( Yj, imgsG, Ig, w, M);
-+      sp += robertson02_applyResponse( Yj, imgsG, Ig, w, M);
-       VERBOSE_STR << "applying response to B channel..." << endl;
--      robertson02_applyResponse( Zj, imgsB, Ib, w, M);
-+      sp += robertson02_applyResponse( Zj, imgsB, Ib, w, M);
-+      sp /= 3;
-     }
-     break;
-   case ROBERTSON:
-     if( opt_luminance )
-     {
-       VERBOSE_STR << "recovering Y channel..." << endl;
--      robertson02_getResponse( Yj, imgsY, Iy, w, M);
-+      sp = robertson02_getResponse( Yj, imgsY, Iy, w, M);
-     }
-     else
-     {
-       VERBOSE_STR << "recovering R channel..." << endl;
--      robertson02_getResponse( Xj, imgsR, Ir, w, M);
-+      sp = robertson02_getResponse( Xj, imgsR, Ir, w, M);
-       VERBOSE_STR << "recovering G channel..." << endl;
--      robertson02_getResponse( Yj, imgsG, Ig, w, M);
-+      sp += robertson02_getResponse( Yj, imgsG, Ig, w, M);
-       VERBOSE_STR << "recovering B channel..." << endl;
--      robertson02_getResponse( Zj, imgsB, Ib, w, M);
-+      sp += robertson02_getResponse( Zj, imgsB, Ib, w, M);
-+      sp /= 3;
-     }
-     break;
-   case DEBEVEC:
-     break;
-+  }
-+  if( sp>0 )
-+  {
-+    float perc = ceilf(100.0f*sp/size);
-+    VERBOSE_STR << "saturated pixels found in " << perc << "% of the image!" << endl;
-   }
- 
-   // save response curve to a given file
+@@ -192,7 +192,9 @@
+       break;
+     case 'p':
+       mitsunaga_sample_no = (unsigned long)atoll(optarg);
+-      if( opt_bpp<10 || opt_bpp>=(1 << 31))
++      if( mitsunaga_sample_no<10 )
++        throw pfs::Exception("too few samples");
++      if( mitsunaga_sample_no>=(1 << 31) )
+         throw pfs::Exception("too many samples");
+       break;	  
+     case 'A':                   // max response

Added: head/graphics/pfscalibration/files/patch-src-responses.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/pfscalibration/files/patch-src-responses.cpp	Fri Jun 20 00:40:44 2014	(r358483)
@@ -0,0 +1,10 @@
+--- src/responses.cpp.orig	2006-09-13 14:27:06.000000000 +0000
++++ src/responses.cpp	2014-06-18 15:27:14.298952630 +0000
+@@ -63,6 +63,7 @@
+ {
+   float mid = Mmin + (Mmax-Mmin)/2.0f - 0.5f;
+   float mid2 = (mid-Mmin) * (mid-Mmin);
++  std::cerr << "Mmin: " << Mmin << "; mid: " << mid << "; Mmax: " << Mmax << "; M: " << M << "; sigma: " << sigma << std::endl;
+   for( int m=0 ; m<M ; m++ )
+     if( m<Mmin || m>Mmax )
+       w[m] = 0.0f;

Modified: head/graphics/pfscalibration/pkg-plist
==============================================================================
--- head/graphics/pfscalibration/pkg-plist	Fri Jun 20 00:29:42 2014	(r358482)
+++ head/graphics/pfscalibration/pkg-plist	Fri Jun 20 00:40:44 2014	(r358483)
@@ -1,4 +1,9 @@
-bin/pfshdrcalibrate
-bin/jpeg2hdrgen
 bin/dcraw2hdrgen
+bin/jpeg2hdrgen
+bin/pfshdrcalibrate
 bin/pfsinhdrgen
+bin/pfsmergehdr
+man/man1/jpeg2hdrgen.1.gz
+man/man1/dcraw2hdrgen.1.gz
+man/man1/pfsinhdrgen.1.gz
+man/man1/pfshdrcalibrate.1.gz


More information about the svn-ports-head mailing list