pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/archivers/zziplib archivers/zziplib: Use portable swit...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/415937e4f1f7
branches:  trunk
changeset: 445184:415937e4f1f7
user:      otis <otis%pkgsrc.org@localhost>
date:      Sun Jan 17 09:36:45 2021 +0000

description:
archivers/zziplib: Use portable switches for ln

Backport of upstream change. See
https://github.com/gdraheim/zziplib/commit/eaba986ff3e6b29539d693fdab7189682dc72351

diffstat:

 archivers/zziplib/distinfo                              |   6 +-
 archivers/zziplib/patches/patch-zzip_CMakeLists.txt     |  78 +++++++++++-----
 archivers/zziplib/patches/patch-zzipwrap_CMakeLists.txt |  34 ++++++-
 3 files changed, 85 insertions(+), 33 deletions(-)

diffs (218 lines):

diff -r b9d81e4b785b -r 415937e4f1f7 archivers/zziplib/distinfo
--- a/archivers/zziplib/distinfo        Sun Jan 17 08:32:50 2021 +0000
+++ b/archivers/zziplib/distinfo        Sun Jan 17 09:36:45 2021 +0000
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.21 2021/01/15 07:15:12 schmonz Exp $
+$NetBSD: distinfo,v 1.22 2021/01/17 09:36:45 otis Exp $
 
 SHA1 (zziplib-0.13.72.tar.gz) = 330cab1c477196d2d26d30d5f4cb031647fd4597
 RMD160 (zziplib-0.13.72.tar.gz) = d1bcdbf0df1e1eb222c31b8d4c659bb1a45744f4
 SHA512 (zziplib-0.13.72.tar.gz) = 4bb089e74813c6fac9657cd96e44e4a6469bf86aba3980d885c4573e8db45e74fd07bbdfcec9f36297c72227c8c0b2c37dab1bc4326cef8529960e482fe501c8
 Size (zziplib-0.13.72.tar.gz) = 1162175 bytes
-SHA1 (patch-zzip_CMakeLists.txt) = 736f28d1617825d3c14a338ff3e022f53a746190
-SHA1 (patch-zzipwrap_CMakeLists.txt) = 01df91186ccea06fec2a085f440e2151086700df
+SHA1 (patch-zzip_CMakeLists.txt) = 3ffad6de6dcb48189880d972052d917653f138aa
+SHA1 (patch-zzipwrap_CMakeLists.txt) = be632707cecafcdae76a7633d60cac6261f720d8
diff -r b9d81e4b785b -r 415937e4f1f7 archivers/zziplib/patches/patch-zzip_CMakeLists.txt
--- a/archivers/zziplib/patches/patch-zzip_CMakeLists.txt       Sun Jan 17 08:32:50 2021 +0000
+++ b/archivers/zziplib/patches/patch-zzip_CMakeLists.txt       Sun Jan 17 09:36:45 2021 +0000
@@ -1,98 +1,124 @@
-$NetBSD: patch-zzip_CMakeLists.txt,v 1.2 2021/01/15 07:15:12 schmonz Exp $
+$NetBSD: patch-zzip_CMakeLists.txt,v 1.3 2021/01/17 09:36:45 otis Exp $
 
-Use portable ln switches
+Use portable ln switches.
+
+This is a backport of:
+https://github.com/gdraheim/zziplib/commit/eaba986ff3e6b29539d693fdab7189682dc72351
 
 --- zzip/CMakeLists.txt.orig   2021-01-04 23:05:08.000000000 +0000
 +++ zzip/CMakeLists.txt
