pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/www/nsm nsm: fix build.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d8d6dc98dd72
branches:  trunk
changeset: 450251:d8d6dc98dd72
user:      nia <nia%pkgsrc.org@localhost>
date:      Tue Apr 13 08:55:58 2021 +0000

description:
nsm: fix build.

diffstat:

 www/nsm/Makefile               |   7 ++++-
 www/nsm/distinfo               |   4 ++-
 www/nsm/patches/patch-Lua.h    |  51 ++++++++++++++++++++++++++++++++++++++++++
 www/nsm/patches/patch-Makefile |  15 ++++++++++++
 4 files changed, 74 insertions(+), 3 deletions(-)

diffs (117 lines):

diff -r 0b12eb9e2674 -r d8d6dc98dd72 www/nsm/Makefile
--- a/www/nsm/Makefile  Tue Apr 13 08:36:19 2021 +0000
+++ b/www/nsm/Makefile  Tue Apr 13 08:55:58 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2021/03/08 08:44:28 nikita Exp $
+# $NetBSD: Makefile,v 1.9 2021/04/13 08:55:58 nia Exp $
 
 DISTNAME=      nsm-2.3.10
 CATEGORIES=    www
@@ -27,16 +27,19 @@
 SUBST_SED.nift+=       -e 's,CXXFLAGS=-std=c++11,CXXFLAGS+=-std=c++11,g'
 SUBST_SED.nift+=       -e 's,LINK=,LDFLAGS+=,g'
 SUBST_SED.nift+=       -e 's,LINK+=,LDFLAGS+=,g'
+SUBST_SED.nift+=       -e 's,-O3,,g'
 
 MAKE_ENV+=     BUNDLED=0
 MAKE_ENV+=     LUA_VERSION=5.3
 DL_AUTO_VARS=  yes
 
+BUILDLINK_TRANSFORM+=  opt:-llua-5.3:-llua5.3
+
 post-install:
        cd ${DESTDIR}${PREFIX}/bin && ${LN} -s nsm nift
 
 .include "../../mk/dlopen.buildlink3.mk"
+BUILDLINK_TRANSFORM+=  opt:-ldl:${BUILDLINK_LDADD.dl:Q}
 .include "../../lang/lua53/buildlink3.mk"
-.include "../../lang/LuaJIT2/buildlink3.mk"
 .include "../../mk/pthread.buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r 0b12eb9e2674 -r d8d6dc98dd72 www/nsm/distinfo
--- a/www/nsm/distinfo  Tue Apr 13 08:36:19 2021 +0000
+++ b/www/nsm/distinfo  Tue Apr 13 08:55:58 2021 +0000
@@ -1,6 +1,8 @@
-$NetBSD: distinfo,v 1.8 2021/03/27 23:18:59 mef Exp $
+$NetBSD: distinfo,v 1.9 2021/04/13 08:55:58 nia Exp $
 
 SHA1 (nsm-2.3.10.tar.gz) = cc9a04d17a0dc3969241b2ac4758664b335da7d8
 RMD160 (nsm-2.3.10.tar.gz) = 627cbbba3e4bd1e5cfe92768ec2beef8e260ff74
 SHA512 (nsm-2.3.10.tar.gz) = b329b71b4af87820d75ca82c6bb429c82088f2cae24acdfbbb7cf6ededfd54a91ad96ac605b57d359770faa3f9956745d822d08ed1c83a7678f4a2781e904492
 Size (nsm-2.3.10.tar.gz) = 1607394 bytes
+SHA1 (patch-Lua.h) = bc3fd674e8fbb506b168820b688f3c572304e16b
+SHA1 (patch-Makefile) = 4af14ac2df1ce272214322b3f82bc91cd9e005e6
diff -r 0b12eb9e2674 -r d8d6dc98dd72 www/nsm/patches/patch-Lua.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/nsm/patches/patch-Lua.h       Tue Apr 13 08:55:58 2021 +0000
@@ -0,0 +1,51 @@
+$NetBSD: patch-Lua.h,v 1.1 2021/04/13 08:55:59 nia Exp $
+
+Fix absolute paths.
+
+--- Lua.h.orig 2020-05-24 10:59:03.000000000 +0000
++++ Lua.h
+@@ -6,41 +6,9 @@
+ 
+ #include "StrFns.h"
+ 
+-#if defined __BUNDLED__
+-      #if defined __LUA_VERSION_5_3__
+-              #include "Lua-5.3/src/lua.hpp"
+-              #include "Lua-5.3/src/lualib.h"
+-              #include "Lua-5.3/src/lauxlib.h"
+-      #else // __LUAJIT_VERSION_2_1__
+-              #include "LuaJIT/src/lua.hpp"
+-      #endif
+-#else
+-      #if defined __LUA_VERSION_x__
+-              #include "/usr/local/include/lua.hpp"
+-              #include "/usr/local/include/lualib.h"
+-              #include "/usr/local/include/lauxlib.h"
+-      #elif __LUA_VERSION_5_4__
+-              #include "/usr/local/include/lua54/lua.hpp"
+-              #include "/usr/local/include/lua54/lualib.h"
+-              #include "/usr/local/include/lua54/lauxlib.h"
+-      #elif __LUA_VERSION_5_3__
+-              #include "/usr/local/include/lua53/lua.hpp"
+-              #include "/usr/local/include/lua53/lualib.h"
+-              #include "/usr/local/include/lua53/lauxlib.h"
+-      #elif __LUA_VERSION_5_2__
+-              #include "/usr/local/include/lua52/lua.hpp"
+-              #include "/usr/local/include/lua52/lualib.h"
+-              #include "/usr/local/include/lua52/lauxlib.h"
+-      #elif __LUA_VERSION_5_1__
+-              #include "/usr/local/include/lua51/lua.hpp"
+-              #include "/usr/local/include/lua51/lualib.h"
+-              #include "/usr/local/include/lua51/lauxlib.h"
+-      #elif __LUAJIT_VERSION_2_0__
+-              #include "/usr/local/include/luajit-2.0/lua.hpp"
+-      #else //__LUAJIT_VERSION_2_1__
+-              #include "/usr/local/include/luajit-2.1/lua.hpp"
+-      #endif
+-#endif
++#include <lua.hpp>
++#include <lualib.h>
++#include <lauxlib.h>
+ 
+ void process_lua_error(std::string& errStr, int& errLineNo);
+ 
diff -r 0b12eb9e2674 -r d8d6dc98dd72 www/nsm/patches/patch-Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/nsm/patches/patch-Makefile    Tue Apr 13 08:55:58 2021 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-Makefile,v 1.3 2021/04/13 08:55:59 nia Exp $
+
+use LDFLAGS for linking rather than CXXFLAGS.
+
+--- Makefile.orig      2020-05-24 10:59:03.000000000 +0000
++++ Makefile
+@@ -223,7 +223,7 @@ ifeq ($(detected_OS),Windows)  # Windows
+       $(CXX) $(CXXFLAGS) $(objects) -o nsm $(LINK)
+       copy nsm.exe nift.exe
+ else
+-      $(CXX) $(CXXFLAGS) $(objects) -o nsm $(LINK)
++      $(CXX) $(LDFLAGS) $(objects) -o nsm $(LINK)
+       cp nsm nift
+ endif
+ 



Home | Main Index | Thread Index | Old Index