sysutils/libdnf: Fix PYTHON option

This commit is contained in:
Yuri Victorovich 2020-09-26 06:56:14 +00:00
parent 809370b506
commit 4a83f13ec5
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=550108
5 changed files with 56 additions and 15 deletions

View File

@ -2,6 +2,7 @@
PORTNAME= libdnf
DISTVERSION= 0.48.0
PORTREVISION= 1
CATEGORIES= sysutils
MAINTAINER= yuri@FreeBSD.org
@ -10,8 +11,7 @@ COMMENT= Dandified YUM, the next-generation version of YUM
LICENSE= LGPL21 # no LICENSE tag for Version 2.1
LICENSE_FILE= ${WRKSRC}/COPYING
BUILD_DEPENDS= check>0:devel/check \
${LOCALBASE}/include/libsmartcols/libsmartcols.h:devel/util-linux
BUILD_DEPENDS= check>0:devel/check
LIB_DEPENDS= libassuan.so:security/libassuan \
libgpgme.so:security/gpgme \
libgpg-error.so:security/libgpg-error \
@ -19,26 +19,27 @@ LIB_DEPENDS= libassuan.so:security/libassuan \
libmodulemd.so:misc/libmodulemd \
librepo.so:misc/librepo \
librpmio.so:archivers/rpm4 \
libsmartcols.so:devel/util-linux \
libsolv.so:misc/libsolv
USES= cmake compiler:c++11-lang gettext gnome pkgconfig sqlite ssl
USE_GNOME= glib20
USE_LDCONFIG= yes
USE_GCC= any # clang fails: https://github.com/rpm-software-management/libdnf/issues/1038
USE_GITHUB= yes
GH_ACCOUNT= rpm-software-management
CMAKE_OFF= BUILD_TESTNG WITH_GTKDOC WITH_HTML
USE_GCC= any # clang fails: https://github.com/rpm-software-management/libdnf/issues/1038
CMAKE_OFF= BUILD_TESTNG WITH_GTKDOC WITH_HTML BUILD_TESTING FREEBSD_INSTALL_DOCS
OPTIONS_DEFINE= PYTHON ZCHUNK
OPTIONS_DEFAULT= PYTHON
OPTIONS_SUB= yes
PYTHON_CMAKE_BOOL= WITH_BINDINGS
PYTHON_USES= python
PYTHON_CMAKE_ON= -DPYTHON_DESIRED=${PYTHON_MAJOR_VER}
PYTHON_BUILD_DEPENDS= swig:devel/swig
PYTHON_BROKEN= https://github.com/rpm-software-management/libdnf/issues/1046
ZCHUNK_DESC= With zchunk support
ZCHUNK_CMAKE_BOOL= WITH_ZCHUNK

View File

@ -1,15 +1,15 @@
--- CMakeLists.txt.orig 2020-06-02 09:41:46 UTC
+++ CMakeLists.txt
@@ -65,7 +65,7 @@ pkg_check_modules(REPO REQUIRED librepo>=0.11.0)
include_directories(${REPO_INCLUDE_DIRS})
link_directories(${REPO_LIBRARY_DIRS})
pkg_check_modules(RPM REQUIRED rpm>=4.11.0)
-pkg_check_modules(SMARTCOLS REQUIRED smartcols)
+#pkg_check_modules(SMARTCOLS REQUIRED smartcols)
pkg_check_modules(SQLite3 REQUIRED sqlite3)
@@ -171,15 +171,19 @@ add_subdirectory(po)
# always enable linking with libdnf utils
@@ -178,8 +178,10 @@ endif()
# build docs
+if (FREEBSD_INSTALL_DOCS)
add_subdirectory(docs/libdnf)
if(WITH_BINDINGS)
add_subdirectory(docs/hawkey)
endif()
+endif()
# build tests

View File

@ -0,0 +1,9 @@
--- python/hawkey/CMakeLists.txt.orig 2020-09-26 05:11:04 UTC
+++ python/hawkey/CMakeLists.txt
@@ -50,4 +50,6 @@ target_link_libraries(_hawkeymodule ${PYTHON_LIBRARY})
install(FILES __init__.py DESTINATION ${PYTHON_INSTALL_DIR}/hawkey)
install(TARGETS _hawkeymodule LIBRARY DESTINATION ${PYTHON_INSTALL_DIR}/hawkey)
+if (BUILD_TESTING)
add_subdirectory(tests)
+endif()

View File

@ -0,0 +1,12 @@
--- tests/CMakeLists.txt.orig 2020-09-26 05:07:59 UTC
+++ tests/CMakeLists.txt
@@ -2,7 +2,9 @@ add_subdirectory(libdnf/module/modulemd)
add_subdirectory(libdnf/module)
add_subdirectory(libdnf/repo)
add_subdirectory(libdnf/transaction)
+if (BUILD_TESTING)
add_subdirectory(hawkey)
+endif()
add_subdirectory(libdnf)

View File

@ -55,6 +55,25 @@ include/libdnf/utils/logger.hpp
lib/libdnf.so
lib/libdnf.so.2
lib/libdnf/plugins/README
%%PYTHON%%%%PYTHON_SITELIBDIR%%/hawkey/__init__.py
%%PYTHON%%%%PYTHON_SITELIBDIR%%/hawkey/_hawkey.so
%%PYTHON%%%%PYTHON_SITELIBDIR%%/libdnf/__init__.py
%%PYTHON%%%%PYTHON_SITELIBDIR%%/libdnf/_common_types.so
%%PYTHON%%%%PYTHON_SITELIBDIR%%/libdnf/_conf.so
%%PYTHON%%%%PYTHON_SITELIBDIR%%/libdnf/_error.so
%%PYTHON%%%%PYTHON_SITELIBDIR%%/libdnf/_module.so
%%PYTHON%%%%PYTHON_SITELIBDIR%%/libdnf/_repo.so
%%PYTHON%%%%PYTHON_SITELIBDIR%%/libdnf/_smartcols.so
%%PYTHON%%%%PYTHON_SITELIBDIR%%/libdnf/_transaction.so
%%PYTHON%%%%PYTHON_SITELIBDIR%%/libdnf/_utils.so
%%PYTHON%%%%PYTHON_SITELIBDIR%%/libdnf/common_types.py
%%PYTHON%%%%PYTHON_SITELIBDIR%%/libdnf/conf.py
%%PYTHON%%%%PYTHON_SITELIBDIR%%/libdnf/error.py
%%PYTHON%%%%PYTHON_SITELIBDIR%%/libdnf/module.py
%%PYTHON%%%%PYTHON_SITELIBDIR%%/libdnf/repo.py
%%PYTHON%%%%PYTHON_SITELIBDIR%%/libdnf/smartcols.py
%%PYTHON%%%%PYTHON_SITELIBDIR%%/libdnf/transaction.py
%%PYTHON%%%%PYTHON_SITELIBDIR%%/libdnf/utils.py
libdata/pkgconfig/libdnf.pc
share/locale/as/LC_MESSAGES/libdnf.mo
share/locale/bg/LC_MESSAGES/libdnf.mo