Gentoo Archives: gentoo-commits

From: "Peter Volkov (pva)" <pva@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-analyzer/mrtg/files: mrtg-2.16.4-no-rpath.patch mrtg-2.16.4-disable-static.patch
Date: Tue, 09 Nov 2010 17:57:11
Message-Id: 20101109175707.C03D420054@flycatcher.gentoo.org
1 pva 10/11/09 17:57:07
2
3 Added: mrtg-2.16.4-no-rpath.patch
4 mrtg-2.16.4-disable-static.patch
5 Log:
6 Fix static linkage and rpath, bug #332287, thank Diego Elio Pettenò for report.
7
8 (Portage version: 2.1.9.24/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.1 net-analyzer/mrtg/files/mrtg-2.16.4-no-rpath.patch
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/mrtg/files/mrtg-2.16.4-no-rpath.patch?rev=1.1&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/mrtg/files/mrtg-2.16.4-no-rpath.patch?rev=1.1&content-type=text/plain
15
16 Index: mrtg-2.16.4-no-rpath.patch
17 ===================================================================
18 http://oss.oetiker.ch/mrtg-trac/ticket/98
19
20 --- Makefile.in 2010-11-09 16:25:34 +0000
21 +++ Makefile.in 2010-11-09 17:13:17 +0000
22 @@ -21,7 +21,7 @@
23 CPPFLAGS = @CPPFLAGS@
24 LDFLAGS = @LDFLAGS@
25 GDFORM_EXT = @GDFORM_EXT@
26 -LD_RUN_PATH = @LD_RUN_PATH@
27 +SET_LD_RUN_PATH = @SET_LD_RUN_PATH@
28 LIBS = @LIBS@
29
30 INSTALL = @INSTALL@
31 @@ -30,7 +30,8 @@
32 all: bin/rateup subst
33
34 bin/rateup: bin/rateup.o
35 - LD_RUN_PATH=$(LD_RUN_PATH) $(CC) bin/rateup.o -o bin/rateup $(LDFLAGS) $(LIBS)
36 + $(SET_LD_RUN_PATH) $(CC) bin/rateup.o -o bin/rateup $(LDFLAGS) $(LIBS)
37 +
38
39 bin/rateup.o: $(top_srcdir)/src/rateup.c
40 $(CC) $(CPPFLAGS) $(CFLAGS) -c $(top_srcdir)/src/rateup.c -o bin/rateup.o
41
42 --- configure.in 2010-11-09 17:11:20 +0000
43 +++ configure.in 2010-11-09 17:12:49 +0000
44 @@ -141,6 +141,9 @@
45
46 LIBS="${GLIBS} ${LIBS}"
47
48 +if test x$LD_RUN_PATH != x; then
49 + SET_LD_RUN_PATH="LD_RUN_PATH=${LD_RUN_PATH}"
50 +fi
51
52 dnl Make sure the header is here
53 AC_CHECK_HEADER( gd.h,:,[ GDFORM_EXT="" ])
54 @@ -198,7 +201,7 @@
55 AC_SUBST(PERL)
56 AC_SUBST(RRD_PERL)
57 AC_SUBST(GDFORM_EXT)
58 -AC_SUBST(LD_RUN_PATH)
59 +AC_SUBST(SET_LD_RUN_PATH)
60 AC_SUBST(LIBS)
61 AC_SUBST(CFLAGS)
62 AC_CONFIG_HEADERS(config.h)
63
64
65
66
67 1.1 net-analyzer/mrtg/files/mrtg-2.16.4-disable-static.patch
68
69 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/mrtg/files/mrtg-2.16.4-disable-static.patch?rev=1.1&view=markup
70 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/mrtg/files/mrtg-2.16.4-disable-static.patch?rev=1.1&content-type=text/plain
71
72 Index: mrtg-2.16.4-disable-static.patch
73 ===================================================================
74 http://oss.oetiker.ch/mrtg-trac/ticket/97
75
76 --- configure.in 2010-11-09 16:25:34 +0000
77 +++ configure.in 2010-11-09 16:35:39 +0000
78 @@ -98,6 +98,8 @@
79 AC_ARG_WITH(png-inc,[ --with-png-inc=DIR location of the libpng include files],
80 [CPPFLAGS="${CPPFLAGS} -I${withval}"])
81
82 +AC_ARG_ENABLE(static,[ --disable-static avoid rateup static linkage with gd],
83 + [AVOID_STATIC="${enableval}"],[AVOID_STATIC="no"])
84
85 LIBS="${LIBS} ${MATHLIBS}"
86
87 @@ -127,9 +129,11 @@
88 CPPFLAGS="$CPPFLAGS -DGFORM_GD=gdImageGif"
89 fi
90
91 -AC_CHECK_LIB(gd,gdImageGd,[
92 - GLIBS="-Wl,-Bstatic ${GLIBS} -Wl,-Bdynamic"
93 - ],:,[-Wl,-Bstatic ${GLIBS} -Wl,-Bdynamic])
94 +if test x$AVOID_STATIC = xyes; then
95 + AC_CHECK_LIB(gd,gdImageGd,[
96 + GLIBS="-Wl,-Bstatic ${GLIBS} -Wl,-Bdynamic"
97 + ],:,[-Wl,-Bstatic ${GLIBS} -Wl,-Bdynamic])
98 +fi
99
100 if test x$GDFORM_EXT = xpng; then
101 CPPFLAGS="$CPPFLAGS -DGFORM_GD=gdImagePng"