Commit Graph

10605 Commits

Author SHA1 Message Date
gdt 58a8ce4b04 mk/defaults/options.mk: Document tiff-unsupported option
This option affects graphics/tiff and adds back tools that upstream
has withdrawn from standard builds.
2024-03-25 00:55:02 +00:00
schmonz ff8dc746a8 macOS: avoid install popups for missing m4 or yacc.
NFCI on non-macOS or macOS with working /usr/bin/{m4,yacc}.

FCI on macOS with Command Line Tools 15.3.0.0.1.1708646388: packages
that don't properly declare m4 or yacc in USE_TOOLS will now silently
invoke no-op versions of those tools, rather than popping up the useless
CLT install dialog.

Post-freeze, we can consider switching to TOOLS_FAIL and/or generalizing
an optional mode in which invoking any undeclared tool on any platform
breaks the build.
2024-03-22 18:59:04 +00:00
schmonz c1fd8d0b26 macOS: fix false positives from xcrun --find.
xcrun lately seems to include PATH in its search, which means programs
that aren't part of Apple's developer tools get matched:

    :; xcrun --find mutt
    /opt/pkg/bin/mutt

xcrun also has a cache, so this can produce even odder results:

    :; xcrun --find yacc
    /opt/pkg/bin/yacc

    :; env - xcrun --find yacc
    /opt/pkg/bin/yacc

    :; xcrun --no-cache --find yacc
    /opt/pkg/bin/yacc

    :; env - xcrun --no-cache --find yacc
    xcrun: error: unable to find utility "yacc", not a developer tool or in PATH

Since xcrun has had the "--no-cache" argument dating back to at least
the days of OS X 10.6.8 with gcc 4.2.1 and Apple clang 1.7, add it to
"xcrun --find" commands (along with an empty PATH) for more
deterministic results.
2024-03-20 15:59:54 +00:00
schmonz ac40094c96 clang.mk: avoid slowing pbulk-index, use _PKGSRC_BARRIER. 2024-03-20 10:47:22 +00:00
nia 2cf8f33bfd mk: More BUILDLINK_TRANSFORMs to make software work with old versions
There is an existing rule that translates c++03 to c++0x for old
versions of GCC - this is iffy, GCC treats c++0x as an alias for c++11.

Rewrite c++03 to c++98 for older compilers instead.
2024-03-19 23:22:50 +00:00
schmonz 72da100b5a clang.mk: paper over new macOS and upstream defaults.
As soon as 2024Q1 branches, we should:

1. Do a bulk build with all these -Wno-error tweaks removed, so we can
   see how much is broken.
2. If it's "too much" breakage and we'll have to keep overriding these
   compiler defaults for "a while", find a way to accomplish them with
   fewer compiler invocations. (Some ideas: define a default
   FORCE_C_STD, or apply overrides keyed on CC_VERSION or similar.) Do
   a bulk build to make sure things continue to work as before.
3. Otherwise, fix as much as we can before 2024Q2. This will help with
   gcc 14 (which has many similar new defaults) as well.
