Bug 206560

Summary: science/libkml: Library libminizip.a conflicts with the one of archivers/minizip
Product: Ports & Packages Reporter: Rainer Hurling <rhurlin>
Component: Individual Port(s)Assignee: Po-Chuan Hsieh <sunpoet>
Status: Closed FIXED    
Severity: Affects Only Me CC: d8zNeCFG, koobs, lbartoletti, rhurlin
Priority: --- Keywords: needs-patch, needs-qa
Version: LatestFlags: koobs: maintainer-feedback? (lbartoletti)
koobs: maintainer-feedback? (sunpoet)
koobs: merge-quarterly?
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patches to science/libkml and graphics/gdal to rename libkml's libminizip to libkmlminizip none

Description Rainer Hurling freebsd_committer freebsd_triage 2016-01-24 10:20:38 UTC
When I try to install science/libkml as a dependency of graphics/gdal, 'make install' gives the following error:

[..snip..]
Installing libkml-1.2_4...
pkg-static: libkml-1.2_4 conflicts with minizip-1.2.8_1 (installs files
into the same place).  Problematic file: /usr/local/lib/libminizip.a
*** Error code 70


This happens, because the static library libminizip.a from science/libkml conflicts with the one of archivers/minizip, which also is installed on my boxes. archivers/minizip is needed by other ports like multimedia/vlc, emulators/mupen64plus-core, and net-im/psi.

It would be nice, if we could disable the integrated minizip version of science/libkml, and use the port archivers/minizip instead. Unfortunately, my skills are not enough to prepare a patch for this :(
Comment 1 Loïc Bartoletti freebsd_committer freebsd_triage 2016-02-02 20:42:09 UTC
Hi,

I have identified the problem. libkml use third party in its code; there have already been a patch for expat. The problem is that the version of MINIZIP used not only very old but modified (libkml _... in sources). I think the easiest way is to keep their version of MINIZIP renaming the libkml_minizip; care should be taken to make links with this "new" lib.

Best regards.
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2016-02-04 07:06:54 UTC
@code, can/will you provide a patch to resolve this issue (whether make them not conflict, or add CONFLICTS)
Comment 3 Martin Birgmeier 2016-04-02 15:48:39 UTC
Created attachment 168897 [details]
patches to science/libkml and graphics/gdal to rename libkml's libminizip to libkmlminizip

Here are my patches to science/libkml and graphics/gdal to get rid of the conflict with the libminizip library from archivers/minizip by renaming libkml's library to libkmlminizip.

Notes:
- I did not check which other ports besides graphics/gdal might need to be patched to live with this modified sciene/libkml.
- The patches also upgrade libkml from version 1.2 to version 1.3, taken directly from the SVN repository. This should probably be fixed to use a regular release file.

Apply the patches in /usr/ports.

-- Martin
Comment 4 commit-hook freebsd_committer freebsd_triage 2016-04-07 13:29:22 UTC
A commit references this bug:

Author: sunpoet
Date: Thu Apr  7 13:28:47 UTC 2016
New revision: 412662
URL: https://svnweb.freebsd.org/changeset/ports/412662

Log:
  - Resolve conflict with archivers/minizip: rename libminizip to libkmlminizip
  - Bump PORTREVISION for science/libkml shlib change

  PR:		206560 (based on)
  Submitted by:	Martin Birgmeier <la5lbtyi@aon.at>

Changes:
  head/graphics/gdal/Makefile
  head/science/libkml/Makefile
  head/science/libkml/files/patch-examples-helloworld-Makefile.am
  head/science/libkml/files/patch-src-kml-base-Makefile.am
  head/science/libkml/files/patch-third_party-Makefile.am
  head/science/libkml/pkg-plist
Comment 5 Po-Chuan Hsieh freebsd_committer freebsd_triage 2016-04-07 13:33:49 UTC
Library renaming committed. Thanks!