Skip to content

Commit

Permalink
nzbget 24.4
Browse files Browse the repository at this point in the history
nzbget: update install
  • Loading branch information
BrewTestBot authored and bevanjkay committed Nov 26, 2024
1 parent 6ad41cb commit bb0bc03
Showing 1 changed file with 40 additions and 3 deletions.
43 changes: 40 additions & 3 deletions Formula/n/nzbget.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
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"

Expand All @@ -26,14 +26,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 +82,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 bb0bc03

Please sign in to comment.