diff --git a/projects/swig.org/fixture.c b/projects/swig.org/fixture.c new file mode 100644 index 00000000..ff0b6fd6 --- /dev/null +++ b/projects/swig.org/fixture.c @@ -0,0 +1,4 @@ +int add(int x, int y) +{ + return x + y; +} diff --git a/projects/swig.org/fixture.i b/projects/swig.org/fixture.i new file mode 100644 index 00000000..fa58765a --- /dev/null +++ b/projects/swig.org/fixture.i @@ -0,0 +1,4 @@ +%module test +%inline %{ +extern int add(int x, int y); +%} \ No newline at end of file diff --git a/projects/swig.org/package.yml b/projects/swig.org/package.yml new file mode 100644 index 00000000..b6b1a495 --- /dev/null +++ b/projects/swig.org/package.yml @@ -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 \ No newline at end of file