-@@ -290,17 +290,17 @@ if(ZZIP_COMPAT)
+@@ -276,6 +276,22 @@ install(TARGETS libzzipmmapped
+     ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ endif()
+ 
++if(ZZIP_COMPAT OR ZZIP_LIBTOOL)
++  if(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG)
++    execute_process(COMMAND bash -c "ln --help"
++        OUTPUT_VARIABLE ln_verbose_help
++        ERROR_QUIET
++    )
++    string(FIND "${ln_verbose_help}" "verbose" ln_verbose_found)
++    if(${ln_verbose_found} STREQUAL "-1")
++        set(ln_svf "ln -sf")
++    else()
++        set(ln_svf "ln -svf")
++    endif()
++    message(STATUS "Can symlink libraries with: ${ln_svf}")
++  endif()
++endif()
++
+ if(ZZIP_COMPAT)
+   install(FILES ${outdir}/compat/zzip.h ${outdir}/compat/zziplib.h ${outdir}/compat/zzip-io.h 
+           DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+@@ -290,17 +306,17 @@ if(ZZIP_COMPAT)
          cd $DESTDIR/${libdir}
          if [ -f ${lib}${libname}${librelease}.${libversion}${dll} ]; then
            # Fix for APPLE where dylib goes in the end
 -          ln -s ${lib}${libname}${librelease}.${libversion}${dll} ${lib}${libname}${librelease}${dll}.${libversion}
-+          ln -sf ${lib}${libname}${librelease}.${libversion}${dll} ${lib}${libname}${librelease}${dll}.${libversion}
++          ${ln_svf} ${lib}${libname}${librelease}.${libversion}${dll} ${lib}${libname}${librelease}${dll}.${libversion}
          fi
          [ -f ${lib}${libname}${librelease}${dll}.${libversion} ] || exit 0
          echo -n .. Installing: `pwd`
 -        ln -svf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}
-+        ln -sf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}
++        ${ln_svf} ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}
          echo -n .. Installing: `pwd`
 -        ln -svf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.10
-+        ln -sf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.10
++        ${ln_svf} ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.10
          echo -n .. Installing: `pwd`
 -        ln -svf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.11
-+        ln -sf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.11
++        ${ln_svf} ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.11
          echo -n .. Installing: `pwd`
 -        ln -svf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.12
-+        ln -sf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.12
++        ${ln_svf} ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.12
          \")")
    endif()
  endif()
-@@ -317,17 +317,17 @@ if(ZZIP_LIBTOOL)
+@@ -317,17 +333,17 @@ if(ZZIP_LIBTOOL)
          cd $DESTDIR/${libdir}
          if [ -f ${lib}${libname}${librelease}.${libversion}${dll} ]; then
            # Fix for APPLE where dylib goes in the end
 -          ln -s ${lib}${libname}${librelease}.${libversion}${dll} ${lib}${libname}${librelease}${dll}.${libversion}
-+          ln -sf ${lib}${libname}${librelease}.${libversion}${dll} ${lib}${libname}${librelease}${dll}.${libversion}
++          ${ln_svf} ${lib}${libname}${librelease}.${libversion}${dll} ${lib}${libname}${librelease}${dll}.${libversion}
          fi
          [ -f ${lib}${libname}${librelease}${dll}.${libversion} ] || exit 0
          echo -n .. Installing: `pwd`
 -        ln -svf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${dll}
-+        ln -sf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${dll}
++        ${ln_svf} ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${dll}
          echo -n .. Installing: `pwd`
 -        ln -svf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.10
-+        ln -sf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.10
++        ${ln_svf} ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.10
          echo -n .. Installing: `pwd`
 -        ln -svf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.11
-+        ln -sf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.11
++        ${ln_svf} ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.11
          echo -n .. Installing: `pwd`
 -        ln -svf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.12
-+        ln -sf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.12
++        ${ln_svf} ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.12
          \")")
      if(ZZIPFSEEKO)
      get_target_property(libname libzzipfseeko OUTPUT_NAME)
-@@ -337,17 +337,17 @@ if(ZZIP_LIBTOOL)
+@@ -337,17 +353,17 @@ if(ZZIP_LIBTOOL)
          cd $DESTDIR/${libdir}
          if [ -f ${lib}${libname}${librelease}.${libversion}${dll} ]; then
            # Fix for APPLE where dylib goes in the end
 -          ln -s ${lib}${libname}${librelease}.${libversion}${dll} ${lib}${libname}${librelease}${dll}.${libversion}
-+          ln -sf ${lib}${libname}${librelease}.${libversion}${dll} ${lib}${libname}${librelease}${dll}.${libversion}
++          ${ln_svf} ${lib}${libname}${librelease}.${libversion}${dll} ${lib}${libname}${librelease}${dll}.${libversion}
          fi
          [ -f ${lib}${libname}${librelease}${dll}.${libversion} ] || exit 0
          echo -n .. Installing: `pwd`
 -        ln -svf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${dll}
-+        ln -sf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${dll}
++        ${ln_svf} ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${dll}
          echo -n .. Installing: `pwd`
 -        ln -svf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.10
-+        ln -sf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.10
++        ${ln_svf} ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.10
          echo -n .. Installing: `pwd`
 -        ln -svf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.11
