[FreeBSD]: first step of port

This commit is contained in:
Veniamin Gvozdikov 2012-08-09 22:41:37 +04:00
parent 85b5caf105
commit cef05fbb4b
7 changed files with 431 additions and 0 deletions

View File

@ -0,0 +1,233 @@
# New ports collection makefile for: openresty
# Date created: 2012-08-07
# Whom: Gvozdikov Veniamin <g.veniamin@googlemail.com>
#
# $FreeBSD$
#
PORTNAME= openresty
PORTVERSION= 1.2.1.11
CATEGORIES= www
MASTER_SITES= http://agentzh.org/misc/nginx/
DISTNAME= ngx_${PORTNAME}-${PORTVERSION}
MAINTAINER= g.veniamin@googlemail.com
COMMENT= OpenResty a powerful web app server by extending nginx
LICENSE= BSD
LIB_DEPENDS= pcre:${PORTSDIR}/devel/pcre
HAS_CONFIGURE= yes
USE_GMAKE= yes
USE_PERL5= yes
CONFIGURE_ARGS= --prefix=${PREFIX}\
--with-cc-opt="-I ${LOCALBASE}/include" \
--with-ld-opt="-L ${LOCALBASE}/lib" \
--user=${WWWOWN} --group=${WWWGRP}
OPTIONS_DEFINE= LUACJSON LUAREDISPARS LUARDS LUARESTYDNS LUARESTYMEM \
LUARESTYREDIS LUARESTYMYSQL LUARESTYUPLOAD LUARESTYSTRING \
ECHO XSS COOLKIT MISC ENCSESSION HEADERSMORE SRCACHE \
ARRAYVAR MEMC REDIS REDIS2 AUTHREQ RDSJSON RDSCVS \
ICONV NDK DRIZZLE POSTGRES
OPTIONS_SINGLE= GLUA
OPTIONS_SINGLE_GLUA= LUA LUAJIT DLUA
LUACJSON_DESC= Lua cjson library
LUAREDISPARS_DESC= Lua redis parser library
LUARDS_DESC= Lua rds library
LUARESTYDNS_DESC= Lua resty dns library
LUARESTYMEM_DESC= Lua resty memcached library
LUARESTYREDIS_DESC= Lua resty redis library
LUARESTYMYSQL_DESC= Lua resty mysql library
LUARESTYUPLOAD_DESC= Lua resty upload library
LUARESTYSTRING_DESC= Lua resty string library
ECHO_DESC= Brings echo/sleep/time and more shell-style
XSS_DESC= Native cross-site scripting support in nginx
COOLKIT_DESC= Collection of small and useful nginx add-ons
MISC_DESC= Various set_xxx directives added
ENCSESSION_DESC= Encrypt and decrypt nginx variable values
HEADERSMORE_DESC= Set and clear input and output headers
SRCACHE_DESC= Transparent subrequest-based caching layout
ARRAYVAR_DESC= Add support for array variables to config
MEMC_DESC= An extended memcached module
REDIS_DESC= HTTP redis module
REDIS2_DESC= Module for the Redis 2.0 protocol
AUTHREQ_DESC= Auth request module
RDSJSON_DESC= An output filter that formats Resty
RDSCVS_DESC= Output filter module to convert CVS
NDK_DESC= Nginx Development Kit
ICONV_DESC= Iconv support
DRIZZLE_DESC= Module for talking to MySQL and Drizzle
POSTGRES_DESC= Module for talking to Postgeres
DLUA_DESC= Disable Lua
LUA_DESC= Use LUA 5.1
LUAJIT_DESC= Use LuaJIT 2.0
OPTIONS_DEFAULT= MISC XSS ECHO COOLKIT ENCSESSION HEADERMORE LUA \
SRCACHE ARRAYVAR MEMC REDIS REDIS2 AUTHREQ RDSJSON \
RDSCVS NDK ICONV PORTGRES
.include <bsd.port.options.mk>
.if empty(${PORT_OPTIONS:MAUTHREQ})
CONFIGURE_ARGS+= --without-http_auth_request_module
.endif
.if empty(${PORT_OPTIONS:MRDSJSON})
CONFIGURE_ARGS+= --without-http_rds_json_module
.endif
.if empty(${PORT_OPTIONS:MRDSCVS})
CONFIGURE_ARGS+= --without-http_rds_csv_module
.endif
.if ${PORT_OPTIONS:MICONV}
CONFIGURE_ARGS+= --with-http_iconv_module
.endif
.if ${PORT_OPTIONS:MNDK}
.else
CONFIGURE_ARGS+= --without-ngx_devel_kit_module
.endif
.if ${PORT_OPTIONS:MDRIZZLE}
CONFIGURE_ARGS+= --with-http_drizzle_module \
--with-libdrizzle=${LOCALBASE}
LIB_DEPENDS+= drizzle:${PORTSDIR}/databases/libdrizzle
.endif
.if ${PORT_OPTIONS:MPOSTGRES}
CONFIGURE_ARGS+= --with-http_postgres_module
.endif
.if empty(${PORT_OPTIONS:MREDIS})
CONFIGURE_ARGS+= --without-http_redis_module
.endif
.if empty(${PORT_OPTIONS:MREDIS2})
CONFIGURE_ARGS+= --without-http_redis2_module
.endif
.if empty(${PORT_OPTIONS:MMEMC})
CONFIGURE_ARGS+= --without-http_memc_module
.endif
.if empty(${PORT_OPTIONS:MARRAYVAR})
CONFIGURE_ARGS+= --without-http_array_var_module
.endif
.if empty(${PORT_OPTIONS:MSRCACHE})
CONFIGURE_ARGS+= --without-http_srcache_module
.endif
.if empty(${PORT_OPTIONS:MENCSESSION})
CONFIGURE_ARGS+= --without-http_encrypted_session_module
.endif
.if empty(${PORT_OPTIONS:MHEADERSMORE})
CONFIGURE_ARGS+= --without-http_headers_more_module
.endif
.if empty(${PORT_OPTIONS:MMISC})
CONFIGURE_ARGS+= --without-http_set_misc_module
.endif
.if empty(${PORT_OPTIONS:MXSS})
CONFIGURE_ARGS+= --without-http_xss_module
.endif
.if empty(${PORT_OPTIONS:MCOOLKIT})
CONFIGURE_ARGS+= --without-http_coolkit_module
.endif
.if empty(${PORT_OPTIONS:MECHO})
CONFIGURE_ARGS+= --without-http_echo_module
.endif
.if ${PORT_OPTIONS:MLUAJIT}
CONFIGURE_ARGS+= --with-luajit
PLIST_SUB+= LUAJIT=""
.else
PLIST_SUB+= LUAJIT="@comment "
.endif
.if ${PORT_OPTIONS:MLUA}
PLIST_SUB+= LUA=""
.else
CONFIGURE_ARGS+= --without-lua51
PLIST_SUB+= LUA="@comment "
.endif
.if ${PORT_OPTIONS:MDLUA}
CONFIGURE_ARGS+= --without-http_lua_module
.endif
.if ${PORT_OPTIONS:MLUACJSON}
PLIST_SUB+= LUACJSON=""
.else
CONFIGURE_ARGS+= --without-lua_cjson
PLIST_SUB+= LUACJSON="@comment "
.endif
.if ${PORT_OPTIONS:MLUAREDISPARS}
PLIST_SUB+= LUAREDISPARS=""
.else
CONFIGURE_ARGS+= --without-lua_redis_parser
PLIST_SUB+= LUAREDISPARS="@comment "
.endif
.if ${PORT_OPTIONS:MLUARDS}
PLIST_SUB+= LUARDS=""
.else
CONFIGURE_ARGS+= --without-lua_rds_parser
PLIST_SUB+= LUARDS="@comment "
.endif
.if ${PORT_OPTIONS:MLUARESTYDNS}
PLIST_SUB+= LUARESTYDNS=""
.else
PLIST_SUB+= LUARESTYDNS="@comment "
CONFIGURE_ARGS+= --without-lua_resty_dns
.endif
.if ${PORT_OPTIONS:MLUARESTYMEM}
PLIST_SUB+= LUARESTYMEM=""
.else
PLIST_SUB+= LUARESTYMEM="@comment "
CONFIGURE_ARGS+= --without-lua_resty_memcached
.endif
.if ${PORT_OPTIONS:MLUARESTYREDIS}
PLIST_SUB+= LUARESTYREDIS=""
.else
CONFIGURE_ARGS+= --without-lua_resty_redis
PLIST_SUB+= LUARESTYREDIS="@comment "
.endif
.if ${PORT_OPTIONS:MLUARESTYMYSQL}
PLIST_SUB+= LUARESTYMYSQL=""
.else
CONFIGURE_ARGS+= --without-lua_resty_mysql
PLIST_SUB+= LUARESTYMYSQL="@comment "
.endif
.if ${PORT_OPTIONS:MLUARESTYUPLOAD}
PLIST_SUB+= LUARESTYUPLOAD=""
.else
CONFIGURE_ARGS+= --without-lua_resty_upload
PLIST_SUB+= LUARESTYUPLOAD="@comment "
.endif
.if ${PORT_OPTIONS:MLUARESTYSTRING}
PLIST_SUB+= LUARESTYSTRING=""
.else
CONFIGURE_ARGS+= --without-lua_resty_string
PLIST_SUB+= LUARESTYSTRING="@comment "
.endif
.include <bsd.port.mk>

