Преглед изворни кода

elfutils: imported from oldpackages, updated to 0.160

The pkg was imported from oldpackages.
It was updated to latest version, requiring some fixes in patches.

I added myself as maintainer.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Luiz Angelo Daros de Luca пре 10 година
родитељ
комит
5313490216

+ 92
- 0
libs/elfutils/Makefile Прегледај датотеку

@@ -0,0 +1,92 @@
1
+#
2
+# Copyright (C) 2010-2014 OpenWrt.org
3
+#
4
+# This is free software, licensed under the GNU General Public License v2.
5
+# See /LICENSE for more information.
6
+#
7
+include $(TOPDIR)/rules.mk
8
+
9
+PKG_NAME:=elfutils
10
+PKG_VERSION:=0.160
11
+PKG_RELEASE:=1
12
+
13
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
14
+PKG_SOURCE_URL:=http://fedorahosted.org/releases/e/l/$(PKG_NAME)/$(PKG_VERSION)
15
+PKG_MD5SUM:=7527f22dff8b1ac8c122cfc4d3d3bb1e
16
+PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
17
+PKG_LICENSE:=GPL-3.0+
18
+PKG_LICENSE_FILES:=COPYING COPYING-GPLV2 COPYING-LGPLV3
19
+
20
+PKG_INSTALL:=1
21
+PKG_USE_MIPS16:=0
22
+
23
+PKG_BUILD_DEPENDS:=USE_UCLIBC:argp-standalone
24
+
25
+include $(INCLUDE_DIR)/package.mk
26
+include $(INCLUDE_DIR)/nls.mk
27
+
28
+define Package/elfutils/Default
29
+  SECTION:=libs
30
+  CATEGORY:=Libraries
31
+  DEPENDS:=$(INTL_DEPENDS)
32
+  TITLE:=ELF manipulation libraries
33
+  URL:=https://fedorahosted.org/elfutils/
34
+endef
35
+
36
+define Package/libasm
37
+  $(call Package/elfutils/Default)
38
+  TITLE+= (libasm)
39
+  DEPENDS:=libelf1
40
+endef
41
+
42
+define Package/libdw
43
+  $(call Package/elfutils/Default)
44
+  DEPENDS:=libelf1 +zlib +libbz2
45
+  TITLE+= (libdw)
46
+endef
47
+
48
+define Package/libelf1
49
+  $(call Package/elfutils/Default)
50
+  TITLE+= (libelf)
51
+endef
52
+
53
+ifeq ($(CONFIG_BUILD_NLS),y)
54
+TARGET_LDFLAGS += "-lintl"
55
+endif
56
+
57
+ifdef CONFIG_USE_UCLIBC
58
+CONFIGURE_VARS += \
59
+	LIBS="-largp"
60
+endif
61
+
62
+CONFIGURE_ARGS += \
63
+	--disable-werror \
64
+	--without-lzma
65
+
66
+define Build/InstallDev
67
+	$(INSTALL_DIR) $(1)/usr/include
68
+	$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
69
+	$(INSTALL_DIR) $(1)/usr/lib
70
+	$(CP) $(PKG_BUILD_DIR)/libasm/libasm.{a,so*} $(1)/usr/lib/
71
+	$(CP) $(PKG_BUILD_DIR)/libdw/libdw.{a,so*} $(1)/usr/lib/
72
+	$(CP) $(PKG_BUILD_DIR)/libelf/libelf.{a,so*} $(1)/usr/lib/
73
+endef
74
+
75
+define Package/libasm/install
76
+	$(INSTALL_DIR) $(1)/usr/lib
77
+	$(CP) $(PKG_BUILD_DIR)/libasm/libasm.so* $(1)/usr/lib/
78
+endef
79
+
80
+define Package/libdw/install
81
+	$(INSTALL_DIR) $(1)/usr/lib
82
+	$(CP) $(PKG_BUILD_DIR)/libdw/libdw.so* $(1)/usr/lib/
83
+endef
84
+
85
+define Package/libelf1/install
86
+	$(INSTALL_DIR) $(1)/usr/lib
87
+	$(CP) $(PKG_BUILD_DIR)/libelf/libelf.so* $(1)/usr/lib/
88
+endef
89
+
90
+$(eval $(call BuildPackage,libasm))
91
+$(eval $(call BuildPackage,libdw))
92
+$(eval $(call BuildPackage,libelf1))

