From 9ce8f9f2a39dea43a16705901224b38eed035147 Mon Sep 17 00:00:00 2001 From: Andrew Sun Date: Mon, 19 Aug 2019 17:18:59 -0400 Subject: [PATCH] librsync: update to 2.1.0 --- mingw-w64-librsync/PKGBUILD | 28 ++++++++++++----------- mingw-w64-librsync/library-location.patch | 20 ++++++++-------- 2 files changed, 26 insertions(+), 22 deletions(-) diff --git a/mingw-w64-librsync/PKGBUILD b/mingw-w64-librsync/PKGBUILD index 63ca7c6853..fb1d6b85e4 100644 --- a/mingw-w64-librsync/PKGBUILD +++ b/mingw-w64-librsync/PKGBUILD @@ -3,7 +3,7 @@ _realname=librsync pkgbase="mingw-w64-${_realname}" pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=2.0.2 +pkgver=2.1.0 pkgrel=1 arch=('any') url='https://librsync.github.io/' @@ -17,8 +17,8 @@ license=('LGPL2') options=('strip' 'staticlibs' 'docs') source=(${_realname}-${pkgver}.tar.gz::"https://github.com/librsync/librsync/archive/v${pkgver}.tar.gz" 'library-location.patch') -sha256sums=('e67b9520ee84f7239be6e948795803bd95495091cc00bf6d0e8c6976032a4af1' - '19a6e6ae6180cb59eea5db408eb5ac94959ea6378639a1957b10b3cb59a3cc58') +sha256sums=('f701d2bab3d7471dfea60d29e9251f8bb7567222957f7195af55142cb207c653' + '647faebf2e25b002888e61f832d0ef6306f935abbc8a778d41bf5e82d1c8e015') prepare() { cd "${srcdir}/${_realname}-${pkgver}" @@ -26,22 +26,24 @@ prepare() { } build() { - local BUILD_TYPE="Release" - if check_option "debug" "y"; then - BUILD_TYPE="Debug" - fi - [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} - mkdir -p ${srcdir}/build-${MINGW_CHOST} - cd ${srcdir}/build-${MINGW_CHOST} + mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} + + CFLAGS+=" -Drsync_EXPORTS" + + declare -a extra_config + if check_option "debug" "n"; then + extra_config+=("-DCMAKE_BUILD_TYPE=Release") + else + extra_config+=("-DCMAKE_BUILD_TYPE=Debug") + fi MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ ${MINGW_PREFIX}/bin/cmake \ -G"MSYS Makefiles" \ - -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ - -DCMAKE_C_COMPILER=${MINGW_CHOST}-gcc \ - -DCMAKE_CXX_COMPILER=${MINGW_CHOST}-g++ \ + -DCMAKE_INSTALL_LIBDIR=lib \ + "${extra_config[@]}" \ ../${_realname}-${pkgver} make # Generate docs diff --git a/mingw-w64-librsync/library-location.patch b/mingw-w64-librsync/library-location.patch index e6ef9318f8..bd8d0b8284 100644 --- a/mingw-w64-librsync/library-location.patch +++ b/mingw-w64-librsync/library-location.patch @@ -1,24 +1,26 @@ ---- librsync-2.0.2/CMakeLists.txt.orig 2018-02-27 12:08:36.000000000 +0200 -+++ librsync-2.0.2/CMakeLists.txt 2018-04-07 01:05:50.001941100 +0300 -@@ -355,7 +355,10 @@ - - set_target_properties(rsync PROPERTIES VERSION ${LIBRSYNC_VERSION} - SOVERSION ${LIBRSYNC_MAJOR_VERSION}) +--- librsync-2.1.0.orig/CMakeLists.txt 2019-08-18 22:10:39.794438100 -0400 ++++ librsync-2.1.0/CMakeLists.txt 2019-08-18 22:14:33.695063500 -0400 +@@ -361,7 +361,11 @@ + VERSION ${LIBRSYNC_VERSION} + SOVERSION ${LIBRSYNC_MAJOR_VERSION} + C_VISIBILITY_PRESET hidden) -install(TARGETS rsync ${INSTALL_TARGETS_DEFAULT_ARGS} DESTINATION ${CMAKE_INSTALL_LIBDIR}) -+install(TARGETS rsync ${INSTALL_TARGETS_DEFAULT_ARGS} ++install(TARGETS rsync ${INSTALL_TARGETS_DEFAULT_ARGS} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} +) ########### next target ############### -@@ -372,7 +375,11 @@ +@@ -378,7 +382,12 @@ message (WARNING "Popt library is required for rdiff target") endif (POPT_FOUND) - install(TARGETS rdiff ${INSTALL_TARGETS_DEFAULT_ARGS} DESTINATION ${CMAKE_INSTALL_BINDIR}) -+ install(TARGETS rdiff ${INSTALL_TARGETS_DEFAULT_ARGS} ++ install(TARGETS rdiff ${INSTALL_TARGETS_DEFAULT_ARGS} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) +