pkgsrc-Bugs archive

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

Re: pkg/54496: databases/lua-qlite3 relative library path, build tools missing



The following reply was made to PR pkg/54496; it has been noted by GNATS.

From: =?utf-8?Q?cl=C3=A9ment_bouvier?= <clement.bouvier.europe%gmail.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: pkg/54496: databases/lua-qlite3 relative library path, build
 tools missing
Date: Thu, 29 Aug 2019 18:27:09 +0400

 --Apple-Mail=_5E1F1BAB-4E2E-4981-B915-4FFF38D8E26F
 Content-Transfer-Encoding: quoted-printable
 Content-Type: text/plain;
 	charset=utf-8
 
 Hi,
 
 Probably is better with shared option.
 I'm sorry...
 
 Cl=C3=A9ment.
 
 
 --Apple-Mail=_5E1F1BAB-4E2E-4981-B915-4FFF38D8E26F
 Content-Disposition: attachment;
 	filename=patch-lua-sqlite3.diff
 Content-Type: application/octet-stream;
 	x-unix-mode=0644;
 	name="patch-lua-sqlite3.diff"
 Content-Transfer-Encoding: 7bit
 
 Index: Makefile
 ===================================================================
 RCS file: /cvsroot/pkgsrc/databases/lua-sqlite3/Makefile,v
 retrieving revision 1.19
 diff -u -r1.19 Makefile
 --- Makefile	3 Apr 2019 00:32:30 -0000	1.19
 +++ Makefile	29 Aug 2019 14:24:53 -0000
 @@ -12,17 +12,20 @@
  COMMENT=	SQLite3 binding for LUA
  LICENSE=	mit
  
 +USE_LIBTOOL=		yes
 +USE_TOOLS+=		gmake m4
  GNU_CONFIGURE=		yes
  CONFIGURE_ARGS+=	--libdir=${PREFIX}/${LUA_CDIR}
 +CONFIGURE_ARGS+=	--bindir=${PREFIX}/${LUA_LDIR}
  CONFIGURE_ARGS+=	--with-lua=${LUA_INTERPRETER:Q}
  
  CFLAGS+=		-fPIC
  
 +LUA_VERSIONS_INCOMPATIBLE=      52 53
 +
  INSTALLATION_DIRS+= 	${LUA_LDIR} ${LUA_CDIR}
  
 -post-install:
 -	mv ${DESTDIR}${PREFIX}/${LUA_CDIR}/*.lua \
 -	   ${DESTDIR}${PREFIX}/${LUA_LDIR}
 +TEST_TARGET=            check
  
  .include "../../databases/sqlite3/buildlink3.mk"
  .include "../../lang/lua/module.mk"
 Index: PLIST
 ===================================================================
 RCS file: /cvsroot/pkgsrc/databases/lua-sqlite3/PLIST,v
 retrieving revision 1.2
 diff -u -r1.2 PLIST
 --- PLIST	3 May 2014 13:01:24 -0000	1.2
 +++ PLIST	29 Aug 2019 14:24:53 -0000
 @@ -1,5 +1,5 @@
  @comment $NetBSD: PLIST,v 1.2 2014/05/03 13:01:24 alnsn Exp $
 -${LUA_CDIR}/libluasqlite3.so
 +${LUA_CDIR}/libluasqlite3.la
  ${LUA_LDIR}/libluasqlite3-loader.lua
  ${LUA_LDIR}/luasql-sqlite3.lua
  ${LUA_LDIR}/sqlite3.lua
 Index: distinfo
 ===================================================================
 RCS file: /cvsroot/pkgsrc/databases/lua-sqlite3/distinfo,v
 retrieving revision 1.3
 diff -u -r1.3 distinfo
 --- distinfo	3 Nov 2015 01:56:14 -0000	1.3
 +++ distinfo	29 Aug 2019 14:24:53 -0000
 @@ -4,6 +4,6 @@
  RMD160 (lua-sqlite3-0.4.1.tar.bz2) = ab502207f8cdaaf7749500b2f02cf7990da1f87c
  SHA512 (lua-sqlite3-0.4.1.tar.bz2) = bd1b915e09f24926fa8cdb7b5e1e5ea9484d36d74402171c250a854428e4c6ebc883bfe9313fc7354f84bf85e97eaa0005839d55080bfbc8baace4f1a0e92802
  Size (lua-sqlite3-0.4.1.tar.bz2) = 54780 bytes
 -SHA1 (patch-Makefile.in) = 6a1482242354c6b1b5c935695fd49154312a9a5d
 -SHA1 (patch-configure) = a9950af9c314bf3bc2ab813d3cc7d8e6c410b4dd
 -SHA1 (patch-libluasqlite3.c) = 7eccef9ebdbc9e33b6bb52ce0b214a19786aa230
 +SHA1 (patch-Makefile.in) = 4241217722884c441e97f9ff59543c8bb5db836d
 +SHA1 (patch-configure) = c60674ea3363881635e28307d8a9aa4d8edcee03
 +SHA1 (patch-libluasqlite3.c) = 68e8c59c2d9523b7f3d809185fa8036ce1ff7cf9
 Index: patches/patch-Makefile.in
 ===================================================================
 RCS file: /cvsroot/pkgsrc/databases/lua-sqlite3/patches/patch-Makefile.in,v
 retrieving revision 1.1
 diff -u -r1.1 patch-Makefile.in
 --- patches/patch-Makefile.in	3 May 2014 13:01:24 -0000	1.1
 +++ patches/patch-Makefile.in	29 Aug 2019 14:24:53 -0000
 @@ -1,5 +1,9 @@
  $NetBSD: patch-Makefile.in,v 1.1 2014/05/03 13:01:24 alnsn Exp $
  
 +* Adapt luadir for installing the lua module
 +* Use bindir for installing the lua script files
 +* Build lua module with libtool
 +
  --- Makefile.in.orig	2006-05-11 11:07:19.000000000 +0000
  +++ Makefile.in
  @@ -9,7 +9,7 @@ libdir			:= @libdir@
 @@ -11,20 +15,35 @@
   
   install			:= install
   install-data		:= $(install) -p -m 644
 -@@ -27,7 +27,6 @@ LIBS			:= @LIBS@
 +@@ -58,8 +58,9 @@ all:			libluasqlite3.so libluasqlite3-lo
   
 - COMPILE			= $(CC) -c $(CFLAGS) -o $@ $<
 - LINK			= $(CC) $(LDFLAGS) -o $@ $+ $(LIBS)
 --LINKSHARED		= $(CC) -shared  $(LDFLAGS) -o $@ $+ $(LIBS)
 - 
 - DESTDIR			=
 - 
 -@@ -127,7 +126,7 @@ libluasqlite3.o:	libluasqlite3.c
 - 			$(COMPILE)
 + install:		all
 + 			$(install-dirs) $(DESTDIR)$(luadir)
 +-			$(install-data) $(LUA_FILES) libluasqlite3.so $(DESTDIR)$(luadir)
 +-			$(install-data) libluasqlite3-loader.lua.install $(DESTDIR)$(luadir)/libluasqlite3-loader.lua
 ++			${LIBTOOL} --mode=install $(install-data) libluasqlite3.la $(DESTDIR)$(luadir) 
 ++			$(install-data) $(LUA_FILES) $(DESTDIR)$(bindir)
 ++			$(install-data) libluasqlite3-loader.lua.install $(DESTDIR)$(bindir)/libluasqlite3-loader.lua
 + 
 + uninstall:
 + 			( cd $(DESTDIR)$(luadir); rm -f $(LUA_FILES) libluasqlite3-loader.lua libluasqlite3.so )
 +@@ -118,16 +119,16 @@ docsclean:
 + 			rm -f documentation.html
 + 
 + check:			all
 +-			$(LUA) tests.lua
 ++			${LIBTOOL} --mode=execute -dlopen libluasqlite3.la $(LUA) tests.lua
 + 
 + documentation.html:	docs/doc.mrd makedoc.lua
 + 			$(LUA) makedoc.lua >documentation.html
 + 
 + libluasqlite3.o:	libluasqlite3.c
 +-			$(COMPILE)
 ++			${LIBTOOL} --tag=CC --mode=compile $(CC) $(CFLAGS) -c $< -o ${@:.o=.lo}
   
   libluasqlite3.so:	libluasqlite3.o
  -			$(LINKSHARED)
 -+			$(CC) -shared  $(LDFLAGS) libluasqlite3.o -o $@ $(LIBS)
 ++			${LIBTOOL} --tag=CC --mode=link $(CC) $(LDFLAGS) -shared -module -avoid-version -export-dynamic -rpath $(luadir) -o ${@:.so=.la} ${<:.o=.lo} $(LIBS)
   
   libluasqlite3-loader.lua.install: libluasqlite3-loader.lua.in
   			m4 -DSHARED_LIB_PATH=$(luadir)				\
 Index: patches/patch-configure
 ===================================================================
 RCS file: /cvsroot/pkgsrc/databases/lua-sqlite3/patches/patch-configure,v
 retrieving revision 1.2
 diff -u -r1.2 patch-configure
 --- patches/patch-configure	3 May 2014 13:01:24 -0000	1.2
 +++ patches/patch-configure	29 Aug 2019 14:24:53 -0000
 @@ -1,14 +1,17 @@
  $NetBSD: patch-configure,v 1.2 2014/05/03 13:01:24 alnsn Exp $
  
  nm -D is not portable, but -llua is needed anyway.
 +Linking directly to lua is not useful for a module.  
  
  --- configure.orig	2006-05-11 11:23:29.000000000 +0000
  +++ configure
 -@@ -3513,7 +3513,6 @@ fi
 +@@ -3512,8 +3512,7 @@ fi
 + 
   echo "$as_me:$LINENO: checking if we need -llua" >&5
   echo $ECHO_N "checking if we need -llua... $ECHO_C" >&6
 - need_llua=yes
 +-need_llua=yes
  -nm -D "$LUA" | $EGREP "T lua_open$" >/dev/null && need_llua=no
 ++need_llua=no
   echo "$as_me:$LINENO: result: $need_llua" >&5
   echo "${ECHO_T}$need_llua" >&6
   if test $need_llua = yes; then
 Index: patches/patch-libluasqlite3.c
 ===================================================================
 RCS file: /cvsroot/pkgsrc/databases/lua-sqlite3/patches/patch-libluasqlite3.c,v
 retrieving revision 1.1
 diff -u -r1.1 patch-libluasqlite3.c
 --- patches/patch-libluasqlite3.c	3 May 2014 13:01:24 -0000	1.1
 +++ patches/patch-libluasqlite3.c	29 Aug 2019 14:24:53 -0000
 @@ -1,5 +1,8 @@
  $NetBSD: patch-libluasqlite3.c,v 1.1 2014/05/03 13:01:24 alnsn Exp $
  
 +* Adapt module to lua 5.2
 +* luaL_typerror does not exist anymore with lua 5.2. Make an equivalent version
 +
  --- libluasqlite3.c.orig	2006-05-11 11:06:16.000000000 +0000
  +++ libluasqlite3.c
  @@ -302,10 +302,28 @@ static void report_error(lua_State * L, 
 
 --Apple-Mail=_5E1F1BAB-4E2E-4981-B915-4FFF38D8E26F--
 


Home | Main Index | Thread Index | Old Index