Page MenuHomeFreeBSD

D7386.diff
No OneTemporary

D7386.diff

Index: devel/hyperscan/Makefile
===================================================================
--- devel/hyperscan/Makefile
+++ devel/hyperscan/Makefile
@@ -11,49 +11,41 @@
COMMENT= High-performance multiple regex matching library
LICENSE= BSD3CLAUSE
+LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= ragel:devel/ragel
+USES= compiler:c++11-lib cmake:outsource pathfix python:build pkgconfig
USE_GITHUB= yes
+USE_LDCONFIG= yes
+
GH_ACCOUNT= 01org
-USES= compiler:c++11-lib cmake:outsource python:build pkgconfig
-ONLY_FOR_ARCHS= amd64
-ONLY_FOR_ARCHS_REASON= SSSE3 is required for work
-
-OPTIONS_DEFINE= SHARED NATIVE
-SHARED_DESC= Build shared library
-NATIVE_DESC= Build with native CPU tunes
-
-.ifndef DEBUG_FLAGS
-CMAKE_BUILD_TYPE= MinSizeRel
-.else
-CMAKE_BUILD_TYPE= Debug
-.endif
-CMAKE_ARGS+= -DBOOST_ROOT=${WRKDIR}/boost_1_59_0
+OPTIONS_DEFINE= EXAMPLES NATIVE
-.include <bsd.port.options.mk>
+EXAMPLES_CMAKE_BOOL= WITH_EXAMPLES
-.if ${PORT_OPTIONS:MNATIVE}
-CXXFLAGS+= -march=native -mtune=native
-CFLAGS+= -march=native -mtune=native
-.else
-CXXFLAGS+= -march=core2
-CFLAGS+= -march=core2
-.endif
+NATIVE_DESC= Build for this hosts (native) CPU and Architecture
+NATIVE_CMAKE_BOOL= WITH_NATIVE
+
+CFLAGS+= -mssse3
+#CXXFLAGS+= -mssse3
-.if ${PORT_OPTIONS:MSHARED}
-CMAKE_ARGS+= -DBUILD_STATIC_AND_SHARED=ON
-PLIST_SUB+= SHARED="" \
- SOVERSION=${PORTVERSION} \
+CMAKE_ARGS+= -DBOOST_ROOT=${WRKDIR}/boost_1_59_0 \
+ -DBUILD_STATIC_AND_SHARED=ON
+
+PLIST_SUB+= SOVERSION=${PORTVERSION} \
SOSHORTVERSION=${PORTVERSION:C/\.[0-9]$//}
-.else
-PLIST_SUB+= SHARED="@comment "
-.endif
-post-stage:
- ${MV} ${STAGEDIR}/${PREFIX}/lib/pkgconfig/libhs.pc \
- ${STAGEDIR}/${PREFIX}/libdata/pkgconfig/
- ${RMDIR} ${STAGEDIR}/${PREFIX}/lib/pkgconfig/
+do-test:
+ @cd ${WRKDIR} && \
+ .build/bin/unit-hyperscan
+
+.include <bsd.port.pre.mk>
+
+pre-install:
+.if empty(MACHINE_CPU:tu:MSSSE3) && empty(PACKAGE_BUILDING)
+ BROKEN= Supplemental Streaming SIMD Extensions 3 (SSSE3) is required, but are not supported on this CPU/Host
+.endif
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
Index: devel/hyperscan/files/patch-CMakeLists.txt
===================================================================
--- devel/hyperscan/files/patch-CMakeLists.txt
+++ devel/hyperscan/files/patch-CMakeLists.txt
@@ -1,12 +1,36 @@
---- CMakeLists.txt.orig 2015-12-18 03:41:50.000000000 +0000
-+++ CMakeLists.txt 2016-02-22 13:28:07.548454000 +0000
-@@ -954,6 +954,6 @@
- install(TARGETS hs_shared DESTINATION lib)
+--- CMakeLists.txt.orig 2016-08-01 09:05:19 UTC
++++ CMakeLists.txt
+@@ -131,6 +131,8 @@ endif()
+
+ option(WINDOWS_ICC "Use Intel C++ Compiler on Windows, default off, requires ICC to be set in project" OFF)
+
++option(WITH_NATIVE "Use -march & -mtune native)" FALSE)
++
+ # TODO: per platform config files?
+
+ # TODO: windows generator on cmake always uses msvc, even if we plan to build with icc
+@@ -182,11 +184,11 @@ else()
+ set(EXTRA_CXX_FLAGS "${EXTRA_CXX_FLAGS} -Werror")
+ endif()
+
+- if (NOT CMAKE_C_FLAGS MATCHES .*march.*)
++ if (NOT CMAKE_C_FLAGS MATCHES .*march.* AND WITH_NATIVE)
+ message(STATUS "Building for current host CPU")
+ set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} -march=native -mtune=native")
+ endif()
+- if (NOT CMAKE_CXX_FLAGS MATCHES .*march.*)
++ if (NOT CMAKE_CXX_FLAGS MATCHES .*march.* AND WITH_NATIVE)
+ set(EXTRA_CXX_FLAGS "${EXTRA_CXX_FLAGS} -march=native -mtune=native")
+ endif()
+
+@@ -999,6 +1001,8 @@ install(TARGETS hs_shared
+ LIBRARY DESTINATION lib)
endif()
-if(NOT WIN32)
- add_subdirectory(examples)
--endif()
-+#if(NOT WIN32)
-+#add_subdirectory(examples)
-+#endif()
++option(WITH_EXAMPLES "Install examples)" TRUE)
++
++if(NOT WIN32 AND WITH_EXAMPLES)
++add_subdirectory(examples)
+ endif()
Index: devel/hyperscan/files/patch-src-rose-rose_build_misc.cpp
===================================================================
--- devel/hyperscan/files/patch-src-rose-rose_build_misc.cpp
+++ devel/hyperscan/files/patch-src-rose-rose_build_misc.cpp
@@ -1,6 +1,6 @@
---- src/rose/rose_build_misc.cpp.orig 2016-06-24 12:15:55.919040000 +0100
-+++ src/rose/rose_build_misc.cpp 2016-06-24 12:16:42.747695000 +0100
-@@ -880,7 +880,7 @@
+--- src/rose/rose_build_misc.cpp.orig 2016-06-01 01:09:05 UTC
++++ src/rose/rose_build_misc.cpp
+@@ -880,7 +880,7 @@ namespace {
class OutfixAllReports : public boost::static_visitor<set<ReportID>> {
public:
set<ReportID> operator()(const boost::blank &) const {
Index: devel/hyperscan/pkg-plist
===================================================================
--- devel/hyperscan/pkg-plist
+++ devel/hyperscan/pkg-plist
@@ -1,13 +1,13 @@
-include/hs/hs.h
include/hs/hs_common.h
include/hs/hs_compile.h
include/hs/hs_runtime.h
-lib/libhs.a
+include/hs/hs.h
lib/libhs_runtime.a
+lib/libhs_runtime.so
+lib/libhs_runtime.so.%%SOSHORTVERSION%%
+lib/libhs_runtime.so.%%SOVERSION%%
+lib/libhs.a
+lib/libhs.so
+lib/libhs.so.%%SOSHORTVERSION%%
+lib/libhs.so.%%SOVERSION%%
libdata/pkgconfig/libhs.pc
-%%SHARED%%lib/libhs.so.%%SOVERSION%%
-%%SHARED%%lib/libhs.so.%%SOSHORTVERSION%%
-%%SHARED%%lib/libhs.so
-%%SHARED%%lib/libhs_runtime.so.%%SOVERSION%%
-%%SHARED%%lib/libhs_runtime.so.%%SOSHORTVERSION%%
-%%SHARED%%lib/libhs_runtime.so

File Metadata

Mime Type
text/plain
Expires
Wed, Apr 8, 10:18 AM (10 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31094258
Default Alt Text
D7386.diff (5 KB)

Event Timeline