Commit graph

307 commits

Author SHA1 Message Date
dholland
826ee26538 When bombing out because the package we need isn't installed, print
the full requirement rather than just the package name. This message
should never be seen (after all, the package we need is supposed to
*get* installed) but sometimes if things are screwed up in one way or
another it does show up. Since often what's wrong is that the package
that's installed is the wrong version, not that it's missing entirely,
this way the error message makes a lot more sense.

E.g. http://mail-index.netbsd.org/tech-pkg/2008/06/12/msg001126.html et seq.

ok dillo@
2008-06-22 23:54:06 +00:00
joerg
053f4aa0ea Replace "pkg_admin -S lsbest" usage with pkg_info -E. The base stripping
in bsd.buildlink3.mk was broken with pkg_install-20080309 was it
returned a relative path. It would have failed before e.g. with symbolic
links in the path. pkg_info -E is simpler and was added exactly for this
purpose. Fixes PR 38213 and PR 38211.
2008-03-10 20:05:59 +00:00
xtraeme
5af55181db Check if BUILDLINK_AUTO_VARS.${_pkg_} is defined before testing it
via !empty. This fixes a problem with gnome-panel and db1.
2008-02-19 11:12:51 +00:00
rillig
66736dde43 Replaced _PKG_SILENT and _PKG_DEBUG with RUN. 2008-02-07 21:36:13 +00:00
tnn
4a325fa592 Use bsd.fast.prefs.mk in some very commonly included locations. 2008-01-23 17:35:20 +00:00
tron
66d2de41c9 Escape colons in preprocessor, compiler or linker flags while checking
their existances in other variables. This avoids parsing errors if
e.g. "BUILDLINK_LDFLAGS.<pkg>" contains a colon.
2007-12-05 21:36:43 +00:00
rillig
8f225edbcd Made the code a bit more readable by elimination common subexpressions. 2007-11-27 23:06:43 +00:00
kano
abdb54b351 fix obsolete URLs for www.NetBSD.org
close PR pkg/37071
reviewd by xtraeme@
2007-10-07 12:59:11 +00:00
rillig
bedf33485e Why don't we use pkg_info -qL instead of pkg_info -f? 2007-10-01 06:46:37 +00:00
joerg
005620851f Add core of the infrastructure support for cross-compilation.
- USE_CROSS_COMPILATION activates it, CROSS_DESTDIR specifies root of
  the target filesystem
- derive _CROSS_DESTDIR from CROSS_DESTDIR or MAKEOBJDIR
- buildlink3.mk prefixes the files to symlink with _CROSS_DESTDIR
- compiler/gcc.mk knows about the target prefix (e.g. i386--netbsdelf)
- PKG_DBDIR is prefixed with _CROSS_DESTDIR
- package-install and bin-install are not called with su
- install and strip are redirected to the tool version
- links for the target specific ar, as, ld, nm, objdump, ranlib and
  strip are added
- compiler wrapper detect if linking is requested or not
- special command sinks for CPP and CC/CXX add the cross-compile magic:
  - modify include dirs to get the target /usr/include
  - modify linker dirs and runpath to use target /usr/lib at link time,
    but keep correct rpath entries

Supported-by: Google SoC 2007
Basic tests by he@ on Sparc. Review from jlam@.
2007-08-02 18:19:31 +00:00
tnn
bd630c4f6f If using X11_TYPE=modular this means we have imake(1) from pkgsrc.
We can't use our own imake to check for builtin packages so disable the
check and always report that no builtin implementation exists.
No objections on tech-pkg@
2007-07-27 17:44:43 +00:00
joerg
1181f7164e Remove remaining traces of BUILDLINK_TRANSFORM.${pkg}. 2007-07-27 13:15:41 +00:00
joerg
de82d7fa12 *blush* One variable was missing for the !modular case. 2007-07-23 15:25:20 +00:00
joerg
a3551a9262 More aggressively conditionalize X11BASE handling. Only one case
is left now and that is hidden by LOCALBASE=X11BASE for modular Xorg.
2007-07-23 13:22:11 +00:00
rillig
fc0688ff52 Added _VARGROUPS. 2007-06-06 09:29:53 +00:00
tron
aef83eee53 Remove special treatment of "DynaLoader.a" completely. It's not necessary
with current libtool version and breaks the build under Darwin 8.x and
NetBSD 4.0_BETA2.
2007-04-09 22:33:26 +00:00
tron
f2c3793d4d Don't handle Perl's "DynaLoader.a" specially under Mac OS X. It is not
necessary and doing so causes build problems.

