summaryrefslogtreecommitdiff
path: root/mk/bsd.pkg.mk
AgeCommit message (Collapse)AuthorFilesLines
2005-03-02When FAILOVER_FETCH is set, only use the first digest algorithm foundagc1-2/+2
for a dist file or patch, and let the "checksum" target do the full digest integrity checks. Should fix a problem reported by John Klos on tech-pkg, which I was a bit dim in analysing.
2005-02-27Fix PLIST_SRC error introduced in rev 1.1593.veego1-4/+7
Before this fix it would include PLIST.common then _only_ one of the following PLIST.${OPSYS} PLIST.${MACHINE_ARCH:C/i[3-6]86/i386/g} PLIST.${OPSYS}-${MACHINE_ARCH:C/i[3-6]86/i386/g} PLIST and then PLIST.common_end. Now, uses all of the following PLIST files, in that order: PLIST.common PLIST.${OPSYS} PLIST.${MACHINE_ARCH:C/i[3-6]86/i386/g} PLIST.${OPSYS}-${MACHINE_ARCH:C/i[3-6]86/i386/g} PLIST PLIST.common_end
2005-02-25Fix a problem introduced in the previous commit, noticed by Matthiasesagc1-11/+19
Scheler and Drochner. Handle missing checksums in distinfo properly. Tested by myself and tron.
2005-02-22As seen on tech-pkg - allow multiple digest algorithms to be used toagc1-20/+29
ensure the integrity of distfiles and dist patches. For now, the default algorithms are SHA1 and RMD160, set as a whitespace-separated list in the DIGEST_ALGORITHMS definition. The DIGEST_ALGORITHM definition is deprecated. Patchfiles will still use simply SHA1, since we are trying to detect a binary "has this file changed", rather than proect against tampering. In short, if someone can modify the patch file, they can modify the distinfo file holding its digest information. This value is set in the new PATCH_DIGEST_ALGORITHM definition. Triggered by the breaking of SHA1, as reported in http://www.schneier.com/blog/archives/2005/02/sha1_broken.html
2005-02-21Change the files to be used for PLIST_SRC fromveego1-1/+5
PLIST.common PLIST.${OPSYS} PLIST PLIST.common_end to PLIST.common PLIST.${OPSYS} PLIST.${MACHINE_ARCH:C/i[3-6]86/i386/g} PLIST.${OPSYS}-${MACHINE_ARCH:C/i[3-6]86/i386/g} PLIST PLIST.common_end Which makes it possible to remove duplicated code in some packages. This doesn't change anything, because all affected packages define PLIST_SRC, so this code would never be used for them. And most of them will be fixed with the next commit. ToDO: ${MACHINE_ARCH:C/i[3-6]86/i386/g} looks wrong and should be changed, but thats what we allready use for MESSAGE_SRC.
2005-02-20fix bug introduced in 1.1569: use ${GREP} instead of 'grep' and notgrant1-2/+2
all grep(1)s support grepping for empty string. `${GREP} .' instead.
2005-02-19update the PLIST handling for AIX, shared libraries have the .sogrant1-3/+3
extension when the runtime linker is used. from garbled@.
2005-02-16Fix an anomaly noted by Steve Bellovin inagc1-2/+1
<20050215182853.AC52D3C03B8@berkshire.machshav.com> The check for a vulnerable package at package fetch time is producing incorrect results when csh-style alternates are used in the pkg-vulnerabilities specification of the vulnerable package - disable the incorrect speed-up that was there previously, at the expense of some machine cycles at build time.
2005-02-15Some older ${FIND}s do not have an implicit "-print"; make sure to specifytv1-8/+8
it explicitly (as with other ${FIND} usage here).
2005-02-13Corrected a misspelling of a variable. I used $rebooted in a shell code,rillig1-2/+2
which had better been $$rebooted (Makefile quoting). Approved by jlam.
2005-02-12Don't use the -nt operator for ${TEST}. It is not defined in POSIX, andrillig1-5/+8
not provided by the Solaris 9 /bin/sh. Use the find(1) -newer expression instead, as it expresses exactly what we want, compared to the "ls -t" hack.
2005-02-11Whitespace formatting nits.tv1-5/+5
2005-02-11Consolidate PLIST_SRC default generation and the plethora of failsafetv1-139/+125
error checks into labelled blocks toward the top of the file. While here, remove the historic (now completely empty; it was replaced by PKG_FAIL_REASON some time ago) uptodate-pkgtools target and the references to it.
2005-02-11Visual cleanup from tv-derecurse:tv1-65/+58
Consolidate many MAKE_ENVs and SCRIPTS_ENVs into a common block. (CONFIGURE_ENVs to be done later.) Introduce new variable ALL_ENV which is automatically included into all of MAKE_ENV, SCRIPTS_ENV, and CONFIGURE_ENV; this allows much cleaner addition of the common CC/CXX/CFLAGS/etc. variables needed by all of these.
2005-02-11Migrate the big block of USE_PERL5 and PERL5_REQD logic to bsd.pkg.use.mk.tv1-80/+1
2005-02-11Migrate several USE_* logic blocks, previously sprinkled liberallytv1-74/+1
throughout bsd.pkg.mk, to labelled blocks in bsd.pkg.use.mk.
2005-02-11Merge down some more visual cleanup from tv-derecurse to reduce divergence.tv1-100/+47
Part of this, introduce bsd.pkg.use.mk, where the Special Logic invoked by various pkgsrc-wide USE_* variables will be migrated/consolidated.
2005-02-09"replace" should depend on ${_PKGSRC_BUILD_TARGETS}, just like "install".tv1-2/+2
2005-02-04Bump PKGTOOLS_REQD to 20050204. This version of pkg_install passesjlam1-2/+2
the correct information to the +INSTALL and +DEINSTALL scripts to fix problems with binary packages incorrectly locating the reference counts database, e.g. /var/db.refcount.
2005-01-28Don't make pkgsrc depend on dc(1) to be present in the system. Sincejlam1-10/+5
we already use awk so pervasively in pkgsrc, simply use awk in place of dc for simple computations.
2005-01-27Move the creation of ${PKG_DB_TMPDIR} to when we create ${WRKDIR}.jlam1-2/+3
This ensures that it's always created with the same user/group/mode as ${WRKDIR}, so if a non-root user thinks he has permissions to remove ${WRKDIR}, then that expectation will remain true for ${PKG_DB_TMPDIR}.
2005-01-27Fix handling of PREPEND_PATH in dependency-recursed builds.tv1-1/+3
2005-01-27Move the PREPEND_PATH for LOCALBASE/bin (and optionally X11BASE/bin) to atv1-8/+5
spot that will come before compiler.mk (in bsd.prefs.mk). Previously, LOCALBASE/bin was appearing earlier in the path than work/.<compiler>/bin, which could cause the Wrong Thing to happen.
2005-01-25Relax need to put GNU_CONFIGURE before inclusion of bsd.prefs.mk:tv1-3/+3
Convert _OPSYS_MAX_CMDLEN to a plain _OPSYS_MAX_CMDLEN_CMD variable, which is not evaluated by a shell until CONFIGURE_ENV is expanded (and only then if USE_LIBTOOL+GNU_CONFIGURE are both set).
2005-01-25Add alternatives.mk, a file used to manipulate the alternatives system.jmmv1-1/+5
A package can optionally provide an ALTERNATIVES file which contains pairs of wrapper/alternative, one per line. The file is then used by the install and deinstall scripts to register the alternatives and to create the appropriate wrappers. Make bsd.pkg.mk include this new file. This happens unconditionally to keep all the alternatives logic in an independent file. Otherwise, some of the stuff could have to be moved to bsd.pkg.mk, breaking consistency.
2005-01-24Merge a little visual-only cleanup from the tv-derecurse branch:tv1-103/+71
Collect many modifiable hard-to-find variables scattered throughout bsd.pkg.mk into a common section near the top of the file. (Not necessarily "complete", but helps to reduce HEAD-branch divergence.)
2005-01-24Merge down deferred PREPEND_PATH handling from the tv-derecurse branch.tv1-39/+23
Also merge in deferred CLASSPATH handling, which can now be moved back to java-vm.mk for cleanliness.
2005-01-24Make CHECK_FILES_SKIP_CMD into a single grep, using a ${var:@foo@bar@} loop.tv1-7/+2
2005-01-24Merge down deferred EVAL_PREFIX handling from tv-derecurse branch.tv1-19/+13
Also move its definition later in bsd.pkg.mk, so that it actually works for compiler/*.mk (which is why those files originally had to provide "defaults" for their variables -- they never did get evaluated).
2005-01-24Fix breakage in previous, installed pkg db files should be installed intoxtraeme1-7/+7
${PKG_DB_TMPDIR} not ${_PKG_DB_TMPDIR}, patch from Geoff Wing.
2005-01-23Move the creation of ${PKG_DB_TMPDIR} earlier so that it's created asjlam1-3/+2
the build user instead of the root user. This should allow "make clean" as a non-root user to work again.
2005-01-23Rearrange the register-pkg and post-install-fake-pkg code. All ofjlam1-39/+44
the meta-data files are generated and stored in ${PKG_DB_TMPDIR} by the *-install-fake-pkg targets, and then all of the contents of that directory are simply copied into ${PKG_DBDIR}/${PKGNAME} by register-pkg. This is intended to make (DE)INSTALL scripts be more powerful. Currently, they have no way to keep state on their own. Now, they can keep state in the current working directory. When invoked by pkg_add(1), the current working directory is ${PKG_DBDIR}/${PKGNAME}, so the state files are already stored in the correct place. When invoked by bsd.pkg.mk, the current working directory is ${PKG_DB_TMPDIR}, and any state files generated by the (DE)INSTALL scripts are copied into the correct place by the register-pkg target.
2005-01-23Rework the way that packages are registered during a "make install". Wejlam1-37/+55
split the fake-pkg target into three smaller pieces: pre-install-fake-pkg - Create files in ${WRKSRC}/.pkgdb meant to be installed into ${PKG_DBDIR}/${PKGNAME} that don't depend on the installed files. post-install-fake-pkg - Create files in ${WRKSRC}/.pkgdb meant to be installed into ${PKG_DBDIR}/${PKGNAME} that may depend on the installed files. register-pkg - Copy the files in ${WRKSRC}/.pkgdb and create a few additional meta-files in ${PKG_DBDIR}/${PKGNAME}. The idea is that ${WRKSRC}/.pkgdb contains as much of the state as possible that will be copied into ${PKG_DBDIR}/${PKGNAME}. The INSTALL and DEINSTALL scripts generated by bsd.pkg.install.mk are now invoked with ${WRKSRC}/.pkgdb as the working directory, so the scripts may use the working directory to store temporary files, regardless of whether they're invoked from bsd.pkg.mk or by pkg_add.
2005-01-22message whitespace fixgrant1-2/+2
2005-01-15- Move all CHECK_FILES_SKIP definitions to a central place in bsd.pkg.mk.jmmv1-19/+42
- Move the previous block of code down in the file so that all used variables are defined (specially PKG_SYSCONFDIR). Fixes a problem noticed by kristerw@'s bulk build in comms/minicom. - Ignore diff's return code, which aborts make in NetBSD 1.6.2. Also noticed by kristerw@'s bulk build. - Use full paths to do the checks, instead of relative to ${PREFIX}. Less ambiguity. Matches should be turned into regular expressions that anchor to a whole line (tried that, but found some problems). - Turn CHECK_FILES to NO by default. As said in the previous point, there are still some problems that have to be fixed and minor improvements to be done. And I have no time to fix this ATM. Yes, this definitely needs more testing. I'm sorry for all the noise. (But hey! you should set and try this feature locally! ;-)
2005-01-14Automatically add any of the {CONF,SUPPORT}_FILES and {MAKE,OWN}_DIRS stuffjmmv1-12/+12
to CHECK_FILES_SKIP to avoid some false positives. These directories are created in the pre-install stage so are included in the generated file list. The files are also added to silence some problems that may arise during "make replace". Found by wiz@ in the gtk2 package.
2005-01-14Add the check-files target: when enabled, this verifies that installedjmmv1-1/+98
packages do not install more files than expected (nor delete existing files), aside other sanity checks in PKG_SYSCONFDIR and VARBASE. This behavior is only enabled if PKG_DEVELOPER is set and CHECK_FILES is YES (the default). Should let us catch problems in other systems, as some packages install different files depending on the OS they are being built (which is different to see). Furthermore, since the sanity checks done in PKG_SYSCONFDIR and VARBASE are quite agressive, only enable them when CHECK_FILES_STRICT is YES (defaults to NO). Developers should enable this feature to detect errors, but this can't be a default yet. Otherwise, lots of packages could be marked broken in bulk builds (they really are, according to "cleanliness" rules, but most of them are non-trivial to fix).
2005-01-14Only do the config.* overrides iff GNU_CONFIGURE. (defined() check neededtv1-12/+14
to make older bmakes happy.)
2005-01-14Add override for uncommon "config.rpath" GNU config snippet. Use platformtv1-10/+21
file to indicate that override logic should be turned on. (AFAICT, only Interix is afflicted at the moment.)
2005-01-13Put back the proper variable construct for LIBTOOL_REQD that was borken intv1-5/+3
previous. (_OPSYS_LIBTOOL_REQD is only defined on some platforms, so the :U clause provides the next best choice if that's not defined.)
2005-01-12Nuke USE_FORTRAN and bring the f2c handling within the mk/compilerjlam1-31/+9
framework. The list of changes include: * Modify compiler.mk so that "c" is always prepended to USE_LANGUAGES, so we no longer need to say it in package Makefiles. Packages should now append to USE_LANGUAGES instead of setting it. * Create mk/compiler/f2c.mk which implements another pseudo-compiler "f2c" that may be used with any C compiler backend, e.g. PKGSRC_COMPILER= f2c ccache gcc * Teach the various "real" compiler files, e.g., sunpro.mk, mipspro.mk, etc., to use f2c if the native Fortran compiler isn't present. Packages that use Fortran should now simply include the line: USE_LANGUAGES+= fortran in the package Makefile.
2005-01-11Redo previous because it had a chance to cause serious problems, and wasjmmv1-4/+4
already demonstrated by imake failing. So, instead of fiddling with PATH's value in multiple places, rely on PREPEND_PATH to get things right. Hopefully this will DTRT. At least several local tests have worked without problems.
2005-01-11Reverse PATH order in many places: instead of appending ${LOCALBASE}/binjmmv1-4/+6
and ${X11BASE}/bin to the current PATH, _prepend_ them. This way we will pick our own binaries in favour of the system ones, in the cases where conflicts exist. Also add a PREPEND_PATH for ${LOCALBASE}/bin. This should fix several packages on non-NetBSD systems. For example, ispell-spanish under Linux comes to mind, as it was using the 'ispell' binary from /usr/bin instead of the one in /usr/pkg/bin to get its configuration information. Ideally, buildlink could handle this as it does for libraries, hidding unexpected binaries ;-) No objections in tech-pkg@ (or packages@; I don't remember the exact list where I asked).
2005-01-10Allow the creation of error handlers for shell commands in make targets.jlam1-3/+41
PKG_ERROR_CLASSES is a list of error handlers, PKG_ERROR_HANDLER.<class>, to create. The default error handler will rethrow the exit code after emitting an error message that may be specified per-class with PKG_ERROR_MSG.<class>. Create error messages for the configure and build phases that inform the user of places to go looking for why the build didn't complete.
2005-01-10Remove redundant CONFIGURE_ENV lines (they're already present in thejlam1-3/+1
shell environment passed in the do-configure target.
2004-12-31Add the perl path to CONFIGURE_ENV here, so that we don't have to fixminskim1-1/+2
every package using perl.
2004-12-29Use GNU make on Linux when USE_IMAKE=yes, because Makefile generatedminskim1-1/+4
by imake on Linux requires GNU make.
2004-12-27Remove USERADD and GROUPADD definitions from OSes where the useraddjlam1-3/+1
and groupadd commands won't follow the calling conventions of the NetBSD useradd/groupadd. Modify the INSTALL scripts to *never* create users or groups if there is no available ${USERADD} or ${GROUPADD} command, but will warn the user of users and groups that need to be created before the package can be installed.
2004-12-21Whitespace police - no functional changeagc1-53/+51
2004-12-18Ensure that libtool-base>=1.5.10nb7 is required for packages that setjlam1-4/+6
USE_FORTRAN.