+ 1869
- 0
libs/elfutils/patches/001-elfutils-portability.patch
Разлика између датотеке није приказан због своје велике величине
Прегледај датотеку


+ 14
- 0
libs/elfutils/patches/002-argp_standalone.patch Прегледај датотеку

@@ -0,0 +1,14 @@
1
+--- elfutils-0.160/lib/color.c.old	2014-11-06 03:46:43.584116134 -0200
2
++++ elfutils-0.160/lib/color.c	2014-11-06 03:47:25.840116128 -0200
3
+@@ -131,8 +131,10 @@
4
+   - 'never', 'no', 'none'\n\
5
+   - 'auto', 'tty', 'if-tty'\n"),
6
+ 		     program_invocation_short_name, arg);
7
++          char program_invocation_short_name_nonconst[sizeof(program_invocation_short_name)];
8
++          strcpy(program_invocation_short_name_nonconst, program_invocation_short_name);
9
+ 	      argp_help (&color_argp, stderr, ARGP_HELP_SEE,
10
+-			 program_invocation_short_name);
11
++			 program_invocation_short_name_nonconst);
12
+ 	      exit (EXIT_FAILURE);
13
+ 	    }
14
+ 	}

+ 49
- 0
libs/elfutils/patches/003-libint-stub.patch Прегледај датотеку

@@ -0,0 +1,49 @@
1
+--- elfutils-0.160/libelf/libelfP.h.old	2014-11-06 01:47:55.420116984 -0200
2
++++ elfutils-0.160/libelf/libelfP.h	2014-11-06 01:48:33.368116980 -0200
3
+@@ -43,6 +43,9 @@
4
+ #include <string.h>
5
+ 
6
++#ifdef _ /* fix libintl-stub */
7
++#undef _
8
++#endif
9
+ /* gettext helper macros.  */
10
+ #define _(Str) dgettext ("elfutils", Str)
11
+ 
12
+ 
13
+--- elfutils-0.160/libdw/libdwP.h.old	2014-11-06 02:27:12.628116703 -0200
14
++++ elfutils-0.160/libdw/libdwP.h	2014-11-06 02:27:39.816116700 -0200
15
+@@ -36,7 +36,9 @@
16
+ #include <libdw.h>
17
+ #include <dwarf.h>
18
+ 
19
+-
20
++#ifdef _ /* fix libintl-stub */
21
++#undef _
22
++#endif
23
+ /* gettext helper macros.  */
24
+ #define _(Str) dgettext ("elfutils", Str)
25
+ 
26
+--- elfutils-0.160/libdwfl/libdwflP.h.old	2014-11-06 02:31:20.112116673 -0200
27
++++ elfutils-0.160/libdwfl/libdwflP.h	2014-11-06 02:33:00.548116661 -0200
28
+@@ -46,6 +46,9 @@
29
+ 
30
+ typedef struct Dwfl_Process Dwfl_Process;
31
+ 
32
++#ifdef _ /* fix libintl-stub */
33
++#undef _
34
++#endif
35
+ /* gettext helper macros.  */
36
+ #define _(Str) dgettext ("elfutils", Str)
37
+ 
38
+--- elfutils-0.160/libasm/libasmP.h.old	2014-11-06 02:31:32.064116672 -0200
39
++++ elfutils-0.160/libasm/libasmP.h	2014-11-06 02:33:08.656116660 -0200
40
+@@ -33,6 +33,9 @@
41
+ 
42
+ #include <libasm.h>
43
+ 
44
++#ifdef _ /* fix libintl-stub */
45
++#undef _
46
++#endif
47
+ /* gettext helper macros.  */
48
+ #define _(Str) dgettext ("elfutils", Str)
49
+ 

+ 11
- 0
libs/elfutils/patches/004-maybe-uninitialized.patch Прегледај датотеку

