Commit graph

242 commits

Author SHA1 Message Date
rillig
a4d021bb7b mk/buildlink3: add some more variables to show-all-bl3 2019-08-18 21:00:10 +00:00
rillig
836d82c80c mk/curses: document the affected variables for make show-all 2018-12-16 23:21:52 +00:00
maya
6c25dec844 Remove clauses 3,4 from TNF-only copyright blocks.
This is based on the decision The NetBSD Foundation made in 2008 to
do so, which was already applied to src.

This change has been applied to code which is likely not in other
repositories.

ok board@, reviewed by riastradh@
2018-08-22 20:48:36 +00:00
dholland
702361dd1b Add more diagnostic info for when packages are forced to non-builtin.
The voodoo that checks this now keeps track of which packages caused
what, and in addition to the list FORCED_PKGSRC of packages that have
been forced to non-builtin, it also produces a list FORCED_PKGSRC_REASONS
of the form pkg:causing-pkg{,causing-pkg...}.

(which means that USE_BUILTIN.pkg has been set to no because
USE_BUILTIN.causing-pkg is set to no.)

This could probably just be one list but I'm not sure if anything is
relying on the format of the current FORCED_PKGSRC.
2018-03-19 03:53:29 +00:00
dbj
76af32191a don't try to create buildlinks if BUILDLINK_PREFIX.${_pkg_} is empty
without this change it looks for files in $HOME or fails if that is not set
2017-08-01 05:48:12 +00:00
markd
3d30e908bb In cwrappers case transform ${X11BASE} path after ${LOCALBASE} path
in case its a prefix of ${LOCALBASE}.
Fixes build of print/poppler-glib and others when using CWRAPPERS
on Linux with native X and ${X11BASE}=/usr
2016-06-09 02:38:34 +00:00
markd
9cd5091c7b Add support for -isystem to legacy wrappers.
rewrite "-isystem dir" as "-isystem,dir"
  transform "-isystem,dir" in same ways as "-Idir"
  rewrite "-isystem,dir" back to "-isystem dir" in cmd-sink
2016-03-14 20:11:56 +00:00
joerg
81428e7010 Drop _LIBTOOL and _SHLIBTOOL and make LIBTOOL and SHLIBTOOL point to the
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.
2015-05-04 19:23:19 +00:00
jperkin
6c2c920fd0 Remove ECHO_WRAPPER_MSG and just use ECHO_BUILDLINK_MSG, which was set
to the same value anyway.  Also removes a comment from 2005 which was
possibly wrong at the time it was committed, given the same construct
has been used in bsd.buildlink3.mk unchanged since 2004.
2015-04-27 19:38:03 +00:00
joerg
6c1ee05297 Drop special casing of rpath in /usr/lib, the change didn't really work
due to misspelling in the old wrapper case and for cwrappers, it creates
more problems than it fixes. If parts of /usr/lib should really be
preserved, they should be added explicitly as pass-thru directory.
2015-03-15 21:18:32 +00:00
joerg
dfbcb4d26d PR 49686: Drop -I and -L options references the built-in search
directories of the compiler/linker when using cwrappers. Command line
flags will often put them before the corresponding flags for
PREFIX/include and PREFIX/lib, so the version from outside .buildlink
would be prefered. The other way around is much less likely to be a
problem and normally the expected case. Bump required cwrappers version
for the necessary exact-match feature.
2015-03-15 19:23:26 +00:00
wiz
627d407a75 Remove pkg_views support, second part: infrastructure. 2014-12-30 15:13:19 +00:00
joerg
0e2789d33d Fix typo 2014-11-25 19:01:02 +00:00
joerg
f69fd1d607 Clean up error from manual patch application. 2014-11-24 09:59:07 +00:00
joerg
516b42831c Add cwrappers glue as developed during Google's Summer of Code 2007. 2014-11-24 00:32:31 +00:00
wiz
794c5d7fb5 Fix typo. 2014-10-31 16:14:07 +00:00
jperkin
47fdae3df2 Check for the existence of a file before trying to remove it. It is highly
likely that the files in this code path do not exist, so this can save a
significant number of exec's, especially for packages with a large number of
dependencies, with a corresponding reduction in the run time for the 'wrapper'
phase.

In addition, remove a 'useless use of cat' instance to save more exec's.
2014-09-02 14:31:27 +00:00
obache
0d2918764c Catch up to /boot/common => /boot/system/develop on Haiku. 2014-05-18 11:23:26 +00:00
obache
aca999743c Stop USE_BUINTIN.pkg=no escalation from IGNORE_PKG.pkg=YES.
affect to result of pkgtools/x11-links, normal build v.s. pbulk.
2014-04-17 01:57:31 +00:00
jperkin
1b3bb96be7 Swap the ordering of the buildlink3 filters so that ${LOCALBASE} is
transformed before ${X11BASE}.  On Red Hat Linux with native X11,
X11BASE=/usr and so any ${LOCALBASE} which is under that hierarchy
(e.g. the default /usr/pkg) will break in weird and wonderful ways.

In addition to this, use ${LIBABISUFFIX} where appropriate, and avoid
some extra transformations in the X11BASE=/usr case.

