Bug 210725 - databases/cppdb: Build with ninja to reduce build time
Summary: databases/cppdb: Build with ninja to reduce build time
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Thomas Zander
URL:
Keywords: easy, patch, patch-ready
Depends on:
Blocks:
 
Reported: 2016-06-30 16:18 UTC by Mohammad S. Babaei
Modified: 2016-07-17 06:55 UTC (History)
2 users (show)

See Also:


Attachments
The patch file against the port directory (488 bytes, patch)
2016-06-30 16:18 UTC, Mohammad S. Babaei
no flags Details | Diff
ninja build system patch for cppdb (322 bytes, patch)
2016-06-30 19:22 UTC, Mohammad S. Babaei
info: maintainer-approval+
Details | Diff
Adds ninja and cmake:outsource (332 bytes, patch)
2016-07-02 20:49 UTC, Mohammad S. Babaei
info: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mohammad S. Babaei 2016-06-30 16:18:26 UTC
Created attachment 171975 [details]
The patch file against the port directory

Replaces make with ninja to reduce build times.
Comment 1 VK freebsd_triage 2016-06-30 17:34:41 UTC
Thanks for the patch. If this just changes the build method and not the resulting package, then the PORTREVISION should not be bumped. Please correct and then flag the attachment with maintainer-approval(+) to help us track the issue through the "Maintainer Approved" saved search. Please do so for all your patches for ports you're maintainer of. ;)
Comment 2 Mohammad S. Babaei 2016-06-30 19:22:49 UTC
Created attachment 171979 [details]
ninja build system patch for cppdb

Thank you so much for the useful tips :)

Here is the new patch as you suggested.
Comment 3 Mohammad S. Babaei 2016-07-02 20:49:18 UTC
Created attachment 172045 [details]
Adds ninja and cmake:outsource

Sorry to pop-up this again. Recently I've been creating another port #210750 and from the porter's handbook I just learned cmake:outsource which builds outside the source tree which I found cleaner.

So, since I noticed that this patch has not been committed yet, this is my new patch that enables both ninja (from the recent patch) and cmake:outsource

Pardon me please.
Comment 4 commit-hook freebsd_committer 2016-07-17 06:47:04 UTC
A commit references this bug:

Author: riggs
Date: Sun Jul 17 06:46:46 UTC 2016
New revision: 418659
URL: https://svnweb.freebsd.org/changeset/ports/418659

Log:
  Build with ninja to reduce build time

  PR:		210725
  Submitted by:	info@babaei.net (maintainer)

Changes:
  head/databases/cppdb/Makefile
Comment 5 Thomas Zander freebsd_committer 2016-07-17 06:55:07 UTC
In a subsequent work, could you please look into the following:

When building with non-default OPTIONS, e.g.

====> SQLite 3 Backend: you have to select exactly one of them
     SQLITE3_DISABLE=off: Disable SQLite 3 backend
     SQLITE3_INTERNAL=on: Link SQLite 3 backend into CppDB
     SQLITE3_MODULE=off: Build SQLite 3 backend as a CppDB module
====> PostgreSQL Backend: you have to select exactly one of them
     PGSQL_DISABLE=off: Disable PostgreSQL backend
     PGSQL_INTERNAL=on: Link PostgreSQL backend into CppDB
     PGSQL_MODULE=off: Build PostgreSQL backend as a CppDB module
====> MySQL Backend: you have to select exactly one of them
     MYSQL_DISABLE=off: Disable MySQL backend
     MYSQL_INTERNAL=on: Link MySQL backend into CppDB
     MYSQL_MODULE=off: Build MySQL backend as a CppDB module
====> ODBC Backend: you have to select exactly one of them
     ODBC_DISABLE=off: Disable ODBC backend
     ODBC_INTERNAL=on: Link ODBC backend into CppDB
     ODBC_MODULE=off: Build ODBC backend as a CppDB module

the plist is incorrect. I get these from poudriere:
====> Running Q/A tests (stage-qa)
====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
===> Checking for items in pkg-plist which are not in STAGEDIR
Error: Missing: lib/libcppdb_mysql.a
Error: Missing: lib/libcppdb_mysql.so
Error: Missing: lib/libcppdb_mysql.so.0
Error: Missing: lib/libcppdb_mysql.so.0.3.1
Error: Missing: lib/libcppdb_odbc.a
Error: Missing: lib/libcppdb_odbc.so
Error: Missing: lib/libcppdb_odbc.so.0
Error: Missing: lib/libcppdb_odbc.so.0.3.1
Error: Missing: lib/libcppdb_postgresql.a
Error: Missing: lib/libcppdb_postgresql.so
Error: Missing: lib/libcppdb_postgresql.so.0
Error: Missing: lib/libcppdb_postgresql.so.0.3.1
Error: Missing: lib/libcppdb_sqlite3.a
Error: Missing: lib/libcppdb_sqlite3.so
Error: Missing: lib/libcppdb_sqlite3.so.0
Error: Missing: lib/libcppdb_sqlite3.so.0.3.1
===> Error: Plist issues found.

Thanks in advance!