Re: Update to exiv2-0.27.0

2019-02-13 Thread Daniel Jakots
On Tue, 12 Feb 2019 18:04:15 +0100, Jeremie Courreges-Anglas
 wrote:

> On Mon, Feb 11 2019, Daniel Jakots  wrote:
> > Anyone cares to test it?  
> 
> Tested, looks good overall but I have a bunch of tweaks to propose.

Not much of an opinion about them but thanks a lot for pick it up!

ok danj@ to commit it once it went in a bulk (and others are happy)

Cheers,
Daniel



Re: Update to exiv2-0.27.0

2019-02-12 Thread Jeremie Courreges-Anglas
On Mon, Feb 11 2019, Daniel Jakots  wrote:
> Anyone cares to test it?

Tested, looks good overall but I have a bunch of tweaks to propose.
Note that as is, this update won't build if exiv2-0.26 is already
installed.  The error points at a function with a fishy name,
getProcessPath(), which wasn't there in previous versions.

This function is now in the public API exported by
include/exiv2/futils.hpp.  It can't work on OpenBSD.  Shame, its main
use is to find the .mo files now that exiv2 supports i18n.

So here's a revised diff with the following changes:
- remove Exiv2::getProcessPath() from the public API.  My take is that
  it's easier to spot build failures rather than runtime failures, in
  this situation.  IMO upstream made a mistake to publish this function,
  I'd like to try and convince them to deprecate it.
- stop using getProcessPath() in exiv2 source code, instead use the
  PREFIX passed at configure time, just like 99% of software out there.
- drop patches/patch-src_http_cpp, not needed any more
- drop visibility workaround in patches/patch-src_version_cpp, not
  needed any more
- don't force-disable XMP.  What we want is to remove libxmp.a from
  installed files, we don't want to disable XMP support in libexiv2
  itself.  A "funny" side-effect is that expat is now detected again,
  which in turn builds and installs the geotag executable from the
  samples directory...
- also drop -DEXV_HAVE_PROCESS_H=OFF, not needed in my tests

I'm a bit sceptical regarding the new programs.  Are they really that
useful?  Aren't they built/installed just because cmake...?

IIUC Daniel's diff hasn't seen bulk build yet, which is probably
desirable.  But first I'd like to hear feedback/objections regarding the
changes proposed above.


Index: Makefile
===
RCS file: /cvs/ports/graphics/exiv2/Makefile,v
retrieving revision 1.28
diff -u -p -r1.28 Makefile
--- Makefile24 Oct 2018 14:28:05 -  1.28
+++ Makefile12 Feb 2019 16:57:09 -
@@ -2,12 +2,11 @@
 
 COMMENT=   manipulate image meta-data such as exif and ipct
 
-DISTNAME=  exiv2-0.26-trunk
-PKGNAME=   exiv2-0.26
+DISTNAME=  exiv2-0.27.0-Source
+PKGNAME=   exiv2-0.27.0
 CATEGORIES=graphics devel
-REVISION=  0
 
-SHARED_LIBS +=  exiv29.0  # 14.0
+SHARED_LIBS +=  exiv210.0  # 14.0
 
 HOMEPAGE=  http://www.exiv2.org/
 
@@ -20,18 +19,34 @@ COMPILER =  base-clang ports-gcc base-gc
 
 MASTER_SITES=  http://www.exiv2.org/builds/
 
-USE_GMAKE= Yes
+MODULES=   devel/cmake
 
-CONFIGURE_STYLE=gnu
+CFLAGS +=  -I${LOCALBASE}/include
+CXXFLAGS +=-I${LOCALBASE}/include
 
-BUILD_DEPENDS= devel/gettext-tools
+BUILD_DEPENDS= devel/gettext-tools \
+   devel/gtest
 
 LIB_DEPENDS=   devel/gettext
 
-CONFIGURE_ARGS=--enable-static
+TEST_DEPENDS=  converters/dos2unix \
+   shells/bash
 
-NO_TEST=   Yes
+CONFIGURE_ARGS += -DEXIV2_BUILD_UNIT_TESTS=ON
+CONFIGURE_ARGS += -DEXIV2_BUILD_PO=ON
 
