summaryrefslogtreecommitdiff
path: root/mk/configure
AgeCommit message (Collapse)AuthorFilesLines
2022-11-23mk: Miscellaneous performance improvements.jperkin1-4/+5
Inline ${RUN} calls where appropriate. Call mkdir directly rather than via a shell when invoked as a single command. Avoid unnecessary mkdir calls.
2022-08-12cmake.mk: strip only for targets have USE_LANGUAGESadam1-2/+2
2022-08-05cmake.mk: install stripped binariesadam1-1/+5
2022-04-04mk: Cross-eyed hacks to support cross-libtool.riastradh1-2/+2
For a long time, when cross-building, say from native=amd64 to target=powerpc, it was necessary to: 1. cross-build a _powerpc_ package called cross-libtool-base-powerpc, and then 2. install the powerpc package _natively_ with `pkg_add -m x86_64' to override the architecture check that normally forbids this kind of shenanigans, in order to cross-build anything that uses libtool as a tool. This is partly because libtool doesn't follow the normal GNU convention of `./configure --build=<native platform> --host=<platform package will run on> --target=<platform package is configured to operate on>' -- in this example, build=amd64, host=amd64, target=powerpc. Instead, libtool expects to be cross-built itself, even if it's going to run as a tool. It's not as bonkers as it sounds at first: libtool is just a shell script, and it caches various information about the (cross-building!) toolchain it is built with so it can use that information later when it is run as a tool itself to cross-compile other software. To make this work, we need to create the toolchain wrappers for libtool _as if_ we were cross-building even if we are building a native package. So mk/tools uses a new flag TOOLS_USE_CROSS_COMPILE instead of USE_CROSS_COMPILE, and libtool internally sets MACHINE_ARCH=${TARGET_ARCH} (in the example above, powerpc) to make it look like we're cross-building. The new TOOLS_CROSS_DESTDIR is an alias for the (defaulted) CROSS_DESTDIR, which must now be set unconditionally in mk.conf in order for libtool to know where the cross-destdir will be; _CROSS_DESTDIR remains empty when building any native packages (including the native cross-libtool package). Finally, we need to make the resulting package be a native package, with MACHINE_ARCH set to the one that it will be installed on (in the example above, amd64), so I added an indirection _BUILD_DEFS.${var} to replace var on its own in the build definitions that get baked into the package, shown by `pkg_info -B'. Setting _BUILD_DEFS.MACHINE_ARCH=${NATIVE_MACHINE_ARCH} ensures that this mutant hybrid cross-built libtool still produces a native package. All of this logic is gated on setting USE_CROSS_COMPILE in mk.conf or LIBTOOL_CROSS_COMPILE in the package makefile, so it should be safe for non-cross-builds -- when USE_CROSS_COMPILE=no and you're not building cross-libtool, everything is as before.
2021-11-09replace-interpreter.mk: update a commentgutteridge1-2/+2
2021-10-20mk/configure/cmake: Add comments about cmakegdt1-1/+8
Explain that we should probably use cmake's RPATH support instead of turning it off and passing it via LDFLAGS, but that this change seems somewhat risky. (This is a comment-only change.)
2021-09-09(replace-interpreter.mk) Add REPLACE_R, tks rillig@ and greg@mef1-2/+11
2021-07-17mk: Enforce arm64 host CPU for Darwin/aarch64.jperkin1-1/+4
Fixes builds inside an x86_64 chroot where packages add x86-specific flags based on the output of uname even though we're building for aarch64. CMake provides the CMAKE_APPLE_SILICON_PROCESSOR variable for this situation.
2020-08-12Add CMAKE_INSTALL_NAME_DIR, a package-settable variable containing theschmonz1-2/+7
destination directory to install shlibs. It's used on macOS by install_name_tool(1). The default is ${PREFIX}/lib.
2020-06-13mk/configure: Replace SET(CMAKE_MODULE_PATH... like 'set' too.ryoon1-2/+4
This will break print/scribus-qt4. It uses CMAKE_MODULE_PATH as not a directory list. It is wrong assumption.
2020-06-07mk/configure/replace-interpreter.mk: clean up show-all-interp variablesrillig1-4/+3
2020-05-23mk/configure: fix configure options check for custom CONFIGURE_SCRIPTrillig1-3/+6
Seen in cross/arm-none-eabi-gdb.
2020-05-22mk/configure: fix check for unknown configure optionsrillig1-2/+2
2020-05-21mk/configure: remove outdated documentationrillig1-6/+1
2020-05-21mk/configure: add variable GNU_CONFIGURE_QUIETrillig1-1/+13
This allows bulk builds or other setups to see interesting error messages, without them being hidden in the noise of "checking ...".
2020-05-21mk/configure/gnu-configure.mk: disable built-in option checkrillig1-4/+2
The rewritten check for unknown configure options already checks for options that are not defined anywhere. After that, the configure scripts don't need to check for these options anymore since all remaining options are known to the package, in at least one of its configure scripts.
2020-05-21mk/configure: completely rewrite check for unknown configure optionsrillig2-95/+42
The previous implementation could not reliably detect outdated configure options. This was apparent in devel/gettext-tools, where the option --with-included-libcroco had become unknown between May 2019 and May 2020, but the check was not run. The behavior is the same in the pkgsrc default configuration. Only if GNU_CONFIGURE_STRICT=yes, the new check is activated and will make packages fail that previously succeeded to build. Since that variable is not widely known, there won't be much sudden breakage, if any.
2020-05-18mk/configure/replace-interpreter.mk: silently skip broken symlinksrillig1-5/+5
Like directories, they probably come from shell globs. Seen in misc/byobu.
2020-05-12mk/configure/cmake.mk: allow no-op SUBST blockrillig1-1/+2
For example, graphics/openjpeg on SunOS doesn't need it.
2020-05-04mk/configure/pkg-config-override.mk: ignore no-op SUBST blocksrillig1-1/+2
There are many .pc files that don't have a "Libs:" line. That is totally ok, therefore just skip these files.
2020-03-30mk/configure/replace-localedir.mk: allow SUBST to be a no-oprillig1-1/+2
Since the SUBST_FILES of this class are generated by running find(1) in WRKSRC, there may be files that are unaffected by the substitution.
2020-03-24replace-interpreter: make documentation more preciserillig1-4/+4
There are several places in pkgsrc where the files to be patched are listed individually instead of just saying util/*/*.sh. This is unnecessarily detailed. Encourage package authors to use filename patterns more often. An example is REPLACE_PYTHON in lang/clang, which currently fails because some of the listed files don't exist anymore.
2020-03-22mk/configure/replace-interpreter.mk: add missing empty linerillig1-1/+2
The optional /usr/bin/env is independent from sh. It applies to all languages.
2020-02-23mk/configure: fix configure-env to cd to the correct directoryrillig1-2/+2
The previous "cd ${d}" had been a left-over from the .for loop around CONFIGURE_DIRS.
2020-02-09mk/configure: add configure-env targetrillig1-1/+28
This allows easy inspection of the realistic environment in which the configure scripts are run. The code is copied from the similar build-env target. This might help to find the cause for pkg/54894, where "gcc -dumpversion" is said to output 0 as the version number.
2019-10-06mk/configure: add more keywords for bmake helprillig1-2/+2
2019-09-02mk: use a single form for headings in the documentation commentsrillig1-2/+2
2019-05-07mk: allow "bmake clean depends" as shortcutrillig2-5/+5
When "bmake clean depends" was called for a package where the various cookie files already existed, these would enable different rules than a clean package directory. Since "bmake clean" deletes all the cookie files before "bmake depends" starts, in these combined command lines the cookie files must be treated as absent.
2019-05-04mk/configure: assist in finding unrecognized configure optionsrillig2-10/+119
Instead of giving instructions, just to the work automatically as far as it can be automated.
2019-05-04mk/configure: document how to fix GNU_CONFIGURE_STRICT failuresrillig1-1/+10
2019-04-28mk/configure: when there are multiple CONFIGURE_DIRS, print current dirrillig1-1/+4
This helps to find out which of the several configure scripts has problems, for example when checking for unknown command line options using GNU_CONFIGURE_STRICT.
2019-04-28mk/configure: mention CONFIGURE_DIRS in show-all-configurerillig1-2/+3
2019-04-20mk: fix pkglint warnings about ambiguous variablesrillig1-2/+2
When a Makefile fragment contains $0, this means a Makefile variable, not a shell or AWK variable. The bug in ccc.mk survived unnoticed for almost 15 years. The bug in gnu-configure.mk for MirBSD got only half as old.
2019-04-03mk/configure: allow strict option checking for GNU configure scriptsrillig1-2/+22
When a GNU configure script is run with unknown --enable, --disable, --with or --without options, it doesn't fail but just prints a warning. This hides outdated package definitions that may still pass options that have been removed already. See https://mail-index.netbsd.org/pkgsrc-users/2019/04/02/msg028272.html for a recent case. The default behavior doesn't change. After a period of testing this new check, the check is expected to become enabled by default so that future problems like this are prevented.
2019-02-18replace-interpreter.mk: support REPLACE_PERL6.bsiegert1-2/+11
This is basically the same as REPLACE_PERL, except that there is a default for ${PERL6} inline if it is not otherwise defined.
2018-11-30mk/misc: make configuration for show-all targets more configurablerillig1-1/+3
Up to now, there was a central list of variable name patterns that defined whether a variable was printed as a sorted list, as a list or as a single value. Now each variable group decides on its own which of the variables are printed in which way, using the usual glob patterns. This is more flexible since different files sometimes differ in their naming conventions. Two variable groups are added: license (for everything related to LICENSE) and go (for lang/go).
2018-04-17Print a message if REPLACE_INTERPRETER does not change anything (similar to ↵adam1-2/+7
SUBST_)
2018-04-08add support for CMAKE_PKGSRC_BUILD_FLAGSchuck1-1/+12
CMAKE_PKGSRC_BUILD_FLAGS If set to yes, disable compiler optimization flags associated with the CMAKE_BUILD_TYPE setting (for pkgsrc these come in from the user via variables like CFLAGS). The default is yes, but you can set it to no for pkgsrc packages that do not use a compiler to avoid cmake "Manually-specified variables were not used by the project" warnings associated with this variable.
2018-03-11mk/configure/replace-interpreter.mk: document variables for show-allrillig1-1/+10
2018-03-11mk/configure/replace-interpreter: add "make help" keywordsrillig1-2/+3
2017-12-27mk/configure/cmake.mk: Fix typos in comments.wiz1-4/+4
2017-03-06Update libtool packages to 2.4.6.jperkin1-1/+5
Changes since 2.4.2 are too numerous to mention, with over 4,700 lines in the ChangeLog file. However, this release does at least fix a large number of build failures on SmartOS, and doesn't appear to cause any obvious regressions in bulk builds performed by Joerg and myself. Some pkgsrc cleanups while here, including merging the MirBSD patches correctly. It couldn't be made much clearer how to properly integrate patches here to ensure they are not lost. Next time you might not be so fortunate!
2016-10-21Add support for overloading CMAKE_INSTALL_PREFIXkamil1-2/+7
By default CMAKE_INSTALL_PREFIX points to PREFIX, but some software requres custom subprefix. At least blender and brlcad are in this category. To set new prefix it's sufficient to set CMAKE_INSTALL_PREFIX in a package, for example (in brlcad): CMAKE_INSTALL_PREFIX=${PREFIX}/brlcad Reviewed by <joerg> and <jperkin>.
2016-02-24Remove overrides for OPENAL_INCLUDE_DIR and OPENGL_INCLUDE_DIR. Thesejperkin1-3/+1
conflict with pkgsrc versions of those packages, and do not interact well with the wrappers anyway as cmake will perform simple file-based tests for headers but the compiler will be unable to find them.
2016-02-23Add a new override mechanism for depcomp, similar to the existingjoerg1-5/+33
overrides for libtool. This allows us to easily get the fixed version from our libtool in place without having to hunt down for the specific bugs in random places. Disable the override explicitly in clisp, which installs a copy without explicitly depending on libtool at run time.
2015-05-04Drop _LIBTOOL and _SHLIBTOOL and make LIBTOOL and SHLIBTOOL point to thejoerg1-3/+3
wrapped version by full path. This fixes some cases where the wrappers have been bypassed. lang/lua52 triggered the investigation as it failed to link against libreadline, which should have been translated to libedit. Tested by jperkin and myself with full bulk builds.
2014-09-06Introduce CMAKE_USE_GNU_INSTALL_DIRS,obache1-5/+13
If set to yes, set GNU standard installation directories with pkgsrc configured settings for cmake GNUInstallDirs module. The default is yes.
2014-08-23Add CMAKE_PREFIX_PATH variable that can be used by packages that installwiz1-1/+13
their files in non-standard locations (e.g., qt5). From Niclas Rosenvik.
2014-08-23Prevent to update timestamp of configure script with pkgsrc specific override.obache1-1/+3
It may be triger of unwanted rebuild.
2014-07-21iRename SUBST_CLASS to _pkgconfig (adding a '_') to avoid conflictswiz1-8/+8
with packager-chosen prefixes (as with portaudio-devel recently).