Skip to content

Commit

Permalink
Merge pull request Homebrew#198191 from Homebrew/bump-nzbget-24.4
Browse files Browse the repository at this point in the history
nzbget 24.4
  • Loading branch information
BrewTestBot authored Nov 27, 2024
2 parents be1f426 + cb36e1d commit 3a7a709
Showing 1 changed file with 46 additions and 11 deletions.
57 changes: 46 additions & 11 deletions Formula/n/nzbget.rb
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
class Nzbget < Formula
desc "Binary newsgrabber for nzb files"
homepage "https://nzbget.com"
url "https://github.com/nzbgetcom/nzbget/archive/refs/tags/v24.3.tar.gz"
sha256 "b20ff0da1367825fbf00337a48196e81514195748d3d96f620f28ab2cc0b7cc0"
url "https://github.com/nzbgetcom/nzbget/archive/refs/tags/v24.4.tar.gz"
sha256 "ea3ebe13f5d48f040f1614b62bff9b51da134f4f689ec918997f5896cf51f337"
license "GPL-2.0-or-later"
head "https://github.com/nzbgetcom/nzbget.git", branch: "develop"

bottle do
sha256 cellar: :any, arm64_sequoia: "6c68cbbdab136141537374b155de26b72e32e2f0cde6139a2480d97a3cbdb5e0"
sha256 cellar: :any, arm64_sonoma: "5c8c7d15f27dc7b650f42e049c29111af248e35dfb41916939869c9d63f1f986"
sha256 cellar: :any, arm64_ventura: "5d1ca334ae08f0aaf99c474b3d6ca01d7a24ce6e34a25ef84426bd829e2bae0d"
sha256 cellar: :any, arm64_monterey: "fe3f2f00177bb08ab060af9524068489e3fde33fcd1262d2099eca47234ae8a8"
sha256 sonoma: "8735a21091a5d22fd9faf0571b02c003825022a4bccb17b25d361314961bb24a"
sha256 ventura: "648677c0bd4dd2b93e3737c4ebb11fe9e5f6f6dc591da8f3df75a5e4d055f23a"
sha256 monterey: "cc815d9546026e20294ac1690eba95d1329db0cc74ecc4015cc48484d3371b63"
sha256 cellar: :any_skip_relocation, x86_64_linux: "b5658154d9bdc1496d74858305c9c72284efe6639c1252e827519c147d5b0dc3"
sha256 cellar: :any, arm64_sequoia: "0478991b7ae356aca4c35a7d036fdcb188988b57811fd2bb1a1d678e9dbc33fc"
sha256 cellar: :any, arm64_sonoma: "7af9e5cee1dabae64cd660cbe0fb9bde0aaf3607f80ee798d052483a436f5492"
sha256 cellar: :any, arm64_ventura: "e353ce5f208b56a48f41656ee35784f74dabe71759e1f676f426f7b67d7694d1"
sha256 sonoma: "d0ffe0849e5e2135a7405402a55b6787cfe546e7dac732024e1cd9b7737fb103"
sha256 ventura: "df3636cf74641699384be7edf44b9d7126ec3fa9cf44b81812cfdada38bf3e66"
sha256 cellar: :any_skip_relocation, x86_64_linux: "ea5ef2b5e097844f99a180ccd6c2b9508354c1d8ecf0dcd228de3b71a69173ea"
end

depends_on "cmake" => :build
Expand All @@ -26,14 +24,24 @@ class Nzbget < Formula
uses_from_macos "ncurses"
uses_from_macos "zlib"

resource "par2cmdline-turbo" do
url "https://github.com/nzbgetcom/par2cmdline-turbo/archive/refs/tags/v1.1.1-nzbget.tar.gz"
sha256 "b471a76e6ac7384da87af9314826bc6d89ce879afb9485136b949cc5ce019ddf"
end

# Use the par2cmdline-turbo resource instead of fetching it
patch :DATA

def install
# Workaround to fix build on Xcode 16. This was just ignored on older Xcode so no functional impact
# Issue ref: https://github.com/nzbgetcom/nzbget/issues/421
if DevelopmentTools.clang_build_version >= 1600
inreplace "lib/sources.cmake", 'set(NEON_CXXFLAGS "-mfpu=neon")', ""
end

system "cmake", "-S", ".", "-B", "build", *std_cmake_args
resource("par2cmdline-turbo").stage buildpath/"par2cmdline-turbo"

system "cmake", "-S", ".", "-B", "build", *std_cmake_args, "-DCURSES_INCLUDE_PATH=/usr/include"
system "cmake", "--build", "build"

# nzbget CMake build does not strip binary
Expand Down Expand Up @@ -72,3 +80,30 @@ def install
system bin/"nzbget", "-Q", "-c", etc/"nzbget.conf"
end
end

__END__

diff --git a/cmake/par2-turbo.cmake b/cmake/par2-turbo.cmake
index 8b92c12..cddb1b4 100644
--- a/cmake/par2-turbo.cmake
+++ b/cmake/par2-turbo.cmake
@@ -1,17 +1,8 @@
-set(FETCHCONTENT_QUIET FALSE)
-FetchContent_Declare(
- par2-turbo
- GIT_REPOSITORY https://github.com/nzbgetcom/par2cmdline-turbo.git
- GIT_TAG v1.1.1-nzbget
- TLS_VERIFY TRUE
- GIT_SHALLOW TRUE
- GIT_PROGRESS TRUE
-)
-
add_compile_definitions(HAVE_CONFIG_H PARPAR_ENABLE_HASHER_MD5CRC)
set(BUILD_TOOL OFF CACHE BOOL "")
set(BUILD_LIB ON CACHE BOOL "")
-FetchContent_MakeAvailable(par2-turbo)
+
+add_subdirectory(${CMAKE_SOURCE_DIR}/par2cmdline-turbo)

set(LIBS ${LIBS} par2-turbo gf16 hasher)
set(INCLUDES ${INCLUDES} ${par2_SOURCE_DIR}/include)

0 comments on commit 3a7a709

Please sign in to comment.