diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-03-18 00:29:05 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-03-18 00:29:05 +0000 |
commit | 467e2131896a3030032cd5b0fab2094a045bf9d0 (patch) | |
tree | 534578ca7ef61b3eb30fee861db78c0ae58e2fa6 /media-gfx/gphoto2 | |
parent | 1f254b1ee917690b4f8f7738fdcfc295ee304ff7 (diff) |
gentoo auto-resync : 18:03:2023 - 00:29:05
Diffstat (limited to 'media-gfx/gphoto2')
-rw-r--r-- | media-gfx/gphoto2/Manifest | 2 | ||||
-rw-r--r-- | media-gfx/gphoto2/files/gphoto2-2.5.28-clang-16.patch | 77 | ||||
-rw-r--r-- | media-gfx/gphoto2/gphoto2-2.5.28-r1.ebuild | 54 |
3 files changed, 133 insertions, 0 deletions
diff --git a/media-gfx/gphoto2/Manifest b/media-gfx/gphoto2/Manifest index 8a504e976545..f15dc94ed536 100644 --- a/media-gfx/gphoto2/Manifest +++ b/media-gfx/gphoto2/Manifest @@ -1,3 +1,5 @@ +AUX gphoto2-2.5.28-clang-16.patch 2438 BLAKE2B 6bb4bee0c5d0b0aa60ecb3ab5f33aef115173eae61a7933fb7c98ee77bf474ebf63b87e4e5c843b8737f26dc065c126a0ade25a3718960db8b6c37181ed189b7 SHA512 2c4c3fb4861b745e8fc106a2e98ba8737caacfab2ffd999e6ba8c22bebedc795cce47ed8069de9c109267daef9096b7904d5f1d9966fe3844664a3f9f34d4065 DIST gphoto2-2.5.28.tar.xz 575816 BLAKE2B 4f919349d435cdb8e2cc4602ef57cee5e9ba5c7117e9d9e0dc0cec48f8820e8fb56204e7b4eb96105015c603fe83eaccd1ce8a240780a258fe7e56eef06f0665 SHA512 f5e23fd559b3a272441556323b9eadbce11e73bdcfe94ee027d58e51d5396ee6e2c12f0b7675d5017c140db329354de775ad619fcd6f19e3252659e0cbc4baa8 +EBUILD gphoto2-2.5.28-r1.ebuild 1105 BLAKE2B dd1eb2244cc570305cf0474d5d247d3d582811234f2b506551afeb6752adb15b8f95287d0640dc746dc91036eb07672ac8b6d06a3f97d1e1a4f6240d7c3b73b2 SHA512 d556d2cc5da25cd24312c0d7938a50f37996f44dbc3dc0a4a2d95f19670ee2c01285db941d2e4d932a3353c577b31c048c623811b5c8e0643c47ccce88a6227a EBUILD gphoto2-2.5.28.ebuild 1043 BLAKE2B 9f0dcf2681310f7d8a19f644be40475fe99a8f78463b40d67b767b618d04714a71008925773469908dde477078ad1eec825ae401e26877ce5656a4587ea7f402 SHA512 7e07f895327ce03d233e8700d8592c2bdc1a1da41a62cf42359055c40f81819934effe72946722310af40cb68a8bf644771b64d777498a8d11f8fafe945096fe MISC metadata.xml 384 BLAKE2B 1577d799609489e1e29078aaa779e019b01622aed8322d23aea0b3203f620d123c3bb0b2e5a3696ba89422c52695882253524c2104b47456e2b2a66f782ea9c4 SHA512 96f5267ca8b7ca6a0b22a82c3b386a1094db45056ade223cc3c24e52ef6a37117e283c0bcf6eb89e6a2a47347916ffdcfd5bdffd9049fda1717f2fd044fff9b5 diff --git a/media-gfx/gphoto2/files/gphoto2-2.5.28-clang-16.patch b/media-gfx/gphoto2/files/gphoto2-2.5.28-clang-16.patch new file mode 100644 index 000000000000..e21d38b311e9 --- /dev/null +++ b/media-gfx/gphoto2/files/gphoto2-2.5.28-clang-16.patch @@ -0,0 +1,77 @@ +https://bugs.gentoo.org/896212 +https://github.com/gphoto/gphoto2/pull/569 +https://github.com/gphoto/gphoto2/commit/ccc4c1f092bd21ebc713f4d7b9be85be49f92f1e +https://github.com/gphoto/gphoto2/commit/366930ccc1a261c3eb883da2bf3c655162ccd75f + +From ccc4c1f092bd21ebc713f4d7b9be85be49f92f1e Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 2 Sep 2022 12:59:46 -0700 +Subject: [PATCH] gphoto2: Use pthread_t abstract type for thead IDs + +This is not a plain old datatype in every libc, e.g. with musl this +would fail in type conversion + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- a/gphoto2/main.c ++++ b/gphoto2/main.c +@@ -1198,7 +1198,7 @@ thread_func (void *data) + pthread_cleanup_pop (1); + } + +-static unsigned int ++static pthread_t + start_timeout_func (Camera *camera, unsigned int timeout, + CameraTimeoutFunc func, void __unused__ *data) + { +@@ -1219,7 +1219,7 @@ start_timeout_func (Camera *camera, unsigned int timeout, + } + + static void +-stop_timeout_func (Camera __unused__ *camera, unsigned int id, ++stop_timeout_func (Camera __unused__ *camera, pthread_t id, + void __unused__ *data) + { + pthread_t tid = id; + + +From 366930ccc1a261c3eb883da2bf3c655162ccd75f Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 1 Mar 2023 22:58:37 -0800 +Subject: [PATCH] Match prototypes of callbacks with libgphoto + +In https://github.com/gphoto/gphoto2/pull/535/commits/ccc4c1f092bd21ebc713f4d7b9be85be49f92f1e +we tried to fix by using pthread_t but it also needs to make changes in +libgphoto and these changes can be invasive, therefore lets revert to +older types and to fix musl problem fix it via type casts + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- a/gphoto2/main.c ++++ b/gphoto2/main.c +@@ -1198,7 +1198,7 @@ thread_func (void *data) + pthread_cleanup_pop (1); + } + +-static pthread_t ++static unsigned int + start_timeout_func (Camera *camera, unsigned int timeout, + CameraTimeoutFunc func, void __unused__ *data) + { +@@ -1215,14 +1215,14 @@ start_timeout_func (Camera *camera, unsigned int timeout, + + pthread_create (&tid, NULL, thread_func, td); + +- return (tid); ++ return (unsigned int)tid; + } + + static void +-stop_timeout_func (Camera __unused__ *camera, pthread_t id, ++stop_timeout_func (Camera __unused__ *camera, unsigned int id, + void __unused__ *data) + { +- pthread_t tid = id; ++ pthread_t tid = (pthread_t)id; + + pthread_cancel (tid); + pthread_join (tid, NULL); + diff --git a/media-gfx/gphoto2/gphoto2-2.5.28-r1.ebuild b/media-gfx/gphoto2/gphoto2-2.5.28-r1.ebuild new file mode 100644 index 000000000000..451c24940a8e --- /dev/null +++ b/media-gfx/gphoto2/gphoto2-2.5.28-r1.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools + +DESCRIPTION="Free, redistributable digital camera software application" +HOMEPAGE="http://www.gphoto.org/" +SRC_URI="mirror://sourceforge/gphoto/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86" +IUSE="aalib ncurses nls readline" + +# aalib -> needs libjpeg +RDEPEND=" + >=dev-libs/popt-1.6.1 + >=media-libs/libexif-0.6.9 + >=media-libs/libgphoto2-2.5.17:=[exif] + aalib? ( + media-libs/aalib + media-libs/libjpeg-turbo + ) + ncurses? ( dev-libs/cdk:= ) + readline? ( sys-libs/readline:= ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + virtual/pkgconfig + nls? ( >=sys-devel/gettext-0.14.1 ) +" + +PATCHES=( + "${FILESDIR}"/${P}-clang-16.patch +) + +src_prepare() { + default + # Leave GCC debug builds under user control + sed -r '/(C|LD)FLAGS/ s/ -g( |")/\1/' \ + -i configure{.ac,} || die + eautoreconf +} + +src_configure() { + econf \ + $(use_with aalib) \ + $(use_with aalib jpeg) \ + $(use_with ncurses cdk) \ + $(use_enable nls) \ + $(use_with readline) +} |