Unverified Commit 3cc766b4 authored by Francesco Gazzetta's avatar Francesco Gazzetta Committed by GitHub
Browse files

libresprite: fix darwin by removing homebrew interference (#498574)

parents 2ebe7847 3aeccf6d
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1234567..abcdefg 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -151,14 +151,4 @@ include_directories(${ZLIB_INCLUDE_DIRS})
 
 # libArchive
-if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
-    # Homebrew ships libarchive keg only, include dirs have to be set manually
-    execute_process(
-        COMMAND brew --prefix libarchive
-        OUTPUT_VARIABLE LIBARCHIVE_PREFIX
-        OUTPUT_STRIP_TRAILING_WHITESPACE
-        COMMAND_ERROR_IS_FATAL ANY
-    )
-    set(LibArchive_INCLUDE_DIR "${LIBARCHIVE_PREFIX}/include")
-endif()
 find_package(LibArchive REQUIRED)
 include_directories(${LibArchive_INCLUDE_DIR})
+3 −2
Original line number Diff line number Diff line
@@ -40,6 +40,9 @@ stdenv.mkDerivation (finalAttrs: {
  patches = [
    # From https://github.com/LibreSprite/LibreSprite/pull/565
    ./cmake4.diff
    # Remove Homebrew-specific brew invocation for libarchive on Darwin;
    # Nix provides libarchive directly via buildInputs.
    ./no-brew.patch
  ];
  nativeBuildInputs = [
    cmake
@@ -110,7 +113,5 @@ stdenv.mkDerivation (finalAttrs: {
    '';
    maintainers = with lib.maintainers; [ fgaz ];
    platforms = lib.platforms.all;
    # https://github.com/LibreSprite/LibreSprite/issues/308
    broken = stdenv.hostPlatform.isDarwin;
  };
})