mirror of
https://github.com/KranX/Vangers.git
synced 2025-11-30 23:15:27 +07:00
use 10.12 macos version as main target
This commit is contained in:
13
.github/workflows/vangers_macos_build.yml
vendored
13
.github/workflows/vangers_macos_build.yml
vendored
@@ -14,7 +14,10 @@ jobs:
|
||||
- name: update repos
|
||||
run: brew update
|
||||
- name: install libs
|
||||
run: brew install git ninja cmake sdl2 sdl2_net libogg libvorbis nasm yasm dylibbundler
|
||||
run: |
|
||||
brew install git ninja cmake libogg libvorbis nasm yasm dylibbundler
|
||||
brew install -s ./sdl2.rb
|
||||
brew install -s ./sdl2_net.rb
|
||||
- name: clunk -- download lib
|
||||
run: git clone --depth 1 https://github.com/stalkerg/clunk.git clunk
|
||||
- name: clunk -- create build dir
|
||||
@@ -38,16 +41,24 @@ jobs:
|
||||
--disable-doc --disable-ffplay --disable-ffprobe --disable-ffmpeg
|
||||
--disable-static --disable-bzlib --disable-libopenjpeg --disable-iconv
|
||||
working-directory: ffmpeg
|
||||
env:
|
||||
MACOSX_DEPLOYMENT_TARGET: 10.12
|
||||
- name: ffmpeg -- build and install
|
||||
run: |
|
||||
make -j4
|
||||
sudo make install
|
||||
working-directory: ffmpeg
|
||||
env:
|
||||
MACOSX_DEPLOYMENT_TARGET: 10.12
|
||||
- name: configure
|
||||
run: mkdir build && cd build && cmake -G Ninja ..
|
||||
env:
|
||||
MACOSX_DEPLOYMENT_TARGET: 10.12
|
||||
- name: make
|
||||
run: ninja
|
||||
working-directory: build
|
||||
env:
|
||||
MACOSX_DEPLOYMENT_TARGET: 10.12
|
||||
- name: vangers -- prepare release folder
|
||||
run: |
|
||||
mkdir Vangers.app/Contents/Frameworks
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.12" CACHE STRING "Minimum OS X deployment version")
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.1.0)
|
||||
|
||||
# root
|
||||
PROJECT(vangers)
|
||||
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.1.0)
|
||||
|
||||
# modules
|
||||
SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
|
||||
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
<key>IFMinorVersion</key>
|
||||
<integer>1</integer>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.10.0</string>
|
||||
<string>10.12.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
51
sdl2.rb
Normal file
51
sdl2.rb
Normal file
@@ -0,0 +1,51 @@
|
||||
class Sdl2 < Formula
|
||||
desc "Low-level access to audio, keyboard, mouse, joystick, and graphics"
|
||||
homepage "https://www.libsdl.org/"
|
||||
url "https://libsdl.org/release/SDL2-2.0.12.tar.gz"
|
||||
sha256 "349268f695c02efbc9b9148a70b85e58cefbbf704abd3e91be654db7f1e2c863"
|
||||
revision 1
|
||||
|
||||
bottle do
|
||||
cellar :any
|
||||
sha256 "4dcd635465d16372ca7a7bb2b94221aa21de02f681a22e9239d095b66fb00c63" => :catalina
|
||||
sha256 "8733b127dd4ba6179e6ad9e6336418df9dbad8eb13f05597c05e6916f2ff0543" => :mojave
|
||||
sha256 "b71346aebd499ed30f6de2f58a333c50575bc3bf73fbba6dcaef5a04c58282c5" => :high_sierra
|
||||
end
|
||||
|
||||
head do
|
||||
url "https://hg.libsdl.org/SDL", :using => :hg
|
||||
|
||||
depends_on "autoconf" => :build
|
||||
depends_on "automake" => :build
|
||||
depends_on "libtool" => :build
|
||||
end
|
||||
|
||||
on_linux do
|
||||
depends_on "pkg-config" => :build
|
||||
end
|
||||
|
||||
# Fix library extension in CMake config file.
|
||||
# https://bugzilla.libsdl.org/show_bug.cgi?id=5039
|
||||
patch do
|
||||
url "https://bugzilla.libsdl.org/attachment.cgi?id=4263"
|
||||
sha256 "07ea066e805f82d85e6472e767ba75d265cb262053901ac9a9e22c5f8ff187a5"
|
||||
end
|
||||
|
||||
def install
|
||||
# we have to do this because most build scripts assume that all SDL modules
|
||||
# are installed to the same prefix. Consequently SDL stuff cannot be
|
||||
# keg-only but I doubt that will be needed.
|
||||
inreplace %w[sdl2.pc.in sdl2-config.in], "@prefix@", HOMEBREW_PREFIX
|
||||
|
||||
system "./autogen.sh" if build.head?
|
||||
|
||||
args = %W[--prefix=#{prefix} --without-x]
|
||||
ENV["MACOSX_DEPLOYMENT_TARGET"] = "10.12"
|
||||
system "./configure", *args
|
||||
system "make", "install"
|
||||
end
|
||||
|
||||
test do
|
||||
system bin/"sdl2-config", "--version"
|
||||
end
|
||||
end
|
||||
44
sdl2_net.rb
Normal file
44
sdl2_net.rb
Normal file
@@ -0,0 +1,44 @@
|
||||
class Sdl2Net < Formula
|
||||
desc "Small sample cross-platform networking library"
|
||||
homepage "https://www.libsdl.org/projects/SDL_net/"
|
||||
url "https://www.libsdl.org/projects/SDL_net/release/SDL2_net-2.0.1.tar.gz"
|
||||
sha256 "15ce8a7e5a23dafe8177c8df6e6c79b6749a03fff1e8196742d3571657609d21"
|
||||
|
||||
bottle do
|
||||
cellar :any
|
||||
sha256 "920e892ba80cba3a99d4a15473351be5dc23f0d9445c28480c5dae904e8a8271" => :catalina
|
||||
sha256 "0631754a7016b3e6e175644cc7976cc22843f7b872e8f50662d0cb50a4264901" => :mojave
|
||||
sha256 "f193c7c2ae1b7f2c82cbbc9b83a16fc72d845c6396ecd33644eea19695a850ee" => :high_sierra
|
||||
sha256 "dc2b96762f77dd4d42fea1da4d4c2373692dd0a531f686f00de0dd4a6eed8df9" => :sierra
|
||||
sha256 "46d189ebe1f240381a9e8d99a2cb249e577cec98e6399e741e47275735a3471c" => :el_capitan
|
||||
sha256 "2e2bcc1e1aac84b37ebb44398e463d9004764aa369489926cd07bb97cb9f60c4" => :yosemite
|
||||
sha256 "ebabcb8f4df6fdee7855a6e19080aea42d9909205b287312015179bb9b3f472a" => :mavericks
|
||||
end
|
||||
|
||||
depends_on "pkg-config" => :build
|
||||
depends_on "sdl2"
|
||||
|
||||
def install
|
||||
inreplace "SDL2_net.pc.in", "@prefix@", HOMEBREW_PREFIX
|
||||
ENV["MACOSX_DEPLOYMENT_TARGET"] = "10.12"
|
||||
system "./configure", "--disable-dependency-tracking",
|
||||
"--prefix=#{prefix}", "--disable-sdltest"
|
||||
system "make", "install"
|
||||
end
|
||||
|
||||
test do
|
||||
(testpath/"test.c").write <<~EOS
|
||||
#include <SDL2/SDL_net.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
int success = SDLNet_Init();
|
||||
SDLNet_Quit();
|
||||
return success;
|
||||
}
|
||||
EOS
|
||||
|
||||
system ENV.cc, "-L#{lib}", "-lsdl2_net", "test.c", "-o", "test"
|
||||
system "./test"
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user