diff options
author | Khem Raj <raj.khem@gmail.com> | 2022-12-18 15:29:22 -0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2022-12-23 08:52:22 -0800 |
commit | 6a6defcc2bd835bbccbd7fef09591f718263e6de (patch) | |
tree | 4496cb42f708de48fc91214daef1ef28e836638d /meta-oe/recipes-graphics/libyui | |
parent | a8e8825ee1b7ebb1c8af2bc95c64ed10c056414e (diff) | |
download | meta-openembedded-6a6defcc2bd835bbccbd7fef09591f718263e6de.tar.gz |
libyui,libyui-ncurses: Upgrade to 4.2.3
Add a fix to build with lfs64
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-graphics/libyui')
-rw-r--r-- | meta-oe/recipes-graphics/libyui/libyui-ncurses/0001-libyui-ncurses-Replace-off64_t-with-off_t-and-stat64.patch | 176 | ||||
-rw-r--r-- | meta-oe/recipes-graphics/libyui/libyui-ncurses_4.2.3.bb (renamed from meta-oe/recipes-graphics/libyui/libyui-ncurses_4.1.1.bb) | 6 | ||||
-rw-r--r-- | meta-oe/recipes-graphics/libyui/libyui_4.2.3.bb (renamed from meta-oe/recipes-graphics/libyui/libyui_4.1.1.bb) | 2 |
3 files changed, 181 insertions, 3 deletions
diff --git a/meta-oe/recipes-graphics/libyui/libyui-ncurses/0001-libyui-ncurses-Replace-off64_t-with-off_t-and-stat64.patch b/meta-oe/recipes-graphics/libyui/libyui-ncurses/0001-libyui-ncurses-Replace-off64_t-with-off_t-and-stat64.patch new file mode 100644 index 000000000..b29e5dc7b --- /dev/null +++ b/meta-oe/recipes-graphics/libyui/libyui-ncurses/0001-libyui-ncurses-Replace-off64_t-with-off_t-and-stat64.patch | |||
@@ -0,0 +1,176 @@ | |||
1 | From b81fb7942ab77b0bf6791e5fd98411dd68f133d9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sun, 18 Dec 2022 15:13:00 -0800 | ||
4 | Subject: [PATCH] libyui-ncurses: Replace off64_t with off_t and stat64 with stat | ||
5 | |||
6 | stat is same as stat64 when 64bit off_t is used. | ||
7 | |||
8 | Upstream-Status: Submitted [https://github.com/libyui/libyui/pull/88] | ||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | CMakeLists.txt | 2 +- | ||
12 | src/NCAskForFile.cc | 6 +++--- | ||
13 | src/NCFileSelection.cc | 24 ++++++++++++------------ | ||
14 | src/NCFileSelection.h | 6 +++--- | ||
15 | 4 files changed, 19 insertions(+), 19 deletions(-) | ||
16 | |||
17 | diff --git a/CMakeLists.txt b/libyui-ncurses/CMakeLists.txt | ||
18 | index b10eab8e..2000bb58 100644 | ||
19 | --- a/CMakeLists.txt | ||
20 | +++ b/CMakeLists.txt | ||
21 | @@ -58,7 +58,7 @@ set( CMAKE_INSTALL_MESSAGE LAZY ) # Suppress "up-to-date" messages during "make | ||
22 | # Initialize compiler flags for all targets in all subdirectories | ||
23 | add_compile_options( "-Wall" ) | ||
24 | add_compile_options( "-Os" ) # Optimize for size (overrides CMake's -O3 in RELEASE builds) | ||
25 | - | ||
26 | +add_compile_options( "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" ) # Enable largefile support | ||
27 | if ( WERROR ) | ||
28 | add_compile_options( "-Werror" ) | ||
29 | endif() | ||
30 | diff --git a/src/NCAskForFile.cc b/libyui-ncurses/src/NCAskForFile.cc | ||
31 | index aba6e0a6..44bb81bc 100644 | ||
32 | --- a/src/NCAskForFile.cc | ||
33 | +++ b/src/NCAskForFile.cc | ||
34 | @@ -73,8 +73,8 @@ std::string NCAskForFile::checkIniDir( std::string iniDir ) | ||
35 | { | ||
36 | std::string dname = ""; | ||
37 | |||
38 | - struct stat64 statInfo; | ||
39 | - stat64( iniDir.c_str(), &statInfo ); | ||
40 | + struct stat statInfo; | ||
41 | + stat( iniDir.c_str(), &statInfo ); | ||
42 | |||
43 | if ( S_ISDIR( statInfo.st_mode ) ) | ||
44 | { | ||
45 | @@ -90,7 +90,7 @@ std::string NCAskForFile::checkIniDir( std::string iniDir ) | ||
46 | && pos != 0 ) | ||
47 | { | ||
48 | std::string dir = iniDir.substr( 0, pos ); | ||
49 | - stat64( dir.c_str(), &statInfo ); | ||
50 | + stat( dir.c_str(), &statInfo ); | ||
51 | |||
52 | if ( S_ISDIR( statInfo.st_mode ) ) | ||
53 | { | ||
54 | diff --git a/src/NCFileSelection.cc b/libyui-ncurses/src/NCFileSelection.cc | ||
55 | index 3eb9c908..8894dc72 100644 | ||
56 | --- a/src/NCFileSelection.cc | ||
57 | +++ b/src/NCFileSelection.cc | ||
58 | @@ -46,7 +46,7 @@ using std::list; | ||
59 | |||
60 | |||
61 | NCFileInfo::NCFileInfo( string fileName, | ||
62 | - struct stat64 * statInfo, | ||
63 | + struct stat * statInfo, | ||
64 | bool link ) | ||
65 | { | ||
66 | _name = fileName; | ||
67 | @@ -146,7 +146,7 @@ NCFileInfo::NCFileInfo() | ||
68 | _mode = ( mode_t )0; | ||
69 | _device = ( dev_t )0; | ||
70 | _links = ( nlink_t )0; | ||
71 | - _size = ( off64_t )0; | ||
72 | + _size = ( off_t )0; | ||
73 | _mtime = ( time_t )0; | ||
74 | } | ||
75 | |||
76 | @@ -177,11 +177,11 @@ NCFileSelection::NCFileSelection( YWidget * parent, | ||
77 | { | ||
78 | SetSepChar( ' ' ); | ||
79 | |||
80 | - struct stat64 statInfo; | ||
81 | + struct stat statInfo; | ||
82 | |||
83 | if ( !iniDir.empty() ) | ||
84 | { | ||
85 | - stat64( iniDir.c_str(), &statInfo ); | ||
86 | + stat( iniDir.c_str(), &statInfo ); | ||
87 | } | ||
88 | |||
89 | if ( iniDir.empty() | ||
90 | @@ -559,8 +559,8 @@ NCursesEvent NCFileTable::wHandleInput( wint_t key ) | ||
91 | bool NCFileTable::fillList() | ||
92 | { | ||
93 | |||
94 | - struct stat64 statInfo; | ||
95 | - struct stat64 linkInfo; | ||
96 | + struct stat statInfo; | ||
97 | + struct stat linkInfo; | ||
98 | struct dirent * entry; | ||
99 | list<string> tmpList; | ||
100 | list<string>::iterator it; | ||
101 | @@ -592,7 +592,7 @@ bool NCFileTable::fillList() | ||
102 | { | ||
103 | string fullName = currentDir + "/" + ( *it ); | ||
104 | |||
105 | - if ( lstat64( fullName.c_str(), &statInfo ) == 0 ) | ||
106 | + if ( lstat( fullName.c_str(), &statInfo ) == 0 ) | ||
107 | { | ||
108 | if ( S_ISREG( statInfo.st_mode ) || S_ISBLK( statInfo.st_mode ) ) | ||
109 | { | ||
110 | @@ -604,7 +604,7 @@ bool NCFileTable::fillList() | ||
111 | } | ||
112 | else if ( S_ISLNK( statInfo.st_mode ) ) | ||
113 | { | ||
114 | - if ( stat64( fullName.c_str(), &linkInfo ) == 0 ) | ||
115 | + if ( stat( fullName.c_str(), &linkInfo ) == 0 ) | ||
116 | { | ||
117 | if ( S_ISREG( linkInfo.st_mode ) || S_ISBLK( linkInfo.st_mode ) ) | ||
118 | { | ||
119 | @@ -701,8 +701,8 @@ void NCDirectoryTable::fillHeader() | ||
120 | |||
121 | bool NCDirectoryTable::fillList() | ||
122 | { | ||
123 | - struct stat64 statInfo; | ||
124 | - struct stat64 linkInfo; | ||
125 | + struct stat statInfo; | ||
126 | + struct stat linkInfo; | ||
127 | struct dirent * entry; | ||
128 | list<string> tmpList; | ||
129 | list<string>::iterator it; | ||
130 | @@ -734,7 +734,7 @@ bool NCDirectoryTable::fillList() | ||
131 | { | ||
132 | string fullName = currentDir + "/" + ( *it ); | ||
133 | |||
134 | - if ( lstat64( fullName.c_str(), &statInfo ) == 0 ) | ||
135 | + if ( lstat( fullName.c_str(), &statInfo ) == 0 ) | ||
136 | { | ||
137 | if ( S_ISDIR( statInfo.st_mode ) ) | ||
138 | { | ||
139 | @@ -746,7 +746,7 @@ bool NCDirectoryTable::fillList() | ||
140 | } | ||
141 | else if ( S_ISLNK( statInfo.st_mode ) ) | ||
142 | { | ||
143 | - if ( stat64( fullName.c_str(), &linkInfo ) == 0 ) | ||
144 | + if ( stat( fullName.c_str(), &linkInfo ) == 0 ) | ||
145 | { | ||
146 | if ( S_ISDIR( linkInfo.st_mode ) ) | ||
147 | { | ||
148 | diff --git a/src/NCFileSelection.h b/libyui-ncurses/src/NCFileSelection.h | ||
149 | index 0569215d..5c459d62 100644 | ||
150 | --- a/src/NCFileSelection.h | ||
151 | +++ b/src/NCFileSelection.h | ||
152 | @@ -44,10 +44,10 @@ | ||
153 | struct NCFileInfo | ||
154 | { | ||
155 | /** | ||
156 | - * Constructor from a stat buffer (i.e. based on an lstat64() call). | ||
157 | + * Constructor from a stat buffer (i.e. based on an lstat() call). | ||
158 | **/ | ||
159 | NCFileInfo( std::string fileName, | ||
160 | - struct stat64 * statInfo, | ||
161 | + struct stat * statInfo, | ||
162 | bool link = false ); | ||
163 | |||
164 | NCFileInfo(); | ||
165 | @@ -65,7 +65,7 @@ struct NCFileInfo | ||
166 | dev_t _device; // device this object resides on | ||
167 | mode_t _mode; // file permissions + object type | ||
168 | nlink_t _links; // number of links | ||
169 | - off64_t _size; // size in bytes | ||
170 | + off_t _size; // size in bytes | ||
171 | time_t _mtime; // modification time | ||
172 | |||
173 | bool isDir() { return (( S_ISDIR( _mode ) ) ? true : false ); } | ||
174 | -- | ||
175 | 2.39.0 | ||
176 | |||
diff --git a/meta-oe/recipes-graphics/libyui/libyui-ncurses_4.1.1.bb b/meta-oe/recipes-graphics/libyui/libyui-ncurses_4.2.3.bb index 8eb77291a..bcc5ef33e 100644 --- a/meta-oe/recipes-graphics/libyui/libyui-ncurses_4.1.1.bb +++ b/meta-oe/recipes-graphics/libyui/libyui-ncurses_4.2.3.bb | |||
@@ -4,11 +4,13 @@ LIC_FILES_CHKSUM = "file://../COPYING.lgpl-3;md5=e6a600fd5e1d9cbde2d983680233ad0 | |||
4 | file://../COPYING.lgpl-2.1;md5=4fbd65380cdd255951079008b364516c \ | 4 | file://../COPYING.lgpl-2.1;md5=4fbd65380cdd255951079008b364516c \ |
5 | " | 5 | " |
6 | 6 | ||
7 | SRC_URI = "git://github.com/libyui/libyui.git;branch=master;protocol=https" | 7 | SRC_URI = "git://github.com/libyui/libyui.git;branch=master;protocol=https \ |
8 | file://0001-libyui-ncurses-Replace-off64_t-with-off_t-and-stat64.patch \ | ||
9 | " | ||
8 | 10 | ||
9 | SRC_URI:append:class-target = " file://0001-Fix-the-error-of-can-t-find-header-file.patch" | 11 | SRC_URI:append:class-target = " file://0001-Fix-the-error-of-can-t-find-header-file.patch" |
10 | 12 | ||
11 | SRCREV = "718ac672374a2b0f50cbc7d637d90e6471babc3d" | 13 | SRCREV = "dabdcd9cc6a0058fd6966d7d2e19d508debcc0ac" |
12 | 14 | ||
13 | S = "${WORKDIR}/git/libyui-ncurses" | 15 | S = "${WORKDIR}/git/libyui-ncurses" |
14 | 16 | ||
diff --git a/meta-oe/recipes-graphics/libyui/libyui_4.1.1.bb b/meta-oe/recipes-graphics/libyui/libyui_4.2.3.bb index 477856166..939f3f36e 100644 --- a/meta-oe/recipes-graphics/libyui/libyui_4.1.1.bb +++ b/meta-oe/recipes-graphics/libyui/libyui_4.2.3.bb | |||
@@ -10,7 +10,7 @@ SRC_URI = "git://github.com/libyui/libyui.git;branch=master;protocol=https \ | |||
10 | file://0001-Use-relative-install-paths-for-CMake.patch \ | 10 | file://0001-Use-relative-install-paths-for-CMake.patch \ |
11 | " | 11 | " |
12 | 12 | ||
13 | SRCREV = "718ac672374a2b0f50cbc7d637d90e6471babc3d" | 13 | SRCREV = "dabdcd9cc6a0058fd6966d7d2e19d508debcc0ac" |
14 | 14 | ||
15 | S = "${WORKDIR}/git/libyui" | 15 | S = "${WORKDIR}/git/libyui" |
16 | 16 | ||