Browse Source

package: added Homebrew package.

pull/2/head
Vladimír Vondruš 7 years ago
parent
commit
8b9146dc78
  1. 27
      doc/python/pages/building.rst
  2. 25
      package/homebrew/magnum-bindings.rb

27
doc/python/pages/building.rst

@ -69,6 +69,33 @@ Once built, install the package using ``pacman``:
sudo pacman -U magnum-bindings-*.pkg.tar.xz
`Homebrew formulas for macOS`_
------------------------------
macOS `Homebrew <https://brew.sh>`_ formulas building the latest Git revision
are in the `package/homebrew` directory. Either use the `*.rb` files directly
or use the tap at https://github.com/mosra/homebrew-magnum. Right now, there's
no stable release of Python bindings yet, so you need to install the latest Git
revision of all Magnum projects instead:
.. code:: sh
brew install --HEAD mosra/magnum/corrade
brew install --HEAD mosra/magnum/magnum
brew install --HEAD mosra/magnum/magnum-bindings
When installing from the `*.rb` files you need to install the
:dox:`Corrade <building-corrade-packages-brew>` and
:dox:`Magnum <building-packages-brew>` Homebrew packages first. If you want to
pass additional flags to CMake or ``setup.py`` or enable / disable additional
features, edit the ``*.rb`` file.
There are also Homebrew packages for
:dox:`Magnum Plugins <building-plugins-packages-brew>`
:dox:`Magnum Integration <building-integration-packages-brew>`,
:dox:`Magnum Extras <building-extras-packages-brew>` and
:dox:`Magnum Examples <building-examples-packages-brew>`.
`Manual build`_
===============

25
package/homebrew/magnum-bindings.rb

@ -0,0 +1,25 @@
class MagnumBindings < Formula
desc "`Bindings for the Magnum C++11/C++14 graphics engine"
homepage "https://magnum.graphics"
# url "https://github.com/mosra/magnum-plugins/archive/v2019.01.tar.gz"
# wget https://github.com/mosra/magnum-plugins/archive/v2019.01.tar.gz -O - | sha256sum
# sha256 "d3adadc5b6d4f2e5061608d67f0c7fa07f0dd078bab4672dc5604ddbcd11ca80"
head "git://github.com/mosra/magnum-bindings.git"
depends_on "cmake"
depends_on "python"
depends_on "magnum"
depends_on "pybind11" => :build
def install
system "mkdir build"
cd "build" do
system "cmake", "-DCMAKE_BUILD_TYPE=Release", "-DCMAKE_INSTALL_PREFIX=#{prefix}", "-DWITH_PYTHON=ON", ".."
system "cmake", "--build", "."
system "cmake", "--build", ".", "--target", "install"
cd "src/python" do
system "python3", *Language::Python.setup_install_args(prefix)
end
end
end
end
Loading…
Cancel
Save