Commit graph

63 commits

Author SHA1 Message Date
joerg
2b4c4d15f1 Always set both --host and --build, a number of programs want to use
a cross-compile like environment otherwise.
2009-09-12 00:52:45 +00:00
rillig
14faa7757b One more variable for show-all-gnu-configure. 2008-11-29 12:29:35 +00:00
markd
29286b7c5f Tell cmake not to muck with rpath's as it seems to interact badly with
pkgsrc.
2008-09-13 11:09:58 +00:00
rillig
3425bf4596 Oops, fixed a typo. 2008-02-13 09:13:31 +00:00
rillig
102b3c5eb6 Documented the interface to packages. Renamed the targets to emphasize
that they are private to the current file.
2008-02-13 09:12:15 +00:00
rillig
66736dde43 Replaced _PKG_SILENT and _PKG_DEBUG with RUN. 2008-02-07 21:36:13 +00:00
rillig
d3624fdf10 Made the .include directives simpler, since the directory of the
including file is always the first in the search path.
2008-01-04 01:46:24 +00:00
abs
dc2c1fec59 remember to close() the "ls -l " exprs, lest we run out of file descriptors 2007-12-20 18:51:18 +00:00
markd
4767fe7dc4 Doing USE_TOOLS+=cmake in the configure stage is too late so move it
to tools.  Also cmake wants cpack to exist in the same directory so
toolise it and make cmake and cpack imply each other.
2007-12-18 10:18:39 +00:00
markd
ec09af76f0 Add support for cmake as a tool (USE_TOOLS+=cmake) and for using it in
the configure stage of a build (by setting USE_CMAKE=yes).
2007-12-12 01:00:38 +00:00
rillig
9fab8079e7 Removed _INTERACTIVE_COOKIE, after asking on tech-pkg if anyone needs
it. It had only been used to change the "nerrors" variable in bulk
builds, but this variable is not used further anyway.
2007-12-01 11:11:53 +00:00
rillig
3a2689c94c Added keywords for "bmake help". 2007-11-28 08:48:11 +00:00
rillig
e27c4fc2e0 Moved the pre-configure-checks-hook below do-configure-pre-hook, so that
REPLACE_INTERPRETER takes place before the portability check. Shell
scripts that will use bash anyway do not need to be checked for
portability problems.
2007-11-01 08:37:24 +00:00
joerg
29777c8ec5 Begin adding some of the basic, non-intrusive pieces of the
cross-compile support.

- NATIVE_MACHINE_GNU_ARCH, NATIVE_LOWER_ARCH, NATIVE_MACHINE_ARCH,
  NATIVE_MACHINE_PLATFORM and NATIVE_MACHINE_GNU_PLATFORM work
  like the counterpars without NATIVE_ prefix. Expansion of
  NATIVE_LOWER_ARCH and NATIVE_MACHINE_ARCH is enforced early,
  so that MACHINE_ARCH can be overriden in mk.conf to specify the
  target architecture.
- Provide a default of NO for USE_CROSS_COMPILE. This will be the
  main switch to activate cross-compiling and adding it now makes
  it possible to merge more of the patches for specific packages.
- Set --build and --host when cross-compiling, the former using the
  just added variable NATIVE_MACHINE_GNU_PLATFORM.

Supported-by: Google SoC 2007
Looks good: jlam@
2007-08-01 16:14:17 +00:00
joerg
f493ba1049 Add REPLACE_KSH similiar to REPLACE_BASH and REPLACE_SH as the
CHECK_INTERPRETER bulk build has shown a surprising number of
packages using it.
2007-07-28 00:42:33 +00:00
rillig
c6b4400da0 Documented PKGCONFIG_OVERRIDE and PKGCONFIG_OVERRIDE_STAGE. 2007-07-25 18:07:34 +00:00
jlam
13ed6251eb No longer pass install_sh in the environment to GNU configure scripts.
We fix GNU configure script stupidity by directly replacing the stock
install-sh script provided by the software with the BSD install-compatible
sysutils/install-sh script.

A new package-settable variable comes to life:

