[gentoo-commits] repo/proj/guru:dev commit in: dev-libs/libtypec/, dev-libs/libtypec/files/
commit: 0b69f057f3095fcde880be0884b057cf424e0082 Author: Adrian Ratiu collabora com> AuthorDate: Wed May 15 15:47:33 2024 + Commit: Adrian Ratiu collabora com> CommitDate: Wed May 15 15:48:52 2024 + URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=0b69f057 dev-libs/libtypec: bump 0.5.0 -> 0.5.1 This latest version contains all the backported fixes so we can remove the patches. Signed-off-by: Adrian Ratiu collabora.com> dev-libs/libtypec/Manifest | 2 +- ...CMakeLists.txt-fix-pkgconfig-install-path.patch | 26 --- ...-0.5.0-libtypec-close-fp-before-returning.patch | 33 - ...ils-add-missing-break-in-switch-statement.patch | 30 ...ec-utils-add-missing-return-at-end-of-fun.patch | 31 ...ils-add-missing-return-at-end-of-function.patch | 30 ...-libtypec-utils-close-fp-before-returning.patch | 44 ...sfs_ops-define-feature-test-macro-for-nft.patch | 45 ...-0.5.0-sysfs_ops-fix-nftw-fun-pointer-def.patch | 55 --- ...-0.5.0-typecstatus-fix-potential-overflow.patch | 82 -- dev-libs/libtypec/libtypec-0.5.0-r1.ebuild | 36 -- ...libtypec-0.5.0.ebuild => libtypec-0.5.1.ebuild} | 6 -- 12 files changed, 1 insertion(+), 419 deletions(-) diff --git a/dev-libs/libtypec/Manifest b/dev-libs/libtypec/Manifest index 3e3836b094..860882f219 100644 --- a/dev-libs/libtypec/Manifest +++ b/dev-libs/libtypec/Manifest @@ -1 +1 @@ -DIST libtypec-0.5.0-Source.tar.gz 41621 BLAKE2B 09b7e592b4e52f5b6f568675335dc2366902fa8e2d67c5f1c6d2895345d4f4e2e880fc5336ae849133da7794ab457c7cd2dd3655a68247a15b45d1a6fca6 SHA512 a5f404400f6a08f67f026bbc115fa2278586a0c6b8e9f3766162967d43c111e8985563692a1648efb3a3d3a4cd5047dd903f8733d72a40a175c7bb6be130dcb3 +DIST libtypec-0.5.1-Source.tar.gz 146305 BLAKE2B d93f640c3a37e51c1b0116c8dbdc6f06f301ec63a95739107c09458eecb765ee82ab4b3a4c7d8c54dbcbef32496d67e1030a3b9b11a144dfa149584cf9b4b151 SHA512 b6f9b2396306825e31cb1002953ea0eac8597a099305cd59bb08590939e98c720a0f2eca2742de70a10a90ae379d3338d42cb6f8e5a6a359246f7266ba9b016a diff --git a/dev-libs/libtypec/files/libtypec-0.5.0-CMakeLists.txt-fix-pkgconfig-install-path.patch b/dev-libs/libtypec/files/libtypec-0.5.0-CMakeLists.txt-fix-pkgconfig-install-path.patch deleted file mode 100644 index 71dac0e735..00 --- a/dev-libs/libtypec/files/libtypec-0.5.0-CMakeLists.txt-fix-pkgconfig-install-path.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 8614051a1ff9856c3de932045dc149e758c2b0b1 Mon Sep 17 00:00:00 2001 -From: Adrian Ratiu -Date: Fri, 12 Apr 2024 17:08:09 +0300 -Subject: [PATCH] CMakeLists.txt: fix pkgconfig install path - -pkgconfig pc files need to go under libdir instead of datadir. - -Suggested-by: Sam James -Upstream-Status: Backport [upstream commit 8614051] - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 9d533ab..aecf4e5 100644 a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -59,4 +59,4 @@ configure_file( - ) - - install(FILES ${CMAKE_BINARY_DIR}/libtypec.pc --DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig) -+DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) --- -2.43.2 - diff --git a/dev-libs/libtypec/files/libtypec-0.5.0-libtypec-close-fp-before-returning.patch b/dev-libs/libtypec/files/libtypec-0.5.0-libtypec-close-fp-before-returning.patch deleted file mode 100644 index e8fe5d44bf..00 --- a/dev-libs/libtypec/files/libtypec-0.5.0-libtypec-close-fp-before-returning.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 67d40a5f0132e2b02167ad274c6d6c76e4393964 Mon Sep 17 00:00:00 2001 -From: Colin Ian King -Date: Thu, 4 Jan 2024 09:42:54 + -Subject: [PATCH] libtypec: close fp before returning - -Fix resource leak on fp on error return path, close fp before -returning. - -Signed-off-by: Colin Ian King -Upstream-Status: Backport [upstream commit 67d40a5] - libtypec_sysfs_ops.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/libtypec_sysfs_ops.c b/libtypec_sysfs_ops.c -index 747b562..a22de5a 100644 a/libtypec_sysfs_ops.c -+++ b/libtypec_sysfs_ops.c -@@ -504,8 +504,10 @@ static int count_billbrd_if(const char *usb_path, const struct stat *sb, int typ - if(num_bb_if < MAX_BB_PATH_STORED) - { - int len = strlen(usb_path); -- if(len > 512 ) /*exceeds buffer size*/ -+ if(len > 512 ) { /*exceeds buffer size*/ -+ fclose(fd); - return 0; -+ } - - strcpy(bb_dev_path[num_bb_if],usb_path); - } --- -2.43.2 - diff --git
[gentoo-commits] repo/proj/guru:dev commit in: dev-libs/libtypec/
commit: 7d1147ff437ae8a21aca609c603f8562542d29f6 Author: Lucio Sauer posteo net> AuthorDate: Fri Apr 26 13:45:34 2024 + Commit: Lucio Sauer posteo net> CommitDate: Fri Apr 26 13:51:45 2024 + URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=7d1147ff dev-libs/libtypec: fix revision bump (7e6af504b7ecc) Replace symlink to ${PV} 0.5.0 with regular ...-r1 file. Partially revert 7e6af504b7ecca1853034f60eb6dd6dc20f2ce46 to reset libtypec-0.5.0 to its pre-revision state. Signed-off-by: Lucio Sauer posteo.net> dev-libs/libtypec/libtypec-0.5.0-r1.ebuild | 37 +- dev-libs/libtypec/libtypec-0.5.0.ebuild| 6 - 2 files changed, 36 insertions(+), 7 deletions(-) diff --git a/dev-libs/libtypec/libtypec-0.5.0-r1.ebuild b/dev-libs/libtypec/libtypec-0.5.0-r1.ebuild deleted file mode 12 index 6fadeb75a3..00 --- a/dev-libs/libtypec/libtypec-0.5.0-r1.ebuild +++ /dev/null @@ -1 +0,0 @@ -libtypec-0.5.0.ebuild \ No newline at end of file diff --git a/dev-libs/libtypec/libtypec-0.5.0-r1.ebuild b/dev-libs/libtypec/libtypec-0.5.0-r1.ebuild new file mode 100644 index 00..0e9c08e3aa --- /dev/null +++ b/dev-libs/libtypec/libtypec-0.5.0-r1.ebuild @@ -0,0 +1,36 @@ +# Copyright 2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +DESCRIPTION="Library to interface with USB Type-c/Power Delivery devices" +HOMEPAGE="https://github.com/Rajaram-Regupathy/libtypec; +SRC_URI="https://github.com/Rajaram-Regupathy/libtypec/releases/download/${P}/${P}-Source.tar.gz; + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" + +S="${WORKDIR}/${P}-Source" + +PATCHES=( + "${FILESDIR}/${PN}-0.5.0-CMakeLists.txt-fix-pkgconfig-install-path.patch" + "${FILESDIR}/${PN}-0.5.0-sysfs_ops-define-feature-test-macro-for-nft.patch" + "${FILESDIR}/${PN}-0.5.0-sysfs_ops-fix-nftw-fun-pointer-def.patch" + "${FILESDIR}/${PN}-0.5.0-libtypec-utils-close-fp-before-returning.patch" + "${FILESDIR}/${PN}-0.5.0-libtypec-close-fp-before-returning.patch" + "${FILESDIR}/${PN}-0.5.0-libtypec-utils-add-missing-return-at-end-of-fun.patch" + "${FILESDIR}/${PN}-0.5.0-libtypec-utils-add-missing-return-at-end-of-function.patch" + "${FILESDIR}/${PN}-0.5.0-libtypec-utils-add-missing-break-in-switch-statement.patch" + "${FILESDIR}/${PN}-0.5.0-typecstatus-fix-potential-overflow.patch" +) + +src_configure() { + # don't force CFLAGS to allow Gentoo toolchain to set them + local mycmakeargs=( + -DLIBTYPEC_STRICT_CFLAGS=OFF + ) + cmake_src_configure +} diff --git a/dev-libs/libtypec/libtypec-0.5.0.ebuild b/dev-libs/libtypec/libtypec-0.5.0.ebuild index 0e9c08e3aa..02697c52d9 100644 --- a/dev-libs/libtypec/libtypec-0.5.0.ebuild +++ b/dev-libs/libtypec/libtypec-0.5.0.ebuild @@ -19,12 +19,6 @@ PATCHES=( "${FILESDIR}/${PN}-0.5.0-CMakeLists.txt-fix-pkgconfig-install-path.patch" "${FILESDIR}/${PN}-0.5.0-sysfs_ops-define-feature-test-macro-for-nft.patch" "${FILESDIR}/${PN}-0.5.0-sysfs_ops-fix-nftw-fun-pointer-def.patch" - "${FILESDIR}/${PN}-0.5.0-libtypec-utils-close-fp-before-returning.patch" - "${FILESDIR}/${PN}-0.5.0-libtypec-close-fp-before-returning.patch" - "${FILESDIR}/${PN}-0.5.0-libtypec-utils-add-missing-return-at-end-of-fun.patch" - "${FILESDIR}/${PN}-0.5.0-libtypec-utils-add-missing-return-at-end-of-function.patch" - "${FILESDIR}/${PN}-0.5.0-libtypec-utils-add-missing-break-in-switch-statement.patch" - "${FILESDIR}/${PN}-0.5.0-typecstatus-fix-potential-overflow.patch" ) src_configure() {
[gentoo-commits] repo/proj/guru:dev commit in: dev-libs/libtypec/
commit: 3d509ff858343791965c854acc9d26fff976ee37 Author: Adrian Ratiu collabora com> AuthorDate: Wed Apr 17 22:30:25 2024 + Commit: Adrian Ratiu collabora com> CommitDate: Wed Apr 17 22:32:10 2024 + URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=3d509ff8 dev-util/libtypec: add a co-maintainer Rajaram was very nice to agree to help maintain this. He is also the upstream project maintainer. Signed-off-by: Adrian Ratiu collabora.com> dev-libs/libtypec/metadata.xml | 4 1 file changed, 4 insertions(+) diff --git a/dev-libs/libtypec/metadata.xml b/dev-libs/libtypec/metadata.xml index 970892314e..97cf050480 100644 --- a/dev-libs/libtypec/metadata.xml +++ b/dev-libs/libtypec/metadata.xml @@ -12,6 +12,10 @@ Adrian Ratiu adrian.ra...@collabora.com + +Rajaram Regupathy +rajaram.regupa...@gmail.com + Rajaram-Regupathy/libtypec
[gentoo-commits] repo/proj/guru:dev commit in: dev-libs/libtypec/, dev-libs/libtypec/files/
commit: 7e6af504b7ecca1853034f60eb6dd6dc20f2ce46 Author: Adrian Ratiu collabora com> AuthorDate: Mon Apr 15 11:04:25 2024 + Commit: Adrian Ratiu collabora com> CommitDate: Mon Apr 15 11:58:43 2024 + URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=7e6af504 dev-util/libtypec: backport a few more patches These should all be dropped when upstream does a new release. Signed-off-by: Adrian Ratiu collabora.com> ...-0.5.0-libtypec-close-fp-before-returning.patch | 33 + ...ils-add-missing-break-in-switch-statement.patch | 30 ...ec-utils-add-missing-return-at-end-of-fun.patch | 31 ...ils-add-missing-return-at-end-of-function.patch | 30 ...-libtypec-utils-close-fp-before-returning.patch | 44 ...-0.5.0-typecstatus-fix-potential-overflow.patch | 82 ++ dev-libs/libtypec/libtypec-0.5.0-r1.ebuild | 1 + dev-libs/libtypec/libtypec-0.5.0.ebuild| 6 ++ 8 files changed, 257 insertions(+) diff --git a/dev-libs/libtypec/files/libtypec-0.5.0-libtypec-close-fp-before-returning.patch b/dev-libs/libtypec/files/libtypec-0.5.0-libtypec-close-fp-before-returning.patch new file mode 100644 index 00..e8fe5d44bf --- /dev/null +++ b/dev-libs/libtypec/files/libtypec-0.5.0-libtypec-close-fp-before-returning.patch @@ -0,0 +1,33 @@ +From 67d40a5f0132e2b02167ad274c6d6c76e4393964 Mon Sep 17 00:00:00 2001 +From: Colin Ian King +Date: Thu, 4 Jan 2024 09:42:54 + +Subject: [PATCH] libtypec: close fp before returning + +Fix resource leak on fp on error return path, close fp before +returning. + +Signed-off-by: Colin Ian King +Upstream-Status: Backport [upstream commit 67d40a5] +--- + libtypec_sysfs_ops.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/libtypec_sysfs_ops.c b/libtypec_sysfs_ops.c +index 747b562..a22de5a 100644 +--- a/libtypec_sysfs_ops.c b/libtypec_sysfs_ops.c +@@ -504,8 +504,10 @@ static int count_billbrd_if(const char *usb_path, const struct stat *sb, int typ + if(num_bb_if < MAX_BB_PATH_STORED) + { + int len = strlen(usb_path); +- if(len > 512 ) /*exceeds buffer size*/ ++ if(len > 512 ) { /*exceeds buffer size*/ ++ fclose(fd); + return 0; ++ } + + strcpy(bb_dev_path[num_bb_if],usb_path); + } +-- +2.43.2 + diff --git a/dev-libs/libtypec/files/libtypec-0.5.0-libtypec-utils-add-missing-break-in-switch-statement.patch b/dev-libs/libtypec/files/libtypec-0.5.0-libtypec-utils-add-missing-break-in-switch-statement.patch new file mode 100644 index 00..e48fcac1cb --- /dev/null +++ b/dev-libs/libtypec/files/libtypec-0.5.0-libtypec-utils-add-missing-break-in-switch-statement.patch @@ -0,0 +1,30 @@ +From 7de1000ff658c594a8f0a4b62f4956fc635d6c23 Mon Sep 17 00:00:00 2001 +From: Colin Ian King +Date: Thu, 4 Jan 2024 09:46:19 + +Subject: [PATCH] libtypec: utils: add missing break in switch statement + +For the product_type_pd3p1_drd case there is a missing break +statement causing an unintentional fall-through to the default +case. Add in the missing break statement. + +Signed-off-by: Colin Ian King +Upstream-Status: Backport [upstream commit 7de1000] +--- + utils/lstypec.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/utils/lstypec.c b/utils/lstypec.c +index a30b2bc..98d23f6 100644 +--- a/utils/lstypec.c b/utils/lstypec.c +@@ -396,6 +396,7 @@ void print_identity_data(int recipient, union libtypec_discovered_identity id, s + printf("Product VDO 2: 0x%08x\n", id.disc_id.product_type_vdo2); + printf("Product VDO 3: 0x%08x\n", id.disc_id.product_type_vdo3); + print_vdo(((uint32_t) id.disc_id.product_type_vdo3), 6, pd3p1_dfp_fields, pd3p1_dfp_field_desc); ++ break; + default: + printf("Product VDO 1: 0x%08x\n", id.disc_id.product_type_vdo1); + printf("Product VDO 2: 0x%08x\n", id.disc_id.product_type_vdo2); +-- +2.43.2 + diff --git a/dev-libs/libtypec/files/libtypec-0.5.0-libtypec-utils-add-missing-return-at-end-of-fun.patch b/dev-libs/libtypec/files/libtypec-0.5.0-libtypec-utils-add-missing-return-at-end-of-fun.patch new file mode 100644 index 00..554c0006ac --- /dev/null +++ b/dev-libs/libtypec/files/libtypec-0.5.0-libtypec-utils-add-missing-return-at-end-of-fun.patch @@ -0,0 +1,31 @@ +From 6d193776421db948e4201a60cf239fdae62c196d Mon Sep 17 00:00:00 2001 +From: Colin Ian King +Date: Thu, 4 Jan 2024 09:52:57 + +Subject: [PATCH] libtypec: utils: add missing return at end of function + +Function typecstatus_power_contract is missing a return 0 at the +end of the function, currently it is returning nothing and
[gentoo-commits] repo/proj/guru:dev commit in: dev-libs/libtypec/files/
commit: 71ce798511d23352ef61507295025d65c2f6d1b3 Author: Adrian Ratiu collabora com> AuthorDate: Mon Apr 15 10:35:39 2024 + Commit: Adrian Ratiu collabora com> CommitDate: Mon Apr 15 10:37:29 2024 + URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=71ce7985 dev-libs/libtypec: update patch status These patches have landed upstream very quickly so mark them as backports instead of in-progress. They will be dropped once upstream releases a new version. Signed-off-by: Adrian Ratiu collabora.com> .../libtypec-0.5.0-CMakeLists.txt-fix-pkgconfig-install-path.patch | 2 +- .../libtypec-0.5.0-sysfs_ops-define-feature-test-macro-for-nft.patch| 2 +- .../files/libtypec-0.5.0-sysfs_ops-fix-nftw-fun-pointer-def.patch | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dev-libs/libtypec/files/libtypec-0.5.0-CMakeLists.txt-fix-pkgconfig-install-path.patch b/dev-libs/libtypec/files/libtypec-0.5.0-CMakeLists.txt-fix-pkgconfig-install-path.patch index 7412d6a537..71dac0e735 100644 --- a/dev-libs/libtypec/files/libtypec-0.5.0-CMakeLists.txt-fix-pkgconfig-install-path.patch +++ b/dev-libs/libtypec/files/libtypec-0.5.0-CMakeLists.txt-fix-pkgconfig-install-path.patch @@ -6,7 +6,7 @@ Subject: [PATCH] CMakeLists.txt: fix pkgconfig install path pkgconfig pc files need to go under libdir instead of datadir. Suggested-by: Sam James -Upstream-Status: In-Progress [https://github.com/Rajaram-Regupathy/libtypec/pull/32] +Upstream-Status: Backport [upstream commit 8614051] --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-libs/libtypec/files/libtypec-0.5.0-sysfs_ops-define-feature-test-macro-for-nft.patch b/dev-libs/libtypec/files/libtypec-0.5.0-sysfs_ops-define-feature-test-macro-for-nft.patch index ea83dcf7d1..93c70b9c84 100644 --- a/dev-libs/libtypec/files/libtypec-0.5.0-sysfs_ops-define-feature-test-macro-for-nft.patch +++ b/dev-libs/libtypec/files/libtypec-0.5.0-sysfs_ops-define-feature-test-macro-for-nft.patch @@ -19,7 +19,7 @@ warning: implicit declaration of function ‘nftw’; did you mean ‘ftw’? | ftw [1] https://linux.die.net/man/3/nftw -Upstream-Status: In-Progress [https://github.com/Rajaram-Regupathy/libtypec/pull/32] +Upstream-Status: Backport [upstream commit f1ecf54] --- libtypec_sysfs_ops.c | 5 + 1 file changed, 5 insertions(+) diff --git a/dev-libs/libtypec/files/libtypec-0.5.0-sysfs_ops-fix-nftw-fun-pointer-def.patch b/dev-libs/libtypec/files/libtypec-0.5.0-sysfs_ops-fix-nftw-fun-pointer-def.patch index 01ed6d674a..7ac3e1cc8f 100644 --- a/dev-libs/libtypec/files/libtypec-0.5.0-sysfs_ops-fix-nftw-fun-pointer-def.patch +++ b/dev-libs/libtypec/files/libtypec-0.5.0-sysfs_ops-fix-nftw-fun-pointer-def.patch @@ -32,7 +32,7 @@ In file included from /var/tmp/portage/dev-libs/libtypec-0.5.0/work/libtypec-0.5 [1] https://www.gnu.org/software/libc/manual/html_node/Working-with-Directory-Trees.html#index-_005f_005fnftw_005ffunc_005ft [2] https://man7.org/linux/man-pages/man3/ftw.3.html -Upstream-Status: In-Progress [https://github.com/Rajaram-Regupathy/libtypec/pull/32] +Upstream-Status: Backport [upstream commit d11cd00] --- libtypec_sysfs_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[gentoo-commits] repo/proj/guru:dev commit in: dev-libs/libtypec/
commit: 47cbba5da4e5f62964dc21fc7e719f0976ad96fa Author: Adrian Ratiu collabora com> AuthorDate: Fri Apr 12 22:53:07 2024 + Commit: Adrian Ratiu collabora com> CommitDate: Fri Apr 12 22:55:08 2024 + URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=47cbba5d dev-libs/libtypec: add myself as ebuild maintainer I didn't notice I added this as maintainer-needed :) Addresses comments in: https://github.com/gentoo/guru/commit/1525837f407ffd338515ca42a0f349df824e74c0#r140921558 Signed-off-by: Adrian Ratiu collabora.com> dev-libs/libtypec/metadata.xml | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dev-libs/libtypec/metadata.xml b/dev-libs/libtypec/metadata.xml index 67b3cc5f8c..970892314e 100644 --- a/dev-libs/libtypec/metadata.xml +++ b/dev-libs/libtypec/metadata.xml @@ -8,7 +8,10 @@ diagnostic and debug tools to debug system issues around USB-C/USB PD topology. - + +Adrian Ratiu +adrian.ra...@collabora.com + Rajaram-Regupathy/libtypec
[gentoo-commits] repo/proj/guru:dev commit in: dev-libs/libtypec/, dev-libs/libtypec/files/
commit: 1525837f407ffd338515ca42a0f349df824e74c0 Author: Adrian Ratiu collabora com> AuthorDate: Fri Mar 8 10:46:19 2024 + Commit: Adrian Ratiu collabora com> CommitDate: Fri Apr 12 16:44:40 2024 + URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=1525837f dev-libs/libtypec: new package, add 0.5 thesamesam suggested on github [1] we add this ebuild to GURU first, to get more testing before we eventually add it to the main repo. I'm in the process of upstreaming the 3 patches added in this ebuild [2]. [1] https://github.com/gentoo/gentoo/pull/35666 [2] https://github.com/Rajaram-Regupathy/libtypec/pull/32 Closes: https://bugs.gentoo.org/910433 Signed-off-by: Adrian Ratiu collabora.com> dev-libs/libtypec/Manifest | 1 + ...CMakeLists.txt-fix-pkgconfig-install-path.patch | 26 ++ ...sfs_ops-define-feature-test-macro-for-nft.patch | 45 ++ ...-0.5.0-sysfs_ops-fix-nftw-fun-pointer-def.patch | 55 ++ dev-libs/libtypec/libtypec-0.5.0.ebuild| 30 dev-libs/libtypec/metadata.xml | 15 ++ 6 files changed, 172 insertions(+) diff --git a/dev-libs/libtypec/Manifest b/dev-libs/libtypec/Manifest new file mode 100644 index 00..3e3836b094 --- /dev/null +++ b/dev-libs/libtypec/Manifest @@ -0,0 +1 @@ +DIST libtypec-0.5.0-Source.tar.gz 41621 BLAKE2B 09b7e592b4e52f5b6f568675335dc2366902fa8e2d67c5f1c6d2895345d4f4e2e880fc5336ae849133da7794ab457c7cd2dd3655a68247a15b45d1a6fca6 SHA512 a5f404400f6a08f67f026bbc115fa2278586a0c6b8e9f3766162967d43c111e8985563692a1648efb3a3d3a4cd5047dd903f8733d72a40a175c7bb6be130dcb3 diff --git a/dev-libs/libtypec/files/libtypec-0.5.0-CMakeLists.txt-fix-pkgconfig-install-path.patch b/dev-libs/libtypec/files/libtypec-0.5.0-CMakeLists.txt-fix-pkgconfig-install-path.patch new file mode 100644 index 00..7412d6a537 --- /dev/null +++ b/dev-libs/libtypec/files/libtypec-0.5.0-CMakeLists.txt-fix-pkgconfig-install-path.patch @@ -0,0 +1,26 @@ +From 8614051a1ff9856c3de932045dc149e758c2b0b1 Mon Sep 17 00:00:00 2001 +From: Adrian Ratiu +Date: Fri, 12 Apr 2024 17:08:09 +0300 +Subject: [PATCH] CMakeLists.txt: fix pkgconfig install path + +pkgconfig pc files need to go under libdir instead of datadir. + +Suggested-by: Sam James +Upstream-Status: In-Progress [https://github.com/Rajaram-Regupathy/libtypec/pull/32] +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9d533ab..aecf4e5 100644 +--- a/CMakeLists.txt b/CMakeLists.txt +@@ -59,4 +59,4 @@ configure_file( + ) + + install(FILES ${CMAKE_BINARY_DIR}/libtypec.pc +-DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig) ++DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) +-- +2.43.2 + diff --git a/dev-libs/libtypec/files/libtypec-0.5.0-sysfs_ops-define-feature-test-macro-for-nft.patch b/dev-libs/libtypec/files/libtypec-0.5.0-sysfs_ops-define-feature-test-macro-for-nft.patch new file mode 100644 index 00..ea83dcf7d1 --- /dev/null +++ b/dev-libs/libtypec/files/libtypec-0.5.0-sysfs_ops-define-feature-test-macro-for-nft.patch @@ -0,0 +1,45 @@ +From f1ecf54f8190351b6b1c2f163375405c4b238f64 Mon Sep 17 00:00:00 2001 +From: Adrian Ratiu +Date: Fri, 12 Apr 2024 17:42:38 +0300 +Subject: [PATCH] libtypec_sysfs_ops: define feature test macro for nftw +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +According to the man page [1], the definiton of nftw() is +hidden behind the _XOPEN_SOURCE 500 feature test, so we +must enable it to avoid warnings or errors (if the toolchain +is configured to treat them as errors) like this: + +/var/tmp/portage/dev-libs/libtypec-0.5.0/work/libtypec-0.5.0-Source/libtypec_sysfs_ops.c:1059:13: +warning: implicit declaration of function ‘nftw’; did you mean ‘ftw’? +[-Wimplicit-function-declaration] + 1059 | if (nftw ("/dev/bus/usb/", count_billbrd_if, fd_limit, 0) != 0) + | ^~~~ + | ftw + +[1] https://linux.die.net/man/3/nftw +Upstream-Status: In-Progress [https://github.com/Rajaram-Regupathy/libtypec/pull/32] +--- + libtypec_sysfs_ops.c | 5 + + 1 file changed, 5 insertions(+) + +diff --git a/libtypec_sysfs_ops.c b/libtypec_sysfs_ops.c +index 747b562..bfb5246 100644 +--- a/libtypec_sysfs_ops.c b/libtypec_sysfs_ops.c +@@ -29,6 +29,11 @@ SOFTWARE. + * @brief Functions for libtypec sysfs based operations + */ + ++/** ++ * required for enalbing nftw(), which is part of SUSv1. ++ */ ++#define _XOPEN_SOURCE 500 ++ + #include "libtypec_ops.h" + #include + #include +-- +2.43.2 + diff --git a/dev-libs/libtypec/files/libtypec-0.5.0-sysfs_ops-fix-nftw-fun-pointer-def.patch b/dev-libs/libtypec/files/libtypec-0.5.0-sysfs_ops-fix-nftw-fun-pointer-def.patch new file mode 100644 index 00..01ed6d674a --- /dev/null +++