public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
From: Takashi Yano <takashi.yano@nifty.ne.jp>
To: cygwin-apps@cygwin.com
Subject: [ITA] snappy
Date: Thu, 22 Feb 2024 19:24:13 +0900	[thread overview]
Message-ID: <20240222192413.171765207d327070fe7961f8@nifty.ne.jp> (raw)

[-- Attachment #1: Type: text/plain, Size: 79 bytes --]

I'd like to adopt snappy package.

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

[-- Attachment #2: snappy.cygport --]
[-- Type: text/plain, Size: 963 bytes --]

inherit cmake

NAME="snappy"
VERSION=1.1.10
RELEASE=1
LICENSE="BSD-3-Clauses"
CATEGORY="Libs"
SUMMARY="Fast compression library"
DESCRIPTION="Snappy is a compression/decompression library. It does not aim for
maximum compression, or compatibility with any other compression library,
instead, it aims for very high speeds and reasonable compression."
HOMEPAGE="https://github.com/google/snappy/"
SRC_URI="https://github.com/google/snappy/archive/${VERSION}/snappy-${VERSION}.tar.gz"
PATCH_URI="
	https://src.fedoraproject.org/rpms/snappy/raw/f40/f/snappy-thirdparty.patch
"

PKG_NAMES="libsnappy1 libsnappy-devel"
libsnappy1_CONTENTS="
	usr/bin/cygsnappy-1.dll
	usr/share/doc/${NAME}
"
libsnappy_devel_CONTENTS="
	usr/include/snappy*.h
	usr/lib/cmake/Snappy/
	usr/lib/libsnappy.dll.a
"

CYGCMAKE_ARGS="
	-DBUILD_SHARED_LIBS=ON
	-DSNAPPY_BUILD_TESTS=OFF
	-DSNAPPY_BUILD_BENCHMARKS=OFF
"
BUILD_REQUIRES="liblzo2-devel liblz4-devel"

[-- Attachment #3: snappy-thirdparty.patch --]
[-- Type: text/plain, Size: 1720 bytes --]

diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -306,29 +306,12 @@
 if(SNAPPY_BUILD_TESTS)
   enable_testing()
 
-  # Prevent overriding the parent project's compiler/linker settings on Windows.
-  set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
-  set(install_gtest OFF)
-  set(install_gmock OFF)
-  set(build_gmock ON)
-
-  # This project is tested using GoogleTest.
-  add_subdirectory("third_party/googletest")
-
-  # GoogleTest triggers a missing field initializers warning.
-  if(SNAPPY_HAVE_NO_MISSING_FIELD_INITIALIZERS)
-    set_property(TARGET gtest
-        APPEND PROPERTY COMPILE_OPTIONS -Wno-missing-field-initializers)
-    set_property(TARGET gmock
-        APPEND PROPERTY COMPILE_OPTIONS -Wno-missing-field-initializers)
-  endif(SNAPPY_HAVE_NO_MISSING_FIELD_INITIALIZERS)
-
   add_executable(snappy_unittest "")
   target_sources(snappy_unittest
     PRIVATE
       "snappy_unittest.cc"
   )
-  target_link_libraries(snappy_unittest snappy_test_support gmock_main gtest)
+  target_link_libraries(snappy_unittest snappy_test_support gtest_main gtest)
 
   add_test(
     NAME snappy_unittest
@@ -349,12 +332,11 @@
     PRIVATE
       "snappy_benchmark.cc"
   )
-  target_link_libraries(snappy_benchmark snappy_test_support benchmark_main)
+  target_link_libraries(snappy_benchmark snappy_test_support benchmark_main benchmark)
 
   # This project uses Google benchmark for benchmarking.
   set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "" FORCE)
   set(BENCHMARK_ENABLE_EXCEPTIONS OFF CACHE BOOL "" FORCE)
-  add_subdirectory("third_party/benchmark")
 endif(SNAPPY_BUILD_BENCHMARKS)
 
 if(SNAPPY_FUZZING_BUILD)

                 reply	other threads:[~2024-02-22 10:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240222192413.171765207d327070fe7961f8@nifty.ne.jp \
    --to=takashi.yano@nifty.ne.jp \
    --cc=cygwin-apps@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).