Tuesday, June 04, 2019

Re: devel/leatherman: drop -Werror and fix on sparc64

Resending because of a mail delivery glitch,

On Tue, Jun 04 2019, Jeremie Courreges-Anglas <jca@wxcvbn.org> wrote:
> devel/leatherman fails to build on sparc64 (and probably on
> powerpc/other ports-gcc archs):
>
> http://build-failures.rhaalovely.net/sparc64/2019-05-03/devel/leatherman.log
>
> This is due to the use of -Werror, activated by default.
>
> cmake/options.cmake:
> defoption(ENABLE_CXX_WERROR "Enables the -Werror compiler option" ON)
>
> Passing -DENABLE_CXX_WERROR=OFF is not enough to drop -Werror in
> consumers, since the .cmake files are then installed and reused (this
> has resulted in sysutils/facter build failures on ports-gcc archs in the
> past).
>
> Here's a diff that fixes the build of leatherman (and hopefully of its
> consumers). ok?


Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/leatherman/Makefile,v
retrieving revision 1.26
diff -u -p -r1.26 Makefile
--- Makefile 20 May 2019 22:15:06 -0000 1.26
+++ Makefile 4 Jun 2019 10:07:52 -0000
@@ -5,7 +5,7 @@ COMMENT = collection of C++ and CMake u
GH_ACCOUNT = puppetlabs
GH_PROJECT = leatherman
GH_TAGNAME = 1.6.0
-REVISION = 0
+REVISION = 1

# N.B.: Upstream doesn't care about ABI, better just bump major on update
SHARED_LIBS = leatherman_curl 1.1 # 0.12
Index: patches/patch-cmake_options_cmake
===================================================================
RCS file: patches/patch-cmake_options_cmake
diff -N patches/patch-cmake_options_cmake
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-cmake_options_cmake 4 Jun 2019 10:07:52 -0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+Force-disable the use of -Werror. Since options.cmake is installed and
+used by consumers (eg sysutils/facter) it's not enough to
+pass -DENABLE_CXX_WERROR=Off when building leatherman.
+
+Index: cmake/options.cmake
+--- cmake/options.cmake.orig
++++ cmake/options.cmake
+@@ -1,5 +1,5 @@
+ include(leatherman)
+-defoption(ENABLE_CXX_WERROR "Enables the -Werror compiler option" ON)
++defoption(ENABLE_CXX_WERROR "Enables the -Werror compiler option" OFF)
+ defoption(COVERALLS "Generate code coverage using Coveralls.io" OFF)
+ defoption(BOOST_STATIC "Use Boost's static libraries" OFF)
+ defoption(CURL_STATIC "Use curl's static libraries" OFF)


--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE

No comments:

Post a Comment