File: libbsd.patch

package info (click to toggle)
libedit 3.1-20140620-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,440 kB
  • ctags: 1,949
  • sloc: ansic: 15,788; sh: 11,514; awk: 427; makefile: 104
file content (101 lines) | stat: -rw-r--r-- 3,635 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
Index: libedit/configure.ac
===================================================================
--- libedit.orig/configure.ac	2014-02-19 12:56:48.509023194 +0100
+++ libedit/configure.ac	2014-02-19 12:56:48.505023194 +0100
@@ -61,6 +61,12 @@
   )]
 )
 
+PKG_CHECK_MODULES(LIBBSD, [libbsd-overlay],
+  [CFLAGS="$CFLAGS $LIBBSD_CFLAGS"
+   LDFLAGS="$LDFLAGS $LIBBSD_LIBS"
+   MODULES="$MODULES libbsd"
+   AC_SUBST([MODULES])]
+)
 
 ### use option --enable-widec to turn on use of wide-character support
 EL_ENABLE_WIDEC
@@ -117,24 +123,32 @@
 #AC_FUNC_REALLOC
 AC_TYPE_SIGNAL
 AC_FUNC_STAT
-AC_CHECK_FUNCS([endpwent isascii memchr memset re_comp regcomp strcasecmp strchr strcspn strdup strerror strrchr strstr strtol issetugid wcsdup strlcpy strlcat fgetln vis strvis strunvis __secure_getenv secure_getenv])
+AC_CHECK_FUNCS([endpwent isascii memchr memset re_comp regcomp strcasecmp strchr strcspn strdup strerror strrchr strstr strtol issetugid __secure_getenv secure_getenv])
+
+# fgetln
+AC_CHECK_FUNCS(fgetln, found_fgetln=yes, found_fgetln=no)
+AM_CONDITIONAL(HAVE_FGETLN, [test "x$found_fgetln" = xyes])
 
 # strlcpy
-AC_CHECK_FUNC(strlcpy, found_strlcpy=yes, found_strlcpy=no)
+AC_CHECK_FUNCS(strlcpy, found_strlcpy=yes, found_strlcpy=no)
 AM_CONDITIONAL(HAVE_STRLCPY, [test "x$found_strlcpy" = xyes])
 
 # strlcat
-AC_CHECK_FUNC(strlcat, found_strlcat=yes, found_strlcat=no)
+AC_CHECK_FUNCS(strlcat, found_strlcat=yes, found_strlcat=no)
 AM_CONDITIONAL(HAVE_STRLCAT, [test "x$found_strlcat" = xyes])
 
 # vis
-AC_CHECK_FUNC(vis, found_vis=yes, found_vis=no)
+AC_CHECK_FUNCS(vis, found_vis=yes, found_vis=no)
 AM_CONDITIONAL(HAVE_VIS, [test "x$found_vis" = xyes])
 
 # unvis
-AC_CHECK_FUNC(unvis, found_unvis=yes, found_unvis=no)
+AC_CHECK_FUNCS(unvis, found_unvis=yes, found_unvis=no)
 AM_CONDITIONAL(HAVE_UNVIS, [test "x$found_unvis" = xyes])
 
+# wcsdup
+AC_CHECK_FUNCS(wcsdup, found_wcsdup=yes, found_wcsdup=no)
+AM_CONDITIONAL(HAVE_WCSDUP, [test "x$found_wcsdup" = xyes])
+
 
 EL_GETPW_R_POSIX
 EL_GETPW_R_DRAFT
Index: libedit/libedit.pc.in
===================================================================
--- libedit.orig/libedit.pc.in	2014-02-19 12:56:48.509023194 +0100
+++ libedit/libedit.pc.in	2014-02-19 12:56:48.505023194 +0100
@@ -6,7 +6,8 @@
 Name: libedit
 Description: command line editor library provides generic line editing, history, and tokenization functions.
 Version: @VERSION@
-Requires:
-Libs: -L${libdir} -ledit @LIBS@
+Requires.private: @MODULES@
+Libs: -L${libdir} -ledit
+Libs.private: @LIBS@
 Cflags: -I${includedir} -I${includedir}/editline
 
Index: libedit/src/Makefile.am
===================================================================
--- libedit.orig/src/Makefile.am	2014-02-19 12:56:48.509023194 +0100
+++ libedit/src/Makefile.am	2014-02-19 12:56:48.505023194 +0100
@@ -39,12 +39,15 @@
 lib_LTLIBRARIES    = libedit.la
 libedit_la_SOURCES = chared.c common.c el.c emacs.c hist.c keymacro.c map.c chartype.c parse.c \
 							prompt.c read.c refresh.c search.c sig.c terminal.c tty.c vi.c \
-							fgetln.c wcsdup.c tokenizer.c \
+							tokenizer.c \
 							history.c filecomplete.c readline.c chared.h el.h hist.h \
 							histedit.h keymacro.h map.h chartype.h parse.h prompt.h read.h refresh.h \
 							search.h sig.h sys.h terminal.h tty.h vis.h filecomplete.h \
 							editline/readline.h
 
+if !HAVE_FGETLN
+libedit_la_SOURCES += fgetln.c
+endif
 if !HAVE_STRLCPY
 libedit_la_SOURCES += strlcpy.c
 endif
@@ -59,6 +62,9 @@
 endif
 if WIDECHAR
 libedit_la_SOURCES += eln.c
+if !HAVE_WCSDUP
+libedit_la_SOURCES += wcsdup.c
+endif
 endif
 
 EXTRA_DIST = makelist shlib_version