-WRKDIST=   ${WRKDIR}/exiv2-trunk
+TEST_TARGET =  tests
+
+# dos line-endings in file needing patch
+post-extract:
+   @cd ${WRKSRC} && perl -i -pe 's/\r$$//' 
${WRKSRC}/cmake/compilerFlags.cmake
+
+post-install:
+   find ${WRKINST} -name '._*' -delete
+   rm ${PREFIX}/include/exiv2/*.orig
+   rm ${PREFIX}/lib/libxmp.a
+
+pre-test:
+   @sed -Ei 's,!/bin/(ba)?sh,!/usr/bin/env bash,g' ${WRKSRC}/test/*.sh
 
 .include 
Index: distinfo
===
RCS file: /cvs/ports/graphics/exiv2/distinfo,v
retrieving revision 1.12
diff -u -p -r1.12 distinfo
--- distinfo5 Apr 2018 21:21:52 -   1.12
+++ distinfo12 Feb 2019 16:57:09 -
@@ -1,2 +1,2 @@
-SHA256 (exiv2-0.26-trunk.tar.gz) = x148SggRv3ANksgjGTc7eoJaIzHBK4s31B61jk8Y6vs=
-SIZE (exiv2-0.26-trunk.tar.gz) = 5677925
+SHA256 (exiv2-0.27.0-Source.tar.gz) = 
7oi8gVObc8ZQEGUXhdCU+tCzl2CkJLPBbBfhhWz+8tc=
+SIZE (exiv2-0.27.0-Source.tar.gz) = 27222970
Index: patches/patch-cmake_compilerFlags_cmake
===
RCS file: patches/patch-cmake_compilerFlags_cmake
diff -N patches/patch-cmake_compilerFlags_cmake
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-cmake_compilerFlags_cmake 12 Feb 2019 16:57:09 -
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+- warnings about c++locale.h clutter the build
+
+Index: cmake/compilerFlags.cmake
+--- cmake/compilerFlags.cmake.orig
 cmake/compilerFlags.cmake
+@@ -30,7 +30,7 @@ if ( MINGW OR UNIX OR MSYS ) # MINGW, Linux, APPLE, CY
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --coverage")
+ endif()
+ 
+-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wcast-align 
-Wpointer-arith -Wformat-security -Wmissing-format-attribute 
-Woverloaded-virtual -W")
++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wcast-align 

Update to exiv2-0.27.0

2019-02-11 Thread Daniel Jakots
Anyone cares to test it?

Cheers,
Daniel

Index: Makefile
===
RCS file: /cvs/ports/graphics/exiv2/Makefile,v
retrieving revision 1.28
diff -u -p -r1.28 Makefile
--- Makefile24 Oct 2018 14:28:05 -  1.28
+++ Makefile11 Feb 2019 18:38:15 -
@@ -2,12 +2,11 @@
 
 COMMENT=   manipulate image meta-data such as exif and ipct
 
-DISTNAME=  exiv2-0.26-trunk
-PKGNAME=   exiv2-0.26
+DISTNAME=  exiv2-0.27.0-Source
+PKGNAME=   exiv2-0.27.0
 CATEGORIES=graphics devel
-REVISION=  0
 
-SHARED_LIBS +=  exiv29.0  # 14.0
+SHARED_LIBS +=  exiv210.0  # 14.0
 
 HOMEPAGE=  http://www.exiv2.org/
 
@@ -20,18 +19,35 @@ COMPILER =  base-clang ports-gcc base-gc
 
 MASTER_SITES=  http://www.exiv2.org/builds/
 
-USE_GMAKE= Yes
+MODULES=   devel/cmake
 
-CONFIGURE_STYLE=gnu
+CFLAGS +=  -I${LOCALBASE}/include
+CXXFLAGS +=-I${LOCALBASE}/include
 
-BUILD_DEPENDS= devel/gettext-tools
+BUILD_DEPENDS= devel/gettext-tools \
+   devel/gtest
 
 LIB_DEPENDS=   devel/gettext
 
-CONFIGURE_ARGS=--enable-static
+TEST_DEPENDS=  converters/dos2unix \
+   shells/bash
 
-NO_TEST=   Yes
+CONFIGURE_ARGS += -DEXIV2_BUILD_UNIT_TESTS=ON
+CONFIGURE_ARGS += -DEXV_HAVE_PROCESS_H=OFF
+CONFIGURE_ARGS += -DEXIV2_BUILD_PO=ON
+# audio/libxmp installs libxmp.so, things may got confused
+CONFIGURE_ARGS += -DEXIV2_ENABLE_XMP=OFF
+
+TEST_TARGET =  tests
+
+# dos line-endings in file needing patch
+post-extract:
+   @cd ${WRKSRC} && perl -i -pe 's/\r$$//' 
${WRKSRC}/cmake/compilerFlags.cmake
 
-WRKDIST=   ${WRKDIR}/exiv2-trunk
+post-install:
+   find ${WRKINST} -name '._*' -delete
+
+pre-test:
+   @sed -Ei 's,!/bin/(ba)?sh,!/usr/bin/env bash,g' ${WRKSRC}/test/*.sh
 
 .include 
Index: distinfo
===
RCS file: /cvs/ports/graphics/exiv2/distinfo,v
retrieving revision 1.12
diff -u -p -r1.12 distinfo
--- distinfo5 Apr 2018 21:21:52 -   1.12
+++ distinfo11 Feb 2019 18:38:15 -
@@ -1,2 +1,2 @@
-SHA256 (exiv2-0.26-trunk.tar.gz) = x148SggRv3ANksgjGTc7eoJaIzHBK4s31B61jk8Y6vs=
-SIZE (exiv2-0.26-trunk.tar.gz) = 5677925
+SHA256 (exiv2-0.27.0-Source.tar.gz) = 
7oi8gVObc8ZQEGUXhdCU+tCzl2CkJLPBbBfhhWz+8tc=
+SIZE (exiv2-0.27.0-Source.tar.gz) = 27222970
Index: patches/patch-cmake_compilerFlags_cmake
===
RCS file: patches/patch-cmake_compilerFlags_cmake
diff -N patches/patch-cmake_compilerFlags_cmake
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-cmake_compilerFlags_cmake 11 Feb 2019 18:38:15 -
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+- warnings about c++locale.h clutter the build
+
+Index: cmake/compilerFlags.cmake
+--- cmake/compilerFlags.cmake.orig
 cmake/compilerFlags.cmake
+@@ -30,7 +30,7 @@ if ( MINGW OR UNIX OR MSYS ) # MINGW, Linux, APPLE, CY
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --coverage")
+ endif()
+ 
+-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wcast-align 
-Wpointer-arith -Wformat-security -Wmissing-format-attribute 
-Woverloaded-virtual -W")
++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wcast-align 
-Wpointer-arith -Wformat-security -Woverloaded-virtual -W")
+ 
+ if ( EXIV2_TEAM_USE_SANITIZERS )
+ # ASAN is available in gcc from 4.8 and UBSAN from 4.9
Index: patches/patch-config_config_mk_in
===
RCS file: patches/patch-config_config_mk_in
diff -N patches/patch-config_config_mk_in
--- patches/patch-config_config_mk_in   21 Nov 2015 15:33:56 -  1.2
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,15 +0,0 @@
-$OpenBSD: patch-config_config_mk_in,v 1.2 2015/11/21 15:33:56 jca Exp $
-
-- warnings about c++locale.h clutter the build
-
 config/config.mk.in.orig   Sun Jun 21 16:19:25 2015
-+++ config/config.mk.inThu Nov 19 19:56:00 2015
-@@ -58,7 +58,7 @@ GXX = @GXX@
- # Common compiler flags (warnings, symbols [-ggdb], optimization [-O2], etc)
- CXXFLAGS = @CXXFLAGS@
- ifeq ($(GXX),yes)
--  CXXFLAGS += -Wall -Wcast-align -Wpointer-arith -Wformat-security 
-Wmissing-format-attribute -Woverloaded-virtual -W
-+  CXXFLAGS += -Wall -Wcast-align -Wpointer-arith -Wformat-security 
-Woverloaded-virtual -W
- endif
- 
- # Command to run only the preprocessor
Index: patches/patch-src_Makefile
===
RCS file: patches/patch-src_Makefile
diff -N patches/patch-src_Makefile
--- patches/patch-src_Makefile  5 Apr 2018 21:21:52 -   1.5
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,31 +0,0 @@
-$OpenBSD: patch-src_Makefile,v 1.5 2018/04/05 21:21:52 rsadowski Exp $
-Index: src/Makefile
 src/Makefile.orig
-+++ src/Makefile
-@@ -151,7 +151,7 @@ LIBRARY = libexiv2.la
- 
- #