packages feed

yoga-0.0.0.7: yoga.cabal

cabal-version:       2.2
-- Initial yoga.cabal generated by cabal init.  For further documentation, 
-- see http://haskell.org/cabal/users-guide/

name:                yoga
version:             0.0.0.7
synopsis:            Bindings to Facebook's Yoga layout library
description:         The <https://facebook.github.com/yoga Yoga> library from
                     <https://facebook.github.com/ Facebook> is a fast layout engine
                     written in C that implements flexbox. There are two
                     main ways to interface with these bindings. The high-level
                     bindings are stored in the Yoga module and provide a more
                     Haskell-like interface to the library. The other option is to
                     directly use the C-level bindings in "Bindings.Yoga". If you do
                     so you do so at your own risk (i.e. you must manage your own
                     memory).

                     The examples are not built nor included by default. Please
                     refer to the source tarball for examples on how to use this
                     library.

                     These bindings are not affiliated with Facebook in any way,
                     and have been developed separately for the sole purpose of
                     interfacing with their open source library.
license:             BSD-3-Clause
license-file:        LICENSE
author:              Pavel Krajcevski
maintainer:          Krajcevski@gmail.com
copyright:           2017-present
category:            Graphics
build-type:          Simple

source-repository head
  type:           git
  location:       https://www.github.com/Mokosha/yoga-hs.git

library
  default-language: Haskell2010
  hs-source-dirs:      lib

  ghc-options: -Wall
  if impl(ghc >= 8.0)
    ghc-options:      -Wno-redundant-constraints
  if impl(ghc >= 6.8)
    ghc-options:      -fwarn-tabs
  build-tool-depends: hsc2hs:hsc2hs >= 0.68
  include-dirs:       yoga/
                    , yoga/yoga/
  install-includes:   YGConfig.h
                      YGEnums.h
                      YGMacros.h
                      YGNode.h
                      YGNodeLayout.h
                      YGNodeStyle.h
                      YGPixelGrid.h
                      YGValue.h
                      algorithm/AbsoluteLayout.h
                      algorithm/Align.h
                      algorithm/Baseline.h
                      algorithm/BoundAxis.h
                      algorithm/Cache.h
                      algorithm/CalculateLayout.h
                      algorithm/FlexDirection.h
                      algorithm/FlexLine.h
                      algorithm/PixelGrid.h
                      algorithm/SizingMode.h
                      algorithm/TrailingPosition.h
                      config/Config.h
                      debug/AssertFatal.h
                      debug/Log.h
                      debug/NodeToString.h
                      enums/Align.h
                      enums/Dimension.h
                      enums/Direction.h
                      enums/Display.h
                      enums/Edge.h
                      enums/Errata.h
                      enums/ExperimentalFeature.h
                      enums/FlexDirection.h
                      enums/Gutter.h
                      enums/Justify.h
                      enums/LogLevel.h
                      enums/MeasureMode.h
                      enums/NodeType.h
                      enums/Overflow.h
                      enums/PositionType.h
                      enums/PrintOptions.h
                      enums/Unit.h
                      enums/Wrap.h
                      enums/YogaEnums.h
                      event/event.h
                      node/CachedMeasurement.h
                      node/LayoutResults.h
                      node/Node.h
                      numeric/Comparison.h
                      numeric/FloatOptional.h
                      style/CompactValue.h
                      style/Style.h
                      style/StyleLength.h
                      Yoga.h 

  c-sources:          lib/Bindings/glue.c
  cxx-sources:        yoga/yoga/YGConfig.cpp
                      yoga/yoga/YGEnums.cpp
                      yoga/yoga/YGNode.cpp
                      yoga/yoga/YGNodeLayout.cpp
                      yoga/yoga/YGNodeStyle.cpp
                      yoga/yoga/YGPixelGrid.cpp
                      yoga/yoga/YGValue.cpp
                      yoga/yoga/algorithm/AbsoluteLayout.cpp
                      yoga/yoga/algorithm/Baseline.cpp
                      yoga/yoga/algorithm/Cache.cpp
                      yoga/yoga/algorithm/CalculateLayout.cpp
                      yoga/yoga/algorithm/FlexLine.cpp
                      yoga/yoga/algorithm/PixelGrid.cpp
                      yoga/yoga/config/Config.cpp
                      yoga/yoga/debug/AssertFatal.cpp
                      yoga/yoga/debug/Log.cpp
                      yoga/yoga/debug/NodeToString.cpp
                      yoga/yoga/event/event.cpp
                      yoga/yoga/node/LayoutResults.cpp
                      yoga/yoga/node/Node.cpp

  cxx-options:        -fno-omit-frame-pointer
                      -fexceptions
                      -fvisibility=hidden
                      -ffunction-sections
                      -fdata-sections
                      -std=c++20
                      -DYG_ENABLE_EVENTS

  extra-libraries:    stdc++

  exposed-modules:
    Bindings.Yoga
    Bindings.Yoga.Enums
    Yoga

  build-depends:
    base            >= 4     && < 6,
    ieee754         >= 0.7,
    bindings-DSL

flag                 examples
  description:       Build examples
  default:           False

executable yoga-example
  default-language: Haskell2010
  main-is:          Main.hs
  hs-source-dirs:   examples
  ghc-options:      -Wall -rtsopts -O3
  build-depends:    base          >  4,
                    yoga

  if flag(examples)
    buildable:    True
  else
    buildable:    False

test-suite spec
  default-language:    Haskell2010
  hs-source-dirs:      test
  type:                exitcode-stdio-1.0
  main-is:             Spec.hs
  other-modules:       Bindings.YogaSpec
  build-tool-depends:  hspec-discover:hspec-discover
  build-depends:       base > 4,
                       hspec >= 2.7,
                       hspec-discover >= 2.7,
                       yoga