diff --git a/templates/bzip2.tmpl b/templates/bzip2.tmpl index 39007cee1a..97de8ea347 100644 --- a/templates/bzip2.tmpl +++ b/templates/bzip2.tmpl @@ -1,7 +1,6 @@ # Template build file for 'bzip2'. pkgname=bzip2 version=1.0.5 -patch_files="$pkgname-fix-install.diff" distfiles="http://www.bzip.org/1.0.5/$pkgname-$version@.tar.gz" build_style=gnu_makefile make_build_target="-f Makefile-libbz2_so" diff --git a/templates/cpio.tmpl b/templates/cpio.tmpl index 33f19dfe94..3bcd552db9 100644 --- a/templates/cpio.tmpl +++ b/templates/cpio.tmpl @@ -1,7 +1,6 @@ # Template file for 'cpio' pkgname=cpio version=2.9 -patch_files="$pkgname-fix-build.diff" distfiles="http://ftp.gnu.org/gnu/$pkgname/$pkgname-$version@.tar.gz" build_style=gnu_configure short_desc="GNU copy-in/out (cpio) with remote magnetic tape (rmt) support" diff --git a/templates/firefox.tmpl b/templates/firefox.tmpl index 89efc56b83..a1a4c1ef10 100644 --- a/templates/firefox.tmpl +++ b/templates/firefox.tmpl @@ -2,7 +2,6 @@ pkgname=firefox version=3.0.3 wrksrc=mozilla -patch_files="$pkgname-fix-build.diff" distfiles=" http://sunsite.rediris.es/pub/mozilla.org/firefox/releases/3.0.3/source/$pkgname-$version-source@.tar.bz2" build_style=gnu_configure diff --git a/templates/gdbm.tmpl b/templates/gdbm.tmpl index 8a98f317bf..607443c60f 100644 --- a/templates/gdbm.tmpl +++ b/templates/gdbm.tmpl @@ -1,7 +1,6 @@ # Template file for 'gdbm' pkgname=gdbm version=1.8.3 -patch_files="$pkgname-fix-install.diff" distfiles="http://ftp.gnu.org/gnu/$pkgname/$pkgname-$version@.tar.gz" build_style=gnu_configure short_desc="GNU database routines" diff --git a/templates/gzip.tmpl b/templates/gzip.tmpl index 6f40c79627..1374c2846b 100644 --- a/templates/gzip.tmpl +++ b/templates/gzip.tmpl @@ -1,7 +1,6 @@ # Template file for 'gzip' pkgname=gzip version=1.3.12 -patch_files="$pkgname-fix-build.diff" distfiles="http://ftp.gnu.org/gnu/gzip/$pkgname-$version@.tar.gz" build_style=gnu_configure short_desc="GNU compression utility (replacement for compress)" diff --git a/templates/mono.tmpl b/templates/mono.tmpl index 79922cd70d..7b44bd9913 100644 --- a/templates/mono.tmpl +++ b/templates/mono.tmpl @@ -1,7 +1,6 @@ # Template build file for 'mono'. pkgname=mono version=2.0 -patch_files="$pkgname-fix-build.diff" distfiles="http://ftp.novell.com/pub/mono/sources/mono/$pkgname-$version@.tar.bz2" tar_override_cmd="$XBPS_MASTERDIR/bin/gtar" build_style=gnu_configure diff --git a/templates/openssl.tmpl b/templates/openssl.tmpl index 2acd36fd0d..35bcf87fca 100644 --- a/templates/openssl.tmpl +++ b/templates/openssl.tmpl @@ -1,7 +1,6 @@ # Template file for 'openssl' pkgname=openssl version=0.9.8i -patch_files="$pkgname-fix-install.diff" distfiles="http://www.openssl.org/source/$pkgname-$version@.tar.gz" build_style=configure configure_script="./Configure" diff --git a/templates/procps.tmpl b/templates/procps.tmpl index 6817e97cef..5d379e9e9f 100644 --- a/templates/procps.tmpl +++ b/templates/procps.tmpl @@ -1,7 +1,6 @@ # Template file for 'procps' pkgname=procps version=3.2.7 -patch_files="$pkgname-fix-install.diff" distfiles="http://procps.sourceforge.net/$pkgname-$version@.tar.gz" build_style=gnu_makefile make_install_args="DESTDIR=$XBPS_DESTDIR/$pkgname-$version" diff --git a/templates/sysklogd.tmpl b/templates/sysklogd.tmpl index 85e91a614f..3bcceee0e2 100644 --- a/templates/sysklogd.tmpl +++ b/templates/sysklogd.tmpl @@ -1,7 +1,6 @@ # Template file for 'sysklogd' pkgname=sysklogd version=1.5 -patch_files="$pkgname-fix-install.diff" distfiles=" http://www.infodrom.org/projects/sysklogd/download/$pkgname-$version@.tar.gz" build_style=gnu_makefile diff --git a/templates/util-linux.tmpl b/templates/util-linux.tmpl index e627769dce..9db692f526 100644 --- a/templates/util-linux.tmpl +++ b/templates/util-linux.tmpl @@ -1,7 +1,6 @@ # Template file for 'util-linux' pkgname=util-linux version=2.12r -patch_files="$pkgname-fix-build.diff" distfiles="http://www.kernel.org/pub/linux/utils/util-linux/$pkgname-$version@.tar.bz2" build_style=gnu_configure CFLAGS="-I/usr/include" diff --git a/templates/zlib.tmpl b/templates/zlib.tmpl index 777c6e7e64..954bcdae6d 100644 --- a/templates/zlib.tmpl +++ b/templates/zlib.tmpl @@ -1,7 +1,6 @@ # Template build file for 'zlib' pkgname=zlib version=1.2.3 -patch_files="$pkgname-fix-build.diff" distfiles="http://www.zlib.net/$pkgname-$version@.tar.bz2" build_style=configure CFLAGS="-fPIC -DPIC" diff --git a/xbps.sh b/xbps.sh index 9ca5172ede..399983b2c5 100755 --- a/xbps.sh +++ b/xbps.sh @@ -611,6 +611,14 @@ apply_tmpl_patches() local patch= local i= + # Apply some build/install patches automatically. + if [ -f $XBPS_TEMPLATESDIR/$pkgname-fix-build.diff ]; then + patch_files="$pkgname-fix-build.diff $patch_files" + fi + if [ -f $XBPS_TEMPLATESDIR/$pkgname-fix-install.diff ]; then + patch_files="$pkgname-fix-install.diff $patch_files" + fi + # # If package needs some patches applied before building, # apply them now.