1
0
forked from GitHub/gf-core

Merge branch 'majestic' of github.com:GrammaticalFramework/gf-core into majestic

This commit is contained in:
krangelov
2021-08-13 19:29:39 +02:00
3 changed files with 99 additions and 41 deletions

View File

@@ -11,20 +11,34 @@ jobs:
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Install build tools # All these are already available in GitHub runner
run: | # - name: Install build tools
sudo apt-get update # run: |
sudo apt-get install -y \ # sudo apt-get update
autoconf \ # sudo apt-get install -y \
automake \ # autoconf \
autotools-dev \ # automake \
g++ \ # libtool \
libtool \ # make \
make # g++
- name: Build package - name: Build runtime
working-directory: ./src/runtime/c working-directory: ./src/runtime/c
run: | run: |
autoreconf -i autoreconf -i
./configure ./configure
make make
sudo make install
- name: Setup Haskell
uses: haskell/actions/setup@v1
# with:
# ghc-version: '8.6'
# cabal-version: '2.4.1.0'
- name: Run testsuite
working-directory: ./src/runtime/haskell
env:
LD_LIBRARY_PATH: /usr/local/lib
run: |
cabal test --extra-lib-dirs=/usr/local/lib

27
src/runtime/c/README.md Normal file
View File

@@ -0,0 +1,27 @@
# "Majestic" C Runtime
## Requirements
Required system packages (Debian/Ubuntu):
```
autoconf
automake
libtool
make
g++
```
## Installation
Installing the runtime (puts libraries in `/usr/local/lib`):
```
autoreconf -i
./configure
make
make install
```
## Using
- Compiling GF with this runtime will require flag `--extra-lib-dirs=/usr/local/lib`.
- Running GF with this runtime will require environment variable `LD_LIBRARY_PATH=/usr/local/lib`

View File

@@ -1,28 +1,42 @@
name: pgf2 name: pgf2
version: 0.1.0.0 version: 2.0.0
-- synopsis:
-- description: cabal-version: 1.22
homepage: http://www.grammaticalframework.org
license: LGPL-3
--license-file: LICENSE
author: Krasimir Angelov, Inari
maintainer:
-- copyright:
category: Language
build-type: Simple build-type: Simple
extra-source-files: README license: LGPL-3
cabal-version: >=1.10 license-file: LICENSE
category: Natural Language Processing
-- synopsis: Bindings to the C version of the PGF runtime
-- description:
-- GF, Grammatical Framework, is a programming language for multilingual grammar applications.
-- GF grammars are compiled into Portable Grammar Format (PGF) which can be used with the PGF runtime, written in C.
-- This package provides Haskell bindings to that runtime.
homepage: https://www.grammaticalframework.org/
bug-reports: https://github.com/GrammaticalFramework/gf-core/issues
author: Krasimir Angelov
-- tested-with: GHC==7.10.3, GHC==8.0.2, GHC==8.10.4
extra-source-files:
CHANGELOG.md
README.md
library library
exposed-modules: PGF2, PGF2.Internal, exposed-modules:
PGF2,
PGF2.Internal,
-- backwards compatibility API: -- backwards compatibility API:
PGF PGF
other-modules: PGF2.FFI, PGF2.Expr, PGF2.Type other-modules:
build-depends: base >=4.3, containers, pretty, array, random PGF2.FFI,
-- hs-source-dirs: PGF2.Expr,
PGF2.Type
build-depends:
base >= 4.3 && < 4.16,
containers,
pretty,
array,
random
default-language: Haskell2010 default-language: Haskell2010
build-tools: hsc2hs build-tools: hsc2hs
extra-libraries: pgf extra-libraries: pgf
cc-options: -std=c99 cc-options: -std=c99
c-sources: utils.c c-sources: utils.c
@@ -31,4 +45,7 @@ test-suite basic
type: exitcode-stdio-1.0 type: exitcode-stdio-1.0
main-is: tests/basic.hs main-is: tests/basic.hs
default-language: Haskell2010 default-language: Haskell2010
build-depends: base, HUnit, pgf2 build-depends:
base,
HUnit,
pgf2