aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsunpoet <sunpoet@FreeBSD.org>2014-06-25 02:15:43 +0800
committersunpoet <sunpoet@FreeBSD.org>2014-06-25 02:15:43 +0800
commit195a3e31c84477534796c4ec7646fa35550fa8b8 (patch)
tree7e1056b977ee020207c4d8202184e5ccb7d85496
parent00c8568e96171ee7bd22262d65a9eb96c5c866cd (diff)
downloadfreebsd-ports-gnome-195a3e31c84477534796c4ec7646fa35550fa8b8.tar.gz
freebsd-ports-gnome-195a3e31c84477534796c4ec7646fa35550fa8b8.tar.zst
freebsd-ports-gnome-195a3e31c84477534796c4ec7646fa35550fa8b8.zip
- Add swig 3.0.2
SWIG is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages. SWIG is used with different types of target languages including common scripting languages such as Javascript, Perl, PHP, Python, Tcl and Ruby. The list of supported languages also includes non-scripting languages such as C#, Common Lisp (CLISP, Allegro CL, CFFI, UFFI), D, Go language, Java, Lua, Modula-3, OCAML, Octave and R. Also several interpreted and compiled Scheme implementations (Guile, MzScheme/Racket, Chicken) are supported. SWIG is most commonly used to create high-level interpreted or compiled programming environments, user interfaces, and as a tool for testing and prototyping C/C++ software. SWIG is typically used to parse C/C++ interfaces and generate the 'glue code' required for the above target languages to call into the C/C++ code. SWIG can also export its parse tree in the form of XML and Lisp s-expressions. WWW: http://www.swig.org/
-rw-r--r--devel/Makefile1
-rw-r--r--devel/swig30/Makefile57
-rw-r--r--devel/swig30/distinfo2
-rw-r--r--devel/swig30/files/patch-Lib_swigrun.swg10
-rw-r--r--devel/swig30/pkg-descr15
-rw-r--r--devel/swig30/pkg-plist3
6 files changed, 88 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index 2611c7aab4a1..4a8a3905c0fe 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -4572,6 +4572,7 @@
SUBDIR += swank-clojure
SUBDIR += swig13
SUBDIR += swig20
+ SUBDIR += swig30
SUBDIR += synfig
SUBDIR += sysconftool
SUBDIR += sysfsutils
diff --git a/devel/swig30/Makefile b/devel/swig30/Makefile
new file mode 100644
index 000000000000..c33d5adcc5a8
--- /dev/null
+++ b/devel/swig30/Makefile
@@ -0,0 +1,57 @@
+# Created by: jkh
+# $FreeBSD$
+
+PORTNAME= swig
+PORTVERSION= 3.0.2
+CATEGORIES= devel
+MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
+PKGNAMESUFFIX= 30
+
+MAINTAINER= sunpoet@FreeBSD.org
+COMMENT= Generate wrappers for calling C/C++ code from other languages
+
+LICENSE= GPLv3
+
+LIB_DEPENDS= libpcre.so:${PORTSDIR}/devel/pcre
+
+OPTIONS_DEFINE= DOCS EXAMPLES
+
+ALL_TARGET= # empty
+CFLAGS+= -fPIC -DPIC
+CONFIGURE_ARGS= --program-suffix=${PORTVERSION:R} \
+ --with-lua=${LUA_BINDIR}/lua \
+ --with-luaincl=${LUA_INCDIR} \
+ --with-lualib=${LUA_LIBDIR}
+GNU_CONFIGURE= yes
+USE_AUTOTOOLS= autoconf:env
+#USES= gmake libtool lua
+USES= gmake lua
+
+PLIST_SUB= MAJOR_VER=${PORTVERSION:R}
+PORTDATA= *
+PORTDOCS= *
+PORTEXAMPLES= *
+
+OCTAVE_VER_CMD= ${LOCALBASE}/bin/octave-config -v 2>/dev/null || ${TRUE}
+
+post-patch:
+ @${SETENV} OCTAVE_VER=$$(${OCTAVE_VER_CMD}) ${REINPLACE_CMD} \
+ -e 's|$$RUBY |${RUBY} |' \
+ -e 's|^PHP4CONFIG=.*$$|PHP4CONFIG=php-config|' \
+ -e 's|OCTAVEDIR=".*"|OCTAVEDIR="${LOCALBASE}/include/octave-$${OCTAVE_VER}"|' \
+ -e 's|MZSCHEME --mute-banner|MZSCHEME|' \
+ -e '/^MZDYNOBJ/s|`$$|\| tail -n 1`|' \
+ ${WRKSRC}/configure
+ @${REINPLACE_CMD} -e 's|malloc.h|stdlib.h|' ${WRKSRC}/Lib/lua/luarun.swg
+
+post-configure:
+ ${REINPLACE_CMD} -e 's#null#&|| true#' ${WRKSRC}/Makefile
+
+post-install:
+ cd ${WRKSRC}/Doc/ && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}/${PORTVERSION}
+ cd ${WRKSRC}/Examples/ && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}/${PORTVERSION}
+
+regression-test test: build
+ cd ${WRKSRC}/ && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} check
+
+.include <bsd.port.mk>
diff --git a/devel/swig30/distinfo b/devel/swig30/distinfo
new file mode 100644
index 000000000000..34aada848ad4
--- /dev/null
+++ b/devel/swig30/distinfo
@@ -0,0 +1,2 @@
+SHA256 (swig-3.0.2.tar.gz) = a2669657cabcedc371f63c0457407a183e0b6b2ef4e7e303c1ec9a3964cc7813
+SIZE (swig-3.0.2.tar.gz) = 5690863
diff --git a/devel/swig30/files/patch-Lib_swigrun.swg b/devel/swig30/files/patch-Lib_swigrun.swg
new file mode 100644
index 000000000000..ef4d00533f34
--- /dev/null
+++ b/devel/swig30/files/patch-Lib_swigrun.swg
@@ -0,0 +1,10 @@
+--- Lib/swigrun.swg.orig 2013-09-15 09:11:43.000000000 -0500
++++ Lib/swigrun.swg 2014-02-06 14:04:08.000000000 -0500
+@@ -176,6 +176,7 @@
+ #include <string.h>
+
+ #ifdef __cplusplus
++#include <string>
+ extern "C" {
+ #endif
+
diff --git a/devel/swig30/pkg-descr b/devel/swig30/pkg-descr
new file mode 100644
index 000000000000..536fd4b87784
--- /dev/null
+++ b/devel/swig30/pkg-descr
@@ -0,0 +1,15 @@
+SWIG is a software development tool that connects programs written in C and C++
+with a variety of high-level programming languages. SWIG is used with different
+types of target languages including common scripting languages such as
+Javascript, Perl, PHP, Python, Tcl and Ruby. The list of supported languages
+also includes non-scripting languages such as C#, Common Lisp (CLISP, Allegro
+CL, CFFI, UFFI), D, Go language, Java, Lua, Modula-3, OCAML, Octave and R. Also
+several interpreted and compiled Scheme implementations (Guile, MzScheme/Racket,
+Chicken) are supported. SWIG is most commonly used to create high-level
+interpreted or compiled programming environments, user interfaces, and as a tool
+for testing and prototyping C/C++ software. SWIG is typically used to parse
+C/C++ interfaces and generate the 'glue code' required for the above target
+languages to call into the C/C++ code. SWIG can also export its parse tree in
+the form of XML and Lisp s-expressions.
+
+WWW: http://www.swig.org/
diff --git a/devel/swig30/pkg-plist b/devel/swig30/pkg-plist
new file mode 100644
index 000000000000..70dce5d61462
--- /dev/null
+++ b/devel/swig30/pkg-plist
@@ -0,0 +1,3 @@
+bin/ccache-swig%%MAJOR_VER%%
+bin/swig%%MAJOR_VER%%
+man/man1/ccache-swig%%MAJOR_VER%%.1.gz