Closes #517
This commit is contained in:
Max Howell 2023-03-21 10:19:00 -04:00 committed by GitHub
parent 0f15379b2a
commit 08f1a2de93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 42 additions and 0 deletions

View file

@ -0,0 +1,4 @@
int add(int x, int y)
{
return x + y;
}

View file

@ -0,0 +1,4 @@
%module test
%inline %{
extern int add(int x, int y);
%}

View file

@ -0,0 +1,34 @@
distributable:
url: https://downloads.sourceforge.net/project/swig/swig/swig-{{version}}/swig-{{version}}.tar.gz
strip-components: 1
versions:
github: swig/swig/tags
dependencies:
pcre.org/v2: '*'
runtime:
env:
SWIG_LIB: ${{prefix}}/lib
build:
dependencies:
tea.xyz/gx/cc: c99
tea.xyz/gx/make: '*'
script: |
./configure --prefix="{{prefix}}" --with-swiglibdir={{prefix}}/lib
make --jobs {{ hw.concurrency }}
make install
provides:
- bin/swig
- bin/ccache-swig
test:
dependencies:
tea.xyz/gx/cc: c99
ruby-lang.org: ^3
script: |
swig -ruby fixture.i
cc -c -fPIC -fdeclspec fixture.c fixture_wrap.c