From 91d743197728b11531fb091a93602e73fa4b27ec Mon Sep 17 00:00:00 2001 From: Hiroaki Nakamura Date: Wed, 14 Aug 2019 14:41:44 +0900 Subject: [PATCH] Set CFLAGS and LDFLAGS for LuaJIT 2.1 in debian/rules --- .../patches/lua-nginx-module-luajit-2.1.patch | 46 ------------------- debian/patches/series | 1 - debian/rules | 4 +- 3 files changed, 2 insertions(+), 49 deletions(-) delete mode 100644 debian/patches/lua-nginx-module-luajit-2.1.patch diff --git a/debian/patches/lua-nginx-module-luajit-2.1.patch b/debian/patches/lua-nginx-module-luajit-2.1.patch deleted file mode 100644 index f103e9ed..00000000 --- a/debian/patches/lua-nginx-module-luajit-2.1.patch +++ /dev/null @@ -1,46 +0,0 @@ -From: Sergey Budnevitch -Date: Wed, 25 Jul 2018 12:43:19 +0900 -Subject: lua-nginx-module-luajit-2.1 - ---- - lua-nginx-module/config | 24 ++++++++++++++++++++++++ - 1 file changed, 24 insertions(+) - ---- a/lua-nginx-module/config -+++ b/lua-nginx-module/config -@@ -1,3 +1,4 @@ -+set -x - ngx_lua_opt_I= - ngx_lua_opt_L= - -@@ -132,6 +133,30 @@ - if [ $NGX_RPATH = YES ]; then - ngx_feature_libs="-R/usr/lib -L/usr/lib -lm -lluajit-5.1" - else -+ ngx_feature_libs="-L/usr/lib -lm -lluajit-5.1" -+ fi -+ . auto/feature -+ fi -+ -+ if [ $ngx_found = no ]; then -+ # Ubuntu 18.04 with LuaJIT-2.1, try with -ldl -+ ngx_feature="LuaJIT library in /usr/" -+ ngx_feature_path="/usr/include/luajit-2.1" -+ if [ $NGX_RPATH = YES ]; then -+ ngx_feature_libs="-R/usr/lib -L/usr/lib -lm -lluajit-5.1 -ldl" -+ else -+ ngx_feature_libs="-L/usr/lib -lm -lluajit-5.1 -ldl" -+ fi -+ . auto/feature -+ fi -+ -+ if [ $ngx_found = no ]; then -+ # Ubuntu 18.04 with LuaJIT 2.1 -+ ngx_feature="LuaJIT library in /usr/" -+ ngx_feature_path="/usr/include/luajit-2.1" -+ if [ $NGX_RPATH = YES ]; then -+ ngx_feature_libs="-R/usr/lib -L/usr/lib -lm -lluajit-5.1" -+ else - ngx_feature_libs="-L/usr/lib -lm -lluajit-5.1" - fi - . auto/feature diff --git a/debian/patches/series b/debian/patches/series index 6f4e41c1..1318218e 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ -lua-nginx-module-luajit-2.1.patch ngx_http_secure_download-dynamic_module.patch ngx_cache_purge-dynamic_module.patch ngx_cache_purge-fix_compatibility_with_nginx_1.11.6.patch diff --git a/debian/rules b/debian/rules index ed30a410..1c83cc95 100755 --- a/debian/rules +++ b/debian/rules @@ -2,8 +2,8 @@ #export DH_VERBOSE=1 export DEB_BUILD_MAINT_OPTIONS=hardening=+all,-pie -export DEB_CFLAGS_MAINT_APPEND=-Wp,-D_FORTIFY_SOURCE=2 -fPIC -Wno-missing-field-initializers -export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed -pie +export DEB_CFLAGS_MAINT_APPEND=-Wp,-D_FORTIFY_SOURCE=2 -fPIC -Wno-missing-field-initializers -I/usr/include/luajit-2.1 +export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed -pie -lm -lluajit-5.1 -ldl DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/buildflags.mk