From 6a6defcc2bd835bbccbd7fef09591f718263e6de Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 18 Dec 2022 15:29:22 -0800 Subject: libyui,libyui-ncurses: Upgrade to 4.2.3 Add a fix to build with lfs64 Signed-off-by: Khem Raj --- ...ses-Replace-off64_t-with-off_t-and-stat64.patch | 176 +++++++++++++++++++++ .../libyui/libyui-ncurses_4.1.1.bb | 48 ------ .../libyui/libyui-ncurses_4.2.3.bb | 50 ++++++ meta-oe/recipes-graphics/libyui/libyui_4.1.1.bb | 36 ----- meta-oe/recipes-graphics/libyui/libyui_4.2.3.bb | 36 +++++ 5 files changed, 262 insertions(+), 84 deletions(-) create mode 100644 meta-oe/recipes-graphics/libyui/libyui-ncurses/0001-libyui-ncurses-Replace-off64_t-with-off_t-and-stat64.patch delete mode 100644 meta-oe/recipes-graphics/libyui/libyui-ncurses_4.1.1.bb create mode 100644 meta-oe/recipes-graphics/libyui/libyui-ncurses_4.2.3.bb delete mode 100644 meta-oe/recipes-graphics/libyui/libyui_4.1.1.bb create mode 100644 meta-oe/recipes-graphics/libyui/libyui_4.2.3.bb 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 0000000000..b29e5dc7b2 --- /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 @@ +From b81fb7942ab77b0bf6791e5fd98411dd68f133d9 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 18 Dec 2022 15:13:00 -0800 +Subject: [PATCH] libyui-ncurses: Replace off64_t with off_t and stat64 with stat + +stat is same as stat64 when 64bit off_t is used. + +Upstream-Status: Submitted [https://github.com/libyui/libyui/pull/88] +Signed-off-by: Khem Raj +--- + CMakeLists.txt | 2 +- + src/NCAskForFile.cc | 6 +++--- + src/NCFileSelection.cc | 24 ++++++++++++------------ + src/NCFileSelection.h | 6 +++--- + 4 files changed, 19 insertions(+), 19 deletions(-) + +diff --git a/CMakeLists.txt b/libyui-ncurses/CMakeLists.txt +index b10eab8e..2000bb58 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -58,7 +58,7 @@ set( CMAKE_INSTALL_MESSAGE LAZY ) # Suppress "up-to-date" messages during "make + # Initialize compiler flags for all targets in all subdirectories + add_compile_options( "-Wall" ) + add_compile_options( "-Os" ) # Optimize for size (overrides CMake's -O3 in RELEASE builds) +- ++add_compile_options( "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" ) # Enable largefile support + if ( WERROR ) + add_compile_options( "-Werror" ) + endif() +diff --git a/src/NCAskForFile.cc b/libyui-ncurses/src/NCAskForFile.cc +index aba6e0a6..44bb81bc 100644 +--- a/src/NCAskForFile.cc ++++ b/src/NCAskForFile.cc +@@ -73,8 +73,8 @@ std::string NCAskForFile::checkIniDir( std::string iniDir ) + { + std::string dname = ""; + +- struct stat64 statInfo; +- stat64( iniDir.c_str(), &statInfo ); ++ struct stat statInfo; ++ stat( iniDir.c_str(), &statInfo ); + + if ( S_ISDIR( statInfo.st_mode ) ) + { +@@ -90,7 +90,7 @@ std::string NCAskForFile::checkIniDir( std::string iniDir ) + && pos != 0 ) + { + std::string dir = iniDir.substr( 0, pos ); +- stat64( dir.c_str(), &statInfo ); ++ stat( dir.c_str(), &statInfo ); + + if ( S_ISDIR( statInfo.st_mode ) ) + { +diff --git a/src/NCFileSelection.cc b/libyui-ncurses/src/NCFileSelection.cc +index 3eb9c908..8894dc72 100644 +--- a/src/NCFileSelection.cc ++++ b/src/NCFileSelection.cc +@@ -46,7 +46,7 @@ using std::list; + + + NCFileInfo::NCFileInfo( string fileName, +- struct stat64 * statInfo, ++ struct stat * statInfo, + bool link ) + { + _name = fileName; +@@ -146,7 +146,7 @@ NCFileInfo::NCFileInfo() + _mode = ( mode_t )0; + _device = ( dev_t )0; + _links = ( nlink_t )0; +- _size = ( off64_t )0; ++ _size = ( off_t )0; + _mtime = ( time_t )0; + } + +@@ -177,11 +177,11 @@ NCFileSelection::NCFileSelection( YWidget * parent, + { + SetSepChar( ' ' ); + +- struct stat64 statInfo; ++ struct stat statInfo; + + if ( !iniDir.empty() ) + { +- stat64( iniDir.c_str(), &statInfo ); ++ stat( iniDir.c_str(), &statInfo ); + } + + if ( iniDir.empty() +@@ -559,8 +559,8 @@ NCursesEvent NCFileTable::wHandleInput( wint_t key ) + bool NCFileTable::fillList() + { + +- struct stat64 statInfo; +- struct stat64 linkInfo; ++ struct stat statInfo; ++ struct stat linkInfo; + struct dirent * entry; + list tmpList; + list::iterator it; +@@ -592,7 +592,7 @@ bool NCFileTable::fillList() + { + string fullName = currentDir + "/" + ( *it ); + +- if ( lstat64( fullName.c_str(), &statInfo ) == 0 ) ++ if ( lstat( fullName.c_str(), &statInfo ) == 0 ) + { + if ( S_ISREG( statInfo.st_mode ) || S_ISBLK( statInfo.st_mode ) ) + { +@@ -604,7 +604,7 @@ bool NCFileTable::fillList() + } + else if ( S_ISLNK( statInfo.st_mode ) ) + { +- if ( stat64( fullName.c_str(), &linkInfo ) == 0 ) ++ if ( stat( fullName.c_str(), &linkInfo ) == 0 ) + { + if ( S_ISREG( linkInfo.st_mode ) || S_ISBLK( linkInfo.st_mode ) ) + { +@@ -701,8 +701,8 @@ void NCDirectoryTable::fillHeader() + + bool NCDirectoryTable::fillList() + { +- struct stat64 statInfo; +- struct stat64 linkInfo; ++ struct stat statInfo; ++ struct stat linkInfo; + struct dirent * entry; + list tmpList; + list::iterator it; +@@ -734,7 +734,7 @@ bool NCDirectoryTable::fillList() + { + string fullName = currentDir + "/" + ( *it ); + +- if ( lstat64( fullName.c_str(), &statInfo ) == 0 ) ++ if ( lstat( fullName.c_str(), &statInfo ) == 0 ) + { + if ( S_ISDIR( statInfo.st_mode ) ) + { +@@ -746,7 +746,7 @@ bool NCDirectoryTable::fillList() + } + else if ( S_ISLNK( statInfo.st_mode ) ) + { +- if ( stat64( fullName.c_str(), &linkInfo ) == 0 ) ++ if ( stat( fullName.c_str(), &linkInfo ) == 0 ) + { + if ( S_ISDIR( linkInfo.st_mode ) ) + { +diff --git a/src/NCFileSelection.h b/libyui-ncurses/src/NCFileSelection.h +index 0569215d..5c459d62 100644 +--- a/src/NCFileSelection.h ++++ b/src/NCFileSelection.h +@@ -44,10 +44,10 @@ + struct NCFileInfo + { + /** +- * Constructor from a stat buffer (i.e. based on an lstat64() call). ++ * Constructor from a stat buffer (i.e. based on an lstat() call). + **/ + NCFileInfo( std::string fileName, +- struct stat64 * statInfo, ++ struct stat * statInfo, + bool link = false ); + + NCFileInfo(); +@@ -65,7 +65,7 @@ struct NCFileInfo + dev_t _device; // device this object resides on + mode_t _mode; // file permissions + object type + nlink_t _links; // number of links +- off64_t _size; // size in bytes ++ off_t _size; // size in bytes + time_t _mtime; // modification time + + bool isDir() { return (( S_ISDIR( _mode ) ) ? true : false ); } +-- +2.39.0 + diff --git a/meta-oe/recipes-graphics/libyui/libyui-ncurses_4.1.1.bb b/meta-oe/recipes-graphics/libyui/libyui-ncurses_4.1.1.bb deleted file mode 100644 index 8eb77291ab..0000000000 --- a/meta-oe/recipes-graphics/libyui/libyui-ncurses_4.1.1.bb +++ /dev/null @@ -1,48 +0,0 @@ -SUMMARY = "Character Based User Interface for libyui" -LICENSE = "LGPL-3.0-only" -LIC_FILES_CHKSUM = "file://../COPYING.lgpl-3;md5=e6a600fd5e1d9cbde2d983680233ad02 \ - file://../COPYING.lgpl-2.1;md5=4fbd65380cdd255951079008b364516c \ -" - -SRC_URI = "git://github.com/libyui/libyui.git;branch=master;protocol=https" - -SRC_URI:append:class-target = " file://0001-Fix-the-error-of-can-t-find-header-file.patch" - -SRCREV = "718ac672374a2b0f50cbc7d637d90e6471babc3d" - -S = "${WORKDIR}/git/libyui-ncurses" - -inherit cmake gettext pkgconfig - -DEPENDS += "boost libyui ncurses" - -BBCLASSEXTEND = "nativesdk" - -EXTRA_OECMAKE += "-DCMAKE_BUILD_TYPE=RELWITHDEBINFO -DWERROR=OFF" - -CXXFLAGS += "-DNCURSES_WIDECHAR" - -do_configure:prepend () { - cd ${S} - if [ -e ${PKG_CONFIG_SYSROOT_DIR}${base_prefix}/usr/lib/libyui.so ]; then - mkdir -p ${PKG_CONFIG_SYSROOT_DIR}${base_prefix}/usr/lib64/ - cp ${PKG_CONFIG_SYSROOT_DIR}${base_prefix}/usr/lib/libyui.so* ${PKG_CONFIG_SYSROOT_DIR}${base_prefix}/usr/lib64/ - fi - cd - - sed -i -e "s#\${YPREFIX}#\${PKG_CONFIG_SYSROOT_DIR}${base_prefix}&#" ${S}/CMakeLists.txt -} - -do_install:append () { - if [ "${libdir}" = "${base_prefix}/usr/lib" ] && [ -d ${D}/usr/lib64 ]; then - mv ${D}/usr/lib64 ${D}/usr/lib - fi -} - -do_install:append:class-nativesdk () { - mkdir -p ${D}/${base_prefix} - mv ${D}/usr ${D}/${base_prefix} -} - -FILES:${PN} += "${datadir}/*" - -FILES:${PN}-dev += "${libdir}/*" diff --git a/meta-oe/recipes-graphics/libyui/libyui-ncurses_4.2.3.bb b/meta-oe/recipes-graphics/libyui/libyui-ncurses_4.2.3.bb new file mode 100644 index 0000000000..bcc5ef33e2 --- /dev/null +++ b/meta-oe/recipes-graphics/libyui/libyui-ncurses_4.2.3.bb @@ -0,0 +1,50 @@ +SUMMARY = "Character Based User Interface for libyui" +LICENSE = "LGPL-3.0-only" +LIC_FILES_CHKSUM = "file://../COPYING.lgpl-3;md5=e6a600fd5e1d9cbde2d983680233ad02 \ + file://../COPYING.lgpl-2.1;md5=4fbd65380cdd255951079008b364516c \ +" + +SRC_URI = "git://github.com/libyui/libyui.git;branch=master;protocol=https \ + file://0001-libyui-ncurses-Replace-off64_t-with-off_t-and-stat64.patch \ + " + +SRC_URI:append:class-target = " file://0001-Fix-the-error-of-can-t-find-header-file.patch" + +SRCREV = "dabdcd9cc6a0058fd6966d7d2e19d508debcc0ac" + +S = "${WORKDIR}/git/libyui-ncurses" + +inherit cmake gettext pkgconfig + +DEPENDS += "boost libyui ncurses" + +BBCLASSEXTEND = "nativesdk" + +EXTRA_OECMAKE += "-DCMAKE_BUILD_TYPE=RELWITHDEBINFO -DWERROR=OFF" + +CXXFLAGS += "-DNCURSES_WIDECHAR" + +do_configure:prepend () { + cd ${S} + if [ -e ${PKG_CONFIG_SYSROOT_DIR}${base_prefix}/usr/lib/libyui.so ]; then + mkdir -p ${PKG_CONFIG_SYSROOT_DIR}${base_prefix}/usr/lib64/ + cp ${PKG_CONFIG_SYSROOT_DIR}${base_prefix}/usr/lib/libyui.so* ${PKG_CONFIG_SYSROOT_DIR}${base_prefix}/usr/lib64/ + fi + cd - + sed -i -e "s#\${YPREFIX}#\${PKG_CONFIG_SYSROOT_DIR}${base_prefix}&#" ${S}/CMakeLists.txt +} + +do_install:append () { + if [ "${libdir}" = "${base_prefix}/usr/lib" ] && [ -d ${D}/usr/lib64 ]; then + mv ${D}/usr/lib64 ${D}/usr/lib + fi +} + +do_install:append:class-nativesdk () { + mkdir -p ${D}/${base_prefix} + mv ${D}/usr ${D}/${base_prefix} +} + +FILES:${PN} += "${datadir}/*" + +FILES:${PN}-dev += "${libdir}/*" diff --git a/meta-oe/recipes-graphics/libyui/libyui_4.1.1.bb b/meta-oe/recipes-graphics/libyui/libyui_4.1.1.bb deleted file mode 100644 index 4778561662..0000000000 --- a/meta-oe/recipes-graphics/libyui/libyui_4.1.1.bb +++ /dev/null @@ -1,36 +0,0 @@ -SUMMARY = "Libyui is a widget abstraction library providing Qt, GTK and ncurses frontends." -LICENSE = "LGPL-3.0-only" -LIC_FILES_CHKSUM = "file://../COPYING.gpl-3;md5=d32239bcb673463ab874e80d47fae504 \ - file://../COPYING.lgpl-2.1;md5=4fbd65380cdd255951079008b364516c \ - file://../COPYING.lgpl-3;md5=e6a600fd5e1d9cbde2d983680233ad02 \ - " - -SRC_URI = "git://github.com/libyui/libyui.git;branch=master;protocol=https \ - file://0001-Fix-build-with-clang.patch \ - file://0001-Use-relative-install-paths-for-CMake.patch \ - " - -SRCREV = "718ac672374a2b0f50cbc7d637d90e6471babc3d" - -S = "${WORKDIR}/git/libyui" - -inherit cmake gettext pkgconfig - -DEPENDS += "boost" - -EXTRA_OECMAKE += "-DCMAKE_BUILD_TYPE=RELWITHDEBINFO -DWERROR=OFF" - -BBCLASSEXTEND = "native nativesdk" - -do_install:append () { - if [ "${libdir}" = "${base_prefix}/usr/lib" ] && [ -d ${D}/usr/lib64 ]; then - mv ${D}/usr/lib64 ${D}/usr/lib - fi -} - -do_install:append:class-nativesdk () { - mkdir -p ${D}/${base_prefix} - mv ${D}/usr ${D}/${base_prefix} -} - -FILES:${PN}-dev = "${libdir}/* ${includedir}/yui*" diff --git a/meta-oe/recipes-graphics/libyui/libyui_4.2.3.bb b/meta-oe/recipes-graphics/libyui/libyui_4.2.3.bb new file mode 100644 index 0000000000..939f3f36e5 --- /dev/null +++ b/meta-oe/recipes-graphics/libyui/libyui_4.2.3.bb @@ -0,0 +1,36 @@ +SUMMARY = "Libyui is a widget abstraction library providing Qt, GTK and ncurses frontends." +LICENSE = "LGPL-3.0-only" +LIC_FILES_CHKSUM = "file://../COPYING.gpl-3;md5=d32239bcb673463ab874e80d47fae504 \ + file://../COPYING.lgpl-2.1;md5=4fbd65380cdd255951079008b364516c \ + file://../COPYING.lgpl-3;md5=e6a600fd5e1d9cbde2d983680233ad02 \ + " + +SRC_URI = "git://github.com/libyui/libyui.git;branch=master;protocol=https \ + file://0001-Fix-build-with-clang.patch \ + file://0001-Use-relative-install-paths-for-CMake.patch \ + " + +SRCREV = "dabdcd9cc6a0058fd6966d7d2e19d508debcc0ac" + +S = "${WORKDIR}/git/libyui" + +inherit cmake gettext pkgconfig + +DEPENDS += "boost" + +EXTRA_OECMAKE += "-DCMAKE_BUILD_TYPE=RELWITHDEBINFO -DWERROR=OFF" + +BBCLASSEXTEND = "native nativesdk" + +do_install:append () { + if [ "${libdir}" = "${base_prefix}/usr/lib" ] && [ -d ${D}/usr/lib64 ]; then + mv ${D}/usr/lib64 ${D}/usr/lib + fi +} + +do_install:append:class-nativesdk () { + mkdir -p ${D}/${base_prefix} + mv ${D}/usr ${D}/${base_prefix} +} + +FILES:${PN}-dev = "${libdir}/* ${includedir}/yui*" -- cgit v1.2.3-54-g00ecf