nginx: clarify special handling for cross
This commit is contained in:
parent
e313a4767d
commit
8cc7c2f06f
|
@ -1,5 +1,10 @@
|
|||
#define NGX_CONFIGURE " --prefix=/etc/nginx --conf-path=/etc/nginx/nginx.conf --sbin-path=/usr/bin/nginx --pid-path=/run/nginx.pid --lock-path=/var/lock/nginx.lock --user=nginx --group=nginx --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/tmp/nginx/client-body --http-proxy-temp-path=/var/tmp/nginx/proxy --http-fastcgi-temp-path=/var/tmp/nginx/fastcgi --http-scgi-temp-path=/var/tmp/nginx/scgi --http-uwsgi-temp-path=/var/tmp/nginx/uwsgi --with-mail --with-mail_ssl_module --with-pcre-jit --with-file-aio --with-http_gunzip_module --with-http_v2_module --with-http_dav_module --with-http_gzip_static_module --with-http_realip_module --with-http_ssl_module --with-http_stub_status_module --with-http_geoip_module"
|
||||
|
||||
#ifndef NGX_COMPILER
|
||||
#define NGX_COMPILER "gcc 8.2.0 (GCC) "
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef NGX_HAVE_GCC_ATOMIC
|
||||
#define NGX_HAVE_GCC_ATOMIC 1
|
||||
#endif
|
||||
|
@ -551,3 +556,4 @@
|
|||
#ifndef NGX_GROUP
|
||||
#define NGX_GROUP "nginx"
|
||||
#endif
|
||||
|
||||
|
|
|
@ -0,0 +1,86 @@
|
|||
Note: this file is provided as a reference. It is not used when building nginx.
|
||||
|
||||
On ARM targets, certain config variables must be changed to accommodate the
|
||||
architecture. This typically means translating 64 bit values to 32 bit. When
|
||||
updating nginx, the difference between objs/ngx_auto_config.h and the vendored
|
||||
srcpkgs/nginx/files/ngx_auto_config.h.armv6l should match this patch. Additional
|
||||
definitions may need to be added to the vendored config file. If these
|
||||
definitions contain architecture specific values like those below, they need to
|
||||
be translated to their 32 bit equivalents.
|
||||
|
||||
--- objs/ngx_auto_config.h.orig 2019-02-09 22:49:23.758277257 -0800
|
||||
+++ objs/ngx_auto_config.h 2019-02-09 23:13:01.326692988 -0800
|
||||
@@ -80,13 +80,13 @@
|
||||
#endif
|
||||
|
||||
|
||||
-#ifndef NGX_HAVE_NONALIGNED
|
||||
-#define NGX_HAVE_NONALIGNED 1
|
||||
+#ifndef NGX_ALIGNMENT
|
||||
+#define NGX_ALIGNMENT 16
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef NGX_CPU_CACHE_LINE
|
||||
-#define NGX_CPU_CACHE_LINE 64
|
||||
+#define NGX_CPU_CACHE_LINE 32
|
||||
#endif
|
||||
|
||||
|
||||
@@ -204,7 +204,7 @@
|
||||
|
||||
|
||||
#ifndef NGX_PTR_SIZE
|
||||
-#define NGX_PTR_SIZE 8
|
||||
+#define NGX_PTR_SIZE 4
|
||||
#endif
|
||||
|
||||
|
||||
@@ -219,12 +219,12 @@
|
||||
|
||||
|
||||
#ifndef NGX_MAX_SIZE_T_VALUE
|
||||
-#define NGX_MAX_SIZE_T_VALUE 9223372036854775807LL
|
||||
+#define NGX_MAX_SIZE_T_VALUE 2147483647
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef NGX_SIZE_T_LEN
|
||||
-#define NGX_SIZE_T_LEN (sizeof("-9223372036854775808") - 1)
|
||||
+#define NGX_SIZE_T_LEN (sizeof("-2147483648") - 1)
|
||||
#endif
|
||||
|
||||
|
||||
@@ -239,17 +239,17 @@
|
||||
|
||||
|
||||
#ifndef NGX_TIME_T_SIZE
|
||||
-#define NGX_TIME_T_SIZE 8
|
||||
+#define NGX_TIME_T_SIZE 4
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef NGX_TIME_T_LEN
|
||||
-#define NGX_TIME_T_LEN (sizeof("-9223372036854775808") - 1)
|
||||
+#define NGX_TIME_T_LEN (sizeof("-2147483648") - 1)
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef NGX_MAX_TIME_T_VALUE
|
||||
-#define NGX_MAX_TIME_T_VALUE 9223372036854775807LL
|
||||
+#define NGX_MAX_TIME_T_VALUE 2147483647
|
||||
#endif
|
||||
|
||||
|
||||
@@ -343,11 +343,6 @@
|
||||
#endif
|
||||
|
||||
|
||||
-#ifndef NGX_HAVE_LEVEL1_DCACHE_LINESIZE
|
||||
-#define NGX_HAVE_LEVEL1_DCACHE_LINESIZE 1
|
||||
-#endif
|
||||
-
|
||||
-
|
||||
#ifndef NGX_HAVE_OPENAT
|
||||
#define NGX_HAVE_OPENAT 1
|
||||
#endif
|
|
@ -1,19 +1,25 @@
|
|||
# Template file for 'nginx'
|
||||
pkgname=nginx
|
||||
version=1.14.2
|
||||
revision=1
|
||||
revision=2
|
||||
build_style=gnu-makefile
|
||||
makedepends="libressl-devel pcre-devel $(vopt_if geoip 'geoip-devel')"
|
||||
short_desc="A high performance web and reverse proxy server"
|
||||
short_desc="High performance web and reverse proxy server"
|
||||
maintainer="Juan RP <xtraeme@voidlinux.org>"
|
||||
license="BSD-2-Clause"
|
||||
homepage="https://nginx.org"
|
||||
distfiles="https://nginx.org/download/nginx-${version}.tar.gz"
|
||||
checksum=002d9f6154e331886a2dd4e6065863c9c1cf8291ae97a1255308572c02be9797
|
||||
|
||||
# NOTE:
|
||||
# On update, the pregenerated header file for ARM may need synchronization.
|
||||
# See srcpkgs/nginx/files/ngx_auto_config.h.armv6l.patch for more information.
|
||||
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
# fake configure run on host
|
||||
hostmakedepends=$makedepends
|
||||
hostmakedepends+=" $makedepends"
|
||||
fi
|
||||
|
||||
conf_files="/etc/nginx/fastcgi.conf
|
||||
/etc/nginx/fastcgi_params
|
||||
/etc/nginx/koi-win
|
||||
|
@ -29,11 +35,6 @@ make_dirs="/var/log/nginx 0750 root root
|
|||
/var/tmp 1777 root root
|
||||
/var/tmp/nginx 0750 nginx root"
|
||||
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
# fake configure run on host
|
||||
hostmakedepends+=" $makedepends"
|
||||
fi
|
||||
|
||||
build_options="geoip"
|
||||
build_options_default="geoip"
|
||||
|
||||
|
@ -69,40 +70,30 @@ do_configure() {
|
|||
--with-http_ssl_module \
|
||||
--with-http_stub_status_module \
|
||||
$(vopt_if geoip --with-http_geoip_module)
|
||||
}
|
||||
|
||||
pre_build() {
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
arm*|aarch64*) cp ${FILESDIR}/ngx_auto_config.h.armv6l objs/ngx_auto_config.h;;
|
||||
arm*|aarch64*) cp "${FILESDIR}/ngx_auto_config.h.armv6l" objs/ngx_auto_config.h;;
|
||||
esac
|
||||
fi
|
||||
|
||||
sed -i 's/-lcrypt/$(LDFLAGS) &/' objs/Makefile
|
||||
}
|
||||
|
||||
do_build() {
|
||||
make ${makejobs} CC="${CC}" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
|
||||
}
|
||||
|
||||
do_install() {
|
||||
make DESTDIR=$DESTDIR install
|
||||
|
||||
post_install() {
|
||||
sed -e 's|\<user\s\+\w\+;|user html;|g' \
|
||||
-e '44s|html|/usr/share/nginx/html|' \
|
||||
-e '54s|html|/usr/share/nginx/html|' \
|
||||
-i $DESTDIR/etc/nginx/nginx.conf
|
||||
rm $DESTDIR/etc/nginx/*.default
|
||||
-i "$DESTDIR/etc/nginx/nginx.conf"
|
||||
rm -- "$DESTDIR"/etc/nginx/*.default
|
||||
|
||||
vmkdir usr/share/nginx
|
||||
mv $DESTDIR/etc/nginx/html/ $DESTDIR/usr/share/nginx
|
||||
mv "$DESTDIR/etc/nginx/html" "$DESTDIR/usr/share/nginx"
|
||||
|
||||
vman man/nginx.8
|
||||
|
||||
vlicense LICENSE
|
||||
vsv nginx
|
||||
}
|
||||
|
||||
# REMARKS:
|
||||
# The pregnerated header file for ARM must be syncrhonized on update. After the
|
||||
# configure step, the diff between srcpkgs/nginx/files/ngx_auto_config.h.armv6l
|
||||
# and masterdir/builddir/nginx-$version/objs/ngx_auto_config.h must be checked
|
||||
# for changes that must be made.
|
||||
|
|
|
@ -1 +1 @@
|
|||
ignore="*.[13579].*"
|
||||
ignore="*\.*[13579]\.*"
|
||||
|
|
Loading…
Reference in New Issue