opkg: update patches, revert SVN r556
[opendreambox.git] / meta-opendreambox / recipes-devtools / opkg / opkg / 0003-Statically-link-libopkg-and-libbb.patch
1 From 698fdfccb2b2855fbe73ecad159b7987b49ddded Mon Sep 17 00:00:00 2001
2 From: Andreas Oberritter <obi@opendreambox.org>
3 Date: Thu, 17 May 2012 01:23:43 +0200
4 Subject: [PATCH 3/9] Statically link libopkg and libbb
5
6 * Based on https://dev.openwrt.org/browser/trunk/package/opkg/patches/007-force_static.patch
7
8 Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
9 ---
10  libbb/Makefile.am   |    8 ++++----
11  libopkg/Makefile.am |   14 +++-----------
12  src/Makefile.am     |    4 ++--
13  tests/Makefile.am   |    6 +++---
14  4 files changed, 12 insertions(+), 20 deletions(-)
15
16 diff --git a/libbb/Makefile.am b/libbb/Makefile.am
17 index 1cc82df..337d94f 100644
18 --- a/libbb/Makefile.am
19 +++ b/libbb/Makefile.am
20 @@ -2,9 +2,9 @@ HOST_CPU=@host_cpu@
21  BUILD_CPU=@build_cpu@
22  ALL_CFLAGS=-g -O -Wall -DHOST_CPU_STR=\"@host_cpu@\" -DBUILD_CPU=@build_cpu@
23  
24 -noinst_LTLIBRARIES = libbb.la
25 +noinst_LIBRARIES = libbb.a
26  
27 -libbb_la_SOURCES = gz_open.c \
28 +libbb_a_SOURCES = gz_open.c \
29         libbb.h \
30         unzip.c \
31         wfopen.c \
32 @@ -22,5 +22,5 @@ libbb_la_SOURCES = gz_open.c \
33         all_read.c \
34         mode_string.c
35  
36 -libbb_la_CFLAGS = $(ALL_CFLAGS)
37 -#libbb_la_LDFLAGS = -static
38 +libbb_a_CFLAGS = $(ALL_CFLAGS)
39 +#libbb_a_LDFLAGS = -static
40 diff --git a/libopkg/Makefile.am b/libopkg/Makefile.am
41 index 043c5c4..5882595 100644
42 --- a/libopkg/Makefile.am
43 +++ b/libopkg/Makefile.am
44 @@ -38,18 +38,10 @@ if HAVE_SHA256
45  opkg_util_sources += sha256.c sha256.h
46  endif
47  
48 -lib_LTLIBRARIES = libopkg.la
49 -libopkg_la_SOURCES = \
50 +noinst_LIBRARIES = libopkg.a
51 +libopkg_a_SOURCES = \
52         $(opkg_libcore_sources) \
53         $(opkg_cmd_sources) $(opkg_db_sources) \
54         $(opkg_util_sources) $(opkg_list_sources)
55  
56 -libopkg_la_LIBADD = $(top_builddir)/libbb/libbb.la $(CURL_LIBS) $(GPGME_LIBS) $(OPENSSL_LIBS) $(PATHFINDER_LIBS)
57 -
58 -libopkg_la_LDFLAGS = -version-info 1:0:0
59 -
60 -# make sure we only export symbols that are for public use
61 -#libopkg_la_LDFLAGS = -export-symbols-regex "^opkg_.*"
62 -
63 -
64 -
65 +libopkg_a_LIBADD = $(top_builddir)/libbb/libbb.a $(CURL_LIBS) $(GPGME_LIBS) $(OPENSSL_LIBS) $(PATHFINDER_LIBS)
66 diff --git a/src/Makefile.am b/src/Makefile.am
67 index efdc19d..bb7a792 100644
68 --- a/src/Makefile.am
69 +++ b/src/Makefile.am
70 @@ -2,5 +2,5 @@ AM_CFLAGS = -I${top_srcdir}/libopkg ${ALL_CFLAGS}
71  bin_PROGRAMS = opkg-cl
72  
73  opkg_cl_SOURCES = opkg-cl.c
74 -opkg_cl_LDADD = $(top_builddir)/libopkg/libopkg.la \
75 -                $(top_builddir)/libbb/libbb.la 
76 +opkg_cl_LDADD = $(top_builddir)/libopkg/libopkg.a \
77 +                $(top_builddir)/libbb/libbb.a
78 diff --git a/tests/Makefile.am b/tests/Makefile.am
79 index 1a6f565..132c792 100644
80 --- a/tests/Makefile.am
81 +++ b/tests/Makefile.am
82 @@ -4,11 +4,11 @@ AM_CFLAGS = $(ALL_CFLAGS) -Wall -g -O3 -I${top_srcdir}/libopkg
83  #noinst_PROGRAMS = libopkg_test opkg_active_list_test
84  noinst_PROGRAMS = libopkg_test
85  
86 -#opkg_hash_test_LDADD = $(top_builddir)/libbb/libbb.la $(top_builddir)/libopkg/libopkg.la
87 +#opkg_hash_test_LDADD = $(top_builddir)/libbb/libbb.a $(top_builddir)/libopkg/libopkg.a
88  #opkg_hash_test_SOURCES = opkg_hash_test.c
89  #opkg_hash_test_CFLAGS = $(ALL_CFLAGS) -I$(top_srcdir)
90  
91 -#opkg_extract_test_LDADD = $(top_builddir)/libbb/libbb.la $(top_builddir)/libopkg/libopkg.la
92 +#opkg_extract_test_LDADD = $(top_builddir)/libbb/libbb.a $(top_builddir)/libopkg/libopkg.a
93  #opkg_extract_test_SOURCES = opkg_extract_test.c
94  #opkg_extract_test_CFLAGS = $(ALL_CFLAGS) -I$(top_srcdir)
95  
96 @@ -16,7 +16,7 @@ noinst_PROGRAMS = libopkg_test
97  #opkg_active_list_test_SOURCES = opkg_active_list_test.c
98  #opkg_active_list_test_CFLAGS = $(ALL_CFLAGS) -I$(top_srcdir)
99  
100 -libopkg_test_LDADD = $(top_builddir)/libopkg/libopkg.la
101 +libopkg_test_LDADD = $(top_builddir)/libopkg/libopkg.a $(top_builddir)/libbb/libbb.a
102  libopkg_test_SOURCE = libopkg_test.c
103  libopkg_test_LDFLAGS = -static
104  
105 -- 
106 1.7.9.5
107