ports

zandra's ports tree
git clone git://zandra.org/ports
Log | Files | Refs | README | LICENSE

commit 625db25fed8d38ca210126b74c3e01af54996fd3
parent f81e1d4bfa99ba26124e0cb37346943a897d1786
Author: Ben O'Neill <ben@benoneill.xyz>
Date:   Tue, 23 Jun 2020 14:03:52 -0400

add pcre and nginx

Diffstat:
Anginx/checksums | 1+
Anginx/mkfile | 6++++++
Anginx/nginx.mk | 44++++++++++++++++++++++++++++++++++++++++++++
Anginx/v.mk | 1+
Apcre/checksums | 1+
Apcre/depsinc.mk | 11+++++++++++
Apcre/mkfile | 6++++++
Apcre/pcre.mk | 20++++++++++++++++++++
Apcre/v.mk | 1+
9 files changed, 91 insertions(+), 0 deletions(-)

diff --git a/nginx/checksums b/nginx/checksums @@ -0,0 +1 @@ +8c21eeb62ab6e32e436932500f700bd2fb99fd2d29e43c08a5bfed4714c189c29c7141db551fcd5d2437303b7439f71758f7407dfd3e801e704e45e7daa78ddb nginx-1.18.0.tar.gz diff --git a/nginx/mkfile b/nginx/mkfile @@ -0,0 +1,6 @@ +<$mkbuild/mk.3rdparty + +<v.mk +src = nginx-$v +url = http://nginx.org/download/nginx-$v.tar.gz +mkfile = ../nginx.mk diff --git a/nginx/nginx.mk b/nginx/nginx.mk @@ -0,0 +1,44 @@ +TARG = nginx +DEPS = libressl pcre zlib + +<$mkbuild/mk.common-noinst + +nginx:QV: + export CFLAGS="$CFLAGS $DEPS_CFLAGS" + export LDFLAGS="$LDFLAGS $DEPS_LDFLAGS" + # nginx incorrectly detects GNU crypt so set: -DNGX_HAVE_GNU_CRYPT_R=0" + export CFLAGS="$CFLAGS -DNGX_HAVE_GNU_CRYPT_R=0" + export BUILDCC="${CC}" + export CC="${CC} -static" + # make nginx believe we are building pcre, but actually we + # use the prebuilt pcre from ports. + mkdir -p "${pcre_dir}" + printf '#!/bin/sh\ntrue' > "${pcre_dir}/configure" + chmod 755 "${pcre_dir}/configure" + printf 'all:\n\ttrue\nlibpcre.la:\n\ttrue\ninstall:\n\ttrue\ndistclean:\n\ttrue\nclean:\n\ttrue' > "${pcre_dir}/Makefile" + ln -sf "${pcre_libdir}" "${pcre_dir}/.libs" + # don't rebuild pcre source, use the ports version. + # See: http://wiki.nginx.org/InstallOptions#Notes + # --with-ld-opt="-L${pcre_libdir}" + # --with-cc-opt="-I${pcre_includedir}" + CC="$HOSTCC -static" ./configure \ + --prefix=/etc/nginx \ + --conf-path=/etc/nginx/nginx.conf \ + --sbin-path=${prefix}/bin/nginx \ + --error-log-path=/var/log/nginx/access.log \ + --error-log-path=stderr \ + --pid-path=/run/nginx.pid \ + --lock-path=/run/lock/nginx.lock \ + --user=http \ + --group=http \ + --with-file-aio \ + --with-pcre="${pcre_dir}" \ + --with-zlib="${zlib_libdir}" \ + --with-openssl="${libressl_libdir}" \ + --with-ld-opt="-L${pcre_libdir}" \ + --with-cc-opt="-I${pcre_includedir}" + make -j$nprocs CC="$BUILDCC -static" + +install:QV: + $INSTALL -d -m 755 "$ROOT/run/lock" + make -j$nprocs install CC="$CC -static" DESTDIR="$ROOT" diff --git a/nginx/v.mk b/nginx/v.mk @@ -0,0 +1 @@ +v = 1.18.0 diff --git a/pcre/checksums b/pcre/checksums @@ -0,0 +1 @@ +e94c652b40de60b391e28afbddc67b5a034650f6f62027e52f2d7aef53caf5f0da9f2d4f6872d1558f965dd9d4d696e5e23d2a50f20a4fbc9f0a707fb6f55fae pcre-8.35.tar.bz2 diff --git a/pcre/depsinc.mk b/pcre/depsinc.mk @@ -0,0 +1,11 @@ +<$pcre_DEPDIR/v.mk + +pcre_dir = ${pcre_DEPDIR}/pcre-$v +pcre_includedir = ${pcre_dir} +pcre_libdir = ${pcre_DEPDIR}/pcre-$v/.libs + +pcre_CFLAGS = -I${pcre_includedir} +pcre_LDFLAGS = -L${pcre_libdir} -lpcre + +DEPS_CFLAGS = $DEPS_CFLAGS ${pcre_CFLAGS} +DEPS_LDFLAGS = $DEPS_LDFLAGS ${pcre_LDFLAGS} diff --git a/pcre/mkfile b/pcre/mkfile @@ -0,0 +1,6 @@ +<$mkbuild/mk.3rdparty + +<v.mk +src = pcre-$v +url = https://ftp.pcre.org/pub/pcre/pcre-$v.tar.gz +mkfile = ../pcre.mk diff --git a/pcre/pcre.mk b/pcre/pcre.mk @@ -0,0 +1,20 @@ +TARG = pcre +DEPS = zlib + +<$mkbuild/mk.common-noinst + +pcre:QV: + export CFLAGS="$CFLAGS $DEPS_CFLAGS" + export LDFLAGS="$LDFLAGS $DEPS_LDFLAGS" + CC="$CC" ./configure \ + --build="${TOOLCHAIN_TRIPLET}" \ + --host="${HOST_TOOLCHAIN_TRIPLET}" \ + --prefix="$PREFIX" \ + --mandir="$ROOT/share/man" \ + --disable-cpp \ + --disable-shared \ + --enable-static \ + --enable-unicode-properties \ + --enable-pcregrep-libz \ + --enable-utf + make -j$nprocs diff --git a/pcre/v.mk b/pcre/v.mk @@ -0,0 +1 @@ +v = 8.35