This fixes PR pkg/35990.
2007-03-12 19:19:45 +00:00
joerg
cb3b0ff71b Absolute never use .x11-buildlink. Some cases get nasty to fix, so
back to this.
2007-01-25 15:37:12 +00:00
rillig
5acfb0b6ca Renamed BUILDLINK_TRANSFORM.* to BUILDLINK_FNAME_TRANSFORM.*, to make
clear that these variables are completely unrelated to
BUILDLINK_TRANSFORM.

Added a legacy check that catches appearances of BUILDLINK_TRANSFORM.*.

XXX: Where should incompatible changes in pkgsrc be documented?
2007-01-17 03:11:18 +00:00
joerg
79c5c99c4d For modular Xorg disable xpkgwedge (will be made a hard error later).
Don't add ${X11BASE}/bin to PATH, don't include mk/x11.buildlink3.mk
when USE_X11BASE is set and don't use BUILDLINK_X11_DIR and related
magic.

OKed by wiz@
2006-12-20 01:04:46 +00:00
martti
e2610fb8c8 Remove trailing tabs. 2006-12-15 13:15:06 +00:00
martti
2cc4216d5e Remove trailing spaces. 2006-12-15 12:46:23 +00:00
rillig
98b52d5edd Added a check for whether X11BASE is set correctly. Currently the error
message is

    Syntax error: word unexpected (expecting ")")

which is not helpful at all.
2006-11-17 09:19:37 +00:00
rillig
9855d392a6 Fixed two scripts so that they also run when "set -u" is in effect. 2006-11-09 02:07:59 +00:00
joerg
ca28d631e8 Special case LOCALBASE before X11BASE, as they can be identical in
the case of modular Xorg and the latter is more specific.
2006-11-05 14:39:11 +00:00
schwarz
94201593d3 ensure that -I and -L paths are correctly rewritten even if ${LOCALBASE}
contains ${X11BASE} (e.g. ${LOCALBASE} being /usr/local and ${X11BASE} being
/usr)
2006-09-10 19:49:53 +00:00
tron
5311471179 Fix PR pkg/34139 in a diffent way:
Setting "WRAPPER_SKIP_TRANSFORM" to "yes" isn't enough because "imake"
will invoke the C compiler which might be a wrapper script which always
fails because the package didn't use "USE_LANGUAGES+= c".

