Commit graph

72 commits

Author SHA1 Message Date
rh
8c4d9ffa48 Add *RECOMMENDED variables as discussed on tech-pkg@ to allow for a more
fine-grained distinction between required versions of pre-requisites
(DEPENDS) and versions that are recommended for security or library ABI
consistency reasons (RECOMMENDED).

  The contents of ${RECOMMENDED} are added to DEPENDS unless
IGNORE_RECOMMENDED is set to YES, in which case a warning will be printed
and IGNORE_RECOMMENDED will be added to BUILD_DEFS.

  Add a corresponding BUILDLINK_RECOMMENDED.<pkg> variable for use with
buildlink2 and buildlink3.
2004-01-14 06:57:45 +00:00
jlam
231aa68659 Add a new command "abs-rpath" to the gen-transform.sh script that removes
rpath options that try to add relative paths to the runtime library search
path.  This basically partly cleans up after lazy programmers.
2004-01-13 07:52:37 +00:00
jlam
e7d55f00e4 Use egrep instead of relying on GNU grep features. Fixes populating the
buildlink directory on Solaris, which doesn't use GNU grep.
2004-01-11 06:50:58 +00:00
jlam
5fdd19eb4c Back out the changes in revision 1.41 which were much more complex than
they needed to be.  Now, when we're emitting untransform rules, we:

(1) change everything back from ${BUILDLINK_DIR} and ${BUILDLINK_X11_DIR}
    back into ${LOCALBASE} and ${X11BASE},
(2) protect ${LOCALBASE} and ${X11BASE} from changes,
(3) nuke all other compiler/linker options that have absolute paths that
    we haven't blessed, and
(4) unmangle all of the protected directory names back into the right
    names.

This should correctly fix the problem where "gtk-config --cflags" didn't
emit any directories for glib headers.
2004-01-11 04:02:52 +00:00
grant
39b4d82767 "for arg; do" -> "for arg do", as the latter is more portable. fixes
buildlink3's wrappers on Solaris.
2004-01-11 03:30:20 +00:00
jlam
6ebd792812 If BUILDLINK_PREFIX.<pkg> is "/usr" and BUILDLINK_{INCDIRS,LIBDIRS}.<pkg>
lists values other "include" or "lib", then protect those directories from
being eaten by the wrapper scripts.  This allows -I/usr/include/krb5 to be
passed safely through to the real compiler when heimdal/buildlink3.mk is
included.
2004-01-10 22:22:50 +00:00
jlam
c38d28f188 Only match the first result of "pkg_info -qp" in case there are weird
+CONTENT files out there with multiple @cwd lines.
2004-01-10 10:52:09 +00:00
jlam
eee6ee1140 Don't stop if the file listed in BUILDLINK_FILES.<pkg> doesn't exist. 2004-01-10 06:15:39 +00:00
jlam
17709ff9af Add bits to make buildlink3 use the MIPSpro compiler if USE_MIPSPRO is
defined.
2004-01-07 20:45:59 +00:00
jlam
8a4b69c91d Make the wrapper exit with error code 2 to signify a buffer overflow to
avoid infinite loops.
2004-01-07 17:40:36 +00:00
jlam
7d7b693291 Suppress duplicates when splitting -Wl,-R/dir1:/dir2:... into separate
arguments.  This avoids overfilling the circular buffer (length 5) used
by the buildlink3 wrappers.
2004-01-07 17:31:02 +00:00
jlam
6990004f97 Be more precise about when rules are emitted in the tranform and
untransform cases.  This should fix the problem noted on tech-pkg@:
"Re: graphics/gdk-pixbuf can't find <gdk/gdk.h> build problem" where the
CFLAGS for glib were being eaten by the unbuildlink step.
2004-01-07 07:11:34 +00:00
jlam
dfa2eafdc6 Remove "$" at the end of rules in the [IL] commands that mistakenly crept
in when creating this file based on the one in buildlink2.  This should
fix the problem noted on tech-pkg@: "Re: graphics/gdk-pixbuf can't find
<gdk/gdk.h> build problem" where the CFLAGS for glib were being eaten by
the unbuildlink step.
2004-01-07 07:10:05 +00:00
jlam
88902e37a3 whitespace 2004-01-07 06:47:29 +00:00
jlam
60b56192f8 Back out revision 1.6 which was wrong. It failed to match
-I/usr/pkg/include given I:/usr/pkg:...
2004-01-06 21:39:07 +00:00
jlam
393f40e76a Allow l:foo: to remove -lfoo. Also remove an incorrect rule in the "l"
case.
2004-01-06 19:08:59 +00:00
jlam
839def8376 Reduce the number of lines emitted by the I and L rules. 2004-01-06 18:43:10 +00:00
jlam
9c46ce5946 Missing trailing $ to only match whole words. 2004-01-06 18:10:06 +00:00
jlam
44d8a8971f Add FreeBSD to _BLNK_CACHE_ALL (matches bsd.buildlink2.mk). 2004-01-06 09:45:31 +00:00
jlam
3a61d3a908 Try to convert GCC's optimization flags to SunPro optimization flags.
From Jonathan Perkin in private email.
2004-01-06 08:48:29 +00:00
jlam
fe15b75845 Fix bug where "!empty" was missing from a .if test. 2004-01-06 04:29:33 +00:00
jlam
636660df39 Do the right thing for pkgviews if we do binary package upgrades of
package dependencies by inserting the right default view directories into
the run-time library search path as well.
2004-01-05 21:50:13 +00:00
jlam
d279e6f535 Use S/+$// instead of C/\+$// to save a backslash. Very highly
recommended by seb :)
2004-01-05 11:05:44 +00:00
jlam
6236fdd401 When checking the value of yes/no variables using the the
!empty(...:M[yY][eE][sS]) construct, always use !empty(...) instead of
empty(...) just for some consistency.
2004-01-05 07:01:43 +00:00
jlam
048ceab425 Of course I really meant buildlink*3*.mk. 2004-01-05 05:59:29 +00:00
jlam
4b39019c6c We don't need to escape "+" if we're using the :M variable operator. 2004-01-04 23:30:04 +00:00
jlam
c705b8fe80 Rearrange some of the lines in the buildlink3.mk example so that it's a bit
shorter to write.
2004-01-04 22:01:18 +00:00
jlam
b840f07908 BUG FIXES:
* Don't add any dependencies (via BUILDLINK_DEPENDS) unless
  buildlink3.mk files add them.  This fixes case where the software
  existed both in the base system and in /usr/pkg, we used only the
  built-in software, but we still recorded a dependency on the one in
  /usr/pkg.

