commit: 65d48063b8ec563f645cd8d0ae97b34e4f77eeda Author: Jaco Kroon <jkroon <AT> gentoo <DOT> org> AuthorDate: Fri Dec 5 12:16:22 2025 +0000 Commit: Jaco Kroon <jkroon <AT> gentoo <DOT> org> CommitDate: Fri Dec 5 12:33:17 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65d48063
app-arch/createrepo_c: 1.2.1-r3 Closes: https://bugs.gentoo.org/963774 Closes: https://bugs.gentoo.org/964539 Signed-off-by: Jaco Kroon <jkroon <AT> gentoo.org> app-arch/createrepo_c/Manifest | 2 + app-arch/createrepo_c/createrepo_c-1.2.1-r3.ebuild | 94 ++++++++++++++++++++++ .../files/createrepo_c-1.2.1-r3-cmake-fixes.patch | 73 +++++++++++++++++ 3 files changed, 169 insertions(+) diff --git a/app-arch/createrepo_c/Manifest b/app-arch/createrepo_c/Manifest index 5c69935f2c8e..10bb7a59bea9 100644 --- a/app-arch/createrepo_c/Manifest +++ b/app-arch/createrepo_c/Manifest @@ -1,3 +1,5 @@ DIST createrepo_c-1.2.1-r2-cmake4.patch 10607 BLAKE2B 366ba9be95eb0a2c5057e999638ab17d2f805a34cc5d0e454e7f9d61369183a54b1670fd6374ca0f2449b665086d48115c64b47e3616adf270cd437474b840cd SHA512 3d61b175e1d70661b1971963ac6977f75c21355019aa78c3b6c6ff1f230078047d8b2d045017f640cefd88f6bc19f7da77b5e7c5350f8d5689c71e21a4878f00 DIST createrepo_c-1.2.1-r2-rpm6compat.patch 1993 BLAKE2B 50d6b21c0129df913ea5740067dd901a3633a3dc10c025e163d0f0fd1dd3e941c13139d92a94908bb33abd61994ea6b8786d8bc1f1bfbc889846aa7ed173cc57 SHA512 cba117543a31a36ec0bae14e8e7c629e28e6081d13d2f7ec48c38dd1d9a0f570c5986c19d14f6cc4ca28dffc8cc3cbb5fcd63f7e5fe01a26c31091bf7fb8c1e6 +DIST createrepo_c-1.2.1-r3-docs-doxygen-optional.patch 1685 BLAKE2B 787d31b8cd236ec59f0dcda7203b02549ba21ebc53957b770b820ce84f78d1e204fbc944f7786b2b0e7c13ac89e58698144782a9126086fde8834e5c5dcae932 SHA512 c3d29ad449b6ab75cb6c51f548c505537c544eec941d80cdeae079cea2c621324e0c54682a3482dbe5ee41af03009dfc07c81d8271189b5c1d747d755f5055ff +DIST createrepo_c-1.2.1-r3-docs-target.patch 1645 BLAKE2B 8915426f5e47143b387b48073baf1f3a9bb02491cb4b5b1e0b1dcfc11fcffab87084520aa402fd02a34431457a9695ce0435d6f95255f569391f0db5ae5ec3ef SHA512 7719748836328340e02471396fcbd266932c6d83651f65f0a636cde89d89c482610f88d86790f784d4b39a769f7eb37bdb3a75fda0dc23ddfd12f66c2968314e DIST createrepo_c-1.2.1.tar.gz 639122 BLAKE2B 6705fd56f72934eef88b31fae725085c91b6b14a601d0f0908ed9307d72eabf17fd2258f13eeadeb7234b31d08a61eab2fc75c4b75bf8ea75ee69442715277bc SHA512 3acd54e5848ad3995d8b140b9d338fb8588c46d163e029b7203e49b3ff1a9984b55d403c3a5c590be23ebb5c5c74de369883eb51bba6fb51e8b247f9f10ab383 diff --git a/app-arch/createrepo_c/createrepo_c-1.2.1-r3.ebuild b/app-arch/createrepo_c/createrepo_c-1.2.1-r3.ebuild new file mode 100644 index 000000000000..1d5f1daebe37 --- /dev/null +++ b/app-arch/createrepo_c/createrepo_c-1.2.1-r3.ebuild @@ -0,0 +1,94 @@ +# Copyright 2020-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +DESCRIPTION="C implementation of createrepo" +HOMEPAGE="https://github.com/rpm-software-management/createrepo_c" +if [[ ${PV} = 9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/rpm-software-management/createrepo_c.git" +else + SRC_URI=" + https://github.com/rpm-software-management/createrepo_c/archive/${PV}.tar.gz -> ${P}.tar.gz + https://github.com/rpm-software-management/createrepo_c/commit/4e37bc582b1673ff767dbd0b570ef1c8871d3e8c.patch + -> ${PN}-1.2.1-r2-rpm6compat.patch + https://github.com/rpm-software-management/createrepo_c/commit/89fa02828cdaf1c710c38bde5fcbcf59538a9cce.patch + -> ${PN}-1.2.1-r2-cmake4.patch + https://github.com/rpm-software-management/createrepo_c/commit/908e3a4a5909ab107da41c2631a06c6b23617f3c.patch + -> ${PN}-1.2.1-r3-docs-target.patch + https://github.com/rpm-software-management/createrepo_c/commit/e2ce40a8191b76165a68289bb3a9876171f42dea.patch + -> ${PN}-1.2.1-r3-docs-doxygen-optional.patch + " + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="GPL-2" +SLOT="0" + +IUSE="doc legacy test zstd" +RESTRICT="!test? ( test )" + +BDEPEND="doc? ( + app-text/doxygen +)" + +DEPEND=" + app-arch/bzip2:= + app-arch/drpm + app-arch/rpm + app-arch/xz-utils + app-arch/zchunk + app-arch/zstd:= + >=dev-db/sqlite-3.6.18:3 + dev-libs/glib:2 + dev-libs/libxml2:= + dev-libs/openssl:= + net-misc/curl + sys-apps/file + sys-libs/libmodulemd + virtual/zlib:= +" + +RDEPEND="${DEPEND}" + +PATCHES=( + "${DISTDIR}/createrepo_c-1.2.1-r2-cmake4.patch" + "${DISTDIR}/createrepo_c-1.2.1-r2-rpm6compat.patch" + "${FILESDIR}/createrepo_c-1.2.1-r3-cmake-fixes.patch" + "${DISTDIR}/createrepo_c-1.2.1-r3-docs-target.patch" + "${DISTDIR}/createrepo_c-1.2.1-r3-docs-doxygen-optional.patch" +) + +src_configure() { + local mycmakeargs=( + -DENABLE_DRPM=ON + # As best I can tell, this enables distribution as a wheel. No need for this on gentoo! + -DENABLE_PYTHON=OFF + # Upstream enables some 'Legacy' stuff by default, let's put that behind a USE flag + -DENABLE_LEGACY_WEAKDEPS=$(usex legacy ON OFF) + -DWITH_LEGACY_HASHES=$(usex legacy ON OFF) + -DWITH_LIBMODULEMD=ON + -DWITH_ZCHUNK=ON + ) + + cmake_src_configure +} + +src_compile() { + cmake_src_compile + # Tests have a magic target! + use test && cmake_src_compile tests + use doc && cmake_src_compile doc-c +} + +src_test() { + "${S}"_build/tests/run_tests.sh || die "Failed to run C library tests" +} + +src_install() { + cmake_src_install + use doc && dodoc -r "${BUILD_DIR}/doc/html" +} diff --git a/app-arch/createrepo_c/files/createrepo_c-1.2.1-r3-cmake-fixes.patch b/app-arch/createrepo_c/files/createrepo_c-1.2.1-r3-cmake-fixes.patch new file mode 100644 index 000000000000..3f6191e10bac --- /dev/null +++ b/app-arch/createrepo_c/files/createrepo_c-1.2.1-r3-cmake-fixes.patch @@ -0,0 +1,73 @@ +https://github.com/rpm-software-management/createrepo_c/pull/461 +From 1723a3044ed7797978a150a7b3fa2483dba17074 Mon Sep 17 00:00:00 2001 +From: Jaco Kroon <[email protected]> +Date: Fri, 5 Dec 2025 14:05:54 +0200 +Subject: [PATCH] Migrate cmake to find_package(PYTHON* to + find_package(Python3. + +Also bump minimum cmake version to 3.12. + +Closes: #460 +Signed-off-by: Jaco Kroon <[email protected]> +--- + CMakeLists.txt | 2 +- + src/python/CMakeLists.txt | 25 ++++++------------------- + 2 files changed, 7 insertions(+), 20 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c4bf525..5b3925a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,4 +1,4 @@ +-CMAKE_MINIMUM_REQUIRED (VERSION 3.7) ++CMAKE_MINIMUM_REQUIRED (VERSION 3.12) + PROJECT (createrepo_c C) + + include(GNUInstallDirs) +diff --git a/src/python/CMakeLists.txt b/src/python/CMakeLists.txt +index a31b14d..5303876 100644 +--- a/src/python/CMakeLists.txt ++++ b/src/python/CMakeLists.txt +@@ -1,23 +1,10 @@ +-MACRO(PYTHON_UNSET) +- unset(PYTHON_LIBRARY) +- unset(PYTHON_INCLUDE_DIR) +- unset(PYTHON_EXECUTABLE) +- unset(PYTHON_LIBRARY CACHE) +- unset(PYTHON_INCLUDE_DIR CACHE) +- unset(PYTHON_EXECUTABLE CACHE) +-ENDMACRO(PYTHON_UNSET) +- + if (NOT SKBUILD) +- PYTHON_UNSET() +- SET(Python_ADDITIONAL_VERSIONS 3.0 CACHE INTERNAL "") +- FIND_PACKAGE(PythonInterp 3 REQUIRED) +- FIND_PACKAGE(PythonLibs 3 REQUIRED) ++ FIND_PACKAGE(Python3 REQUIRED Interpreter Development) + endif (NOT SKBUILD) + +-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from sysconfig import get_path; stdout.write(get_path('platlib'))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR) +-INCLUDE_DIRECTORIES (${PYTHON_INCLUDE_PATH}) ++INCLUDE_DIRECTORIES (${Python3_INCLUDE_DIRS}) + +-MESSAGE(STATUS "Python install dir is ${PYTHON_INSTALL_DIR}") ++MESSAGE(STATUS "Python install dir is ${Python3_SITELIB}") + + set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-strict-aliasing") + set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -fno-strict-aliasing") +@@ -72,9 +59,9 @@ IF (SKBUILD) + INSTALL(FILES createrepo_c/__init__.py DESTINATION src/python/createrepo_c) + INSTALL(TARGETS _createrepo_c LIBRARY DESTINATION src/python/createrepo_c) + ELSE () +- INSTALL(FILES createrepo_c/__init__.py DESTINATION ${PYTHON_INSTALL_DIR}/createrepo_c) +- INSTALL(TARGETS _createrepo_c LIBRARY DESTINATION ${PYTHON_INSTALL_DIR}/createrepo_c) ++ INSTALL(FILES createrepo_c/__init__.py DESTINATION ${Python3_SITELIB}/createrepo_c) ++ INSTALL(TARGETS _createrepo_c LIBRARY DESTINATION ${Python3_SITELIB}/createrepo_c) + + # Version has to be passed as last argument. +- INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/utils/setup_for_python_metadata.py install_egg_info --install-dir \$ENV{DESTDIR}/${PYTHON_INSTALL_DIR} ${VERSION})") ++ INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/utils/setup_for_python_metadata.py install_egg_info --install-dir \$ENV{DESTDIR}/${Python3_SITELIB} ${VERSION})") + ENDIF () +-- +2.51.2 +
