diff options
author | grant <grant@pkgsrc.org> | 2003-10-11 05:09:39 +0000 |
---|---|---|
committer | grant <grant@pkgsrc.org> | 2003-10-11 05:09:39 +0000 |
commit | bd1a3a58f0787977e0bb7bc3736df8120d9458ac (patch) | |
tree | ddc313e9872dfff802e3d629ff97051cddde7cc2 /mk | |
parent | 264f7d1b3bee553f0f8d71f2422fe5caa2f43f5c (diff) | |
download | pkgsrc-bd1a3a58f0787977e0bb7bc3736df8120d9458ac.tar.gz |
add a BUILD_DEPENDS on devel/patch if no suitable patch(1) is
available.
fixes my PR pkg/18380, with hints from jschauma.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.pkg.mk | 20 | ||||
-rw-r--r-- | mk/defs.IRIX.mk | 17 | ||||
-rw-r--r-- | mk/defs.SunOS.mk | 10 |
3 files changed, 39 insertions, 8 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index a89873387a1..936da205308 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.1294 2003/10/11 03:43:14 grant Exp $ +# $NetBSD: bsd.pkg.mk,v 1.1295 2003/10/11 05:09:39 grant Exp $ # # This file is in the public domain. # @@ -460,6 +460,24 @@ FETCH_CMD?= /usr/bin/ftp TOUCH_FLAGS?= -f +# determine if we need GNU patch from pkgsrc. +_NEED_PATCH!= if [ -d ${PATCHDIR} ]; then \ + if [ "`${ECHO} ${PATCHDIR}/patch-*`" != "${PATCHDIR}/patch-*" ]; then \ + ${ECHO} YES; \ + else \ + ${ECHO} NO; \ + fi \ + else \ + ${ECHO} NO; \ + fi +.if defined(PATCHFILES) +_NEED_PATCH= YES +.endif + +.if ${_NEED_PATCH} == "YES" && !exists(${PATCH:C|-.*||}) && empty(PKGPATH:Mdevel/patch) +BUILD_DEPENDS+= patch>=2.2:../../devel/patch +.endif + PATCH_STRIP?= -p0 PATCH_DIST_STRIP?= -p0 .if defined(PATCH_DEBUG) || defined(PKG_VERBOSE) diff --git a/mk/defs.IRIX.mk b/mk/defs.IRIX.mk index bc7b543cc94..f5f7acae373 100644 --- a/mk/defs.IRIX.mk +++ b/mk/defs.IRIX.mk @@ -1,4 +1,4 @@ -# $NetBSD: defs.IRIX.mk,v 1.34 2003/09/23 07:26:23 grant Exp $ +# $NetBSD: defs.IRIX.mk,v 1.35 2003/10/11 05:09:39 grant Exp $ # # Variable definitions for the IRIX operating system. @@ -53,7 +53,17 @@ MTREE?= ${LOCALBASE}/sbin/mtree MTREE?= ${LOCALBASE}/bin/mtree MV?= /sbin/mv NICE?= /sbin/nice +.if exists(${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}patch) +PATCH?= ${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}patch +.else +PATCHV!= /usr/sbin/patch -v 2>&1 | ${CUT} -d" " -f3 +. if ${PATCHV} == "2.1" +_OPSYS_GPATCH_REQD= YES +PATCH= ${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}patch +. else PATCH?= /usr/sbin/patch -b +. endif # PATCHV +.endif PAX?= ${LOCALBASE}/bin/pax PERL5?= ${LOCALBASE}/bin/perl PKGLOCALEDIR?= share @@ -121,7 +131,12 @@ _OPSYS_NEEDS_XPKGWEDGE= yes # xpkgwedge is required for X11 _OPSYS_PERL_REQD= # no base version of perl required _OPSYS_PTHREAD_AUTO= no # -lpthread needed for pthreads _OPSYS_RPATH_NAME= -rpath, # name of symbol in rpath directive to linker +if defined(_OPSYS_GPATCH_REQD) && ${_OPSYS_GPATCH_REQD} == "YES" +_PATCH_CAN_BACKUP= yes # patch(1) can make backups +_PATCH_BACKUP_ARG= -b -V simple -z # switch to patch(1) for backup suffix +.else _PATCH_CAN_BACKUP= no # native patch(1) can make backups +.endif _PREFORMATTED_MAN_DIR= man # directory where catman pages are _USE_GNU_GETTEXT= no # Don't use GNU gettext _USE_RPATH= yes # add rpath to LDFLAGS diff --git a/mk/defs.SunOS.mk b/mk/defs.SunOS.mk index d1ae454eb21..5f1951b1c40 100644 --- a/mk/defs.SunOS.mk +++ b/mk/defs.SunOS.mk @@ -1,4 +1,4 @@ -# $NetBSD: defs.SunOS.mk,v 1.70 2003/10/11 02:44:17 grant Exp $ +# $NetBSD: defs.SunOS.mk,v 1.71 2003/10/11 05:09:39 grant Exp $ # # Variable definitions for the SunOS/Solaris operating system. @@ -55,11 +55,9 @@ MTREE?= ${ZOULARISBASE}/bin/mtree MV?= /usr/bin/mv NICE?= /usr/xpg4/bin/nice .if exists(/usr/bin/gpatch) -PATCH?= /usr/bin/gpatch -b -.elif exists(${LOCALBASE}/bin/gpatch) -PATCH?= ${LOCALBASE}/bin/gpatch -b +PATCH?= /usr/bin/gpatch .else -PATCH?= ${LOCALBASE}/bin/patch -b +PATCH?= ${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX}patch .endif .if exists(${LOCALBASE}/bin/pax) PAX?= ${LOCALBASE}/bin/pax @@ -131,7 +129,7 @@ _OPSYS_PERL_REQD= # no base version of perl required _OPSYS_PTHREAD_AUTO= no # -lpthread needed for pthreads _OPSYS_RPATH_NAME= -R # name of symbol in rpath directive to linker _PATCH_CAN_BACKUP= yes # native patch(1) can make backups -_PATCH_BACKUP_ARG= -V simple -z # switch to patch(1) for backup suffix +_PATCH_BACKUP_ARG= -b -V simple -z # switch to patch(1) for backup suffix _PREFORMATTED_MAN_DIR= man # directory where catman pages are _USE_GNU_GETTEXT= yes # Use GNU gettext _USE_RPATH= yes # add rpath to LDFLAGS |