pkgsrc-Users archive

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

Re: devel or mk readline



Hi,

From: "OBATA Akio" <obache%NetBSD.org@localhost>, Date: Tue, 30 Jul 2013 
09:57:26 +0900

> On Mon, 29 Jul 2013 22:45:00 +0900, Patrick Welche <prlw1%cam.ac.uk@localhost>
> wrote:
> 
>> In that case, I don't understand:
>>
>> revision 1.24
>> date: 2013/07/17 21:22:40;  author: adam;  state: Exp;  lines: +4 -4
>> Distfile got changed (licence clause in mans). Revision bump.
>> Don't use mk/readline.buildlink3.mk! Must be
>> devel/readline/buildlink3.mk!
>>
>> which is from mysql55-client, which I looked at when trying to fix the
>> MySQL two different source tarballs with the same name problem for
>> mysql56-client.
>>
>> Leaving the mk/readline.buildlink3.mk alone, I get for mysql56-client
>>
>> $ ldd /usr/pkg/bin/mysql
>> /usr/pkg/bin/mysql:
>>         -lpthread.1 => /usr/lib/libpthread.so.1
>>         -lgcc_s.1 => /usr/lib/libgcc_s.so.1
>>         -lc.12 => /usr/lib/libc.so.12
>>         -ledit.3 => /usr/lib/libedit.so.3
>>         -lterminfo.1 => /lib/libterminfo.so.1
>>         -lz.1 => /usr/lib/libz.so.1
>>         -lssl.10 => /usr/lib/libssl.so.10
>>         -lcrypto.8 => /usr/lib/libcrypto.so.8
>>         -lcrypt.1 => /lib/libcrypt.so.1
>>         -lstdc++.7 => /usr/lib/libstdc++.so.7
>>         -lm.0 => /usr/lib/libm.so.0
>>
>> So, libedit seems OK. Should that bit of the mysql55-client patch be
>> reverted? What was the problem?
> 
> For me (NetBSD-5.2), cmake will fail to detect libedit,
> so perhaps editline>=3.0 may be required for mysql.
> 
> devel/editline/builtin.mk should detect builtin editline version...

NetBSD's libedit has no version string like 3.1.
The version string 3.1 is independently defined in editline's libedit.pc.
mysql55's CMakeLists.txt does not use the version string in libedit.pc.

mysql55's cmake/readline.cmake has libedit/editline checking small
program, and its build fails always.

Following patches fix READLINE_DEFAULT=editline/readline case
under NetBSD 6.99.23.

And according to gdt@'s e-mail, GPL v3 readline is not compatible
with GPL v2 only mysql55.
Following patches or similar is needed, and/or NO_* and RESTRICTED should
be defined?

Index: Makefile.common
===================================================================
RCS file: /cvsroot/pkgsrc/databases/mysql55-client/Makefile.common,v
retrieving revision 1.29
diff -u -r1.29 Makefile.common
--- Makefile.common     17 Jul 2013 21:22:40 -0000      1.29
+++ Makefile.common     30 Jul 2013 05:40:33 -0000
@@ -17,7 +17,6 @@
 PATCHDIR?=             ${.CURDIR}/../../databases/mysql55-client/patches
 
 USE_CMAKE=             yes
-USE_GNU_READLINE=      yes
 USE_LANGUAGES=         c c++
 USE_TOOLS+=            bash gmake perl:run
 
@@ -115,5 +114,11 @@
 SUBST_SED.scr+=                -e "s,/bin/sh,${RCD_SCRIPTS_SHELL},g"
 SUBST_MESSAGE.scr=     Fixing scripts.
 
-.include "../../devel/readline/buildlink3.mk"
+.include "../../mk/readline.buildlink3.mk"
+
+.if !empty(READLINE_TYPE:Mreadline)
+CMAKE_ARGS+=   -DREADLINE_FOUND=system
+.endif
+CMAKE_ARGS+=   
-DREADLINE_INCLUDE_DIR=${BUILDLINK_PREFIX.editlinereadline}/include/readline
+
 .include "../../devel/zlib/buildlink3.mk"
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/databases/mysql55-client/distinfo,v
retrieving revision 1.24
diff -u -r1.24 distinfo
--- distinfo    17 Jul 2013 21:22:40 -0000      1.24
+++ distinfo    30 Jul 2013 05:40:33 -0000
@@ -10,6 +10,7 @@
 SHA1 (patch-client_mysqlbinlog.cc) = e38abe026c10a07808ccd24b596cf13c5079e206
 SHA1 (patch-client_sql_string.cc) = 1547b8d3889af2831c89b97aecdbe8158711a600
 SHA1 (patch-cmake_libutils.cmake) = 5d75a1762e3db6724bec2d75b45d40b17a5e9d09
+SHA1 (patch-cmake_readline.cmake) = aed279d6740e70d7e0e7565a6d9f0f214c866c8d
 SHA1 (patch-include_CMakeLists.txt) = 4781c69315624fb5567ae70cee87f1ddb3f89847
 SHA1 (patch-include_my_compare.h) = f45bac4b488332a668b0005751856279b67401f5
 SHA1 (patch-include_my_net.h) = 162c97a87ab00b407f6796b55ef839ba2e3ac2af
Index: patches/patch-cmake_readline.cmake
===================================================================
RCS file: patches/patch-cmake_readline.cmake
diff -N patches/patch-cmake_readline.cmake
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-cmake_readline.cmake  30 Jul 2013 05:40:33 -0000
@@ -0,0 +1,19 @@
+$NetBSD$
+
+* Fix cmake's check build error. Borrowed from mysql56's readline.cmake.
+
+--- cmake/readline.cmake.orig  2013-06-19 15:26:27.000000000 +0000
++++ cmake/readline.cmake
+@@ -156,8 +156,11 @@ MACRO (MYSQL_FIND_SYSTEM_READLINE name)
+     #include <readline/readline.h>
+     int main(int argc, char **argv)
+     {
+-      char res= *(*rl_completion_entry_function)(0,0);
++      typedef int MYFunction(const char*, int);
++      MYFunction* myf= rl_completion_entry_function;
++      int res= (myf)(NULL, 0);
+       completion_matches(0,0);
++      return res;
+     }"
+     ${name}_USE_LIBEDIT_INTERFACE)
+ 

--
Ryo ONODERA // ryo_on%yk.rim.or.jp@localhost
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Home | Main Index | Thread Index | Old Index