From f4f6d66010d21e49fdf581ea031919496f980fa5 Mon Sep 17 00:00:00 2001 From: Dean M Greer <38226388+Gcenx@users.noreply.github.com> Date: Sun, 22 Dec 2024 10:04:44 -0500 Subject: [PATCH] Delete Formula directory --- Formula/cx-llvm.rb | 72 --------------- Formula/game-porting-toolkit.rb | 156 -------------------------------- Formula/libinotify-kqueue.rb | 50 ---------- 3 files changed, 278 deletions(-) delete mode 100644 Formula/cx-llvm.rb delete mode 100644 Formula/game-porting-toolkit.rb delete mode 100644 Formula/libinotify-kqueue.rb diff --git a/Formula/cx-llvm.rb b/Formula/cx-llvm.rb deleted file mode 100644 index 9c4f9c4..0000000 --- a/Formula/cx-llvm.rb +++ /dev/null @@ -1,72 +0,0 @@ -class CxLlvm < Formula - desc "CodeWeavers custom compiler for -mwine32 targets" - homepage "https://codeweavers.com/" - url "https://media.codeweavers.com/pub/crossover/source/crossover-sources-22.1.1.tar.gz" - sha256 "cdfe282ce33788bd4f969c8bfb1d3e2de060eb6c296fa1c3cdf4e4690b8b1831" - license "NCSA" - revision 1 - - bottle do - root_url "https://github.com/Gcenx/homebrew-wine/releases/download/cx-llvm-22.1.1_1" - sha256 cellar: :any, ventura: "3064104744baffad31e1a56e8f47090a9e351460639e72c85705206854771caf" - end - - # Clang cannot find system headers if Xcode CLT is not installed - pour_bottle? only_if: :clt_installed - - keg_only :versioned_formula - - # https://llvm.org/docs/GettingStarted.html#requirement - depends_on "cmake" => :build - depends_on xcode: :build - depends_on arch: :x86_64 - depends_on :macos - - uses_from_macos "libedit" - uses_from_macos "libffi" - uses_from_macos "libxml2" - uses_from_macos "ncurses" - uses_from_macos "zlib" - - def install - mv "clang/clang", "clang/llvm/projects/clang" - mv "clang/llvm", "llvm" - - # Apple's libstdc++ is too old to build LLVM - ENV.libcxx if ENV.compiler == :clang - - # compiler-rt has some iOS simulator features that require i386 symbols - # I'm assuming the rest of clang needs support too for 32-bit compilation - # to work correctly, but if not, perhaps universal binaries could be - # limited to compiler-rt. llvm makes this somewhat easier because compiler-rt - # can almost be treated as an entirely different build from llvm. - ENV.permit_arch_flags - - args = %W[ - -DLIBOMP_ARCH=x86_64 - -DFFI_INCLUDE_DIR=#{MacOS.sdk_path}/usr/include/ffi - -DFFI_LIBRARY_DIR=#{MacOS.sdk_path}/usr/lib - ] - - if MacOS.version >= :mojave - sdk_path = MacOS::CLT.installed? ? "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk" : MacOS.sdk_path - args << "-DDEFAULT_SYSROOT=#{sdk_path}" - end - - cd "llvm" do - mkdir "build" do - system "cmake", "-G", "Unix Makefiles", "..", *(std_cmake_args + args) - system "make" - system "make", "install" - end - end - end - - def post_install - rm lib/"libLTO.dylib" - end - - test do - system "#{bin}/clang", "--version" - end -end diff --git a/Formula/game-porting-toolkit.rb b/Formula/game-porting-toolkit.rb deleted file mode 100644 index 55dd7ab..0000000 --- a/Formula/game-porting-toolkit.rb +++ /dev/null @@ -1,156 +0,0 @@ -class GamePortingToolkit < Formula - desc "Apple Game Porting Toolkit" - homepage "https://developer.apple.com/" - url "https://github.com/The-Wineskin-Project/wine/archive/refs/heads/Game-Porting-Toolkit-1.1-Fixup.tar.gz" - sha256 "bfaa71e578bdaf19258f6533684f169f74c88ae9b1037465f3051e19c1f25ecd" - - bottle do - root_url "https://github.com/Gcenx/homebrew-wine/releases/download/game-porting-toolkit-1.1" - rebuild 1 - sha256 ventura: "0244f3af8510a68da428a7ecf40a49eee768bc93a5f1dd89f902a502507dc613" - end - - keg_only :versioned_formula - - depends_on "bison" => :build - depends_on "cx-llvm" => :build - depends_on "mingw-w64" => :build - depends_on "pkg-config" => :build - depends_on arch: :x86_64 - depends_on "freetype" - depends_on "gettext" - depends_on "glib" - depends_on "gnutls" - depends_on "gstreamer" - depends_on :macos - depends_on "sdl2" - - uses_from_macos "flex" => :build - - resource "gecko-x86" do - url "https://dl.winehq.org/wine/wine-gecko/2.47.2/wine-gecko-2.47.2-x86.tar.xz" - sha256 "8fab46ea2110b2b0beed414e3ebb4e038a3da04900e7a28492ca3c3ccf9fea94" - end - - resource "gecko-x86_64" do - url "https://dl.winehq.org/wine/wine-gecko/2.47.2/wine-gecko-2.47.2-x86_64.tar.xz" - sha256 "b4476706a4c3f23461da98bed34f355ff623c5d2bb2da1e2fa0c6a310bc33014" - end - - patch do - url "https://raw.githubusercontent.com/Gcenx/macports-wine/daba9fb681127057c716bffd86f4c7d78da4b025/devel/game-porting-toolkit/files/1006-build_fixes.diff" - sha256 "0fe0c90b1d2f57a3ad0d1b1d1924cdfebf1c362ca8ac4ff2adb864209d0a44c5" - end - - def install - # Bypass the Homebrew shims to build native binaries with the dedicated compiler. - # (PE binaries will be built with mingw32-gcc.) - compiler = Formula["cx-llvm"] - compiler_options = ["CC=#{compiler.bin}/clang", - "CXX=#{compiler.bin}/clang++"] - - # Compiler flags for PE binaries. - ENV.append "CROSSCFLAGS", "-O3 -Wno-error=incompatible-pointer-types -Wno-error=int-conversion" - - # We also need to tell the linker to add Homebrew to the rpath stack. - ENV.append "LDFLAGS", "-lSystem" - ENV.append "LDFLAGS", "-L#{HOMEBREW_PREFIX}/lib" - ENV.append "LDFLAGS", "-Wl,-rpath,#{HOMEBREW_PREFIX}/lib" - ENV.append "LDFLAGS", "-Wl,-rpath,@executable_path/../lib/external" - - # Compiler flags for Mach-O binaries. - ENV.append_to_cflags "-O3 -Wno-deprecated-declarations -Wno-incompatible-pointer-types" - # Use an older deployment target to avoid new dyld behaviors. - # The custom compiler is too old to accept "13.0", so we use "10.14". - ENV["MACOSX_DEPLOYMENT_TARGET"] = "10.14" - - wine_configure_options = ["--prefix=#{prefix}", - "--disable-tests", - "--without-alsa", - "--without-capi", - "--with-coreaudio", - "--with-cups", - "--without-dbus", - "--with-freetype", - "--with-gettext", - "--without-gettextpo", - "--without-gphoto", - "--with-gnutls", - "--without-gssapi", - "--with-gstreamer", - "--without-inotify", - "--without-krb5", - "--with-mingw", - "--without-netapi", - "--without-openal", - "--with-opencl", - "--with-opengl", - "--without-oss", - "--with-pcap", - "--with-pthread", - "--without-pulse", - "--without-sane", - "--with-sdl", - "--without-udev", - "--with-unwind", - "--without-usb", - "--without-v4l2", - "--without-vulkan", - "--without-x"] - - wine64_configure_options = ["--enable-win64"] - - wine32_configure_options = ["--enable-win32on64", - "--with-wine64=../wine64-build"] - - # We don't need wineloader - wine32_configure_options += ["--disable-loader"] - - # Build 64-bit Wine first. - mkdir buildpath/"wine64-build" do - system buildpath/"configure", *wine_configure_options, *wine64_configure_options, *compiler_options - system "make" - end - - # Now build 32-on-64 Wine. - mkdir buildpath/"wine32-build" do - system buildpath/"configure", *wine_configure_options, *wine32_configure_options, *compiler_options - system "make" - end - - # Install both builds. - cd "wine64-build" do - system "make", "install-lib" - end - - cd "wine32-build" do - system "make", "install-lib" - end - end - - def post_install - # Homebrew replaces wine's rpath names with absolute paths, we need to change them back to @rpath relative paths - # Wine relies on @rpath names to cause dlopen to always return the first dylib with that name loaded into - # the process rather than the actual dylib found using rpath lookup. - Dir["#{lib}/wine/{x86_64-unix,x86_32on64-unix}/*.so"].each do |dylib| - chmod 0664, dylib - MachO::Tools.change_dylib_id(dylib, "@rpath/#{File.basename(dylib)}") - MachO.codesign!(dylib) - chmod 0444, dylib - end - - # Install wine-gecko into place - (share/"wine"/"gecko"/"wine-gecko-2.47.2-x86").install resource("gecko-x86") - (share/"wine"/"gecko"/"wine-gecko-2.47.2-x86_64").install resource("gecko-x86_64") - end - - def caveats - return unless latest_version_installed? - - "Please follow the instructions in the Game Porting Toolkit README to complete installation." - end - - test do - system bin/"wine64", "--version" - end -end diff --git a/Formula/libinotify-kqueue.rb b/Formula/libinotify-kqueue.rb deleted file mode 100644 index c0b1bcd..0000000 --- a/Formula/libinotify-kqueue.rb +++ /dev/null @@ -1,50 +0,0 @@ -class LibinotifyKqueue < Formula - desc "BSD port of Linux's inotify" - homepage "https://github.com/libinotify-kqueue/libinotify-kqueue" - url "https://github.com/libinotify-kqueue/libinotify-kqueue.git", - tag: "20211018", - revision: "ea7835fcafc3cee2a0d6c0e3c8034962c48f6afe" - license "MIT" - revision 1 - head "https://github.com/libinotify-kqueue/libinotify-kqueue.git", - branch: "master" - - bottle do - root_url "https://github.com/Gcenx/homebrew-wine/releases/download/libinotify-kqueue-20211018_1" - sha256 cellar: :any, ventura: "3000eeab47d7c30b4887f264d1b07527791d38ee5cf3d65beb5869261fb9f115" - end - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "gcc" => :build - depends_on "libtool" => :build - depends_on :macos - - def install - # Autoconf - system "autoreconf", "-fiv" - # Configure - system "./configure" - # Build - system "make" - # Copy - system "make", "install", "DESTDIR=#{buildpath}" - # Move - lib.install Dir["#{buildpath}/usr/local/lib/*"] - include.install Dir["#{buildpath}/usr/local/include/*"] - man.install Dir["#{buildpath}/usr/local/share/man/*"] - end - - test do - # Check if the library is installed - (testpath/"test.cpp").write <<~EOS - #include - int main() { - inotify_init(); - return 0; - } - EOS - system ENV.cc, "test.cpp", "-L#{lib}", "-linotify", "-o", "test" - system "./test" - end -end