INSTALL_SH_OVERRIDE is a list of files relative to WRKSRC which
	should be overridden by the install-sh script from
	sysutils/install-sh.  If not defined or set to "no", then
	no files are overridden.

	Possible values: no, defined, undefined.

	Default value: defined when GNU_CONFIGURE is defined, undefined
	otherwise.

Get rid of the install_sh tool, which is no longer needed.
2007-07-12 18:59:15 +00:00
rillig
431fbeeba1 For GNU-style configure scripts, the environment variable install_sh
must point to a shell script (as the name implies), not to a binary.
2007-06-04 12:10:20 +00:00
rillig
66bf916302 For all those who are interested in the inner workings of pkgsrc, there
is a new target "show-all" that fits to the existing "debug",
"show-tools", "show-vars" targets. It prints a list of the variables
that make up the public interface to pkgsrc. Running this target is
especially useful if you want to do some things, you know that they must
have been implemented but you don't know what it is called. It also
shows the "class" of a variable (user-defined, package-defined,
system-defined).
2007-03-15 22:54:24 +00:00
rillig
1de2f00cda Moved the definition of CONFIG_SHELL from gnu-configure.mk to configure.mk.
Improved the documentation.
2007-03-15 11:20:40 +00:00
rillig
18851a0799 Better documentation. 2007-03-08 23:58:20 +00:00
rillig
df8fff7998 Renamed the configure-cookie target to _configure-cookie. 2007-03-07 01:27:27 +00:00
wiz
a26ed30484 Update SCRIPTS_ENV description. 2007-03-01 18:30:36 +00:00
rillig
ec83695b2a Added the variable CONFIG_SHELL_FLAGS that is intended to be set to -x
on the command line when nothing else helps.

Added the configure-help target that runs configure --help.
2007-01-08 02:26:03 +00:00
rillig
0cbec72809 Documented OVERRIDE_GNU_CONFIG_SCRIPTS. 2007-01-07 08:50:38 +00:00
rillig
3911155e2f Moved the portability checks from the configure/ directory to checks/,
since according to the comment in check/bsd.check.mk, they belong there.

Added a new check for all C and C++ header files to make sure they don't
contain strings like ${prefix} or ${exec_prefix}, which is currently a
problem with sysutils/dbus and has been noticed in PR 35019. This check
is disabled by default since I don't know anything about possible false
positives, but I plan to enable it for PKG_DEVELOPERs after some
testing.

