Bug 235376 - security/libdecaf: support more ARCHs by changing from gmake to cmake
Summary: security/libdecaf: support more ARCHs by changing from gmake to cmake
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: Kirill Ponomarev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-01 10:30 UTC by Ralf van der Enden
Modified: 2019-03-28 09:29 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (krion)


Attachments
change from gmake to cmake to support more ARCHs (4.40 KB, patch)
2019-02-01 10:30 UTC, Ralf van der Enden
no flags Details | Diff
change from gmake to cmake to support more ARCHs (+patch shlib version) (5.20 KB, patch)
2019-03-26 13:17 UTC, Ralf van der Enden
tremere: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf van der Enden 2019-02-01 10:30:02 UTC
Created attachment 201589 [details]
change from gmake to cmake to support more ARCHs

Since version 1.0.0 more architectures are supported than just amd64 (i386, arm32, arm64), but only when building with CMake (it has some nifty autodetection logic). Result is the SHLIB moves backwards from 1 to 0 though and the debug tools ristretto and shakesum are no longer built by default.

CMake insists on installing in ${LOCALBASE}/include/decaf, but that messes with autodetection of libdecaf for several ports (.ie powerdns, powerdns-recursor), so patched it to install in ${LOCALBASE}/include instead.

Poudriere buildlogs:
i386: https://pkg.cainites.net/data/latest-per-pkg/libdecaf/1.0.0_1/freebsd_12x32-system.log
amd64: https://pkg.cainites.net/data/latest-per-pkg/libdecaf/1.0.0_1/freebsd_12x64-system.log
Comment 1 Adriaan de Groot freebsd_committer freebsd_triage 2019-03-09 14:04:21 UTC
@Ralf: Wouldn't it make sense, then, to patch the CMakeLists.txt so it sets DECAF_SO_VERSION to 1? Then you're not messing with the soversion.

shakesum and ristretto are built when CMake option ENABLE_TESTS is on: which it is by default, so nothing really changes there.
Comment 2 Ralf van der Enden 2019-03-11 12:13:49 UTC
@Adriaan: you're right. I've added a patch to change DECAF_SO_VERSION to 1 to my local port. 

I do notice the tests are built, but with different names. And while some are installed using gmake, they're not installed using cmake. Question is, do we really need 'ristretto' and 'shakesum' binaries to be part of the port ? I don't think so.
Comment 3 Ralf van der Enden 2019-03-26 13:17:43 UTC
Created attachment 203159 [details]
change from gmake to cmake to support more ARCHs (+patch shlib version)


Added a patch to set shlib to the same number as when compiling using gmake (as suggested)
Comment 4 commit-hook freebsd_committer freebsd_triage 2019-03-28 09:29:41 UTC
A commit references this bug:

Author: krion
Date: Thu Mar 28 09:28:52 UTC 2019
New revision: 497007
URL: https://svnweb.freebsd.org/changeset/ports/497007

Log:
  Change from gmake to cmake to support more ARCHs.

  PR:		235376
  Submitted by:	Ralf van der Enden <tremere at cainites_net>

Changes:
  head/security/libdecaf/Makefile
  head/security/libdecaf/files/patch-CMakeLists.txt
  head/security/libdecaf/files/patch-Makefile
  head/security/libdecaf/files/patch-src_CMakeLists.txt
  head/security/libdecaf/pkg-plist