View File

@ -0,0 +1,2 @@
SHA256 (ngx_openresty-1.2.1.11.tar.gz) = 212c3ba07d94b17fcbd4d60054bd8457fa18de3264381e8449074c78aa05f9f5
SIZE (ngx_openresty-1.2.1.11.tar.gz) = 2950664

View File

@ -0,0 +1,36 @@
--- bundle/LuaJIT-2.0.0-beta10/Makefile.orig 2012-05-09 20:00:00.000000000 +0400
+++ bundle/LuaJIT-2.0.0-beta10/Makefile 2012-08-07 23:26:28.853477336 +0400
@@ -38,8 +38,6 @@
INSTALL_JITLIB= $(INSTALL_SHARE)/luajit-$(VERSION)/jit
INSTALL_LMOD= $(INSTALL_SHARE)/lua/$(ABIVER)
INSTALL_CMOD= $(INSTALL_LIB)/lua/$(ABIVER)
-INSTALL_MAN= $(INSTALL_SHARE)/man/man1
-INSTALL_PKGCONFIG= $(INSTALL_LIB)/pkgconfig
INSTALL_TNAME= luajit-$(VERSION)
INSTALL_TSYMNAME= luajit
@@ -59,7 +57,7 @@
INSTALL_TSYM= $(INSTALL_BIN)/$(INSTALL_TSYMNAME)
INSTALL_PC= $(INSTALL_PKGCONFIG)/$(INSTALL_PCNAME)
-INSTALL_DIRS= $(INSTALL_BIN) $(INSTALL_LIB) $(INSTALL_INC) $(INSTALL_MAN) \
+INSTALL_DIRS= $(INSTALL_BIN) $(INSTALL_LIB) $(INSTALL_INC) \
$(INSTALL_PKGCONFIG) $(INSTALL_JITLIB) $(INSTALL_LMOD) $(INSTALL_CMOD)
RM= rm -f
@@ -73,7 +71,6 @@
FILE_T= luajit
FILE_A= libluajit.a
FILE_SO= libluajit.so
-FILE_MAN= luajit.1
FILE_PC= luajit.pc
FILES_INC= lua.h lualib.h lauxlib.h luaconf.h lua.hpp luajit.h
FILES_JITLIB= bc.lua v.lua dump.lua dis_x86.lua dis_x64.lua dis_arm.lua \
@@ -108,7 +105,6 @@
$(LDCONFIG) $(INSTALL_LIB) && \
$(SYMLINK) $(INSTALL_SONAME) $(INSTALL_SHORT1) && \
$(SYMLINK) $(INSTALL_SONAME) $(INSTALL_SHORT2) || :
- cd etc && $(INSTALL_F) $(FILE_MAN) $(INSTALL_MAN)
cd etc && $(SED_PC) $(FILE_PC) > $(FILE_PC).tmp && \
$(INSTALL_F) $(FILE_PC).tmp $(INSTALL_PC) && \
$(RM) $(FILE_PC).tmp

