aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Mk/Uses/php.mk7
-rw-r--r--lang/Makefile1
-rw-r--r--lang/zephir/Makefile36
-rw-r--r--lang/zephir/distinfo3
-rwxr-xr-xlang/zephir/pkg-descr6
5 files changed, 50 insertions, 3 deletions
diff --git a/Mk/Uses/php.mk b/Mk/Uses/php.mk
index b4cc5a376b6c..2b7972fa7e05 100644
--- a/Mk/Uses/php.mk
+++ b/Mk/Uses/php.mk
@@ -391,9 +391,9 @@ _USE_PHP_ALL= bcmath bitset bz2 calendar ctype curl dba dom \
soap sockets sodium spl sqlite3 sysvmsg sysvsem sysvshm \
tidy tokenizer xml xmlreader xmlrpc xmlwriter xsl zip zlib
# version specific components
-_USE_PHP_VER74= ${_USE_PHP_ALL} pdf
-_USE_PHP_VER80= ${_USE_PHP_ALL}
-_USE_PHP_VER81= ${_USE_PHP_ALL}
+_USE_PHP_VER74= ${_USE_PHP_ALL} pdf zephir_parser
+_USE_PHP_VER80= ${_USE_PHP_ALL} zephir_parser
+_USE_PHP_VER81= ${_USE_PHP_ALL} zephir_parser
_USE_PHP_VER82= ${_USE_PHP_ALL}
bcmath_DEPENDS= math/php${PHP_VER}-bcmath
@@ -469,6 +469,7 @@ xmlrpc_DEPENDS= net/php${PHP_VER}-xmlrpc
. endif
xmlwriter_DEPENDS= textproc/php${PHP_VER}-xmlwriter
xsl_DEPENDS= textproc/php${PHP_VER}-xsl
+zephir_parser_DEPENDS= textproc/pecl-zephir_parser@${PHP_FLAVOR}
zip_DEPENDS= archivers/php${PHP_VER}-zip
zlib_DEPENDS= archivers/php${PHP_VER}-zlib
diff --git a/lang/Makefile b/lang/Makefile
index 1d8ca3a44866..bd4332c3c307 100644
--- a/lang/Makefile
+++ b/lang/Makefile
@@ -368,6 +368,7 @@
SUBDIR += yap
SUBDIR += yorick
SUBDIR += ypsilon
+ SUBDIR += zephir
SUBDIR += zig
SUBDIR += zig-devel
diff --git a/lang/zephir/Makefile b/lang/zephir/Makefile
new file mode 100644
index 000000000000..949834f82ea6
--- /dev/null
+++ b/lang/zephir/Makefile
@@ -0,0 +1,36 @@
+PORTNAME= zephir
+DISTVERSION= 0.16.0
+CATEGORIES= lang
+MASTER_SITES= https://github.com/zephir-lang/${PORTNAME}/releases/download/${DISTVERSION}/
+PKGNAMEPREFIX= ${PHP_PKGNAMEPREFIX}
+DISTNAME= ${PORTNAME}
+EXTRACT_SUFX= .phar
+DIST_SUBDIR= ${PORTNAME}-${PORTVERSION}
+
+MAINTAINER= cmcdonald@netgate.com
+COMMENT= Zephir is a transpiled language used for creating C-extensions for PHP
+
+LICENSE= MIT
+
+RUN_DEPENDS= re2c>0:devel/re2c
+
+USES= php:cli,flavors
+USE_PHP= dom filter iconv phar xml zephir_parser zlib
+IGNORE_WITH_PHP= 82
+
+NO_ARCH= yes
+NO_BUILD= yes
+NO_WRKSUBDIR= yes
+
+PLIST_FILES= bin/${DISTNAME} \
+ bin/${DISTNAME}${EXTRACT_SUFX}
+
+do-extract:
+ ${MKDIR} ${WRKSRC}/
+ ${CP} ${_DISTDIR}/${DISTNAME}${EXTRACT_SUFX} ${WRKSRC}/
+
+do-install:
+ ${INSTALL_SCRIPT} ${WRKSRC}/${DISTNAME}${EXTRACT_SUFX} ${STAGEDIR}${PREFIX}/bin/
+ ${LN} -s ${DISTNAME}${EXTRACT_SUFX} ${STAGEDIR}${PREFIX}/bin/${DISTNAME}
+
+.include <bsd.port.mk>
diff --git a/lang/zephir/distinfo b/lang/zephir/distinfo
new file mode 100644
index 000000000000..bd2674b014cf
--- /dev/null
+++ b/lang/zephir/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1660053023
+SHA256 (zephir-0.16.0/zephir.phar) = c9a453f815d03535fe8c48eca57e74167b71892fd4442e9497ff6af247a35b33
+SIZE (zephir-0.16.0/zephir.phar) = 1777747
diff --git a/lang/zephir/pkg-descr b/lang/zephir/pkg-descr
new file mode 100755
index 000000000000..9ee8574a1e27
--- /dev/null
+++ b/lang/zephir/pkg-descr
@@ -0,0 +1,6 @@
+Zephir is a high level programming language that eases the creation and
+maintainability of extensions for PHP. Zephir extensions are exported to
+C code that can be compiled and optimized by major C compilers such as
+gcc/clang/vc++. Functionality is exposed to the PHP language.
+
+WWW: https://github.com/zephir-lang/zephir