Menu

#691 Extend LIBZIP support to FreeBSD (and maybe others)

Always occurs!
pending
nobody
None
5
2024-01-10
2024-01-05
No

Currently, LIBZIP is listed as Linux-only in the src/Makefile while in fact it should be supported just as well on any Unix-like/POSIX operating system. Consider the following patch which I use on FreeBSD (you could probably add NETBSD etc. there, but I haven't tested those):

@@ -1260,8 +1262,7 @@ ifdef CDMUS
 endif

 # LIBZIP
-# For now, Linux only.
-ifeq ($(OS), LINUX)
+ifneq ($(filter LINUX FREEBSD,$(OS)),)
   ifdef HAVE_DLOPEN
     LIBS+=-ldl
     OPTS+=-DHAVE_DLOPEN

Discussion

  • Wesley Johnson

    Wesley Johnson - 2024-01-05

    It was always the intention that all the -nix would be able to use a zip libaray.
    I did need someone from the various -nix to tell me it does work and if any changes are needed to find the library linked, and dynamically using dlopen().
    I was expecting that most FreeBSD users were just compiling as Linux, but I see now that at some time I had added a FreeBSD target compile.
    I will make such changes that you need to use all the capabilities.

    Does this mean that no other changes are needed, that dlopen and the libraries can be found in the same locations as on a standard Linux ??

     
  • Alexey Dokuchaev

    Does this mean that no other changes are needed, that dlopen and the libraries can be found in the same locations as on a standard Linux?

    Admittedly, I've only tested normal linking (that check guards the entire LIBZIP block), but will test dlopen(3) mode and reply later.

     
  • Wesley Johnson

    Wesley Johnson - 2024-01-10
    • status: open --> pending
     
  • Wesley Johnson

    Wesley Johnson - 2024-01-10

    Makefile patched SVN 1664.

     

Log in to post a comment.