From 48b992162b0c0af51742542ddc9ba65ddc82c89c Mon Sep 17 00:00:00 2001 From: dcoppa Date: Sun, 18 Nov 2012 16:55:27 +0000 Subject: [PATCH] Add "-pthread" to compiler flags only where it's needed and remove 'CFLAGS += -pthread' from port's Makefile. While here, remove superfluous SEPARATE_BUILD and CONFIGURE_STYLE variables: cmake module already takes care of them. ok sthen@ --- graphics/hugin/Makefile | 7 ++----- .../patch-src_hugin_base_CMakeLists_txt | 18 ++++++++++++++++++ .../patches/patch-src_tools_CMakeLists_txt | 16 ++++++++++++++++ 3 files changed, 36 insertions(+), 5 deletions(-) create mode 100644 graphics/hugin/patches/patch-src_hugin_base_CMakeLists_txt create mode 100644 graphics/hugin/patches/patch-src_tools_CMakeLists_txt diff --git a/graphics/hugin/Makefile b/graphics/hugin/Makefile index 61f3f017d8c..2c08412096a 100644 --- a/graphics/hugin/Makefile +++ b/graphics/hugin/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.31 2012/11/13 16:11:17 dcoppa Exp $ +# $OpenBSD: Makefile,v 1.32 2012/11/18 16:55:27 dcoppa Exp $ VMEM_WARNING = Yes SHARED_ONLY = Yes @@ -7,7 +7,7 @@ COMMENT = panorama image stitcher DISTNAME = hugin-2011.4.0 EXTRACT_SUFX = .tar.bz2 -REVISION = 0 +REVISION = 1 TAR = ${LOCALBASE}/bin/gtar BUILD_DEPENDS += archivers/gtar @@ -66,12 +66,9 @@ BUILD_DEPENDS += devel/tclap USE_GROFF = Yes MODULES += devel/cmake -SEPARATE_BUILD = Yes -CONFIGURE_STYLE = cmake CONFIGURE_ENV = MANDIR=man CONFIGURE_ARGS += -DCMAKE_BUILD_TYPE:STRING=Release NO_REGRESS = Yes -CFLAGS += -pthread pre-patch: find ${WRKSRC} -name '*.orig' | xargs rm diff --git a/graphics/hugin/patches/patch-src_hugin_base_CMakeLists_txt b/graphics/hugin/patches/patch-src_hugin_base_CMakeLists_txt new file mode 100644 index 00000000000..e2bb7b3c9a5 --- /dev/null +++ b/graphics/hugin/patches/patch-src_hugin_base_CMakeLists_txt @@ -0,0 +1,18 @@ +$OpenBSD: patch-src_hugin_base_CMakeLists_txt,v 1.1 2012/11/18 16:55:27 dcoppa Exp $ + +/usr/local/include/boost/config/requires_threads.hpp:47:5: error: +#error "Compiler threading support is not turned on. Please set the +correct command line options for threading: -pthread (Linux), +-pthreads (Solaris) or -mthreads (Mingw32)" + +--- src/hugin_base/CMakeLists.txt.orig Fri Dec 2 18:02:40 2011 ++++ src/hugin_base/CMakeLists.txt Wed Nov 14 10:58:46 2012 +@@ -122,6 +122,8 @@ vigra_ext/MultiThreadOperations.h + vigra_ext/ImageTransformsGPU.h + ) + ++set(CMAKE_CXX_FLAGS "-pthread ${CMAKE_CXX_FLAGS}") ++ + IF (${HUGIN_SHARED_LIBS}) + add_library(huginbase SHARED ${HUGIN_BASE_SRC} ${HUGIN_BASE_HEADER}) + target_link_libraries(huginbase ${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) diff --git a/graphics/hugin/patches/patch-src_tools_CMakeLists_txt b/graphics/hugin/patches/patch-src_tools_CMakeLists_txt new file mode 100644 index 00000000000..00a567a9521 --- /dev/null +++ b/graphics/hugin/patches/patch-src_tools_CMakeLists_txt @@ -0,0 +1,16 @@ +$OpenBSD: patch-src_tools_CMakeLists_txt,v 1.1 2012/11/18 16:55:27 dcoppa Exp $ + +/usr/local/include/boost/config/requires_threads.hpp:47:5: error: +#error "Compiler threading support is not turned on. Please set the +correct command line options for threading: -pthread (Linux), +-pthreads (Solaris) or -mthreads (Mingw32)" + +--- src/tools/CMakeLists.txt.orig Wed Nov 14 10:59:12 2012 ++++ src/tools/CMakeLists.txt Wed Nov 14 10:59:49 2012 +@@ -1,4 +1,6 @@ + ++set(CMAKE_CXX_FLAGS "-pthread ${CMAKE_CXX_FLAGS}") ++ + add_executable(fulla fulla.cpp) + target_link_libraries(fulla ${common_libs} huginlensdb ${image_libs}) +