View File

@ -0,0 +1,47 @@
--- bundle/lua-5.1.5/Makefile.orig 2012-08-07 14:56:49.606517458 +0400
+++ bundle/lua-5.1.5/Makefile 2012-08-07 14:57:31.325545994 +0400
@@ -13,7 +13,6 @@
INSTALL_BIN= $(INSTALL_TOP)/bin
INSTALL_INC= $(INSTALL_TOP)/include
INSTALL_LIB= $(INSTALL_TOP)/lib
-INSTALL_MAN= $(INSTALL_TOP)/man/man1
#
# You probably want to make INSTALL_LMOD and INSTALL_CMOD consistent with
# LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h (and also with etc/lua.pc).
@@ -44,7 +43,6 @@
TO_BIN= lua luac
TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp
TO_LIB= liblua.a
-TO_MAN= lua.1 luac.1
# Lua version and release.
V= 5.1
@@ -59,11 +57,10 @@
src/lua test/hello.lua
install: dummy
- cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD)
+ cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_LMOD) $(INSTALL_CMOD)
cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN)
cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB)
- cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)
ranlib:
cd src && cd $(INSTALL_LIB) && $(RANLIB) $(TO_LIB)
@@ -95,7 +92,6 @@
@echo "INSTALL_BIN = $(INSTALL_BIN)"
@echo "INSTALL_INC = $(INSTALL_INC)"
@echo "INSTALL_LIB = $(INSTALL_LIB)"
- @echo "INSTALL_MAN = $(INSTALL_MAN)"
@echo "INSTALL_LMOD = $(INSTALL_LMOD)"
@echo "INSTALL_CMOD = $(INSTALL_CMOD)"
@echo "INSTALL_EXEC = $(INSTALL_EXEC)"
@@ -111,7 +107,6 @@
@echo "TO_BIN = $(TO_BIN)"
@echo "TO_INC = $(TO_INC)"
@echo "TO_LIB = $(TO_LIB)"
- @echo "TO_MAN = $(TO_MAN)"
# echo config parameters as Lua code
# uncomment the last sed expression if you want nil instead of empty strings

