Bug 185567

Summary: textproc/clucene: pkgconfig file is missing clucene-contribs-lib
Product: Ports & Packages Reporter: Olivier <bugs-freebsd>
Component: Individual Port(s)Assignee: FreeBSD Office Team <office>
Status: Closed Not Accepted    
Severity: Affects Only Me CC: jkim, robak, software-freebsd
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Olivier 2014-01-08 03:10:00 UTC
A year ago textproc/clucene-contrib was integrated into textproc/clucene, but the pkgconfig patch was not updated to include the new library.

Fix: This patch replaces patch-src__core__libclucene-core.pc.cmake
---
 src/core/libclucene-core.pc.cmake |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
How-To-Repeat: # pkg-config --libs "libclucene-core"
-L/usr/local/lib/ -lclucene-core -lclucene-shared
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2014-01-08 03:44:47 UTC
Responsible Changed
From-To: freebsd-ports-bugs->office

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 commit-hook freebsd_committer freebsd_triage 2015-03-15 08:51:23 UTC
A commit references this bug:

Author: robak
Date: Sun Mar 15 08:50:23 UTC 2015
New revision: 381307
URL: https://svnweb.freebsd.org/changeset/ports/381307

Log:
  textproc/clucene: fix missing lib in patch

  PR:		185567
  Submitted by:	Olivier <bugs-freebsd@interfasys.ch>

Changes:
  head/textproc/clucene/Makefile
  head/textproc/clucene/files/patch-src__core__libclucene-core.pc.cmake
Comment 3 Bartek Rutkowski freebsd_committer freebsd_triage 2015-03-15 08:51:59 UTC
Committed (adjusting the patch as necessary), thanks for your work!
Comment 4 Jung-uk Kim freebsd_committer freebsd_triage 2015-03-16 18:27:52 UTC
I don't understand the reason for this change.  As you can see from the file name, libclucene-core.pc is for *libclucene-core*.  Maybe you wanted to add libclucene-contrib.pc?  Anyway, this change must be reverted.
Comment 5 Jung-uk Kim freebsd_committer freebsd_triage 2015-03-16 20:27:20 UTC
% ldd /usr/local/lib/libclucene-core.so.1
/usr/local/lib/libclucene-core.so.1:
	libclucene-shared.so.1 => /usr/local/lib/libclucene-shared.so.1 (0x8017e8000)
	libz.so.6 => /lib/libz.so.6 (0x801a09000)
	libc++.so.1 => /usr/lib/libc++.so.1 (0x801c1f000)
	libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x801edf000)
	libm.so.5 => /lib/libm.so.5 (0x8020fc000)
	libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x802325000)
	libthr.so.3 => /lib/libthr.so.3 (0x802533000)
	libc.so.7 => /lib/libc.so.7 (0x800822000)

As you can see, patch-src__core__libclucene-core.pc.cmake was added by me to note that libclucene-core.so requires libclucene-shared.so.

https://svnweb.freebsd.org/changeset/ports/315888

However, libclucene-core.so does NOT require libclucene-contribs-lib.so.
Comment 6 Jung-uk Kim freebsd_committer freebsd_triage 2015-03-16 20:40:34 UTC
Sorry but I had to revert the commit.

https://svnweb.freebsd.org/changeset/ports/381438

Please let us know if you disagree with the decision.
Comment 7 Olivier - interfaSys sàrl 2015-03-17 09:11:26 UTC
@Jung-uk Kim, on January 28th 2013, you wrote: "Remove textproc/clucene-contrib because it is now integrated into textproc/clucene."

So where is it?

# pkg-config --libs "libclucene-contrib"
Package libclucene-contrib was not found...

# pkg-config --libs "libclucene-core"
-L/usr/local/lib/ -lclucene-core -lclucene-shared

My patch was simply to add the missing component to the location where it would be looked for, but you can add it wherever you want, as long as it's added somewhere.
Comment 8 Jung-uk Kim freebsd_committer freebsd_triage 2015-03-18 17:05:32 UTC
(In reply to Olivier - interfaSys sàrl from comment #7)
> @Jung-uk Kim, on January 28th 2013, you wrote: "Remove textproc/clucene-contrib because it is now integrated into textproc/clucene."
>
> So where is it?
>
> # pkg-config --libs "libclucene-contrib"
> Package libclucene-contrib was not found...

It never existed because the upstream never released one.  Also, we didn't have one when textproc/clucene-contrib was available.

https://svnweb.freebsd.org/ports/head/textproc/clucene-contrib/pkg-plist?revision=300897&pathrev=311136

> # pkg-config --libs "libclucene-core"
> -L/usr/local/lib/ -lclucene-core -lclucene-shared

As I said, I don't see anything wrong here, i.e., it correctly lists all necessary linker options.  In fact, we don't want to link everything with -lclucene-contribs-lib.  Overlinking is evil.

> My patch was simply to add the missing component to the location where it
> would be looked for, but you can add it wherever you want, as long as it's
> added somewhere.

You may write a patch to add libcluene-contrib-libs.pc as I said.  However, it won't be useful unless the upstream accepts the patch and releases it, which is very unlikely to happen at this point.
Comment 9 Jung-uk Kim freebsd_committer freebsd_triage 2015-03-18 17:13:02 UTC
(In reply to Jung-uk Kim from comment #8)
> You may write a patch to add libcluene-contrib-libs.pc as I said.

Of course, I meant to say "libcluene-contribs-lib.pc".  Sorry.