[Bug 293666] devel/cgit: Fix builds in live environment, and add LUA option

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 08 Mar 2026 12:39:02 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293666

            Bug ID: 293666
           Summary: devel/cgit: Fix builds in live environment, and add
                    LUA option
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: jamie@catflap.org

Created attachment 268625
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=268625&action=edit
fix build and add lua option

1) Remove adding of "openssl" directories to git subtree. openssl isn't
   necessary here, and the resultant include of "/usr/local/include"
   poisions the git tree, causing it to not compile.
2) Add option to add the luajit engine to the install.
3) Reformat to satisfy portclippy and portfmt

Currently, the cgit port modifies the bundled Git Makefile to add ${OPENSSLINC}
and ${OPENSSLLIB} to ALL_CFLAGS and ALL_LDFLAGS. The bundled Git build does not
use OpenSSL. Injecting these paths can cause header precedence issues when
OpenSSL is installed from ports - /usr/local/include is added to the include
path, and some ports install header-files into /usr/local/include that clash
with the cgit build.
This leads to compilation failures, such as redefinition errors in diff_options
or pathspec.

I understand that in a clean poudriere build, this issue does not occur,
because no other headers are present in /usr/local/include.

The motivation for this patch is to handle real-world builds where users have
other ports installed that place headers in /usr/local/include. Without this
patch, compilation of cgit can fail due to header conflicts in the bundled Git
tree.

The patch is minimal, safe, and does not affect clean builds in poudriere. It
simply prevents unnecessary and potentially harmful injection of OpenSSL paths
into the bundled Git build. This ensures that both clean and “live”
environments compile correctly.

--- Comment #1 from Bugzilla Automation <bugzilla@FreeBSD.org> ---
Maintainer informed via mail

-- 
You are receiving this mail because:
You are the assignee for the bug.