Commit graph

1506 commits

Author SHA1 Message Date
hira
da072355cf Don't echo the debug message for the targets whose output is used
by other targets.

OK'd by jlam.  This should close pkg/24377.
2004-10-03 04:24:20 +00:00
tv
c487cb967a Libtool fix for PR pkg/26633, and other issues. Update libtool to 1.5.10
in the process.  (More information on tech-pkg.)

Bump PKGREVISION and BUILDLINK_DEPENDS of all packages using libtool and
installing .la files.

Bump PKGREVISION (only) of all packages depending directly on the above
via a buildlink3 include.
2004-10-03 00:12:51 +00:00
hubertf
ec50bc5bf8 Update the wording a bit when a license is not accepted, to better
indicate the proper process: first read the license, then accept,
and indicate so in /etc/mk.conf:

	yui% make
	===> graphviz-1.12 has an unacceptable license: graphviz-license.
	===>     To view the license, enter "/usr/bin/make show-license".
	===>     To indicate acceptance, add this line to your /etc/mk.conf:
	===>     ACCEPTABLE_LICENSES+=graphviz-license
	*** Error code 1
2004-10-01 00:23:18 +00:00
tv
2639310040 Per jlam's suggestion, remove the libtoolize conditional altogether. Some
packages install libtool archives without using USE_LIBTOOL.
2004-09-27 19:37:36 +00:00
tv
243c9deac1 LIBTOOLIZE_PLIST doesn't even need to be conditional. If USE_LIBTOOL is
set in the package Makefile, then a libtool transform will be done, period.
2004-09-27 14:44:31 +00:00
rh
ccdc09933b In print-PLIST, handle '@exec ${MKDIR}' by PRINT_PLIST_AWK as well. 2004-09-27 00:27:45 +00:00
jlam
74b4e1b968 Make print-PLIST work if there are no *.la files. 2004-09-24 15:00:10 +00:00
jlam
1d55af8fb2 Initial commit of a new wrapper script framework that encapsulates
the non-buildlink-related code and moves it out of mk/buildlink3 into
mk/wrapper.  The buildlink3 code is modified to simply hook its
transformations into the wrapper script framework.

The wrapper script framework has some new features:

* Support automatically passing "ABI" flags to the compiler and linker
  depending on the value of ${ABI}.  Currently supports the SunPro
  compiler with ${ABI} == 64 and the MIPSPro compiler with ${ABI} as
  any of 32, n32, o32, and 64.

* making UnixWare GCC accept -rpath options and silently converting
  them into an appropriate LD_RUN_PATH

* Add cmd-sink-interix-gcc and cmd-sink-interix-ld that errors out
  when it sees -fpic/-fPIC and -shared/-Bshareable, respectively
  (requested by <tv>).

* Much improved debugging output.  It's possible to output the wrapper
  work log in-line with normal output by setting WRAPPER_LOG to
  "stderr".

Important differences in behaviour from the old buildlink3 code include:

* Only move the -l options to the end of the command line, leaving the
  -L options in-place.

* Extend the autodetection of the libtool mode to detect "compile" and
  "uninstall".

