1 |
commit: 3dd88b674ce2c8519c1452ea0eddd181036d84b6 |
2 |
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Mar 14 15:13:48 2019 +0000 |
4 |
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Mar 14 15:15:06 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3dd88b67 |
7 |
|
8 |
sys-fs/squashfs-tools: Fix includes |
9 |
|
10 |
Package-Manager: Portage-2.3.62, Repoman-2.3.12 |
11 |
Bug: https://bugs.gentoo.org/show_bug.cgi?id=575232 |
12 |
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org> |
13 |
|
14 |
.../files/squashfs-tools-3.2-makedev.patch | 20 +++++++++++ |
15 |
.../files/squashfs-tools-3.4-makedev.patch | 20 +++++++++++ |
16 |
.../squashfs-tools/squashfs-tools-3.2_p2-r1.ebuild | 42 ++++++++++++++++++++++ |
17 |
sys-fs/squashfs-tools/squashfs-tools-3.4-r1.ebuild | 42 ++++++++++++++++++++++ |
18 |
4 files changed, 124 insertions(+) |
19 |
|
20 |
diff --git a/sys-fs/squashfs-tools/files/squashfs-tools-3.2-makedev.patch b/sys-fs/squashfs-tools/files/squashfs-tools-3.2-makedev.patch |
21 |
new file mode 100644 |
22 |
index 00000000000..b7bffe01af9 |
23 |
--- /dev/null |
24 |
+++ b/sys-fs/squashfs-tools/files/squashfs-tools-3.2-makedev.patch |
25 |
@@ -0,0 +1,20 @@ |
26 |
+--- a/squashfs-tools/unsquashfs.c |
27 |
++++ b/squashfs-tools/unsquashfs.c |
28 |
+@@ -34,6 +34,7 @@ |
29 |
+ #include <zlib.h> |
30 |
+ #include <sys/mman.h> |
31 |
+ #include <utime.h> |
32 |
++#include <sys/sysmacros.h> /* makedev */ |
33 |
+ |
34 |
+ #ifndef linux |
35 |
+ #define __BYTE_ORDER BYTE_ORDER |
36 |
+--- a/squashfs-tools/mksquashfs.c |
37 |
++++ b/squashfs-tools/mksquashfs.c |
38 |
+@@ -44,6 +44,7 @@ |
39 |
+ #include <sys/mman.h> |
40 |
+ #include <pthread.h> |
41 |
+ #include <math.h> |
42 |
++#include <sys/sysmacros.h> /* makedev */ |
43 |
+ |
44 |
+ #ifndef linux |
45 |
+ #define __BYTE_ORDER BYTE_ORDER |
46 |
|
47 |
diff --git a/sys-fs/squashfs-tools/files/squashfs-tools-3.4-makedev.patch b/sys-fs/squashfs-tools/files/squashfs-tools-3.4-makedev.patch |
48 |
new file mode 100644 |
49 |
index 00000000000..17eb3ffaac2 |
50 |
--- /dev/null |
51 |
+++ b/sys-fs/squashfs-tools/files/squashfs-tools-3.4-makedev.patch |
52 |
@@ -0,0 +1,20 @@ |
53 |
+--- a/squashfs-tools/mksquashfs.c |
54 |
++++ b/squashfs-tools/mksquashfs.c |
55 |
+@@ -47,6 +47,7 @@ |
56 |
+ #include <math.h> |
57 |
+ #include <regex.h> |
58 |
+ #include <fnmatch.h> |
59 |
++#include <sys/sysmacros.h> /* makedev */ |
60 |
+ |
61 |
+ #ifndef linux |
62 |
+ #define __BYTE_ORDER BYTE_ORDER |
63 |
+--- a/squashfs-tools/unsquashfs.c |
64 |
++++ b/squashfs-tools/unsquashfs.c |
65 |
+@@ -47,6 +47,7 @@ |
66 |
+ #include <math.h> |
67 |
+ #include <sys/ioctl.h> |
68 |
+ #include <sys/time.h> |
69 |
++#include <sys/sysmacros.h> /* makedev */ |
70 |
+ |
71 |
+ #ifndef linux |
72 |
+ #define __BYTE_ORDER BYTE_ORDER |
73 |
|
74 |
diff --git a/sys-fs/squashfs-tools/squashfs-tools-3.2_p2-r1.ebuild b/sys-fs/squashfs-tools/squashfs-tools-3.2_p2-r1.ebuild |
75 |
new file mode 100644 |
76 |
index 00000000000..969a1b0ad8d |
77 |
--- /dev/null |
78 |
+++ b/sys-fs/squashfs-tools/squashfs-tools-3.2_p2-r1.ebuild |
79 |
@@ -0,0 +1,42 @@ |
80 |
+# Copyright 1999-2019 Gentoo Authors |
81 |
+# Distributed under the terms of the GNU General Public License v2 |
82 |
+ |
83 |
+EAPI=7 |
84 |
+inherit toolchain-funcs |
85 |
+ |
86 |
+MY_PV=${PV/_p/-r} |
87 |
+DESCRIPTION="Tool for creating compressed filesystem type squashfs" |
88 |
+HOMEPAGE="http://squashfs.sourceforge.net/" |
89 |
+SRC_URI="mirror://sourceforge/squashfs/squashfs${MY_PV}.tar.gz" |
90 |
+ |
91 |
+LICENSE="GPL-2" |
92 |
+SLOT="3.0" # squashfs filesystem version |
93 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
94 |
+ |
95 |
+RDEPEND="sys-libs/zlib" |
96 |
+DEPEND="${RDEPEND}" |
97 |
+S=${WORKDIR}/squashfs${MY_PV}/squashfs-tools |
98 |
+PATCHES=( |
99 |
+ "${FILESDIR}"/${PN}-3.2-makedev.patch |
100 |
+) |
101 |
+ |
102 |
+src_prepare() { |
103 |
+ default |
104 |
+ sed -i \ |
105 |
+ -e 's:-O2:$(CFLAGS):' \ |
106 |
+ -e '/-lz/s:$: $(LDFLAGS):' \ |
107 |
+ Makefile || die |
108 |
+ |
109 |
+ echo "struct dir_info; `grep '^int dir_scan2' mksquashfs.c`;" >> global.h |
110 |
+} |
111 |
+ |
112 |
+src_compile() { |
113 |
+ emake CC="$(tc-getCC)" |
114 |
+} |
115 |
+ |
116 |
+src_install() { |
117 |
+ newbin mksquashfs mksquashfs-${SLOT} |
118 |
+ newbin unsquashfs unsquashfs-${SLOT} |
119 |
+ cd .. |
120 |
+ dodoc README ACKNOWLEDGEMENTS CHANGES PERFORMANCE.README README-3.2 |
121 |
+} |
122 |
|
123 |
diff --git a/sys-fs/squashfs-tools/squashfs-tools-3.4-r1.ebuild b/sys-fs/squashfs-tools/squashfs-tools-3.4-r1.ebuild |
124 |
new file mode 100644 |
125 |
index 00000000000..4b252ea0438 |
126 |
--- /dev/null |
127 |
+++ b/sys-fs/squashfs-tools/squashfs-tools-3.4-r1.ebuild |
128 |
@@ -0,0 +1,42 @@ |
129 |
+# Copyright 1999-2019 Gentoo Authors |
130 |
+# Distributed under the terms of the GNU General Public License v2 |
131 |
+ |
132 |
+EAPI=7 |
133 |
+inherit toolchain-funcs |
134 |
+ |
135 |
+MY_PV=${PV/_p/-r} |
136 |
+DESCRIPTION="Tool for creating compressed filesystem type squashfs" |
137 |
+HOMEPAGE="http://squashfs.sourceforge.net/" |
138 |
+SRC_URI="mirror://sourceforge/squashfs/squashfs${MY_PV}.tar.gz" |
139 |
+ |
140 |
+LICENSE="GPL-2" |
141 |
+SLOT="3.1" # squashfs filesystem version |
142 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
143 |
+ |
144 |
+RDEPEND="sys-libs/zlib" |
145 |
+DEPEND="${RDEPEND}" |
146 |
+PATCHES=( |
147 |
+ "${FILESDIR}"/${PN}-3.4-makedev.patch |
148 |
+) |
149 |
+S=${WORKDIR}/squashfs${MY_PV}/squashfs-tools |
150 |
+ |
151 |
+src_prepare() { |
152 |
+ default |
153 |
+ sed -i \ |
154 |
+ -e 's:-O2:$(CFLAGS):' \ |
155 |
+ -e '/-lz/s:$: $(LDFLAGS):' \ |
156 |
+ Makefile || die |
157 |
+ |
158 |
+ sed -i -e 's:get_nprocs():sysconf(_SC_NPROCESSORS_ONLN):' *.c |
159 |
+} |
160 |
+ |
161 |
+src_compile() { |
162 |
+ emake CC="$(tc-getCC)" |
163 |
+} |
164 |
+ |
165 |
+src_install() { |
166 |
+ newbin mksquashfs mksquashfs-${SLOT} |
167 |
+ newbin unsquashfs unsquashfs-${SLOT} |
168 |
+ cd .. |
169 |
+ dodoc README ACKNOWLEDGEMENTS CHANGES PERFORMANCE.README README |
170 |
+} |