View File

@ -0,0 +1,12 @@
--- configure.orig 2012-08-08 11:10:58.575960219 +0400
+++ configure 2012-08-08 11:11:38.950486311 +0400
@@ -157,6 +157,9 @@
} elsif ($opt eq '--without-lua_redis_parser') {
$resty_opts{no_lua_redis_parser} = 1;
+ } elsif ($opt eq '--without-lua_resty_dns') {
+ $resty_opts{no_lua_resty_dns} = 1;
+
} elsif ($opt eq '--without-lua_resty_memcached') {
$resty_opts{no_lua_resty_memcached} = 1;

View File

@ -0,0 +1,6 @@
ngx_openresty is a full-fledged web application server by bundling
the standard nginx core, lots of 3rd-party nginx modules, as well
as most of their external dependencies.
WWW: http://openresty.org

View File

@ -0,0 +1,95 @@
%%LUA%%lua/bin/luac
%%LUA%%lua/bin/lua
%%LUA%%lua/lib/liblua.a
%%LUA%%lua/include/luaconf.h
%%LUA%%lua/include/lauxlib.h
%%LUA%%lua/include/lua.h
%%LUA%%lua/include/lua.hpp
%%LUA%%lua/include/lualib.h
%%LUAJIT%%luajit/include/luajit-2.0/luaconf.h
%%LUAJIT%%luajit/include/luajit-2.0/lua.hpp
%%LUAJIT%%luajit/include/luajit-2.0/lualib.h
%%LUAJIT%%luajit/include/luajit-2.0/luajit.h
%%LUAJIT%%luajit/include/luajit-2.0/lauxlib.h
%%LUAJIT%%luajit/include/luajit-2.0/lua.h
%%LUAJIT%%luajit/lib/libluajit-5.1.a
%%LUAJIT%%luajit/lib/libluajit-5.1.so.2.0.0
%%LUAJIT%%luajit/share/luajit-2.0.0-beta10/jit/dump.lua
%%LUAJIT%%luajit/share/luajit-2.0.0-beta10/jit/dis_mipsel.lua
%%LUAJIT%%luajit/share/luajit-2.0.0-beta10/jit/bc.lua
%%LUAJIT%%luajit/share/luajit-2.0.0-beta10/jit/dis_mips.lua
%%LUAJIT%%luajit/share/luajit-2.0.0-beta10/jit/dis_x64.lua
%%LUAJIT%%luajit/share/luajit-2.0.0-beta10/jit/v.lua
%%LUAJIT%%luajit/share/luajit-2.0.0-beta10/jit/dis_ppc.lua
%%LUAJIT%%luajit/share/luajit-2.0.0-beta10/jit/dis_arm.lua
%%LUAJIT%%luajit/share/luajit-2.0.0-beta10/jit/vmdef.lua
%%LUAJIT%%luajit/share/luajit-2.0.0-beta10/jit/dis_x86.lua
%%LUAJIT%%luajit/share/luajit-2.0.0-beta10/jit/bcsave.lua
%%LUAJIT%%luajit/bin/luajit-2.0.0-beta10
nginx/html/index.html
nginx/html/50x.html
nginx/conf/koi-win
nginx/conf/koi-utf
nginx/conf/fastcgi_params
nginx/conf/nginx.conf.default
nginx/conf/fastcgi.conf
nginx/conf/win-utf
nginx/conf/fastcgi.conf.default
nginx/conf/scgi_params
nginx/conf/uwsgi_params
nginx/conf/mime.types
nginx/conf/scgi_params.default
nginx/conf/nginx.conf
nginx/conf/uwsgi_params.default
nginx/conf/mime.types.default
nginx/conf/fastcgi_params.default
nginx/sbin/nginx
%%LUARESTYDNS%%lualib/resty/dns/resolver.lua
%%LUARESTYUPLOAD%%lualib/resty/upload.lua
%%LUARESTYSTRING%%lualib/resty/sha1.lua
%%LUARESTYSTRING%%lualib/resty/random.lua
%%LUARESTYSTRING%%lualib/resty/md5.lua
%%LUARESTYSTRING%%lualib/resty/aes.lua
%%LUARESTYSTRING%%lualib/resty/sha384.lua
%%LUARESTYMYSQL%%lualib/resty/mysql.lua
%%LUARESTYMEM%%lualib/resty/memcached.lua
%%LUARESTYREDIS%%lualib/resty/redis.lua
%%LUARESTYSTRING%%lualib/resty/sha512.lua
%%LUARESTYSTRING%%lualib/resty/sha256.lua
%%LUARESTYSTRING%%lualib/resty/string.lua
%%LUARESTYSTRING%%lualib/resty/sha224.lua
%%LUARESTYSTRING%%lualib/resty/sha.lua
%%LUARDS%%lualib/rds/parser.so
%%LUACJSON%%lualib/cjson.so
%%LUAREDISPARS%%lualib/redis/parser.so
@dirrmtry nginx/sbin
@dirrmtry nginx/logs
@dirrmtry nginx/html
@dirrmtry nginx/conf
@dirrmtry nginx
%%LUARESTYDNS%%@dirrm lualib/resty/dns
@dirrmtry lualib/resty
%%LUAREDISPARS%%@dirrmtry lualib/redis
%%LUARDS%%@dirrmtry lualib/rds
@dirrmtry lualib
%%LUA%%@dirrm lua/share/lua/5.1
%%LUA%%@dirrm lua/share/lua
%%LUA%%@dirrm lua/share
%%LUA%%@dirrm lua/lib/lua/5.1
%%LUA%%@dirrm lua/lib/lua
%%LUA%%@dirrm lua/lib
%%LUA%%@dirrm lua/include
%%LUA%%@dirrm lua/bin
%%LUA%%@dirrm lua
%%LUAJIT%%@dirrm luajit/share/luajit-2.0.0-beta10/jit
%%LUAJIT%%@dirrm luajit/share/luajit-2.0.0-beta10
%%LUAJIT%%@dirrm luajit/include/luajit-2.0
%%LUAJIT%%@dirrm luajit/include
%%LUAJIT%%@dirrm luajit/share/lua/5.1
%%LUAJIT%%@dirrm luajit/share/lua
%%LUAJIT%%@dirrm luajit/share
%%LUAJIT%%@dirrm luajit/lib/lua/5.1
%%LUAJIT%%@dirrm luajit/lib/lua
%%LUAJIT%%@dirrm luajit/lib
%%LUAJIT%%@dirrm luajit/bin
%%LUAJIT%%@dirrm luajit