This along with other recent changes gets us to a very healthy >12k
packages with native X11 on Red Hat Linux 6 (and clones).
2014-03-10 12:06:35 +00:00
dholland
6bc2f78646 Add two additional hacks/workarounds to make netbsd-5's make accept the
USE_BUILTIN checking loop.
2013-06-08 20:23:02 +00:00
dholland
212b073ac8 After including builtin.mk files, go through BUILDLINK_TREE in tree order
and force USE_BUILTIN.pkg=no for packages that depend on packages where
USE_BUILTIN.pkg is no. The names of any such packages are accumulated in
the variable FORCED_PKGSRC for reference; this is currently undocumented
and could be dropped in the future.

This makes it a lot safer to install pkgsrc versions of selected X
libraries without switching wholesale to pkgsrc X; however, other
issues may still exist and caution is still advisable.

As seen on tech-pkg.

Also note: this may affect the builds of packages we don't realize are
affected and that haven't been revbumped. If you find one, let us know
so we can bump its version (or do that yourself) -- most likely this
change will produce in working, properly-linked packages that were
previously broken, but if problems arise please speak up.
2013-06-07 17:15:54 +00:00
jperkin
55acebac82 Fix another :ts 2013-05-13 12:01:51 +00:00
jperkin
25f4620492 It is a common misconception that ${FOO:tsc} will split FOO on 'c',
however that is not the case.  To get that behaviour use ':S/c/ /g'.

Fixes a number of issues on various OPSYS introduced with the recent
COMPILER_* and SYSTEM_DEFAULT_RPATH abstractions.
2013-05-13 11:38:30 +00:00
obache
a257488eb5 * use SYSTEM_DEFAULT_RPATH/COMPILER_INCLUDE_DIRS/COMPILER_LIB_DIRS
instead of hard-coded /usr/include, /usr/lib, ... paths.
* allow empty BUILDLINK_PREFIX.${_pkg_}, for builtin packags not match such
  model (Haiku's system headers and libraries are in different hier).
2013-04-28 13:37:34 +00:00
hans
8880bfeddd Fix previous, it didn't work as intended. Just having /usr/lib${LIBABISUFFIX}
there should be sufficient, and it works.
2013-02-02 01:04:59 +00:00
hans
35199213ea Treat /usr/lib${LIBABISUFFIX} like /usr/lib to avoid picking up the
wrong libraries from that dir.
2013-02-01 12:43:44 +00:00
sbd
17c339e3f5 Add "BUILDLINK_AUTO_DIRS.<pkg>" control variable:
"yes" or "no" for whether BUILDLINK_{INCDIRS,LIBDIRS,RPATHDIRS}.<pkg>
should automatically be added to the compiler/linker search paths.
Defaults to "yes".
2012-09-16 07:49:11 +00:00
sbd
45ea5a1e3b Add BUILDLINK_DIR.${_pkg_} with is either ${BUILDLINK_PREFIX.${_pkg_}} if
it is a builtin prefix or ${BUILDLINK_DIR} otherwise.
2012-09-16 07:37:10 +00:00
sbd
c8cb033cda Treat /usr/lib${LIBABISUFFIX}} the same as /usr/lib and strip it out of
the runtime library search path.
2012-05-24 07:27:27 +00:00
joerg
8a0ca9cb7c Apply user transformation earlier to make it possible to drop
to-be-mangled entries like rpath using BUILDLINK_TRANSFORM.
2012-05-11 11:09:42 +00:00
sbd
8799fd0b9f If the BUILDLINK_PREFIX is '/usr' then the BUILDLINK_LIBDIRS will be
'lib${LIBABISUFFIX}'
2012-04-23 07:42:13 +00:00
obache
2fbb5622bb Fix reverse condition, rewrite of X11BASE => BUILDLINK_X11_DIR are required for
X11_TYPE!=modular.
2012-04-08 06:09:06 +00:00
sbd
decd6778f3 On Linux-x86_64 system transform /usr/lib/../lib* to /usr/lib* so that
the buildlink rules work properly.
2012-01-17 22:19:22 +00:00
abs
4ef034af5a Fix build on 64bit linux platforms. When buildlinking directories we
want ${BUILDLINK_DIR}/lib not ${BUILDLINK_DIR}/lib${LIBABISUFFIX}
Tested on Linux x86_64 (Centos 5) and NetBSD
2010-12-03 18:59:20 +00:00
wiz
6b03559b87 Fix typo in comment. 2010-05-02 18:32:29 +00:00
obache
db85cdfb31 Use /boot/common as default BUILDLINK_PREFIX if /usr does not exist.
It's default location of posix packages for Haiku OS.
2010-04-28 08:15:55 +00:00
joerg
a1a6399f39 Restore duplication check for _BLNK_PACKAGES that got lost with earlier
versions and was not fatal.
2009-03-20 20:10:15 +00:00
joerg
2d1ba244e9 Simply and speed up buildlink3.mk files and processing.
This changes the buildlink3.mk files to use an include guard for the
recursive include. The use of BUILDLINK_DEPTH, BUILDLINK_DEPENDS,
BUILDLINK_PACKAGES and BUILDLINK_ORDER is handled by a single new
variable BUILDLINK_TREE. Each buildlink3.mk file adds a pair of
enter/exit marker, which can be used to reconstruct the tree and
to determine first level includes. Avoiding := for large variables
(BUILDLINK_ORDER) speeds up parse time as += has linear complexity.
The include guard reduces system time by avoiding reading files over and
over again. For complex packages this reduces both %user and %sys time to
half of the former time.
2009-03-20 19:23:50 +00:00
joerg
37221332dd Move _SYS_VARS processing to a point where BUILDLINK_PACKAGES is
finalised.
2009-03-16 18:37:07 +00:00
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
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
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
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