The "imake-check" script now simply uses the original command path before
"bsd.pkg.mk" modified and will therefore avoid using any wrappers.
2006-09-10 16:39:31 +00:00
hira
0dbc81e89e Call imake(1) with `WRAPPER_SKIP_TRANSFORM=yes'. The arguments
should not be transformed by wrapper.  This fixes PR pkg/34139.
Reviewed by tron@.
2006-09-03 13:07:59 +00:00
dmcmahill
e141f363dc Add missing $NetBSD$ 2006-08-28 13:27:41 +00:00
jlam
76a1020667 Drop .ORDER declarations since pkgsrc doesn't support "make -j ...". 2006-08-09 15:31:01 +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
wiz
41f2051ba0 Fix typo in comment. 2006-07-10 17:10:18 +00:00
jlam
d25e37d084 Always add dependencies for packages pulled in indirectly buildlink3 that
are build dependencies.  This should fix PR pkg/33940.  Thanks to Joerg
for the debugging hint.
2006-07-10 17:06:26 +00:00
jlam
c16221a4db Change the format of BUILDLINK_ORDER to contain depth information as well,
and add a new helper target and script, "show-buildlink3", that outputs
a listing of the buildlink3.mk files included as well as the depth at
which they are included.

For example, "make show-buildlink3" in fonts/Xft2 displays:

	zlib
	fontconfig
	    iconv
	    zlib
	    freetype2
	    expat
	freetype2
	Xrender
	    renderproto
2006-07-08 23:10:35 +00:00
jlam
356f5e8af5 Rename <phase>_COOKIE variables to _COOKIE.<phase>. These are private
variables so there are no user-visible changes.  This change just makes
it a little easier to write for loops.
2006-07-07 21:24:27 +00:00
jlam
b8d23232b8 Flatten out recursive makes into a single re-invocation of make by
introducing the concept of a "barrier".  We separate the user-invokable
targets into ones that must happen before the barrier, and ones that
must happen after the barrier.  The ones that happen after the barrier
are run in a sub-make process.  In this case, the targets that must
be run after the barrier are from the "wrapper" step and beyond.  We
rewrite the various "flow" targets, e.g. wrapper, configure, build,
etc., so that they of the right form to use the barrier target.

This now completely removes the concept of PKG_PHASE from pkgsrc.  It
is replaced with the concept of "before" and "after" the barrier, and
this state can be checked by testing for the existence of the barrier
cookie file.  Because we've removed most of the recursive makes, there
is now nowhere to hook the PKG_ERROR_HANDLER.* commands, so remove
them for now.

As part of this commit, put back the logic that conditionalized the
sources for the various cookie files.  Because the sources are all
"phony" targets, they were always run, regardless of whether or not
the cookie file already existed.  Now, if a cookie file exists, then
that entire phase associated with that cookie file is skipped.

Lastly, fix a thinko in configure/bsd.configure.mk where setting
NO_CONFIGURE in a package Makefile would manage to skip the "wrapper"
step altogether.  Fix this by correctly noting "wrapper" and not
"patch" as the preceding step to "configure".
2006-07-05 22:21:02 +00:00
rillig
98b01c2c50 pkglint says, the :Q operator should not be used in double quotes.
The code here only worked due to many conincidences: Let's assume a
variable has the value "a b" and is used with the :Q operator, which
results in "a\ b" (a, backslash, space, b). When used in double quotes,
the shell command looks like:

    echo "a\ b"

which, depending on the shell, may output the backslash literally or
not. In the case of this file, the ":Q" string was not passed to
echo(1), but to sed(1). sed(1) in turn interprets (backslash, space) in
the replacement text as equivalent to (space), and that's where the
backslash finally disappears. So it's only to this coincident that the
code worked although it was not correct.
2006-06-09 06:02:33 +00:00
jlam
c82571cd2d Use ERROR_MSG for an error message. 2006-06-07 17:35:49 +00:00
jlam
fd7633a630 Remove PKG_PHASEs that no longer exist from the various *_PHASE_* lists. 2006-06-06 06:44:01 +00:00
joerg
ef19a5e7db Band-aid for dependency handling due to the stricter rules from the
dependency cookie. We now want all dependencies in the default phase,
since depends is run before/outside real-extract. This can be seen
e.g. by textproc/troffcvt, which has a build dependency in a build
dependency. Discussed and tested with seb@.
2006-06-04 21:04:45 +00:00
reed
a36ea4e941 If USE_ABI_DEPENDS=no, do not add the BUILDLINK_ABI_DEPENDS.$pkg
to BUILD_DEPENDS. (I posted about this to pkgsrc-users on April 14.)
2006-05-06 03:28:44 +00:00
jlam
28856457ab If we can't find the package with pkg_info when computing BUILDLINK_PREFIX,
make the resulting error message more useful for debugging purposes
by including the name of the variable in a null statement that is part
of the command executed.
2006-04-14 16:59:04 +00:00
tron
346770d72d Correct typo in example Makefile snippet. 2006-04-10 12:25:43 +00:00
reed
5abef9be14 Over 1200 files touched but no revisions bumped :)
RECOMMENDED is removed. It becomes ABI_DEPENDS.

BUILDLINK_RECOMMENDED.foo becomes BUILDLINK_ABI_DEPENDS.foo.

BUILDLINK_DEPENDS.foo becomes BUILDLINK_API_DEPENDS.foo.

BUILDLINK_DEPENDS does not change.

IGNORE_RECOMMENDED (which defaulted to "no") becomes USE_ABI_DEPENDS
which defaults to "yes".

Added to obsolete.mk checking for IGNORE_RECOMMENDED.

I did not manually go through and fix any aesthetic tab/spacing issues.

I have tested the above patch on DragonFly building and packaging
subversion and pkglint and their many dependencies.

I have also tested USE_ABI_DEPENDS=no on my NetBSD workstation (where I
have used IGNORE_RECOMMENDED for a long time). I have been an active user
of IGNORE_RECOMMENDED since it was available.

As suggested, I removed the documentation sentences suggesting bumping for
"security" issues.

As discussed on tech-pkg.

I will commit to revbump, pkglint, pkg_install, createbuildlink separately.

Note that if you use wip, it will fail!  I will commit to pkgsrc-wip
later (within day).
2006-04-06 06:21:32 +00:00
hira
ed44db6a86 Fix build of the packages which pass .la files to libtool by relative
path.  This allows to use symbolic linked path as WRKOBJDIR and should
fix PR pkg/31337.
2005-12-09 16:16:41 +00:00
jlam
35be7aab3b If we need imake, then also pull in any other tools that imake needs to
work.
2005-08-10 16:28:59 +00:00
jlam
ca47ca0ada Hardcode a workaround for perl's DynaLoader.a which is definitely a
PIC code archive, but libtool isn't smart enough to realize it.  Munge
the name within cmd-sink-libtool into something that will make libtool
recognize it as a PIC code archive.  We unmunge it in arg-pp-main so
non-libtool wrappers see the right thing.  This let's us use libtool
to link applications with an embedded Perl interpreter.

I feel so dirty...
2005-08-05 19:46:41 +00:00
jlam
40b99e5f80 Tools that are marked with ":pkgsrc" are needed very early on, probably
too early for pkgsrc to adequately cope.  In this case, imake-check.mk
was marking "imake" as a tool that was used to perform some tests.
This was causing xpkgwedge to be unnecessarily marked as a build
dependency since using imake in pkgsrc pretty much requires xpkgwedge.
However, in the case where we are running the "imake checks", we don't
need xpkgwedge around.

Solve this issue by marking all the tools in imake-check.mk with
":pkgsrc", and modify the xpkgwedge dependency test to not care about
"imake:pkgsrc".
2005-07-19 23:01:55 +00:00
jlam
bf9129c41e Drop distinction between PKGSRC_USE_TOOLS and USE_TOOLS by making
PKGSRC_USE_TOOLS go away.  There is now only a single USE_TOOLS variable
that specifies all of the tools we need to build/run the package.
2005-07-15 18:27:48 +00:00
jlam
4149dcc90e We were writing the wrong directory path for the location to the
uninstalled libtool archive in the case where we build it into some
place other than the current directory.  Older versions of libtool
didn't allow you to build a *.la file anywhere other than the current
directory, and libtool-fix-la made use of this assumption in libtool's
behavior.  More recent versions of libtool *do* let you build a *.la
file anywhere you'd like, so instead of blindly assuming it's the
current directory, use the path to the argument of the -o option.
This embeds the proper directory path into the uninstalled libtool
archive.

This has no impact on packages that just build libtool archives into
the current directory.  The packages that *are* impacted are the ones
that:

   (1) pkgsrc converted to use libtool, and,
   (2) build shared libraries that are linked into other things
       as part of the build, and,
   (3) builds the libtool archives in some place other than the
       current directory.
2005-06-22 21:08:37 +00:00