Added two names for hooks that are placed in the configure and in the
build phase. Now the checks look more like becoming something one could
call a framework, sharing a common structure and a documented interface.
2006-11-09 02:53:15 +00:00
rillig
3053f12ee8 Normalized the way test(1) is used. Since I have no idea whether ${TEST}
or [] is better, I have used [ to keep the code shorter. Noticed by wiz.
2006-11-05 12:40:01 +00:00
rillig
7104495b24 The config.guess, config.sub and libtool files should also be
overwritten when the package-provided files are (possibly dead)
symlinks. Since on Mac OS X, ls(1) does not return the status I
expected, I investigated a little in the available options of test(1),
and found that the "-h" option should be quite portable. So let's try
that instead.

This fixes PR 34865.
2006-11-05 07:41:06 +00:00
rillig
4c23a4cfdf Added a "see also" entry. 2006-10-29 20:12:49 +00:00
tv
4b29649f1c PKG_DEVELOPER is a defined check; it doesn't need to equal the string "yes". 2006-10-26 14:42:53 +00:00
rillig
9916b8544c Added the CHECK_PORTABILITY_SKIP variable that may be defined by packages
to exclude some files from the portability checks.
2006-10-23 16:07:12 +00:00
rillig
135672e722 If ${WRKSRC} does not yet exist in the configure phase, skip the
portability checks. Needed for the emulators/compat?? packages.
2006-10-21 19:07:18 +00:00
rillig
edbaa66414 Documented a not-so-easily-fixed bug that occurs when stripping comments
off a line.
2006-10-21 10:37:48 +00:00
rillig
f4a3dfca23 Warnings must only be prefixed by a warnings heading, not an error
heading.
2006-10-12 20:36:34 +00:00
rillig
636b8b0e77 Portability checks, version two.
The actual check has moved into a shell file to allow for nice-looking
code. Instead of only the configure scripts, it scans all files whose
first line matches "#!*/bin/sh". Therefore the check is run no matter if
HAS_CONFIGURE is set or not.

Added a warning (not an error) for every use of $RANDOM that is not
combined with $$, the process ID. $RANDOM is only implemented by bash
and some versions of the ksh.
2006-10-12 17:57:05 +00:00
rillig
c6fdabdf40 If a word in a configure script is "#", stop scanning that line for
"test ==".
2006-10-05 10:52:40 +00:00
rillig
5305a8ebc5 Replaced "test -f" with "ls". That way, broken symbolic links are also
replaced with the pkgsrc versions of libtool, config.guess and others.
2006-10-05 02:59:54 +00:00
rillig
ecd4e9d40b It's SKIP_PORTABILITY_CHECK, not SKIP_PORTABILITY_CHECKS. 2006-10-05 02:58:28 +00:00
rillig
48263488c5 Some fixes:
- PKG_DEVELOPER may be undefined, meaning "no".
- Removed unused variables.
- Removed a trailing empty line.
2006-10-02 16:16:14 +00:00
rillig
dba58f8d58 Added a new compile-time check that detects the usage of the "=="
operator in test(1). It is enabled by default when PKG_DEVELOPER is
selected.

In my private bulk build of about 3700 packages, there had been no false
positive.
2006-10-02 15:42:47 +00:00
rillig
262f164d43 Bugfix: In the #! interpreter lines, allow white-space behind the #!.
This fixes the build for audio/madman. Before, only some of the
interpreters had been replaced.
2006-09-19 20:51:34 +00:00
salo
4d7889fa96 Add "itlocaledir" to the list of directory patterns to replace.
From Gilles Dauphin via PR pkg/34103
2006-08-03 16:49:48 +00:00
rillig
be75f6ee56 The intention behind REPLACE_BASH was to make replacing /bin/sh with
${BASH} easy, so the pattern that is replaced is now .*sh instead .*bash.
2006-07-27 14:51:54 +00:00
jlam
6a569e5eb8 After auditing all the packages the ensure that they never invoke the
compiler toolchain until the configure stage, move the "wrapper" stage
back to between "patch" and "configure".

This makes "make extract NO_DEPENDS=" work again for all packages.
2006-07-27 13:47:29 +00:00
jlam
7e75e0ad89 The proper phase to run just before "configure" is "patch", not
"wrapper", after "wrapper" was moved to be between "tools" and "extract".
This should fix PR pkg/34061.
2006-07-23 15:33:16 +00:00
jlam
77b719dae8 Modify the barrier so that we always invoke the recursive make process
when passing through the barrier.  This ensures the PATH (passed via
PKGSRC_MAKE_ENV) is correctly set for all phases after the barrier.

This fixes a bug in "interactive" pkgsrc use, where if you have no
work directory and type "make build && make install", then the "install"
step does not have a PATH set to include all the wrapper and tools
directories.
2006-07-22 16:31:35 +00:00
jlam
4011c5cff2 Rearrange sequence so that "wrapper" occurs between "tools" and
"extract".  This allows all user-definable targets (pre-*, do-*,
post-*) to have access to the wrapper scripts.
2006-07-21 14:21:28 +00:00
jlam
7c21fc1820 Change last instance of _REPLACE.* to REPLACE.*. Remove special
_REPLACE.* handling from replace-interpreter.mk.
2006-07-20 13:54:44 +00:00
jlam
f1759fb181 Handle case where {SH,}LIBTOOL_OVERRIDE is empty for shells that don't
understand empty lists in for loops.  Addresses PR pkg/34042.
2006-07-19 22:07:13 +00:00
jlam
7af716330d Drop support for LTCONFIG_OVERRIDE. For quite a long time, pkgsrc
had actually been ignoring LTCONFIG_OVERRIDE anyway and just using
the default LIBTOOL_OVERRIDE to replace libtool scripts in packages.
This just formalizes the fact that LTCONFIG_OVERRIDE is not used
meaningfully by pkgsrc.
2006-07-19 19:14:37 +00:00