* Fix problem noted in both PR pkg/24760 and PR pkg/25500, where
  -L/usr/lib/* was being mangled improperly.

* Remove the top-level "buildlink" target; instead, make buildlinking
  occur as part of the "wrapper" target.

* mangle and sub-mangle are only meant to transform directories in
  -I, -L, and rpath options, so remove the lines in
  buildlink3/gen-transform.sh that transformed bare directories.

* Add the ability for the libtool wrapper to be called just to unwrap
  an existing libtool archive by running:

	libtool --mode=unwrap -o libfoo.la

  The old --fix-la syntax no longer works.


20040818
========
* Initial release of a new wrapper script framework that encapsulates
  the non-buildlink-related code and moves it out of mk/buildlink3.
  These features include:

   * making MIPSpro accept GCC options
   * making MIPSpro "ucode" accept GCC options
   * making SunPro accept GCC options
   * making "ld" accept -Wl,* options and silently removing the "-Wl,"
   * (NEW) making UnixWare GCC accept -rpath options and silently
     converting them into an appropriate LD_RUN_PATH

  One major benefit of this is that the buildlink3 code is now much
  tighter and easier to understand since it concerns itself solely
  with buildlink-related details.  I haven't yet optimized the wrapper
  cache, so the new wrapper scripts may take slightly longer to execute
  than the old buildlink3 wrapper scripts, but I'll be improving this
  over time.


20040821
========
* Move the inclusion of $cmd_sink outside of the main loop in wrapper.sh
  so that the $cmd_sink script can be used to globally scan and process
  the arguments.  Move the LD_RUN_PATH code to a cmd-sink-unixware-gcc
  script.  Garbage-collect the now unused export_vars-related code.

* Add cmd-sink-aix-xlc for AIX xlc that munges -Wl,-R* into an
  appropriate -blibpath option.

* Add cmd-sink-interix-gcc and cmd-sink-interix-ld that errors out
  when it sees -fpic/-fPIC and -shared/-Bshareable, respectively
  (requested by <tv>).

* Move the code that converts full paths to shared libraries into the
  "-Ldir -llib" equivalents from the buildlink3 code into wrapper/logic.
  Remove the same from bsd.buildlink3.mk and gen-transform.sh.

* Move the code that checks for absolute rpaths from the buildlink3
  code into wrapper/arg-source.  Remove the same from bsd.buildlink3.mk
  and gen-transform.sh.

* Only move the -l options to the end of the command line, leaving the
  -L options in-place.

* Add more debugging code.


20040824
========
* Fix quoting problems after arguments are transformed.  Remove the
  hack that was inserted that magically made almost everything work
  because we do it the right way now.

* Move the inclusion of $logic outside of the main loop in wrapper.sh
  so that the $logic script doesn't have to worry about underflowing
  the argument buffer.

* Encapsulate the loop in wrapper.sh that fills the argument buffer
  entirely within the arg-source script.

* Move from the logic script into the arg-source script the
  transformations that merge or split arguments.

* Fix bug where skipargs was effectively being ignored if it was more
  than 1.

* Handle the whitespace in transformations in the logic script that
  turn one library option into multiple library options, e.g.
  "-lreadline" -> "-ledit -ltermcap".

* Allow you to specify an environment variable WRAPPER_SKIP_TRANSFORM
  for whether you wish to skip the transformation step in the logic
  script.  This is intended for testing purposes.

* Added check_prog() and init_lib() functions to the shell code library
  to make it more reusable outside of the wrapper framework.

* Allow the msg_log() function to output to "stdout" or "stderr".  If
  you want to have all of the logging appear on the screen, then you
  can now set WRAPPER_LOG=stderr.

* Make some of the script components not overridable on a per-wrapper
  basis.

* Add a gen-transform.sh script that generates transformation sedfiles.
  The "transform" script is used to transform arguments, while the
  "untransform" script is used to unwrap files.  Move the no-rpath
  logic from buildlink3/gen-transform.sh into wrapper/gen-transform.sh
  since it's not buildlink3-specific.

* Check for a non-empty blibpath before adding the option in
  cmd-sink-aix-xlc.

* Extend the autodetection of the libtool mode to detect "compile" and
  "uninstall".

* Add a cmd-sink-libtool script that doesn't pass linker options to
  libtool unless we're in "link" mode.

* Set _USE_RPATH to "yes" for UnixWare so that the wrappers will see the
  rpath options and convert them to a LD_RUN_PATH definition.

* Add more debugging code.


20040826
========
* Rewrite buildlink3/gen-transform.sh to produce more precise sed commands.
  Drop some unused commands from the mini-language, and add a few more
  that are more restrictive in their scope.

* Fix problem where repeated options weren't properly handled by some
  of sed commands.  It's not enough that they're "global replace",
  since some patterns match separator characters before and after each
  option.  We must repeat those patterns twice to catch all instances
  correctly.

* Fix problem noted in both PR pkg/24760 and PR pkg/25500, where
  -L/usr/lib/* was being mangled improperly.

* Remove the top-level "buildlink" target; instead, make buildlinking
  occur as part of the "wrapper" target.

* Add more debugging code.


20040828
========
* Added a head_queue function to shell-lib that returns the head of the
  named queue without popping it off the front of the queue.

* Strip consecutive, repeated library options from the command line when
  we read it in the logic script.

* Be more careful about not underflowing the argument buffer.


20040906
========
* shell-lib was moved into pkgsrc/mk/scripts; correct references to that
  file in the wrapper code.

* Use opt-sub instead of sub-mangle when protecting -I/usr/include/*
  and -L/usr/lib/* from buildlink transformations.  This avoids adding
  lines that look like "-I-I..." in the transformation sedfiles.

* mangle and sub-mangle are only meant to transform directories in
  -I, -L, and rpath options, so remove the lines in
  buildlink3/gen-transform.sh that transformed bare directories.

* Fix bug in strip-slashdot where the "." wasn't backquoted and thus
  matched all characters instead of only the "." character.

* Change the libtool wrapper to use a modified buildcmd script that
  doesn't rearrange any of the arguments.  This should fix spurious
  problems where libtool doesn't understand how to parse the command
  line when the -l options are moved to the end of the argument list.

* Fix bug in the logic script where the $cachearg and $cachedarg
  weren't being properly set at all times, which caused the cache to
  contain the wrong transformed argument.


20040907
========
* Support automatically passing "ABI" flags to the compiler and linker
  depending on the value of ${ABI}.  Currently supports the SunPro
  compiler with ${ABI} == 64 and the MIPSPro compiler with ${ABI} as
  any of 32, n32, o32, and 64.

* Move back the code that splits absolute paths to shared libraries
  from arg-source back into logic.  This allows us to correctly skip
  splitting those paths based on the previous option.  Also add a
  sanity check that the library name in the split argument doesn't
  contain a "/" since shell globs are not as precise as REs.

* Don't transform the path given after --dynamic-linker (used by GNU
  ld for ELF linkage).

* Add the ability for the libtool wrapper to be called just to unwrap
  an existing libtool archive by running:

	libtool --mode=unwrap -o libfoo.la


20040914
========
* Add a loop in libtool-fix-la to ensure that all of the options listed
  in the dependency_libs lines of *.lai files are processed.  This fixes
  a buildlink3 leakage bug.

* Merge the gen-transform.sh scripts between buildlink3 and wrapper and
  place them all in wrapper.  This makes sense since the commands simply
  allow for many types of transformations, which buildlink3 takes
  advantage of, but there is nothing inherently buildlink-ish about
  those commands.

* Don't directly manipulate SUBST_SED.unwrap.  Instead, create the
  value of SUBST_SED.unwrap by combining several other variables
  (currently just _UNWRAP_SED) to ensure that the correct ordering is
  preserved.

* Correct some confusing debugging messages.
2004-09-21 15:01:38 +00:00
jlam
9ba4de5e14 Move definition of PKGNAME and PKGNAME_NOREV higher in the file since their
expanded values are used somewhere in the middle.
2004-09-15 15:26:10 +00:00
agc
46f829ac2e Finish off the locking work, by adding locks around "make install" and
"make package", from a nudge by Greg Oster. No objections, but lots of
mail, received from pkgsrc developers, to committing this during the
stability freeze, but I'd really like this to go in pkgsrc-2004Q3.
2004-09-11 07:26:03 +00:00
jlam
5073201af9 * Do the *.la expansion within the current _PLIST_AWK_SCRIPT framework.
We no longer require that LIBTOOL_LA_FILES be defined in the package
  Makefile, and the libtool archives should once again be listed in the
  PLIST.

* Add a new yes/no variable "LIBTOOLIZE_PLIST" to control whether to
  have bsd.pkg.mk automatically expand *.la files in PLISTs into the
  true library names represented by the libtool archives.

* Rename the "transform-la" script to "print-la-libnames" which more
  correctly reflects its function.

Many thanks to Todd Vierling for the original implementation and for
his contructive comments on how to improve the changes in this commit.
2004-09-10 19:51:50 +00:00
schmonz
0286643931 Replace the only occurrence of the :E modifier in bsd.pkg.mk with
a more familiar construction. BZCAT wasn't getting defined for a
bzip2-compressed patch in my tree; now it is.
2004-09-01 00:10:58 +00:00
jlam
ca70938428 Replace RPATH_FLAG with LINKER_RPATH_FLAG and COMPILER_RPATH_FLAG,
which are the full option names used to set rpath directives for the
linker and the compiler, respectively.  In places were we are invoking
the linker, use "${LINKER_RPATH_FLAG} <path>", where the space is
inserted in case the flag is a word, e.g. -rpath.  The default values
of *_RPATH_FLAG are set by the compiler/*.mk files, depending on the
compiler that you use.  They may be overridden on a ${OPSYS}-specific
basis by setting _OPSYS_LINKER_RPATH_FLAG and _OPSYS_COMPILER_RPATH_FLAG,
respectively.  Garbage-collect _OPSYS_RPATH_NAME and _COMPILER_LD_FLAG.
2004-08-27 06:29:06 +00:00
schmonz
71f7ba2993 Add a knob PKGSRC_SHOW_PATCH_ERRORMSG to control whether the newly
verbose message displayed on patch failure is in fact displayed on
patch failure. It defaults to "no" if PKG_DEVELOPER is defined,
"yes" otherwise. While here, rename PKG_PATCH_FAIL to PKGSRC_PATCH_FAIL.
2004-08-25 04:09:10 +00:00
tv
6ae0f5c2f9 Process RECOMMENDED *after* including bsd.buildlink3.mk; else it has no
real effect at all.
2004-08-24 00:27:13 +00:00
tv
b0bcde2b2d Don't put the .la transform in GENERATE_PLIST; that's too late to make it in
before any @dirrm's are executed.  Rather, put it explicitly at the top of
the final static PLIST generation code.
2004-08-17 17:48:11 +00:00
tv
57110d93e1 Add new variable LIBTOOL_LA_FILES, which may be used instead of listing
all of the .a, .la, .so, and .so.* files in the PLIST.  This will
autogenerate the PLIST entries based on the informaion in the .la file.

This include print-PLIST support; if LIBTOOL_LA_FILES contains an
installed .la, its entries will be elided from the output PLIST template.
2004-08-16 03:12:02 +00:00
schmonz
9482f7b935 If patching fails and either of PKG_OPTIONS and LOCALPATCHES are
defined, note thatthe patch failure may be due to incompatible
build options and/or local patches, and suggest building with fewer.
2004-08-16 01:56:03 +00:00
jlam
cf2ba07f21 Add some new variables to control how "distribution" patches are extracted
and applied to the package sources.  The existing options are:

	PATCH_DIST_STRIP - option that sets the pathname strip count.
	PATCH_DIST_ARGS - the list of arguments to pass to patch(1).

The new options are:

	PATCH_DIST_CAT is the command that outputs the patch to stdout.

For each of these variables, there is a patch-specific variant that
may be set, i.e. PATCH_DIST_STRIP.<patch>, PATCH_DIST_ARGS.<patch>,
PATCH_DIST_CAT.<patch>.
2004-08-07 15:58:59 +00:00
jlam
8810d2a8dd Move addition of PKG_OPTIONS to BUILD_DEFS below the definition of the
build-defs-message target so that PKG_OPTIONS doesn't show up as a
settable variable in the displayed message.
2004-08-05 02:10:20 +00:00
jlam
369315ec93 oops.. reversed a test 2004-08-04 23:29:50 +00:00
jlam
0862c2a79c Sometimes, the dependencies installed are a function of which variables
are set, and it'd be nice to know which ones before the default
dependencies are installed.

Create a new target "pre-install-depends" that is executed before
dependencies are installed.  Move the display of BUILD_DEFS
(build-defs-message) into pre-install-depends so that they are displayed
before dependencies are installed.
2004-08-04 23:22:38 +00:00
jschauma
154daf0353 Add INSTALL_GAME_DATA to the list of defined macros in CONFIGURE_ENV
as well.  (Noted by wiz@)
2004-08-04 15:29:13 +00:00
minskim
7f8cb7a664 Do not run xargs if its input is an empty string; xargs in Interix
executes the utility even in such a case.  Based on the patch provided
by Hiramatsu Yoshifumi in PR pkg/25777.
2004-08-04 06:22:39 +00:00
jschauma
b6318472ea Introduce GAMEDATAMODE and INSTALL_GAME_DATA, which will take care
of files installed for SETGIDGAME packages.
This will help address PR pkg/25313 and PR pkg/26236.
2004-08-04 02:56:01 +00:00
seb
f45e880102 Garbage collect NO_CHECK_DEPENDS: it is meaningless since revision 1.942. 2004-07-31 12:24:02 +00:00
xtraeme
088cc6d2d6 Make the option to resume transfer optional, as suggested by
Robert Elz in PR pkg/26448 (at least for now).

If you want to use it, PKG_RESUME_TRANSFERS must be set to [Yy][Ee][Ss].

While here, no need to use ${AWK} to get the size with ${WC} -c,
${WC} -c < file is enough.

Thanks to Robert Elz for suggestions, still I have to fix the problems
reported in the PR.
2004-07-27 15:56:19 +00:00
xtraeme
1c1f182b61 Fix some more troubles with my modification for resume transfers:
o Use ${WC} -c instead of using ${LS} -l, which works with
	  symlinks.
	o Only assign -R to FETCH_RESUME_ARGS when FETCH_CMD is the
	  default value (NetBSD's ftp).
	o Fix for www/navigator package, which uses DIST_SUBDIR.
	o Replace another [ with ${TEST}.
	o Print a warning when FETCH_CMD != ftp and FETCH_RESUME_ARGS
	  is empty (resume will not be possible).

Thanks to cube@ and tron@ for reporting/helping with the problems.
2004-07-27 10:34:53 +00:00
agc
a60952e252 Fix some problems with REFETCH mods:
1. don't hardcode true, echo and [
2. Cope with distfiles which are located in a DIST_SUBDIR
3. Don't always assume there will be a size field in the ${DISTINFO_FILE}

XXX The refetch mods make an assumption that an exit code of 0 from a
${FETCH_CMD} means that the transfer has been completed successfully,
and this used not to be the case.  I haven't tested this assumption
recently.
2004-07-27 09:57:57 +00:00
xtraeme
2f4220cc9d Add support to resume transfers, by default it will be disabled if
$http_proxy or $ftp_proxy are defined (for the moment, NetBSD's ftp(1)
doesn't support this).

While I'm here, move FETCH_CMD from bsd.pkg.mk to bsd.pkg.defaults.mk,
and add the new variable FETCH_RESUME_ARGS (-R by default with ftp(1)
from NetBSD/pkgsrc).

If you want to use wget to resume transfers, you should use something
like:

FETCH_CMD=wget
FETCH_RESUME_ARGS=-c
2004-07-27 03:59:26 +00:00
grant
38ec7e0ca7 move PKG_SUFX=.tbz example to bsd.pkg.defaults.mk. 2004-07-25 06:51:33 +00:00
wiz
d4e8b44315 Retire buildlink2, now that all packages using it have been converted to
buildlink3.
2004-07-06 22:49:16 +00:00
abs
b5a3f86522 Implement EXTRACT_CMD.bin 2004-07-06 11:28:55 +00:00
grant
bb8987d2b8 catch locking failure case where we couldn't find the parent's process
ID. from Roland Illig.
2004-07-03 22:11:56 +00:00
grant
b0aaf8b819 style fix from Roland Illig. 2004-07-03 22:07:11 +00:00
grant
51c3057c32 replace use of ${TEST} -e with -f or -d as appropriate. use consistent
shell syntax.

this allows the pkgsrc framework to work with IRIX 5.3 and Solaris'
sh(1) built-in test(1).
2004-07-03 21:59:04 +00:00
salo
97a5956635 In SUBST_SED.pkglocaledir, escape the rest of the line in the pattern.
Saves trailing \ properly.

Addresses PR pkg/26022 by Akio OBATA.
2004-06-23 11:42:18 +00:00
cjep
a957b1f62d Use TEST instead of [] when using -nt. This makes the section work on
SunOS.
2004-06-23 11:13:12 +00:00
agc
fb05638837 When building a pre-requisite package, exit if the build of the
pre-req fails.  Fixes an error noticed by Kimmo and others, where a
build would blindly continue even if the pre-requsite package wasn't
built correctly, and is fallout from the "sh -e" and make(1) changes
in NetBSD-current.
2004-06-05 09:10:41 +00:00
jschauma
8196789a05 Append ${ABI} to some lib-dirs. This is a no-op on systems that do not
use ABI, but allows IRIX and particularly IRIX64 to find the correct libraries
especially when linking against X11 libs.  Tested over several months and
multiple bulk-builds.
2004-06-04 15:00:14 +00:00
xtraeme
0e31a48155 Remove MASTER_SITE_* definitions from bsd.pkg.mk and put them
into the new bsd.sites.mk file. Ok'ed by Hubert Feyrer and
Jan Schaumann in tech-pkg@.
2004-06-04 13:45:26 +00:00
mrauch
80f88d2fca Add MASTER_SITE_OPENOFFICE for the misc/openoffice* packages.
List extracted from http://download.openoffice.org/1.1.1/source.html
2004-05-30 08:10:05 +00:00
kristerw
a061ccd067 aleron.dl.sourceforge.net have had problems during the last couple of
days.  Comment it out for now.
2004-05-29 21:41:30 +00:00
xtraeme
9461692df5 Add ${X11BASE}/bin to the PATH when USE_IMAKE is used, without objections
in tech-pkg@.
2004-05-24 20:54:12 +00:00
jschauma
5419c918f3 Follow Grant's advice: use _OPSYS_GPATCH_REQD to influence _NEED_PATCH
and let tools.mk take care of the rest.
2004-05-19 03:26:09 +00:00
jschauma
7384d31eb1 We have a variable _OPSYS_GPATCH_REQD, but it doesn't do anything.
Change that:  if it's set to YES, require devel/patch.  If building
devel/patch, set _OPSYS_GPATCH_REQD to NO, as otherwise we have a
circular dependency.
2004-05-19 01:27:03 +00:00
jlam
ffec0a5c18 Add a new package-settable variable, INSTALLATION_PREFIX, as discussed
with gavan@NetBSD.org at pkgsrcCon.

Within the pkgsrc infrastructure, LOCALBASE has two different meanings:

    (1) where the package being built should be installed, and
    (2) where to find previously installed packages.

Most instances of case (2) should be converted to use EVAL_PREFIX,
but there are some cases where this is impossible.  To resolve this,
we preserve LOCALBASE to mean (2) and we create a new variable
INSTALLATION_PREFIX to mean (1).

INSTALLATION_PREFIX is meant to be set some time before bsd.pkg.mk is
included, and provides the value for PREFIX if it's defined, e.g.

	NO_MTREE=               yes
	INSTALLATION_PREFIX=    /

	.include "../../mk/bsd.pkg.mk"

This allows us to remove all cases where PREFIX is explicitly set in
the package Makefile, e.g. Java VM packages, qmail, etc.
2004-05-17 04:44:44 +00:00
wiz
ec3d725a1d No USE_BUILDLINK2 package sets USE_FORTRAN any longer -- convert support
to bl3 and remove f2c's buildlink2.mk file.
2004-05-12 13:23:08 +00:00
jschauma
b639c76d93 INSTALL_GAME should be exported a as BSD_INSTALL_GAME 2004-05-12 01:37:42 +00:00
jschauma
559a086093 Introduce new variables:
SETGIDGAME:  specifies whether or not certain games are installed setgid
GAMEGRP:     the group owning games if SETGIDGAME is set
GAMEOWN:     the user owning games if SETFIDGAME is set
GAMEMODE:    the mode to install games as

Use these to provide INSTALL_GAME (for example for PR pkg/25313), and
set them to meaningful values under NetBSD.
2004-05-12 01:03:58 +00:00