* Re-structure the code that populates ${BUILDLINK_DIR} so that we
  don't bump into ARG_MAX limits in the shell.  This should fix the
  problem present in the buildlink2 framework noted in:

	http://mail-index.netbsd.org/tech-pkg/2004/01/03/0005.html

CHANGES:

* Define a new yes/no variable BUILDLINK_USE_BUILTIN.<pkg> that
  determines if we should use the built-in software or not.  This
  should probably replace the various USE_NCURSES, USE_GNU_READLINE,
  USE_GNU_GETTEXT, etc. variables with something whose naming is a
  bit more consistent and is integrated directly into the buildlink3
  framework.

* Garbage-collect "$$pkg_prefix", which was used exclusively in
  BUILDLINK_FILES_CMD.<pkg>.  It no longer exists in the
  buildlink3/pkgviews world.  Packages _should_ _no_ _longer_
  directly set the PREFIX variable in the package Makefile.  As a
  consequence, the various Java VM packages will need some changes
  when they're converted to use buildlink3.
2004-01-04 20:57:31 +00:00
jlam
24f7929dc2 Extend the "l" command by allowing changing "-lfoo" into "-lbar -lbaz" by
saying "l:foo:bar:baz".
2004-01-03 20:23:51 +00:00
veego
aacddadd1d Update for the latest x11-links 0.19. 2003-12-19 19:22:28 +00:00
jlam
29055be6b7 Do as buildlink2 and _append_ extra flags instead of prepending them.
Prepending caused everything in ${BUILDLINK_DIR} to be found first, which
was bad when you built something like MesaLib where the X11R6 headers
conflict with the ones provided in the source.
2003-11-26 12:52:30 +00:00
jlam
087d9e1669 If we're linking a shared library by "cc -shared -o /srcdir/shlib", we
need to protect the full path after "-o" from being transformed from
"/srcdir/shlib" to "-L/srcdir -lshlib".  This fixes building
graphics/freetype2, which uses lots of full paths to sources and objects.
2003-11-25 14:44:39 +00:00
jlam
35657e5e7f libtool.sh should also supply a definition for "$expr", used by the
buffer script.
2003-11-25 14:43:23 +00:00
jlam
f2379fe5a0 Don't be fooled into thinking that the "-c" in "install -c" means to
interpret the libtool mode as "compile".
2003-11-23 06:06:02 +00:00
tron
ef247410ff Bump minimum required version of "x11-links" package. 2003-10-18 18:24:56 +00:00
veego
4d271b3397 Update pkgtools/x11-links to 0.16.
Changes include supporting XFree86-4.3.99.14 aka XFree86-current.
Added some new library versions and some freetype2 include files.
And bump the required version number in the bsd.buildlink mk's.
2003-10-13 15:55:11 +00:00
jlam
9118eddb47 Change the way in which arguments are processed by the wrappers. We
know read the arguments by first placing them in a buffer and taking
the argument in the first non-empty buffer as the argument to process.
The buffer is there to allow "splitting" an argument into multiple
arguments (currently up to five arguments), e.g. "-Wl,-R/path1:/path2"
is split into "-Wl,-R/path1" and "-Wl,-R/path2".  Each split argument
is placed into a buffer.  Using a buffer lets us read and process all
of the arguments in a single pass despite "pushing" more arguments
onto the front of the argument array.
2003-10-09 12:15:15 +00:00
jlam
52539db8bd It's "skipargs", not "skip". 2003-10-09 08:19:47 +00:00
jlam
ec20dd29fa Use sed instead of requiring gawk (for gensub) for portability. 2003-10-08 09:11:33 +00:00
jlam
eb469bd90b Revert previous change as gsub() doesn't quite work like gensub() with
respect to \1, \2, etc. subexpression replacement.
2003-10-07 10:59:41 +00:00
jlam
827195bab5 Simplify by using gsub() instead of gensub() in awk script. 2003-10-06 10:51:04 +00:00
jlam
12a8599501 Add some documentation. 2003-10-04 10:20:09 +00:00
jlam
8ecc105e86 Darwin's special GCC uses "-install_name /path/shlib" to indicate
the final installed location for the named shared library, and we
need to protect the full path from "/path/shlib" -> "-L/path -lshlib"
transformation.
2003-10-03 19:40:55 +00:00
jlam
197d02376d Factor out some more commonly used bits of the wrapper system into
their own files: buildcmd and quotearg, which are used to build up the
command line and to quote arguments.  Also add the ability to skip
processing the next few arguments and add them directly to the command
line.  Now, either the marshall script or the cache scripts can
request skipping the N arguments by setting skipargs=N.
2003-10-03 19:39:19 +00:00
jlam
0995d71967 Set the final form of the template buildlink3.mk file, after I've had a
strong cup of coffee.  This now works the way it was intended: the
buildlink3.mk file sets a variable that can be checked within itself to
see whether it's already been included or not.
2003-09-30 10:17:30 +00:00
jlam
c094c5fc84 Set the final form of the template buildlink3.mk file as a guideline for
buildlink3.mk writers.
2003-09-30 00:32:57 +00:00
jlam
9e14aa4f47 Update the template buildlink3.mk file so that it may be used for
non-recursive dependencies.  We now use the check:

.if !defined(BUILDLINK_PACKAGES) || empty(BUILDLINK_PACKAGES:Mfoo)
...
.endif

to replace the FOO_BUILDLINK3_MK guards.
2003-09-28 12:51:46 +00:00
jlam
d3196f084c Create _BLNK_{DEPENDS,PACKAGES} that are "uniq"ed versions of
BUILDLINK_{DEPENDS,PACKAGES} and use them throughout bsd.buildlink3.mk.
A lot of processing iterates over these variables and assumes that there
are no repeated items in those lists.
2003-09-28 12:36:52 +00:00
jlam
baf8baf9b8 Rearrange order of the targets for the various helper scripts for the
wrappers, and ensure that they're only defined once.  Also add some more
targets to create the sunpro-* helper scripts.
2003-09-28 10:38:03 +00:00
jlam
c267c3f898 Do a better job of hiding unwanted libtool archives in a mixed
buildlink2/buildlink3 world.  We "buildlink" libtool archives into
${BUILDLINK_DIR} and instruct libtool to find those *.la files before
any other ones.
2003-09-23 19:48:22 +00:00