-+        ln -sf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.11
++        ${ln_svf} ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.11
          echo -n .. Installing: `pwd`
 -        ln -svf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.12
-+        ln -sf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.12
++        ${ln_svf} ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.12
          \")")
      endif(ZZIPFSEEKO)
      if(ZZIPMMAPPED)
-@@ -358,17 +358,17 @@ if(ZZIP_LIBTOOL)
+@@ -358,17 +374,17 @@ if(ZZIP_LIBTOOL)
          cd $DESTDIR/${libdir}
          if [ -f ${lib}${libname}${librelease}.${libversion}${dll} ]; then
            # Fix for APPLE where dylib goes in the end
 -          ln -s ${lib}${libname}${librelease}.${libversion}${dll} ${lib}${libname}${librelease}${dll}.${libversion}
-+          ln -sf ${lib}${libname}${librelease}.${libversion}${dll} ${lib}${libname}${librelease}${dll}.${libversion}
++          ${ln_svf} ${lib}${libname}${librelease}.${libversion}${dll} ${lib}${libname}${librelease}${dll}.${libversion}
          fi
          [ -f ${lib}${libname}${librelease}${dll}.${libversion} ] || exit 0
          echo -n .. Installing: `pwd`
 -        ln -svf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${dll}
-+        ln -sf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${dll}
++        ${ln_svf} ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${dll}
          echo -n .. Installing: `pwd`
 -        ln -svf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.10
-+        ln -sf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.10
++        ${ln_svf} ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.10
          echo -n .. Installing: `pwd`
 -        ln -svf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.11
-+        ln -sf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.11
++        ${ln_svf} ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.11
          echo -n .. Installing: `pwd`
 -        ln -svf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.12
-+        ln -sf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.12
++        ${ln_svf} ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.12
          \")")
      endif(ZZIPMMAPPED)
    endif(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG)
diff -r b9d81e4b785b -r 415937e4f1f7 archivers/zziplib/patches/patch-zzipwrap_CMakeLists.txt
--- a/archivers/zziplib/patches/patch-zzipwrap_CMakeLists.txt   Sun Jan 17 08:32:50 2021 +0000
+++ b/archivers/zziplib/patches/patch-zzipwrap_CMakeLists.txt   Sun Jan 17 09:36:45 2021 +0000
@@ -1,15 +1,41 @@
-$NetBSD: patch-zzipwrap_CMakeLists.txt,v 1.1 2021/01/12 21:06:20 otis Exp $
+$NetBSD: patch-zzipwrap_CMakeLists.txt,v 1.2 2021/01/17 09:36:45 otis Exp $
 
-Use portable ln switches
+Use portable ln switches.
+
+This is a backport of
+https://github.com/gdraheim/zziplib/commit/eaba986ff3e6b29539d693fdab7189682dc72351
 
 --- zzipwrap/CMakeLists.txt.orig       2021-01-04 23:05:08.000000000 +0000
 +++ zzipwrap/CMakeLists.txt
-@@ -99,7 +99,7 @@ if(ZZIP_LIBTOOL)
+@@ -82,6 +82,22 @@ install(FILES ${outdir}/zzipwrap.pc
+         DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig" )
+ endif()
+ 
++if(ZZIP_COMPAT OR ZZIP_LIBTOOL)
++  if(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG)
++    execute_process(COMMAND bash -c "ln --help"
++        OUTPUT_VARIABLE ln_verbose_help
++        ERROR_QUIET
++    )
++    string(FIND "${ln_verbose_help}" "verbose" ln_verbose_found)
++    if(${ln_verbose_found} STREQUAL "-1")
++        set(ln_svf "ln -sf")
++    else()
++        set(ln_svf "ln -svf")
++    endif()
++    message(STATUS "Can symlink libraries with: ${ln_svf}")
++  endif()
++endif()
++
+ install(FILES ${libzzipwrap_HDRS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/zzip )
+ install(TARGETS libzzipwrap
+     LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+@@ -99,7 +115,7 @@ if(ZZIP_LIBTOOL)
          cd $DESTDIR/${libdir}
          [ -f ${lib}${libname}${librelease}${dll}.${libversion} ] || exit 0
          echo -n .. Installing: `pwd`
 -        ln -svf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${dll}
-+        ln -sf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${dll}
++        ${ln_svf} ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${dll}
          \")")
    endif()
  endif()



Home | Main Index | Thread Index | Old Index