2024-03-19 21:12:47 +00:00
nia 70c9cb3c49 mk: Some GCC versions don't have -std=c++03 but do understand -std=c++98 2024-03-17 14:15:59 +00:00
nia d8f302a7da openconnect: Add a libproxy option.
Compared to the rest of openconncet, it has some heavy C++ requirements.
2024-03-17 11:24:34 +00:00
nia 64afa4d5fd mk: DragonFly seems to also have sendfile(2). 2024-03-16 22:56:03 +00:00
nia db134f1ac6 mk: Introduce a OPSYS_HAS_SENDFILE feature flag 2024-03-16 22:55:42 +00:00
schmonz b889d0bc0d macOS: detect missing m4/yacc Command Line Tools.
CLT 15.3.0.0.1.1708646388 does not provide m4 or yacc. For these two
tools, don't default TOOLS_PLATFORM.foo to "/usr/bin/foo" unless the
backing CLT-provided foo binary is found. This lets the tools framework
fall back to something else, as intended.
2024-03-11 14:11:24 +00:00
wiz 9b23d34282 mk: improve disable-compile-inits description 2024-03-11 12:44:13 +00:00
wiz b8bf20f266 mk: describe sonic option, from adr 2024-03-11 08:04:47 +00:00
wiz 37b9fbe6d0 mk: wip -> lang 2024-03-08 12:45:50 +00:00
wiz 649c29016f mk: improve gcc ada support, using gcc13-gnat
From Dmytro Kazankov.
2024-03-08 12:03:23 +00:00
schmonz 91399cf6a4 Belatedly add BINCIMAP_LOG_USER. 2024-03-01 13:37:06 +00:00
jperkin c7db5b9eb7 mk/fetch: Remove -O from curl's FETCH_AFTER_ARGS.
Perhaps this was required in some ancient version of curl, but in any modern
version having both "-o filename" and "-O" (which means to use the remote
filename) only results in "Warning: Got more output options than URLs" messages
for every single download.
2024-02-21 10:53:28 +00:00
wiz 76cf18b809 mk: revert github fetch change for now, breaks too much
Ok pmc
2024-02-13 23:29:57 +00:00
adam 447fab5e9b fetch/github.mk: avoid "the given path has multiple possibilities" error 2024-02-11 15:26:38 +00:00
wiz 774487ec63 mk: describe new grub-efi option 2024-02-08 17:48:38 +00:00
wiz 2936c79f21 mk: add support for c++23/gnu++23 2024-01-27 00:03:49 +00:00
wiz 1a5f9b5f40 mk: add libraw and libarchive to options 2024-01-26 14:07:07 +00:00
riastradh 138d1f5d9b mk: Update `pkg_add -m' syntax in two more places.
(Why is anything outside mk/pkgformat/pkg using pkg_add?)

Gated on USE_CROSS_COMPILE=yes, so no impact on native builds.
2024-01-26 12:42:01 +00:00
riastradh 005b412e87 pkg_install: Fix mistake in previous: this is strchr, not strchrnul.
Either

	if ((q = strchr(p, '/')) == NULL)

or

	if (*(q = strchrnul(p, '/')) == '\0')

will work, but not

	if (*(q = strchr(p, '/')) == '\0')

which will crash with a null pointer dereference.  Let's get the
right version of this committed, not the wrong one!  Oops.

While here, reset PKGREVISION like I meant to do yesterday.
2024-01-26 12:40:04 +00:00
riastradh 649d78edb4 bsd.prefs.mk: Set cross MACHINE_ARCH/destdir right after bsd.own.mk.
This puts it before defaults/mk.conf, which has no effect here --
there's no default TARGET_ARCH, MAKEOBJDIR, or CROSS_DESTDIR in
defaults/mk.conf, and defaults/mk.conf is not affected by
MACHINE_ARCH (immediately, anyway), CROSS_DESTDIR, or _CROSS_DESTDIR.

Later we'll add more variables like MACHINE_ARCH here affected by a
TARGET_* variable, including OBJECT_FMT.  This will allow us to
handle OBJECT_FMT via TARGET_OBJECT_FMT before the next stanza which
provides OPSYS-based defaults for OBJECT_FMT.

No change for native builds since this only moves around a block
gated on USE_CROSS_COMPILE = yes.
2024-01-26 03:25:47 +00:00
riastradh 4aaa77ae1c bsd.prefs.mk: Set OBJECT_FMT for Darwin before cross variables.
This way it can be handled by the cross variable logic when the host
and target have misatched object formats, like building NetBSD
packages (ELF) on macOS (Mach-O).

This whole stanza can be removed when PR pkg/57837
(bootstrap-mk-files bsd.own.mk defines wrong OBJECT_FMT on macOS
(Darwin), https://gnats.NetBSD.org/57837) is fixed.

No functional change intended so far -- this just makes subsequent
patches easier to follow.
2024-01-26 03:25:36 +00:00
riastradh 6d8ffcd6e1 mk/pkgformat/pkg: Use extended `-m "OS/ARCH VER"' syntax.
Requires pkg_install>=20240125.

No change to native builds, not even the pkg_install requirement,
because this is conditional on cross builds.

Proposed on tech-pkg:
https://mail-index.netbsd.org/tech-pkg/2024/01/13/msg028825.html
2024-01-26 03:24:58 +00:00
riastradh 1e9fc5d1bc mk/endian.mk: Make this work for cross-builds. 2024-01-26 03:16:58 +00:00
riastradh 5d4c06f1c0 mk/configure: Use TOOLBASE, not LOCALBASE, for depcomp override.
This is run at build-time, not baked into installed packages.
2024-01-26 03:16:24 +00:00
nia f57ecf155b mk: Make MariaDB 10.11 the default MySQL implementation. 2024-01-23 14:59:32 +00:00
wiz 9bba9341bf mk: remove references to removed postgresql 11 2024-01-22 22:29:24 +00:00
taca daf5ae4bdc mk/defaults: Add ruby-rjit and update ruby-yjit
* Add ruby-rjit PKG_OPTION.
* Remove extra space from description for ruby-yjit
2024-01-21 08:17:37 +00:00
rillig 52f8150784 mk/check-files: actually enable CHECK_FILES_STRICT
The files in ERROR_DIR must not start with a dot, or they are simply
ignored.