@@ -0,0 +1,11 @@
1
+--- elfutils-0.160/libelf/elf_getarsym.c.org	2014-11-06 01:56:58.664116919 -0200
2
++++ elfutils-0.160/libelf/elf_getarsym.c	2014-11-06 01:57:09.396116918 -0200
3
+@@ -166,7 +166,7 @@
4
+ 
5
+       /* We have an archive.  The first word in there is the number of
6
+ 	 entries in the table.  */
7
+-      uint64_t n;
8
++      uint64_t n = 0;
9
+       size_t off = elf->start_offset + SARMAG + sizeof (struct ar_hdr);
10
+       if (read_number_entries (&n, elf, &off, index64_p) < 0)
11
+ 	{

+ 14
- 0
libs/elfutils/patches/004-memcpy_def.patch Прегледај датотеку

@@ -0,0 +1,14 @@
1
+--- a/libelf/libelf.h
2
++++ b/libelf/libelf.h
3
+@@ -34,6 +34,11 @@
4
+ /* Get the ELF types.  */
5
+ #include <elf.h>
6
+ 
7
++#ifndef _LIBC
8
++#ifndef __mempcpy
9
++#define __mempcpy mempcpy
10
++#endif
11
++#endif
12
+ 
13
+ /* Known translation types.  */
14
+ typedef enum

+ 24
- 0
libs/elfutils/patches/005-build_only_libs.patch Прегледај датотеку

@@ -0,0 +1,24 @@
1
+--- elfutils-0.160/Makefile.in.old	2014-11-06 03:56:04.828116067 -0200
2
++++ elfutils-0.160/Makefile.in	2014-11-06 03:57:03.380116060 -0200
3
+@@ -359,8 +359,7 @@
4
+ pkginclude_HEADERS = version.h
5
+ 
6
+ # Add doc back when we have some real content.
7
+-SUBDIRS = config m4 lib libelf libebl libdwelf libdwfl libdw libcpu libasm \
8
+-	  backends src po tests
9
++SUBDIRS = config m4 lib libelf libebl libdwelf libdwfl libdw libasm
10
+ 
11
+ EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \
12
+ 	     COPYING COPYING-GPLV2 COPYING-LGPLV3
13
+--- elfutils-0.160/Makefile.am.old	2014-11-06 03:58:13.012116051 -0200
14
++++ elfutils-0.160/Makefile.am	2014-11-06 03:58:25.948116050 -0200
15
+@@ -23,8 +23,7 @@
16
+ pkginclude_HEADERS = version.h
17
+ 
18
+ # Add doc back when we have some real content.
19
+-SUBDIRS = config m4 lib libelf libebl libdwelf libdwfl libdw libcpu libasm \
20
+-	  backends src po tests
21
++SUBDIRS = config m4 lib libelf libebl libdwelf libdwfl libdw libasm
22
+ 
23
+ EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \
24
+ 	     COPYING COPYING-GPLV2 COPYING-LGPLV3

+ 22
- 0
libs/elfutils/patches/006-libdw_LIBS.patch Прегледај датотеку

@@ -0,0 +1,22 @@
1
+--- elfutils-0.160/libdw/Makefile.am.old	2014-11-06 03:02:12.700116452 -0200
2
++++ elfutils-0.160/libdw/Makefile.am	2014-11-06 03:02:55.732116447 -0200
3
+@@ -110,7 +110,7 @@
4
+ 		-Wl,--enable-new-dtags,-rpath,$(pkglibdir) \
5
+ 		-Wl,--version-script,$<,--no-undefined \
6
+ 		-Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\
7
+-		-ldl $(zip_LIBS)
8
++		-ldl $(zip_LIBS) x $(LIBS)
9
+ 	if $(READELF) -d $@ | fgrep -q TEXTREL; then exit 1; fi
10
+ 	ln -fs $@ $@.$(VERSION)
11
+ 
12
+--- elfutils-0.160/libdw/Makefile.in.old	2014-11-06 03:28:53.092116261 -0200
13
++++ elfutils-0.160/libdw/Makefile.in	2014-11-06 03:29:02.528116260 -0200
14
+@@ -958,7 +958,7 @@
15
+ 		-Wl,--enable-new-dtags,-rpath,$(pkglibdir) \
16
+ 		-Wl,--version-script,$<,--no-undefined \
17
+ 		-Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\
18
+-		-ldl $(zip_LIBS)
19
++		-ldl $(zip_LIBS) $(LIBS)
20
+ 	if $(READELF) -d $@ | fgrep -q TEXTREL; then exit 1; fi
21
+ 	ln -fs $@ $@.$(VERSION)
22
+