diff options
| author | Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2025-04-09 17:41:32 +0000 |
|---|---|---|
| committer | Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2025-04-09 17:41:32 +0000 |
| commit | 49a46084dc5ef76a7eaddbebc4d881f4c7f6544f (patch) | |
| tree | f47a3963394dba22040110c5a02bbe633fbf6adb | |
| parent | 1aa4be148d7cb6ffcef51d45dcd81175ac519e69 (diff) | |
| -rw-r--r-- | devel/Makefile | 1 | ||||
| -rw-r--r-- | devel/libprotobuf-mutator/Makefile | 34 | ||||
| -rw-r--r-- | devel/libprotobuf-mutator/distinfo | 3 | ||||
| -rw-r--r-- | devel/libprotobuf-mutator/files/patch-cmake-external-googletest.cmake | 11 | ||||
| -rw-r--r-- | devel/libprotobuf-mutator/pkg-descr | 2 | ||||
| -rw-r--r-- | devel/libprotobuf-mutator/pkg-plist | 19 |
6 files changed, 70 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile index 2f67b4b170f2..08ba19db3694 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -1409,6 +1409,7 @@ SUBDIR += libplist SUBDIR += libpo6 SUBDIR += libpololu-avr + SUBDIR += libprotobuf-mutator SUBDIR += libpru SUBDIR += libqb SUBDIR += libqcow diff --git a/devel/libprotobuf-mutator/Makefile b/devel/libprotobuf-mutator/Makefile new file mode 100644 index 000000000000..b3566df465b6 --- /dev/null +++ b/devel/libprotobuf-mutator/Makefile @@ -0,0 +1,34 @@ +PORTNAME= libprotobuf-mutator +PORTVERSION= 1.5 +DISTVERSIONPREFIX= v +CATEGORIES= devel + +MAINTAINER= sunpoet@FreeBSD.org +COMMENT= Library for structured fuzzing with protobuffers +WWW= https://github.com/google/libprotobuf-mutator + +LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/LICENSE + +LIB_DEPENDS= libprotobuf.so:devel/protobuf + +USES= cmake:testing localbase:ldflags + +CMAKE_ARGS= -DLOCALBASE=${LOCALBASE} \ + -DPKG_CONFIG_PATH=libdata/pkgconfig +CMAKE_OFF= LIB_PROTO_MUTATOR_DOWNLOAD_PROTOBUF \ + LIB_PROTO_MUTATOR_EXAMPLES \ + LIB_PROTO_MUTATOR_EXAMPLES_USE_LATEST \ + LIB_PROTO_MUTATOR_MSVC_STATIC_RUNTIME \ + LIB_PROTO_MUTATOR_TESTING \ + LIB_PROTO_MUTATOR_WITH_ASAN +CMAKE_ON= BUILD_SHARED_LIBS +CMAKE_TESTING_ON= LIB_PROTO_MUTATOR_TESTING +LDFLAGS+= -labsl_hash \ + -labsl_log_internal_message \ + -labsl_log_internal_nullguard + +USE_GITHUB= yes +GH_ACCOUNT= google + +.include <bsd.port.mk> diff --git a/devel/libprotobuf-mutator/distinfo b/devel/libprotobuf-mutator/distinfo new file mode 100644 index 000000000000..703457aea83e --- /dev/null +++ b/devel/libprotobuf-mutator/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1744215555 +SHA256 (google-libprotobuf-mutator-v1.5_GH0.tar.gz) = 895958881b4993df70b4f652c2d82c5bd97d22f801ca4f430d6546809df293d5 +SIZE (google-libprotobuf-mutator-v1.5_GH0.tar.gz) = 42820 diff --git a/devel/libprotobuf-mutator/files/patch-cmake-external-googletest.cmake b/devel/libprotobuf-mutator/files/patch-cmake-external-googletest.cmake new file mode 100644 index 000000000000..1ec876eb3727 --- /dev/null +++ b/devel/libprotobuf-mutator/files/patch-cmake-external-googletest.cmake @@ -0,0 +1,11 @@ +--- cmake/external/googletest.cmake.orig 2025-02-26 00:43:54 UTC ++++ cmake/external/googletest.cmake +@@ -30,7 +30,7 @@ foreach(lib IN LISTS GTEST_BOTH_LIBRARIES) + set(LIB_PATH ${GTEST_INSTALL_DIR}/lib/${lib}.lib) + endif() + else() +- set(LIB_PATH ${GTEST_INSTALL_DIR}/lib/lib${lib}.a) ++ set(LIB_PATH ${LOCALBASE}/lib/lib${lib}.so) + endif() + list(APPEND GTEST_BUILD_BYPRODUCTS ${LIB_PATH}) + diff --git a/devel/libprotobuf-mutator/pkg-descr b/devel/libprotobuf-mutator/pkg-descr new file mode 100644 index 000000000000..c03dbde2e7ce --- /dev/null +++ b/devel/libprotobuf-mutator/pkg-descr @@ -0,0 +1,2 @@ +libprotobuf-mutator is a library to randomly mutate protobuffers. It could be +used together with guided fuzzing engines, such as libFuzzer. diff --git a/devel/libprotobuf-mutator/pkg-plist b/devel/libprotobuf-mutator/pkg-plist new file mode 100644 index 000000000000..96e84be6800c --- /dev/null +++ b/devel/libprotobuf-mutator/pkg-plist @@ -0,0 +1,19 @@ +include/libprotobuf-mutator/port/gtest.h +include/libprotobuf-mutator/port/protobuf.h +include/libprotobuf-mutator/src/binary_format.h +include/libprotobuf-mutator/src/field_instance.h +include/libprotobuf-mutator/src/libfuzzer/libfuzzer_macro.h +include/libprotobuf-mutator/src/libfuzzer/libfuzzer_mutator.h +include/libprotobuf-mutator/src/mutator.h +include/libprotobuf-mutator/src/random.h +include/libprotobuf-mutator/src/text_format.h +include/libprotobuf-mutator/src/utf8_fix.h +include/libprotobuf-mutator/src/weighted_reservoir_sampler.h +lib/cmake/libprotobuf-mutator/libprotobuf-mutatorConfig.cmake +lib/cmake/libprotobuf-mutator/libprotobuf-mutatorTargets-%%CMAKE_BUILD_TYPE%%.cmake +lib/cmake/libprotobuf-mutator/libprotobuf-mutatorTargets.cmake +lib/libprotobuf-mutator-libfuzzer.so +lib/libprotobuf-mutator-libfuzzer.so.0 +lib/libprotobuf-mutator.so +lib/libprotobuf-mutator.so.0 +libdata/pkgconfig/libprotobuf-mutator.pc |