No change in the default configuration, since CHECK_FILES_STRICT
defaults to no.
2024-01-21 03:12:56 +00:00
rillig 75b419418d mk/check-files: allow detection of packages that install outside PREFIX
An example package that does this is textproc/p5-Publican, many other
packages are fine.
2024-01-21 02:12:20 +00:00
rillig 5bb9c512fe mk/check-file: use common filename prefix in WRKDIR 2024-01-21 00:34:26 +00:00
rillig 9d800b7c41 mk/check-files: fix indentation of backslashes after ${RUN}
In 2008, when ${_PKG_SILENT}${_PKG_DEBUG} was replaced with the shorter
${RUN}, the backslashes were accidentally moved away from their
canonical position.
2024-01-21 00:21:42 +00:00
rillig 3a49159981 mk/check-files: clean up redundant 'defined' and variable alignment 2024-01-20 23:39:48 +00:00
rillig a45608946b mk/check-files: avoid leaning toothpicks syndrome
In the :C modifiers, there is no reason to use '/' as delimiter when the
search pattern or the replacement contains a literal '/' as well, which
then has to be escaped as '\/'.

While here, add two more variables to show-all-check-files, as pkglint
started warning about them.
2024-01-20 23:22:33 +00:00
rillig 5df61d4184 mk/check-files: fail more gracefully on typos in MAKE_DIRS_PERMS
Previously, building a package that had the wrong number of words in
MAKE_DIRS_PERMS failed with "can't shift that many", which didn't give a
hint at the underlying problem.  Now it fails immediately, pointing to
the line in check-files.mk that loops over MAKE_DIRS_PERMS and
OWN_DIRS_PERMS.
2024-01-19 18:41:16 +00:00
rillig e840c3454e mk/check: clean up check-fakehome and check-files 2024-01-19 00:42:01 +00:00
rillig 2e13f76d46 mk/check: remove documentation that was never implemented 2024-01-19 00:25:38 +00:00
rillig 8ca8fad43c mk/buildlink3: remove documentation about PKG_PHASE
The PKG_PHASE variable was removed with the addition of
mk/bsd.pkg.barrier.mk 1.1 from 2006-07-05.
2024-01-18 23:38:40 +00:00
riastradh 9b589d50ab buildlink3, mk/*.builtin.mk: Use TOOLS_CROSS_DESTDIR for file checks.
These are always about the target system, which during cross builds,
or native builds of cross-libtool-base, is relative to
TOOLS_CROSS_DESTDIR.

This is necessary for cross-libtool-base -- the one special package
that is built as a native package as if it were cross-compiled, so
_CROSS_DESTDIR is empty but TOOLS_CROSS_DESTDIR is the cross destdir
-- because cross-libtool-base uses buildlink3 and dlopen.builtin.mk.

No change to native builds because _CROSS_DESTDIR and
TOOLS_CROSS_DESTDIR are both empty in native builds.

XXX Perhaps almost every use of _CROSS_DESTDIR outside mk/pkgformat
should be replaced by TOOLS_CROSS_DESTDIR.
2024-01-13 20:26:47 +00:00
riastradh f5638d3cce bsd.prefs.mk: Unconditionally define TOOLS_CROSS_DESTDIR.
- If we're cross-compiling or building cross-libtool-base, alias for
  CROSS_DESTDIR.

- Otherwise, empty.

This will be convenient for sprinkling TOOLS_CROSS_DESTDIR in various
places throughout mk/ without worrying about disrupting native
builds.

No change to native builds here because all current references are
conditional on USE_CROSS_COMPILE = yes.
2024-01-13 20:21:23 +00:00
riastradh 65ee47057e mk/buildlink3: Use NATIVE_PKG_INFO_CMD for _BNK_PKG_INFO.${_pkg_}.
This is executed at build-time, not baked into the target package to
execute at run-time, so we need the native pkg_info command that can
be executed at build-time.

No change to native builds, where NATIVE_PKG_INFO_CMD is the same as
PKG_INFO_CMD.

(PKG_INFO, used above in _BLNK_PKG_DBDIR.${_pkg_}, is already defined
in terms of NATIVE_PKG_INFO_CMD, so no need to change anything for
_BLNK_PKG_DBDIR.${_pkg_}.)
2024-01-13 20:21:04 +00:00
riastradh 6f4896d6e3 gnu-configure.mk: Don't use _OPSYS_MAX_CMDLEN_CMD in cross-builds.
This is a command to be run in the target system, so it doesn't work
to run it at build-time, which might be a different architecture and
operating system altogether giving unrelated answers.

No change to native builds because this just makes some existing
logic conditional on native builds.
2024-01-13 20:09:28 +00:00
jnemeth 308d3276ce add missing and upcoming sendmail options 2024-01-11 12:07:58 +00:00
schmonz 99d7598ab8 Document mercurial option, used in at least ikiwiki. 2024-01-10 19:36:37 +00:00
gutteridge 2551fc9771 options.description: spaces -> tabs for previous commit 2024-01-10 00:51:44 +00:00
gutteridge 720c7ae916 options.description: add botan & libyang 2024-01-10 00:49:03 +00:00