aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2023-01-28 08:34:29 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2023-01-28 08:34:29 +0000
commit69cd330861e1ff1792d4783fed9613b7b19f22ef (patch)
treef5510a9f8d35734a14bdebba599004a13a48834b
parent5f3785e9c31949a5b9307399f2915c3e4912d1ef (diff)
downloadports-69cd330861e1ff1792d4783fed9613b7b19f22ef.tar.gz
ports-69cd330861e1ff1792d4783fed9613b7b19f22ef.zip
misc/librepo: Update 1.14.4 → 1.15.1
Reported by: portscout
-rw-r--r--misc/librepo/Makefile14
-rw-r--r--misc/librepo/distinfo6
-rw-r--r--misc/librepo/files/patch-CMakeLists.txt4
-rw-r--r--misc/librepo/files/patch-librepo_CMakeLists.txt16
-rw-r--r--misc/librepo/files/patch-tests_CMakeLists.txt10
-rw-r--r--misc/librepo/files/xattr.c20
6 files changed, 60 insertions, 10 deletions
diff --git a/misc/librepo/Makefile b/misc/librepo/Makefile
index c20e616e2f43..5cc5e2750109 100644
--- a/misc/librepo/Makefile
+++ b/misc/librepo/Makefile
@@ -1,5 +1,5 @@
PORTNAME= librepo
-DISTVERSION= 1.14.4
+DISTVERSION= 1.15.1
CATEGORIES= misc
MAINTAINER= yuri@FreeBSD.org
@@ -13,8 +13,12 @@ LIB_DEPENDS= libassuan.so:security/libassuan \
libcurl.so:ftp/curl \
libgpg-error.so:security/libgpg-error \
libgpgme.so:security/gpgme
+TEST_DEPENDS= bash:shells/bash \
+ check>0:devel/check \
+ ${PYTHON_PKGNAMEPREFIX}gpgme>0:security/py-gpgme@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}xattr>0:devel/py-xattr@${PY_FLAVOR}
-USES= cpe gettext-runtime gnome cmake localbase:ldflags pkgconfig
+USES= cpe gettext-runtime gnome cmake:testing localbase:ldflags pkgconfig python shebangfix ssl
CPE_VENDOR= redhat
USE_GNOME= glib20 libxml2
USE_LDCONFIG= yes
@@ -22,7 +26,13 @@ USE_LDCONFIG= yes
USE_GITHUB= yes
GH_ACCOUNT= rpm-software-management
+SHEBANG_FILES= tests/run_tests.sh.in
+SHEBANG_GLOB= *.sh
+
+CFLAGS+= -I${WRKSRC}/librepo
+
CMAKE_OFF= ENABLE_DOCS ENABLE_TESTS
+CMAKE_TESTING_ON= ENABLE_TESTS
OPTIONS_DEFINE= PYTHON ZCHUNK
OPTIONS_DEFAULT= ZCHUNK
diff --git a/misc/librepo/distinfo b/misc/librepo/distinfo
index a2f9f65f4258..e7fa9306a872 100644
--- a/misc/librepo/distinfo
+++ b/misc/librepo/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1662272707
-SHA256 (rpm-software-management-librepo-1.14.4_GH0.tar.gz) = a945e4970ec1fc433b082841c609627de67ba61d00cd297ad827bbd3eccb75ee
-SIZE (rpm-software-management-librepo-1.14.4_GH0.tar.gz) = 824325
+TIMESTAMP = 1674889454
+SHA256 (rpm-software-management-librepo-1.15.1_GH0.tar.gz) = 4af9edb3219030d35f4972ce520444f7534bd9c94729456ec0aea76e868a103a
+SIZE (rpm-software-management-librepo-1.15.1_GH0.tar.gz) = 828520
diff --git a/misc/librepo/files/patch-CMakeLists.txt b/misc/librepo/files/patch-CMakeLists.txt
index ca9ddc03cc8b..e722a9b880af 100644
--- a/misc/librepo/files/patch-CMakeLists.txt
+++ b/misc/librepo/files/patch-CMakeLists.txt
@@ -1,9 +1,9 @@
---- CMakeLists.txt.orig 2022-08-19 07:04:41 UTC
+--- CMakeLists.txt.orig 2022-12-09 12:47:26 UTC
+++ CMakeLists.txt
@@ -29,7 +29,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SO
FIND_PACKAGE(PkgConfig)
- PKG_CHECK_MODULES(GLIB2 glib-2.0>=2.28 REQUIRED)
+ PKG_CHECK_MODULES(GLIB2 glib-2.0>=2.28 gio-2.0 REQUIRED)
-PKG_SEARCH_MODULE(LIBCRYPTO REQUIRED libcrypto openssl)
+#PKG_SEARCH_MODULE(LIBCRYPTO REQUIRED libcrypto openssl)
PKG_CHECK_MODULES(LIBXML2 libxml-2.0 REQUIRED)
diff --git a/misc/librepo/files/patch-librepo_CMakeLists.txt b/misc/librepo/files/patch-librepo_CMakeLists.txt
index d74cffee9c49..b6d57f76719f 100644
--- a/misc/librepo/files/patch-librepo_CMakeLists.txt
+++ b/misc/librepo/files/patch-librepo_CMakeLists.txt
@@ -1,4 +1,4 @@
---- librepo/CMakeLists.txt.orig 2020-08-22 20:15:59 UTC
+--- librepo/CMakeLists.txt.orig 2022-12-09 12:47:26 UTC
+++ librepo/CMakeLists.txt
@@ -18,7 +18,8 @@ SET (librepo_SRCS
url_substitution.c
@@ -10,10 +10,20 @@
SET(librepo_HEADERS
checksum.h
-@@ -73,4 +74,6 @@ INSTALL(TARGETS librepo LIBRARY DESTINATION ${CMAKE_IN
+@@ -52,6 +53,7 @@ TARGET_LINK_LIBRARIES(librepo
+ ${LIBCRYPTO_LIBRARIES}
+ ${GPGME_VANILLA_LIBRARIES}
+ ${GLIB2_LIBRARIES}
++ crypto ssl
+ )
+ IF (WITH_ZCHUNK)
+ TARGET_LINK_LIBRARIES(librepo ${ZCHUNKLIB_LIBRARIES})
+@@ -73,6 +75,8 @@ INSTALL(TARGETS librepo LIBRARY DESTINATION ${CMAKE_IN
INSTALL(FILES "${CMAKE_BINARY_DIR}/librepo.pc"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
+if (ENABLE_PYTHON)
- ADD_SUBDIRECTORY(python)
+ IF (ENABLE_PYTHON)
+endif()
+ ADD_SUBDIRECTORY(python)
+ ENDIF (ENABLE_PYTHON)
diff --git a/misc/librepo/files/patch-tests_CMakeLists.txt b/misc/librepo/files/patch-tests_CMakeLists.txt
new file mode 100644
index 000000000000..9ce6592f68e3
--- /dev/null
+++ b/misc/librepo/files/patch-tests_CMakeLists.txt
@@ -0,0 +1,10 @@
+--- tests/CMakeLists.txt.orig 2023-01-28 07:22:09 UTC
++++ tests/CMakeLists.txt
+@@ -16,6 +16,7 @@ SET (librepotest_SRCS
+ test_url_substitution.c
+ test_util.c
+ test_version.c
++ ../librepo/xattr.c
+ )
+
+ #ADD_LIBRARY(testsys STATIC testsys.c)
diff --git a/misc/librepo/files/xattr.c b/misc/librepo/files/xattr.c
index 34ae5fce5ef6..c69d017fbd25 100644
--- a/misc/librepo/files/xattr.c
+++ b/misc/librepo/files/xattr.c
@@ -3,6 +3,7 @@
#include <sys/extattr.h>
#include <assert.h>
+#include <string.h>
///
/// xattr is a Linux kernel API that has to be mapped to the FreeBSD API
@@ -20,6 +21,25 @@ static void convert_bsd_list(char *namebuf, size_t size) {
}
}
+ssize_t getxattr(const char *path, const char *name,
+ void *value, ssize_t size, u_int32_t position,
+ int options)
+{
+// if (position != 0 ||
+// !(options == 0 || options == XATTR_XATTR_NOFOLLOW)) {
+// return -1;
+// }
+
+// if (options & XATTR_XATTR_NOFOLLOW) {
+// return extattr_get_link(path, EXTATTR_NAMESPACE_USER,
+// name, value, size);
+// }
+// else {
+ return extattr_get_file(path, EXTATTR_NAMESPACE_USER,
+ name, value, size);
+// }
+}
+
int fsetxattr(int fd, const char *name, const void *value, size_t size, int flags) {
int rv = 0;