Bug 246059 - security/clamav: fix build with non-default LOCALBASE, PREFIX
Summary: security/clamav: fix build with non-default LOCALBASE, PREFIX
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Li-Wen Hsu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-30 13:14 UTC by John Hein
Modified: 2020-07-06 04:52 UTC (History)
2 users (show)

See Also:
yasu: maintainer-feedback+


Attachments
[patch] fixes for non-default LOCALBASE, PREFIX (1.45 KB, patch)
2020-04-30 13:14 UTC, John Hein
yasu: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Hein 2020-04-30 13:14:20 UTC
Created attachment 213955 [details]
[patch] fixes for non-default LOCALBASE, PREFIX

The attached patch fixes the security/clamav build if LOCALBASE != /usr/local and/or PREFIX != LOCALBASE.


Some of the issues that were encountered before this patch (with default OPTIONS) are shown below (build log excerpts):


When LOCALBASE != /usr/local:

checking for libxml2 installation... not found
configure: error: ****** Please install libxml2 packages!


checking for libcurl installation... configure: error: libcurl not found. libcurl (e.g. libcurl-devel) is required in order to build freshclam and clamsubmit.


              clamsubmit  : no (missing libjson-c-dev. Use the website to submit FPs/FNs.) (disabled)
  .
  .

===> Checking for items in pkg-plist which are not in STAGEDIR
Error: Missing: bin/clamsubmit
Error: Missing: man/man1/clamsubmit.1.gz




And when PREFIX != LOCALBASE:

===> Checking for items in STAGEDIR missing from pkg-plist
Error: Orphaned: /usr/local/lib/lib%%CLAMAVUSER%%.so
Error: Orphaned: /usr/local/lib/lib%%CLAMAVUSER%%.so.9
Error: Orphaned: /usr/local/lib/lib%%CLAMAVUSER%%.so.9.0.4
Error: Orphaned: /usr/local/lib/libclamunrar.so
Error: Orphaned: /usr/local/lib/libclamunrar.so.9
Error: Orphaned: /usr/local/lib/libclamunrar.so.9.0.4
Error: Orphaned: /usr/local/lib/libclamunrar_iface.so
Error: Orphaned: /usr/local/lib/libclamunrar_iface.so.9
Error: Orphaned: /usr/local/lib/libclamunrar_iface.so.9.0.4
Error: Orphaned: /usr/local/lib/libfreshclam.so
Error: Orphaned: /usr/local/lib/libfreshclam.so.2
Error: Orphaned: /usr/local/lib/libfreshclam.so.2.0.0
===> Checking for items in pkg-plist which are not in STAGEDIR
Error: Missing: lib/lib%%CLAMAVUSER%%.so
Error: Missing: lib/lib%%CLAMAVUSER%%.so.9
Error: Missing: lib/lib%%CLAMAVUSER%%.so.9.0.4
Error: Missing: lib/libclamunrar.so
Error: Missing: lib/libclamunrar.so.9
Error: Missing: lib/libclamunrar.so.9.0.4
Error: Missing: lib/libclamunrar_iface.so
Error: Missing: lib/libclamunrar_iface.so.9
Error: Missing: lib/libclamunrar_iface.so.9.0.4
Error: Missing: lib/libfreshclam.so
Error: Missing: lib/libfreshclam.so.2
Error: Missing: lib/libfreshclam.so.2.0.0



../libclamav/.libs/libclamav.so: undefined reference to `X509_CRL_get0_nextUpdate'
../libclamav/.libs/libclamav.so: undefined reference to `EVP_MD_CTX_free'
../libclamav/.libs/libclamav.so: undefined reference to `EVP_MD_CTX_new'
Comment 1 John Hein 2020-04-30 13:18:20 UTC
The patch also sorted CONFIGURE_ARGS since it was touching some of those args (just a cosmetic change).
Comment 2 John Hein 2020-05-06 19:57:13 UTC
Fixed spelling of port in the title.
That probably kept the auto-notification robot from forwarding this to the maintainer, so explicitly set the feedback flag to maintainer.
Comment 3 Yasuhiro KIMURA 2020-05-18 10:17:00 UTC
Thank you for patch. I confirmed your patch works fine with both default (/usr/local) and custom (/opt) LOCALBASE.
Comment 4 commit-hook freebsd_committer 2020-07-03 14:54:50 UTC
A commit references this bug:

Author: lwhsu
Date: Fri Jul  3 14:54:10 UTC 2020
New revision: 541115
URL: https://svnweb.freebsd.org/changeset/ports/541115

Log:
  Fix build with non-default LOCALBASE, PREFIX

  PR:		246059
  Submitted by:	John Hein <jcfyecrayz@liamekaens.com>
  Approved by:	Yasuhiro KIMURA <yasu@utahime.org> (maintainer)

Changes:
  head/security/clamav/Makefile