summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2017-03-26 16:35:02 -0700
committerMichael Forney <mforney@mforney.org>2017-03-26 19:43:34 -0700
commit140aa21c99ecd2d84bc42923e510557f672f0424 (patch)
tree41a57d4d8663da787eea757af75d9f82a6b87dad /pkg
parent192963f4486dbe416f21ddef0a7535d6640d2db7 (diff)
Add nginx 1.10.3
Diffstat (limited to 'pkg')
-rw-r--r--pkg/gen.rc1
-rw-r--r--pkg/nginx/gen.rc127
-rw-r--r--pkg/nginx/modules.awk46
-rw-r--r--pkg/nginx/modules.txt28
-rw-r--r--pkg/nginx/ngx_auto_config.h108
-rw-r--r--pkg/nginx/ngx_auto_headers.h10
-rw-r--r--pkg/nginx/rev1
-rw-r--r--pkg/nginx/sources.awk13
-rw-r--r--pkg/nginx/sources.txt113
m---------pkg/nginx/src0
10 files changed, 447 insertions, 0 deletions
diff --git a/pkg/gen.rc b/pkg/gen.rc
index d1d3f1b8..0a6ddeaa 100644
--- a/pkg/gen.rc
+++ b/pkg/gen.rc
@@ -50,6 +50,7 @@ subgen mtdev
subgen nasm
subgen ncurses
subgen netsurf
+subgen nginx
subgen ninja
subgen openbsd
subgen openssh
diff --git a/pkg/nginx/gen.rc b/pkg/nginx/gen.rc
new file mode 100644
index 00000000..97cb9512
--- /dev/null
+++ b/pkg/nginx/gen.rc
@@ -0,0 +1,127 @@
+cflags=(\
+ -I '$dir' \
+ -I '$srcdir'/src/core\
+ -I '$srcdir'/src/event\
+ -I '$srcdir'/src/os/unix\
+)
+libs=()
+deps=()
+if(grep -Fxq openssl modules.txt) {
+ cflags=($cflags -I '$builddir'/pkg/libressl/include)
+ libs=($libs '$builddir'/pkg/libressl/^(libssl.a.d libcrypto.a.d))
+ deps=($deps pkg/libressl/headers)
+}
+if(grep -Fxq regex modules.txt) {
+ cflags=($cflags -I '$builddir'/pkg/pcre/include)
+ libs=($libs '$builddir'/pkg/pcre/libpcre.a)
+ deps=($deps pkg/pcre/headers)
+}
+if(grep -Fxq -e http_gzip_filter -e http_gunzip_filter modules.txt || grep -Fq 'NGX_ZLIB 1' ngx_auto_config.h) {
+ cflags=($cflags -I '$builddir'/pkg/zlib/include)
+ libs=($libs '$builddir'/pkg/zlib/libz.a)
+ deps=($deps pkg/zlib/headers)
+}
+if(grep -Fxq http modules.txt)
+ cflags=($cflags -I '$srcdir'/src/http -I '$srcdir'/src/http/modules)
+if(grep -Fxq mail modules.txt)
+ cflags=($cflags -I '$srcdir'/src/mail)
+if(grep -Fxq stream modules.txt)
+ cflags=($cflags -I '$srcdir'/src/stream)
+cflags $cflags
+
+build '$outdir'/ngx_modules.c awk '$dir'/modules.txt '|' '$dir'/^(modules.awk sources.txt) ; with\
+ expr '-f $dir/modules.awk -v sources=$dir/sources.txt'
+cc '$outdir'/ngx_modules.c '||' '$outdir'/fetch.stamp
+
+srcs=src/^(\
+ core/^(\
+ nginx.c\
+ ngx_log.c\
+ ngx_palloc.c\
+ ngx_array.c\
+ ngx_list.c\
+ ngx_hash.c\
+ ngx_buf.c\
+ ngx_queue.c\
+ ngx_output_chain.c\
+ ngx_string.c\
+ ngx_parse.c\
+ ngx_parse_time.c\
+ ngx_inet.c\
+ ngx_file.c\
+ ngx_crc32.c\
+ ngx_murmurhash.c\
+ ngx_md5.c\
+ ngx_rbtree.c\
+ ngx_radix_tree.c\
+ ngx_slab.c\
+ ngx_times.c\
+ ngx_shmtx.c\
+ ngx_connection.c\
+ ngx_cycle.c\
+ ngx_spinlock.c\
+ ngx_rwlock.c\
+ ngx_cpuinfo.c\
+ ngx_conf_file.c\
+ ngx_module.c\
+ ngx_resolver.c\
+ ngx_open_file_cache.c\
+ ngx_crypt.c\
+ ngx_proxy_protocol.c\
+ ngx_syslog.c\
+ )\
+ event/^(\
+ ngx_event.c\
+ ngx_event_timer.c\
+ ngx_event_posted.c\
+ ngx_event_accept.c\
+ ngx_event_connect.c\
+ ngx_event_pipe.c\
+ modules/ngx_epoll_module.c\
+ )\
+ http/ngx_http_file_cache.c\
+ os/unix/^(\
+ ngx_time.c\
+ ngx_errno.c\
+ ngx_alloc.c\
+ ngx_files.c\
+ ngx_socket.c\
+ ngx_recv.c\
+ ngx_readv_chain.c\
+ ngx_udp_recv.c\
+ ngx_send.c\
+ ngx_writev_chain.c\
+ ngx_udp_send.c\
+ ngx_channel.c\
+ ngx_shmem.c\
+ ngx_process.c\
+ ngx_daemon.c\
+ ngx_setaffinity.c\
+ ngx_setproctitle.c\
+ ngx_posix_init.c\
+ ngx_user.c\
+ ngx_dlopen.c\
+ ngx_process_cycle.c\
+ \
+ ngx_linux_init.c\
+ ngx_linux_sendfile_chain.c\
+ )\
+ `{awk -f sources.awk -v 'sources=sources.txt' modules.txt}\
+)
+checkstatus
+
+phony deps $deps
+exe nginx -d '$dir'/deps $srcs ngx_modules.c.o $libs
+file bin/nginx '$outdir'/nginx 755
+file share/nginx/mime.types '$srcdir'/conf/mime.types 644
+
+build '$outdir'/nginx.8 sed '$srcdir'/docs/man/nginx.8 ; expr=(\
+ -e 's,%%PREFIX%%,/run/nginx/,' \
+ -e 's,%%PID_PATH%%,/run/nginx/nginx.pid,' \
+ -e 's,%%CONF_PATH%%,/etc/nginx/nginx.conf,' \
+ -e 's,%%ERROR_LOG_PATH%%,/var/log/nginx/error.log,' \
+) with expr $"expr
+man -d '$outdir' 8 nginx.8
+
+fetch git
+gen_inputs='$dir'/^(sources.awk sources.txt modules.txt)
diff --git a/pkg/nginx/modules.awk b/pkg/nginx/modules.awk
new file mode 100644
index 00000000..7978f4f3
--- /dev/null
+++ b/pkg/nginx/modules.awk
@@ -0,0 +1,46 @@
+BEGIN {
+ while (getline < sources) {
+ if ($0 ~ /^(#|$)/)
+ continue
+ all_modules[++n] = $1
+ }
+
+ enabled["core"] = 1
+ enabled["errlog"] = 1
+ enabled["conf"] = 1
+
+ enabled["events"] = 1
+ enabled["event_core"] = 1
+ enabled["epoll"] = 1
+}
+
+/^(#|$)/ { next }
+{
+ enabled[$0] = 1
+}
+
+END {
+ for (i = 1; i <= n; ++i) {
+ module = all_modules[i]
+ if (enabled[module])
+ modules[++m] = module
+ }
+
+ print "#include <ngx_config.h>"
+ print "#include <ngx_core.h>"
+
+ for (i = 1; i <= m; ++i)
+ print "extern ngx_module_t ngx_" modules[i] "_module;"
+
+ print "ngx_module_t *ngx_modules[] = {"
+ for (i = 1; i <= m; ++i)
+ print "\t&ngx_" modules[i] "_module,"
+ print "\tNULL"
+ print "};"
+
+ print "char *ngx_module_names[] = {"
+ for (i = 1; i <= m; ++i)
+ print "\t\"ngx_" modules[i] "_module\","
+ print "\tNULL"
+ print "};"
+}
diff --git a/pkg/nginx/modules.txt b/pkg/nginx/modules.txt
new file mode 100644
index 00000000..196b6086
--- /dev/null
+++ b/pkg/nginx/modules.txt
@@ -0,0 +1,28 @@
+openssl
+regex
+
+thread_pool
+
+http
+http_core
+http_log
+http_upstream
+
+http_static
+http_autoindex
+http_index
+http_auth_basic
+http_access
+http_rewrite
+http_ssl
+
+http_write_filter
+http_header_filter
+http_chunked_filter
+http_range_header_filter
+http_gzip_filter
+http_headers_filter
+
+http_copy_filter
+http_range_body_filter
+http_not_modified_filter
diff --git a/pkg/nginx/ngx_auto_config.h b/pkg/nginx/ngx_auto_config.h
new file mode 100644
index 00000000..e9c5ff62
--- /dev/null
+++ b/pkg/nginx/ngx_auto_config.h
@@ -0,0 +1,108 @@
+#define NGX_CONFIGURE ""
+
+/* auto/cc/conf */
+#define NGX_HAVE_GCC_ATOMIC 1
+#define NGX_HAVE_C99_VARIADIC_MACROS 1
+#define NGX_HAVE_GCC_VARIADIC_MACROS 1
+#define NGX_HAVE_GCC_BSWAP64 1
+
+/* auto/os/linux */
+#define NGX_HAVE_EPOLL 1
+#define NGX_HAVE_CLEAR_EVENT 1
+#define NGX_HAVE_EPOLLRDHUP 1
+#define NGX_HAVE_O_PATH 1
+#define NGX_HAVE_SENDFILE 1
+#define NGX_HAVE_SENDFILE64 1
+#define NGX_HAVE_PR_SET_DUMPABLE 1
+#define NGX_HAVE_SCHED_SETAFFINITY 1
+#define NGX_HAVE_GNU_CRYPT_R 1
+
+/* auto/os/conf */
+#define NGX_HAVE_NONALIGNED 1
+#define NGX_CPU_CACHE_LINE 64
+
+/* auto/unix */
+#define NGX_HAVE_POSIX_FADVISE 1
+#define NGX_HAVE_O_DIRECT 1
+#define NGX_HAVE_ALIGNED_DIRECTIO 1
+#define NGX_HAVE_STATFS 1
+#define NGX_HAVE_STATVFS 1
+#define NGX_HAVE_DLOPEN 1
+#define NGX_HAVE_SCHED_YIELD 1
+#define NGX_HAVE_REUSEPORT 1
+#define NGX_HAVE_IP_PKTINFO 1
+#define NGX_HAVE_IPV6_RECVPKTINFO 1
+#define NGX_HAVE_DEFERRED_ACCEPT 1
+#define NGX_HAVE_KEEPALIVE_TUNABLE 1
+#define NGX_HAVE_TCP_FASTOPEN 1
+#define NGX_HAVE_TCP_INFO 1
+#define NGX_HAVE_ACCEPT4 1
+#define NGX_HAVE_EVENTFD 1
+#define NGX_HAVE_SYS_EVENTFD_H 1
+#define NGX_HAVE_UNIX_DOMAIN 1
+#define NGX_PTR_SIZE 8
+#define NGX_SIG_ATOMIC_T_SIZE 4
+#define NGX_HAVE_LITTLE_ENDIAN 1
+#define NGX_MAX_SIZE_T_VALUE 9223372036854775807LL
+#define NGX_SIZE_T_LEN (sizeof("-9223372036854775808") - 1)
+#define NGX_MAX_OFF_T_VALUE 9223372036854775807LL
+#define NGX_OFF_T_LEN (sizeof("-9223372036854775808") - 1)
+#define NGX_TIME_T_SIZE 8
+#define NGX_TIME_T_LEN (sizeof("-9223372036854775808") - 1)
+#define NGX_MAX_TIME_T_VALUE 9223372036854775807LL
+#define NGX_HAVE_PREAD 1
+#define NGX_HAVE_PWRITE 1
+#define NGX_HAVE_PWRITEV 1
+#define NGX_SYS_NERR 1000
+#define NGX_HAVE_LOCALTIME_R 1
+#define NGX_HAVE_POSIX_MEMALIGN 1
+#define NGX_HAVE_MEMALIGN 1
+#define NGX_HAVE_MAP_ANON 1
+#define NGX_HAVE_MAP_DEVZERO 1
+#define NGX_HAVE_SYSVSHM 1
+#define NGX_HAVE_POSIX_SEM 1
+#define NGX_HAVE_MSGHDR_MSG_CONTROL 1
+#define NGX_HAVE_FIONBIO 1
+#define NGX_HAVE_GMTOFF 1
+#define NGX_HAVE_D_TYPE 1
+#define NGX_HAVE_SC_NPROCESSORS_ONLN 1
+#define NGX_HAVE_OPENAT 1
+#define NGX_HAVE_GETADDRINFO 1
+
+/* auto/threads */
+#define NGX_THREADS 1
+
+/* auto/modules */
+#define NGX_HTTP_CACHE 1
+#define NGX_HTTP_GZIP 1
+#define NGX_CRYPT 1
+#define NGX_HTTP_SSL 1
+#define NGX_PCRE 1
+#define NGX_HAVE_PCRE_JIT 1
+#define NGX_OPENSSL 1
+#define NGX_SSL 1
+#define NGX_HAVE_OPENSSL_MD5_H 1
+#define NGX_OPENSSL_MD5 1
+#define NGX_HAVE_MD5 1
+#define NGX_HAVE_OPENSSL_SHA1_H 1
+#define NGX_HAVE_SHA1 1
+#define NGX_ZLIB 1
+
+#define NGX_PREFIX "/run/nginx/"
+#define NGX_CONF_PREFIX "/etc/nginx/"
+#define NGX_SBIN_PATH "/bin/nginx"
+#define NGX_CONF_PATH "/etc/nginx/nginx.conf"
+#define NGX_PID_PATH "nginx.pid"
+#define NGX_LOCK_PATH "nginx.lock"
+#define NGX_ERROR_LOG_PATH "/var/log/nginx/error.log"
+#define NGX_HTTP_LOG_PATH "/var/log/nginx/access.log"
+#define NGX_HTTP_CLIENT_TEMP_PATH "client_body_temp"
+#define NGX_HTTP_PROXY_TEMP_PATH "proxy_temp"
+#define NGX_HTTP_FASTCGI_TEMP_PATH "fastcgi_temp"
+#define NGX_HTTP_UWSGI_TEMP_PATH "uwsgi_temp"
+#define NGX_HTTP_SCGI_TEMP_PATH "scgi_temp"
+#define NGX_SUPPRESS_WARN 1
+#define NGX_SMP 1
+#define NGX_USER "nginx"
+#define NGX_GROUP "nginx"
+
diff --git a/pkg/nginx/ngx_auto_headers.h b/pkg/nginx/ngx_auto_headers.h
new file mode 100644
index 00000000..5c8661e2
--- /dev/null
+++ b/pkg/nginx/ngx_auto_headers.h
@@ -0,0 +1,10 @@
+#define NGX_HAVE_UNISTD_H 1
+#define NGX_HAVE_INTTYPES_H 1
+#define NGX_HAVE_LIMITS_H 1
+#define NGX_HAVE_SYS_PARAM_H 1
+#define NGX_HAVE_SYS_MOUNT_H 1
+#define NGX_HAVE_SYS_STATVFS_H 1
+#define NGX_HAVE_CRYPT_H 1
+#define NGX_LINUX 1
+#define NGX_HAVE_SYS_PRCTL_H 1
+#define NGX_HAVE_SYS_VFS_H 1
diff --git a/pkg/nginx/rev b/pkg/nginx/rev
new file mode 100644
index 00000000..d00491fd
--- /dev/null
+++ b/pkg/nginx/rev
@@ -0,0 +1 @@
+1
diff --git a/pkg/nginx/sources.awk b/pkg/nginx/sources.awk
new file mode 100644
index 00000000..212c1310
--- /dev/null
+++ b/pkg/nginx/sources.awk
@@ -0,0 +1,13 @@
+/^(#|$)/ { next }
+{
+ enabled[$0] = 1
+}
+
+END {
+ while (getline < sources) {
+ if (!enabled[$1])
+ continue
+ for (i = 2; i <= NF; ++i)
+ print $i
+ }
+}
diff --git a/pkg/nginx/sources.txt b/pkg/nginx/sources.txt
new file mode 100644
index 00000000..0c3e77c4
--- /dev/null
+++ b/pkg/nginx/sources.txt
@@ -0,0 +1,113 @@
+# CORE_MODULES
+core
+errlog
+conf
+
+openssl event/ngx_event_openssl.c event/ngx_event_openssl_stapling.c
+regex core/ngx_regex.c
+
+# EVENT_MODULES
+events
+event_core
+epoll
+
+# THREAD_POOL_MODULE
+thread_pool core/ngx_thread_pool.c os/unix/ngx_thread_cond.c os/unix/ngx_thread_mutex.c os/unix/ngx_thread_id.c
+
+# HTTP_MODULES
+http http/ngx_http.c http/ngx_http_special_response.c http/ngx_http_request.c http/ngx_http_parse.c http/ngx_http_request_body.c http/ngx_http_variables.c http/ngx_http_script.c
+http_core http/ngx_http_core_module.c
+http_log http/modules/ngx_http_log_module.c
+http_upstream http/ngx_http_upstream.c http/ngx_http_upstream_round_robin.c
+
+http_v2 http/v2/ngx_http_v2.c http/v2/ngx_http_v2_table.c http/v2/ngx_http_v2_huff_decode.c http/v2/ngx_http_v2/huff_encode.c http/v2/ngx_http_v2_module.c
+http_static http/modules/ngx_http_static_module.c
+http_gzip_static http/modules/ngx_http_gzip_static_module.c
+http_dav http/modules/ngx_http_dav_module.c
+http_autoindex http/modules/ngx_http_autoindex_module.c
+http_index http/modules/ngx_http_index_module.c
+http_random_index http/modules/ngx_http_random_index_module.c
+http_auth_request http/modules/ngx_http_auth_request_module.c
+http_auth_basic http/modules/ngx_http_auth_basic_module.c
+http_access http/modules/ngx_http_access_module.c
+http_limit_conn http/modules/ngx_http_limit_conn_module.c
+http_limit_req http/modules/ngx_http_limit_req_module.c
+http_realip http/modules/ngx_http_realip_module.c
+http_status http/modules/ngx_http_status_module.c
+http_geo http/modules/ngx_http_geo_module.c
+http_geoip http/modules/ngx_http_geoip_module.c
+http_map http/modules/ngx_http_map_module.c
+http_split_clients http/modules/ngx_http_split_clients_module.c
+http_referer http/modules/ngx_http_referer_module.c
+http_rewrite http/modules/ngx_http_rewrite_module.c
+http_ssl http/modules/ngx_http_ssl_module.c
+http_proxy http/modules/ngx_http_proxy_module.c
+http_fastcgi http/modules/ngx_http_fastcgi_module.c
+http_uwsgi http/modules/ngx_http_uwsgi_module.c
+http_scgi http/modules/ngx_http_sgi_module.c
+http_perl http/modules/perl/ngx_http_perl_module.c
+http_memcached http/modules/ngx_http_memcached_module.c
+http_empty_gif http/modules/ngx_http_empty_gif_module.c
+http_browser http/modules/ngx_http_browser_module.c
+http_secure_link http/modules/ngx_http_secure_link_module.c
+http_degradation http/modules/ngx_http_degredation_module.c
+http_flv http/modules/ngx_http_flv_module.c
+http_mp4 http/modules/ngx_http_mp4_module.c
+http_upstream_hash http/modules/ngx_http_upstream_hash_module.c
+http_upstream_ip_hash http/modules/ngx_http_upstream_ip_hash_module.c
+http_upstream_least_conn http/modules/ngx_http_upstream_least_conn_module.c
+http_upstream_keepalive http/modules/ngx_http_upstream_keepalive_module.c
+http_upstream_zone http/modules/ngx_http_upstream_zone_module.c
+http_stub_status http/modules/ngx_http_stub_status_module.c
+
+# HTTP_FILTER_MODULES
+http_write_filter http/ngx_http_write_filter_module.c
+http_header_filter http/ngx_http_header_filter_module.c
+http_chunked_filter http/modules/ngx_http_chunked_filter_module.c
+http_v2_filter http/v2/ngx_http_v2_filter_module.c
+http_range_header_filter http/modules/ngx_http_range_filter_module.c
+http_gzip_filter http/modules/ngx_http_gzip_filter_module.c
+http_postpone_filter http/ngx_http_postpone_filter_module.c
+http_ssi_filter http/modules/ngx_http_ssi_filter_module.c
+http_charset_filter http/modules/ngx_http_charset_filter_module.c
+http_xslt_filter http/modules/ngx_http_filter_module.c
+http_image_filter http/modules/ngx_http_image_filter_module.c
+http_sub_filter http/modules/ngx_http_sub_filter_module.c
+http_addition_filter http/modules/ngx_http_addition_filter_module.c
+http_gunzip_filter http/modules/ngx_http_gunzip_filter_module.c
+http_userid_filter http/modules/ngx_http_userid_filter_module.c
+http_headers_filter http/modules/ngx_http_headers_filter_module.c
+
+# HTTP_INIT_FILTER_MODULES
+http_copy_filter http/ngx_http_copy_filter_module.c
+http_range_body_filter
+http_not_modified_filter http/modules/ngx_http_not_modified_filter_module.c
+http_slice_filter http/modules/ngx_http_slice_filter_module.c
+
+# MAIL_MODULES
+mail mail/ngx_mail.c mail/ngx_mail_handler.c mail/ngx_mail_parse.c
+mail_core mail/ngx_mail_core_module.c
+
+mail_ssl mail/ngx_mail_ssl_module.c
+mail_pop3 mail/ngx_mail_pop3_module.c mail/ngx_mail_pop3_handler.c
+mail_imap mail/ngx_mail_imap_module.c mail/ngx_mail_imap_handler.c
+mail_smtp mail/ngx_mail_smtp_module.c mail/ngx_mail_smtp_handler.c
+mail_auth_http mail/ngx_mail_auth_http_module.c
+mail_proxy mail/ngx_mail_proxy_module.c
+
+# STREAM_MODULES
+stream stream/ngx_stream.c stream/ngx_stream_handler.c
+stream_core stream/ngx_stream_core_module.c
+stream_proxy stream/ngx_stream_proxy_module.c
+stream_upstream stream/ngx_stream_upstream.c stream/ngx_stream_upstream_round_robin.c
+
+stream_ssl stream/ngx_stream_ssl_module.c
+stream_limit_conn stream/ngx_stream_limit_conn_module.c
+stream_access stream/ngx_stream_access_module.c
+stream_upstream_hash stream/ngx_stream_upstream_hash_module.c
+stream_upstream_least_conn stream/ngx_stream_upstream_least_conn_module.c
+stream_upstream_zone stream/ngx_stream_upstream_zone_module.c
+
+# MISC_MODULES
+google_perftools misc/ngx_google_perftools_module.c
+cpp_test misc/ngx_cpp_test_module.cpp
diff --git a/pkg/nginx/src b/pkg/nginx/src
new file mode 160000
+Subproject b708f694ea93a91656ea6243a611ba86ac139e7