From 93f485a4e931f20263de513561a655a2750871d5 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 15 Dec 2008 07:27:38 +0100 Subject: [PATCH] Added tmpl_vars util. Common vars that can be used in templates. --HG-- extra : convert_revision : 68393e79e5f25d622d9142bf73b09b24ced28733 --- templates/MesaLib.tmpl | 3 +-- templates/e2fsprogs.tmpl | 3 +-- templates/expat.tmpl | 3 +-- templates/flex.tmpl | 2 +- templates/freeglut.tmpl | 3 +-- templates/imlib2.tmpl | 3 +-- templates/libexif.tmpl | 3 +-- templates/libungif.tmpl | 3 +-- templates/libwmf.tmpl | 3 +-- templates/pcre.tmpl | 3 +-- templates/procps.tmpl | 2 +- templates/xmlcatmgr.tmpl | 3 +-- templates/xstow.tmpl | 3 +-- utils/sh/tmpl_funcs.sh | 1 + utils/sh/tmpl_vars.sh | 5 +++++ 15 files changed, 19 insertions(+), 24 deletions(-) create mode 100644 utils/sh/tmpl_vars.sh diff --git a/templates/MesaLib.tmpl b/templates/MesaLib.tmpl index cdc85934931..70d1f677afe 100644 --- a/templates/MesaLib.tmpl +++ b/templates/MesaLib.tmpl @@ -2,8 +2,7 @@ pkgname=MesaLib version=7.2 wrksrc="Mesa-$version" -distfiles=" -http://kent.dl.sourceforge.net/sourceforge/mesa3d/$pkgname-$version.tar.bz2" +distfiles="$SOURCEFORGE_SITE/mesa3d/$pkgname-$version.tar.bz2" build_style=gnu_configure make_build_args="MKDEP=mkdep" configure_args="--with-expat=$XBPS_MASTERDIR" diff --git a/templates/e2fsprogs.tmpl b/templates/e2fsprogs.tmpl index 9dc34b9c4a5..2fe8003e93f 100644 --- a/templates/e2fsprogs.tmpl +++ b/templates/e2fsprogs.tmpl @@ -1,8 +1,7 @@ # Template file for 'e2fsprogs' pkgname=e2fsprogs version=1.41.3 -distfiles=" -http://prdownloads.sourceforge.net/e2fsprogs/$pkgname-$version.tar.gz" +distfiles="$SOURCEFORGE_SITE/e2fsprogs/$pkgname-$version.tar.gz" build_style=gnu_configure configure_args="--enable-htree --enable-elf-shlibs --enable-fsck --enable-e2initrd-helper --disable-rpath --bindir=/bin --sbindir=/sbin diff --git a/templates/expat.tmpl b/templates/expat.tmpl index 1920cfa679a..54d0ca81b4b 100644 --- a/templates/expat.tmpl +++ b/templates/expat.tmpl @@ -1,8 +1,7 @@ # Template file for 'expat' pkgname=expat version=2.0.1 -distfiles=" -http://kent.dl.sourceforge.net/sourceforge/expat/$pkgname-$version.tar.gz" +distfiles="$SOURCEFORGE_SITE/expat/$pkgname-$version.tar.gz" build_style=gnu_configure short_desc="XML parser library written in C" maintainer="Juan RP " diff --git a/templates/flex.tmpl b/templates/flex.tmpl index 26394d9dfc8..2ee98625bd3 100644 --- a/templates/flex.tmpl +++ b/templates/flex.tmpl @@ -1,7 +1,7 @@ # Template file for 'flex' pkgname=flex version=2.5.35 -distfiles="http://prdownloads.sourceforge.net/flex/$pkgname-$version.tar.bz2" +distfiles="$SOURCEFORGE_SITE/flex/$pkgname-$version.tar.bz2" build_style=gnu_configure configure_args="--disable-rpath" short_desc="The Fast Lexical Analyzer" diff --git a/templates/freeglut.tmpl b/templates/freeglut.tmpl index de3331a6368..6912ed44ad6 100644 --- a/templates/freeglut.tmpl +++ b/templates/freeglut.tmpl @@ -2,8 +2,7 @@ pkgname=freeglut version=2.4.0 patch_files="$pkgname-src-Makefile-in.diff" -distfiles=" -http://surfnet.dl.sourceforge.net/sourceforge/freeglut/$pkgname-$version.tar.gz" +distfiles="$SOURCEFORGE_SITE/freeglut/$pkgname-$version.tar.gz" build_style=gnu_configure configure_args="--disable-warnings" make_cmd="$XBPS_MASTERDIR/bin/gmake" diff --git a/templates/imlib2.tmpl b/templates/imlib2.tmpl index b62fa5a5215..9c4df84ce5c 100644 --- a/templates/imlib2.tmpl +++ b/templates/imlib2.tmpl @@ -1,8 +1,7 @@ # Template build file for 'imlib2'. pkgname=imlib2 version=1.4.0 -distfiles=" -http://kent.dl.sourceforge.net/sourceforge/enlightenment/$pkgname-$version.tar.gz" +distfiles="$SOURCEFORGE_SITE/enlightenment/$pkgname-$version.tar.gz" build_style=gnu_configure short_desc="Image manipulation library" maintainer="Juan RP " diff --git a/templates/libexif.tmpl b/templates/libexif.tmpl index 237c8e5a4c4..9241d9176ff 100644 --- a/templates/libexif.tmpl +++ b/templates/libexif.tmpl @@ -1,8 +1,7 @@ # Template build file for 'libexif'. pkgname=libexif version=0.6.16 -distfiles=" -http://kent.dl.sourceforge.net/sourceforge/libexif/$pkgname-$version.tar.bz2" +distfiles="$SOURCEFORGE_SITE/libexif/$pkgname-$version.tar.bz2" build_style=gnu_configure configure_env="ac_cv_path_DOXYGEN=false" make_cmd="$XBPS_MASTERDIR/bin/gmake" diff --git a/templates/libungif.tmpl b/templates/libungif.tmpl index 43fd664fc25..05e594004cf 100644 --- a/templates/libungif.tmpl +++ b/templates/libungif.tmpl @@ -1,8 +1,7 @@ # Template build file for 'libungif'. pkgname=libungif version=4.1.4 -distfiles=" -http://kent.dl.sourceforge.net/sourceforge/giflib/$pkgname-$version.tar.bz2" +distfiles="$SOURCEFORGE_SITE/giflib/$pkgname-$version.tar.bz2" build_style=gnu_configure configure_args="--without-x" configure_env="ac_cv_lib_X11_main=no" diff --git a/templates/libwmf.tmpl b/templates/libwmf.tmpl index 53598a7dd69..3070f2677ec 100644 --- a/templates/libwmf.tmpl +++ b/templates/libwmf.tmpl @@ -1,8 +1,7 @@ # Template build file for 'libwmf'. pkgname=libwmf version=0.2.8.4 -distfiles=" -http://kent.dl.sourceforge.net/sourceforge/wvware/$pkgname-$version.tar.gz" +distfiles="$SOURCEFORGE_SITE/wvware/$pkgname-$version.tar.gz" build_style=gnu_configure configure_args=" --with-sysfontmap=$XBPS_MASTERDIR/share/fonts/fontmap diff --git a/templates/pcre.tmpl b/templates/pcre.tmpl index efaa381c70d..ce269d18ae7 100644 --- a/templates/pcre.tmpl +++ b/templates/pcre.tmpl @@ -1,8 +1,7 @@ # Template file for 'pcre' pkgname=pcre version=7.8 -distfiles=" -http://kent.dl.sourceforge.net/sourceforge/pcre/$pkgname-$version.tar.bz2" +distfiles="$SOURCEFORGE_SITE/pcre/$pkgname-$version.tar.bz2" build_style=gnu_configure configure_args="--enable-utf8 --enable-unicode-properties" short_desc="Perl Compatible Regular Expressions" diff --git a/templates/procps.tmpl b/templates/procps.tmpl index 8328725f278..094398c516f 100644 --- a/templates/procps.tmpl +++ b/templates/procps.tmpl @@ -1,7 +1,7 @@ # Template file for 'procps' pkgname=procps version=3.2.7 -distfiles="http://procps.sourceforge.net/$pkgname-$version.tar.gz" +distfiles="$SOURCEFORGE_SITE/procps/$pkgname-$version.tar.gz" build_style=gnu_makefile make_install_args="DESTDIR=$XBPS_DESTDIR/$pkgname-$version" short_desc="The /proc file system utilities" diff --git a/templates/xmlcatmgr.tmpl b/templates/xmlcatmgr.tmpl index 6148b66b96e..39dc7667e2b 100644 --- a/templates/xmlcatmgr.tmpl +++ b/templates/xmlcatmgr.tmpl @@ -1,8 +1,7 @@ # Template build file for 'xmlcatmgr'. pkgname=xmlcatmgr version=2.2 -distfiles=" -http://kent.dl.sourceforge.net/sourceforge/xmlcatmgr/$pkgname-$version.tar.gz" +distfiles="$SOURCEFORGE_SITE/xmlcatmgr/$pkgname-$version.tar.gz" build_style=gnu_configure short_desc="XML and SGML catalog manager" maintainer="Juan RP " diff --git a/templates/xstow.tmpl b/templates/xstow.tmpl index 7963fb156f6..c42eb435f6f 100644 --- a/templates/xstow.tmpl +++ b/templates/xstow.tmpl @@ -1,8 +1,7 @@ # Template build file for 'xstow'. pkgname=xstow version=0.6.1-unstable -distfiles=" -http://kent.dl.sourceforge.net/sourceforge/xstow/$pkgname-$version.tar.bz2" +distfiles="$SOURCEFORGE_SITE/xstow/$pkgname-$version.tar.bz2" build_style=gnu_configure short_desc="Replacement of GNU Stow written in C++" maintainer="Juan RP " diff --git a/utils/sh/tmpl_funcs.sh b/utils/sh/tmpl_funcs.sh index c876e7c2e6b..75600729958 100644 --- a/utils/sh/tmpl_funcs.sh +++ b/utils/sh/tmpl_funcs.sh @@ -92,6 +92,7 @@ setup_tmpl() if [ -f "$XBPS_TEMPLATESDIR/$pkg.tmpl" ]; then if [ "$pkgname" != "$pkg" ]; then + . $XBPS_SHUTILSDIR/tmpl_vars.sh . $XBPS_TEMPLATESDIR/$pkg.tmpl fi prepare_tmpl diff --git a/utils/sh/tmpl_vars.sh b/utils/sh/tmpl_vars.sh new file mode 100644 index 00000000000..4358232c359 --- /dev/null +++ b/utils/sh/tmpl_vars.sh @@ -0,0 +1,5 @@ +# +# Common vars that can be used by templates. +# + +SOURCEFORGE_SITE="http://downloads.sourceforge.net/sourceforge"