Package: nutcracker / 0.5.0+dfsg-2

use_system_libyaml Patch series | 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
From: Faidon Liambotis <paravoid@debian.org>
Date: Sat, 11 Feb 2023 22:28:01 +0200
Subject: Use system libyaml

Forwarded: https://github.com/twitter/twemproxy/pull/121
Last-Update: 2023-02-11
---
 Makefile.am     | 2 +-
 configure.ac    | 7 -------
 src/Makefile.am | 5 +----
 3 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 5869974..237405e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,7 +2,7 @@ MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure config.h.in config.h.in~
 
 ACLOCAL_AMFLAGS = -I m4
 
-SUBDIRS = contrib src
+SUBDIRS = src
 
 dist_man_MANS = man/nutcracker.8
 
diff --git a/configure.ac b/configure.ac
index 0f96dba..8634435 100644
--- a/configure.ac
+++ b/configure.ac
@@ -197,15 +197,8 @@ AS_IF([test "x$disable_stats" = xyes],
   [AC_DEFINE([HAVE_STATS], [1], [Define to 1 if stats is not disabled])])
 AC_MSG_RESULT($disable_stats)
 
-# Untar the yaml-0.2.5 in contrib/ before config.status is rerun
-AC_CONFIG_COMMANDS_PRE([tar xvfz contrib/yaml-0.2.5.tar.gz -C contrib])
-
-# Call yaml-0.2.5 ./configure recursively
-AC_CONFIG_SUBDIRS([contrib/yaml-0.2.5])
-
 # Define Makefiles
 AC_CONFIG_FILES([Makefile
-                 contrib/Makefile
                  src/Makefile
                  src/hashkit/Makefile
                  src/proto/Makefile
diff --git a/src/Makefile.am b/src/Makefile.am
index dd07a25..e32be10 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -7,7 +7,6 @@ endif
 AM_CPPFLAGS += -I $(top_srcdir)/src/hashkit
 AM_CPPFLAGS += -I $(top_srcdir)/src/proto
 AM_CPPFLAGS += -I $(top_srcdir)/src/event
-AM_CPPFLAGS += -I $(top_srcdir)/contrib/yaml-0.2.5/include
 
 AM_CFLAGS =
 # about -fno-strict-aliasing: https://github.com/twitter/twemproxy/issues/276
@@ -22,7 +21,7 @@ AM_CFLAGS += -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wmissin
 AM_CFLAGS += -Wno-format-zero-length
 
 AM_LDFLAGS =
-AM_LDFLAGS += -lm -lpthread -rdynamic
+AM_LDFLAGS += -lm -lpthread -lyaml -rdynamic
 if OS_SOLARIS
 AM_LDFLAGS += -lnsl -lsocket
 endif
@@ -58,7 +57,6 @@ nutcracker_SOURCES =			\
 nutcracker_LDADD = $(top_builddir)/src/hashkit/libhashkit.a
 nutcracker_LDADD += $(top_builddir)/src/proto/libproto.a
 nutcracker_LDADD += $(top_builddir)/src/event/libevent.a
-nutcracker_LDADD += $(top_builddir)/contrib/yaml-0.2.5/src/.libs/libyaml.a
 
 TESTS = test_all
 bin_PROGRAMS = test_all
@@ -86,4 +84,3 @@ test_all_SOURCES = test_all.c \
 test_all_LDADD = $(top_builddir)/src/hashkit/libhashkit.a
 test_all_LDADD += $(top_builddir)/src/proto/libproto.a
 test_all_LDADD += $(top_builddir)/src/event/libevent.a
-test_all_LDADD += $(top_builddir)/contrib/yaml-0.2.5/src/.libs/libyaml.a