Skip to content

Commit

Permalink
mv
Browse files Browse the repository at this point in the history
  • Loading branch information
ejconlon committed Dec 18, 2024
1 parent 31a9a2a commit 5cbd935
Show file tree
Hide file tree
Showing 143 changed files with 29 additions and 26 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Probably some FFI bugs in there, haven't tested it all yet.
## Development

You will need to checkout the submodule and run `just vendor` to copy the `libremidi` sources
into the Haskell build tree (to `libremidi/vendor`).
into the Haskell build tree (to `libremidi`).

## License

Expand Down
9 changes: 5 additions & 4 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ exe:

# Copy libremidi sources into build tree
vendor:
rm -rf libremidi/vendor
cp -r submodules/libremidi/include libremidi/vendor
cp submodules/readerwriterqueue/atomicops.h libremidi/vendor
cp submodules/readerwriterqueue/readerwriterqueue.h libremidi/vendor
rm -f libremidi/*.h
rm -rf libremidi/libremidi
cp -r submodules/libremidi/include/libremidi libremidi
cp submodules/readerwriterqueue/atomicops.h libremidi
cp submodules/readerwriterqueue/readerwriterqueue.h libremidi

File renamed without changes.
26 changes: 13 additions & 13 deletions libremidi/libremidi.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cabal-version: 2.2
-- see: https://github.com/sol/hpack

name: libremidi
version: 0.1.1
version: 0.2.0
synopsis: libremidi bindings for haskell
description: Please see the README on GitHub at <https://github.com/ejconlon/libremidi-haskell#readme>
homepage: https://github.com/ejconlon/libremidi-haskell#readme
Expand Down Expand Up @@ -65,18 +65,18 @@ library
TypeFamilies
ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wpartial-fields -Wredundant-constraints -fno-warn-unused-top-binds
include-dirs:
vendor
./
install-includes:
vendor/libremidi/libremidi-c.h
libremidi/libremidi-c.h
cxx-sources:
vendor/libremidi/client.cpp
vendor/libremidi/libremidi-c.cpp
vendor/libremidi/libremidi.cpp
vendor/libremidi/midi_in.cpp
vendor/libremidi/midi_out.cpp
vendor/libremidi/observer.cpp
vendor/libremidi/reader.cpp
vendor/libremidi/writer.cpp
libremidi/client.cpp
libremidi/libremidi-c.cpp
libremidi/libremidi.cpp
libremidi/midi_in.cpp
libremidi/midi_out.cpp
libremidi/observer.cpp
libremidi/reader.cpp
libremidi/writer.cpp
extra-libraries:
stdc++
build-depends:
Expand Down Expand Up @@ -140,7 +140,7 @@ executable libremidi-exe
TypeFamilies
ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wpartial-fields -Wredundant-constraints -fno-warn-unused-top-binds -threaded -rtsopts -with-rtsopts=-N
install-includes:
vendor/libremidi/libremidi-c.h
libremidi/libremidi-c.h
build-depends:
base >=4.12 && <5
, containers >=0.6.7 && <0.7
Expand Down Expand Up @@ -192,7 +192,7 @@ test-suite libremidi-test
TypeFamilies
ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wpartial-fields -Wredundant-constraints -fno-warn-unused-top-binds -threaded -rtsopts -with-rtsopts=-N
install-includes:
vendor/libremidi/libremidi-c.h
libremidi/libremidi-c.h
build-depends:
base >=4.12 && <5
, containers >=0.6.7 && <0.7
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 10 additions & 8 deletions libremidi/package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: libremidi
version: 0.1.1
version: 0.2.0

github: ejconlon/libremidi-haskell
license: BSD3
Expand All @@ -22,25 +22,27 @@ dependencies:
- text >= 2.0.2 && < 2.2
- transformers >= 0.6.1 && < 0.7

# Tired of fighting with cabal so I'm just spilling C includes
# into the package root...
install-includes:
- vendor/libremidi/libremidi-c.h
- libremidi/libremidi-c.h

library:
source-dirs: src
extra-libraries:
- stdc++
include-dirs:
- vendor
- .
cxx-sources:
- vendor/libremidi/*.cpp
- libremidi/*.cpp
when:
- condition: os(darwin)
cxx-options: -std=c++20 -DLIBREMIDI_COREMIDI=1
frameworks: CoreMIDI CoreAudio CoreFoundation
# -- NOTE(ejconlon) This is to make the c ffi wrapper actually catch
# -- the c++ exceptions instead of simply aborting.
# -- Cribbed from https://github.com/fpco/inline-c/pull/89
# -- avoid https://gitlab.haskell.org/ghc/ghc/issues/11829
# NOTE(ejconlon) This is to make the c ffi wrapper actually catch
# the c++ exceptions instead of simply aborting.
# Cribbed from https://github.com/fpco/inline-c/pull/89
# avoid https://gitlab.haskell.org/ghc/ghc/issues/11829
ld-options: -Wl,-keep_dwarf_unwind
ghc-options: -pgmcxx=clang++
- condition: os(linux)
Expand Down
File renamed without changes.

0 comments on commit 5cbd935

Please sign in to comment.