From 4db7ebb47ca9ea753f8ce98b386058bf2063388a Mon Sep 17 00:00:00 2001 From: Jan S Date: Tue, 28 Jan 2014 01:49:55 +0100 Subject: [PATCH 01/18] mutt-kz update notmuch support is now build in, not just promised. --- srcpkgs/mutt-kz/template | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/srcpkgs/mutt-kz/template b/srcpkgs/mutt-kz/template index d330c59d1be..c803c6f68c6 100644 --- a/srcpkgs/mutt-kz/template +++ b/srcpkgs/mutt-kz/template @@ -1,17 +1,22 @@ # Template file for 'mutt-kz' pkgname=mutt-kz -version=20130402 -revision=1 -hostmakedepends="pkg-config automake" -makedepends="openssl-devel ncurses-devel libidn-devel" +version=20140102 +revision=2 build_style=gnu-configure +configure_args="--enable-notmuch --enable-pop --enable-imap --enable-smtp + --enable-gpgme --with-idn --with-ssl --with-gpgme-prefix=${XBPS_CROSS_BASE}/usr + --with-gdbm=${XBPS_CROSS_BASE}/usr mutt_cv_regex_broken=no" + hostmakedepends="perl pkg-config libidn-devel automake " + makedepends="ncurses-devel openssl-devel libidn-devel gpgme-devel mime-types libnotmuch-devel" + depends="notmuch mime-types" + conf_files="/etc/Muttrc" short_desc="mutt fork with notmuch support and another improvements" maintainer="pancake " license="GPL-3" homepage="https://github.com/karelzak/mutt-kz/" do_fetch() { - _githead=29d1357c66ef09642fd0fa8660b3f8173639d6c2 + _githead=be196028c755d3ffff184e9781ac933fbacbd562 git clone git://github.com/karelzak/mutt-kz.git ${pkgname}-${version} cd ${pkgname}-${version} ; git reset --hard ${_githead} } From c0778d63d00644829909f7e2c1cbaaf4ce33803a Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 28 Jan 2014 07:57:22 +0100 Subject: [PATCH 02/18] mutt-kz: multiple improvements. - bump version to match the day that template has been updated. - conflicts with the mutt pkg. - Remove mime files, which are provided by the mime-types pkg. - Move .dist files to usr/share/examples. --- srcpkgs/mutt-kz/template | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/srcpkgs/mutt-kz/template b/srcpkgs/mutt-kz/template index c803c6f68c6..60cf297fa3a 100644 --- a/srcpkgs/mutt-kz/template +++ b/srcpkgs/mutt-kz/template @@ -1,26 +1,38 @@ # Template file for 'mutt-kz' pkgname=mutt-kz -version=20140102 -revision=2 +version=20140128 +revision=1 build_style=gnu-configure configure_args="--enable-notmuch --enable-pop --enable-imap --enable-smtp --enable-gpgme --with-idn --with-ssl --with-gpgme-prefix=${XBPS_CROSS_BASE}/usr --with-gdbm=${XBPS_CROSS_BASE}/usr mutt_cv_regex_broken=no" - hostmakedepends="perl pkg-config libidn-devel automake " - makedepends="ncurses-devel openssl-devel libidn-devel gpgme-devel mime-types libnotmuch-devel" - depends="notmuch mime-types" - conf_files="/etc/Muttrc" +hostmakedepends="perl pkg-config libidn-devel automake" +makedepends="ncurses-devel openssl-devel libidn-devel gpgme-devel mime-types libnotmuch-devel" +depends="notmuch mime-types" +conf_files="/etc/Muttrc" +conflicts="mutt>=0" short_desc="mutt fork with notmuch support and another improvements" maintainer="pancake " license="GPL-3" homepage="https://github.com/karelzak/mutt-kz/" do_fetch() { - _githead=be196028c755d3ffff184e9781ac933fbacbd562 + # latest commit as of ${version} + _githead=be196028c755d3ffff184e9781ac933fbacbd562 + git clone git://github.com/karelzak/mutt-kz.git ${pkgname}-${version} - cd ${pkgname}-${version} ; git reset --hard ${_githead} + cd ${pkgname}-${version} + git reset --hard ${_githead} } pre_configure() { autoreconf -fi } + +post_install() { + # provided by mime-types. + rm ${DESTDIR}/etc/mime.* + # move dist to examples dir. + vmkdir usr/share/examples/${pkgname} + mv ${DESTDIR}/etc/Muttrc.dist ${DESTDIR}/usr/share/examples/${pkgname} +} From 496fe763ab0fca35550133bcd20bb3da9e3ade4a Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 28 Jan 2014 09:45:44 +0100 Subject: [PATCH 03/18] py2cairo: cross build support. --- srcpkgs/py2cairo/files/python-config | 9 +++++++++ srcpkgs/py2cairo/template | 20 +++++++++++++++++--- 2 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 srcpkgs/py2cairo/files/python-config diff --git a/srcpkgs/py2cairo/files/python-config b/srcpkgs/py2cairo/files/python-config new file mode 100644 index 00000000000..18a00e1a4da --- /dev/null +++ b/srcpkgs/py2cairo/files/python-config @@ -0,0 +1,9 @@ +#!/bin/sh + +# python wrapper for cross compilation in xbps +# we simply fake the output of --includes with the cross prefix. +if [ "$1" = "--includes" ]; then + echo "-I${XBPS_CROSS_BASE}/usr/include/python2.7" +fi + +return 0 diff --git a/srcpkgs/py2cairo/template b/srcpkgs/py2cairo/template index 99afada8379..0f4ed4365f2 100644 --- a/srcpkgs/py2cairo/template +++ b/srcpkgs/py2cairo/template @@ -2,8 +2,8 @@ pkgname=py2cairo version=1.10.0 revision=2 -build_style=waf -hostmakedepends="pkg-config which" +build_style=gnu-configure +hostmakedepends="automake libtool pkg-config which python-devel" makedepends="cairo-devel python-devel" depends="python" replaces="pycairo<1.10" @@ -15,9 +15,23 @@ maintainer="Juan RP " distfiles="http://cairographics.org/releases/$pkgname-$version.tar.bz2" checksum=d30439f06c2ec1a39e27464c6c828b6eface3b22ee17b2de05dc409e429a7431 +pre_configure() { + touch ChangeLog + NOCONFIGURE=1 autoreconf -fi +} + +do_configure() { + if [ "$CROSS_BUILD" ]; then + # create a python-config wrapper to fake --includes + install -m755 ${FILESDIR}/python-config ${wrksrc} + export PATH=${wrksrc}:$PATH + fi + env PYTHON=python ./configure ${configure_args} +} + py2cairo-devel_package() { replaces="pycairo-devel<1.10" - depends="python-devel ${sourcepkg}>=${version}" + depends="python-devel ${sourcepkg}>=${version}_${revision}" short_desc+=" - development files" pkg_install() { vmove usr/include From c17c60478d4538b2532c610b8f920dc8d4bdb18c Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 28 Jan 2014 09:58:31 +0100 Subject: [PATCH 04/18] pygobject2: cross build support. --- srcpkgs/pygobject2/template | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/srcpkgs/pygobject2/template b/srcpkgs/pygobject2/template index ae3bfd817da..06160d1311b 100644 --- a/srcpkgs/pygobject2/template +++ b/srcpkgs/pygobject2/template @@ -1,11 +1,11 @@ # Template file for 'pygobject2' pkgname=pygobject2 version=2.28.6 -revision=7 +revision=8 wrksrc=${pkgname%2}-${version} build_style=gnu-configure configure_args="--disable-introspection" -hostmakedepends="pkg-config" +hostmakedepends="automake libtool pkg-config python-devel which glib-devel" makedepends="libffi-devel libglib-devel cairo-devel python-devel py2cairo-devel" depends="cairo python py2cairo" pycompile_module="glib gobject gtk-2.0 pygtk" @@ -17,8 +17,22 @@ maintainer="Juan RP " distfiles="${GNOME_SITE}/${pkgname%2}/2.28/${pkgname%2}-$version.tar.xz" checksum=fb8a1d4f665130a125011659bd347c7339c944232163dbb9a34fd0686577adb8 +pre_configure() { + NOCONFIGURE=1 autoreconf -fi +} + +do_configure() { + if [ "$CROSS_BUILD" ]; then + # XXX share python-config wrapper for all pkgs. + # create a python-config wrapper to fake --includes + install -m755 ${XBPS_SRCPKGDIR}/py2cairo/files/python-config ${wrksrc} + sed -e 's,^PYTHON_CONFIG=.*,PYTHON_CONFIG=./python-config,g' -i configure + fi + ./configure ${configure_args} +} + pygobject2-devel_package() { - depends="libffi-devel libglib-devel py2cairo-devel pygobject2>=${version}" + depends="libffi-devel libglib-devel py2cairo-devel ${sourcepkg}>=${version}_${revision}" short_desc+=" - development files" pycompile_module="usr/share/pygobject/2.0/codegen" replaces="pygobject-devel<3.0.0" From 6bf381436ec9f70c79fbce4637e1ed0e96fc49a1 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 28 Jan 2014 10:07:30 +0100 Subject: [PATCH 05/18] pygtk: cross build support. --- srcpkgs/pygtk/template | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/srcpkgs/pygtk/template b/srcpkgs/pygtk/template index bf1fc560f2b..fa95d44ff44 100644 --- a/srcpkgs/pygtk/template +++ b/srcpkgs/pygtk/template @@ -1,10 +1,10 @@ # Template file for 'pygtk' pkgname=pygtk version=2.24.0 -revision=8 +revision=9 build_style=gnu-configure # XXX: missing python-numpy build dep -hostmakedepends="pkg-config" +hostmakedepends="pkg-config pygobject2-devel>=2.28.6_6" makedepends="python-devel gtk+-devel libxml2-devel pygobject2-devel>=2.28.6_6" depends="python pygobject2 py2cairo" pycompile_module="gtk-2.0/gtk" @@ -15,6 +15,16 @@ maintainer="Juan RP " distfiles="${GNOME_SITE}/$pkgname/2.24/$pkgname-$version.tar.bz2" checksum=cd1c1ea265bd63ff669e92a2d3c2a88eb26bcd9e5363e0f82c896e649f206912 +do_configure() { + if [ "$CROSS_BUILD" ]; then + # XXX share python-config wrapper for all pkgs. + # create a python-config wrapper to fake --includes + install -m755 ${XBPS_SRCPKGDIR}/py2cairo/files/python-config ${wrksrc} + export PATH=${wrksrc}:$PATH + fi + env PYTHON=python ./configure ${configure_args} +} + post_install() { vinstall gtk/gtk-extrafuncs.defs 644 usr/share/pygtk/2.0/defs } From 1332cd4ae198f1ff897fcb810b6aa6736ee1528f Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 28 Jan 2014 10:31:06 +0100 Subject: [PATCH 06/18] build_style/perl-module.sh: add rudimentary cross compile support. --- common/build_style/perl-module.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/common/build_style/perl-module.sh b/common/build_style/perl-module.sh index 989175edd9f..37c5c3a71b0 100644 --- a/common/build_style/perl-module.sh +++ b/common/build_style/perl-module.sh @@ -21,7 +21,11 @@ do_configure() { fi cd $wrksrc - PERL_MM_USE_DEFAULT=1 LD="$CC" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" \ + PERL_MM_USE_DEFAULT=1 GCC="$CC" CC="$CC" LD="$CC" \ + OPTIMIZE="$CFLAGS" \ + CFLAGS="$CFLAGS -I${XBPS_CROSS_BASE}/usr/include" \ + LDFLAGS="$LDFLAGS -L${XBPS_CROSS_BASE}/usr/lib" \ + LDDLFLAGS="-shared $CFLAGS -L${XBPS_CROSS_BASE}/usr/lib" \ perl Makefile.PL ${configure_args} INSTALLDIRS=vendor fi @@ -29,7 +33,11 @@ do_configure() { perlmkf="$wrksrc/$i/Makefile.PL" if [ -f $perlmkf ]; then cd $wrksrc/$i - PERL_MM_USE_DEFAULT=1 LD="$CC" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" \ + PERL_MM_USE_DEFAULT=1 GCC="$CC" CC="$CC" LD="$CC" \ + OPTIMIZE="$CFLAGS" \ + CFLAGS="$CFLAGS -I${XBPS_CROSS_BASE}/usr/include" \ + LDFLAGS="$LDFLAGS -L${XBPS_CROSS_BASE}/usr/lib" \ + LDDLFLAGS="-shared $CFLAGS -L${XBPS_CROSS_BASE}/usr/lib" \ perl Makefile.PL ${make_build_args} INSTALLDIRS=vendor else msg_error "*** ERROR: couldn't find $perlmkf, aborting **\n" @@ -40,7 +48,10 @@ do_configure() { do_build() { : ${make_cmd:=make} - ${make_cmd} ${makejobs} ${make_build_args} ${make_build_target} + ${make_cmd} CC="$CC" LD="$CC" CFLAGS="$CFLAGS" OPTIMIZE="$CFLAGS" \ + LDFLAGS="$LDFLAGS -L${XBPS_CROSS_BASE}/usr/lib" \ + LDDLFLAGS="-shared $CFLAGS -L${XBPS_CROSS_BASE}/usr/lib" \ + ${makejobs} ${make_build_args} ${make_build_target} } do_install() { From 8f9cc69345037843944201ab86fc016e5f1a4330 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 28 Jan 2014 10:32:17 +0100 Subject: [PATCH 07/18] perl-XML-Parser: cross build support. --- srcpkgs/perl-XML-Parser/template | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/srcpkgs/perl-XML-Parser/template b/srcpkgs/perl-XML-Parser/template index 87e0a1df431..584e324e7ec 100644 --- a/srcpkgs/perl-XML-Parser/template +++ b/srcpkgs/perl-XML-Parser/template @@ -1,19 +1,15 @@ # Template build file for 'perl-XML-Parser'. pkgname=perl-XML-Parser version=2.41 -revision=2 -wrksrc="XML-Parser-$version" -homepage="http://search.cpan.org/dist/XML-Parser/" -distfiles="${CPAN_SITE}/XML/XML-Parser-$version.tar.gz" +revision=3 +wrksrc="${pkgname/perl-/}-${version}" build_style=perl-module -hostmakedepends="perl>=5.18" -makedepends="${hostmakedepends} expat-devel" -depends="${hostmakedepends}" +hostmakedepends="perl>=5.18 expat-devel" +makedepends="${hostmakedepends}" +depends="perl>=5.18" short_desc="Perl extension interface to James Clark's XML parser, expat" maintainer="Juan RP " license="GPL-2" +homepage="http://search.cpan.org/dist/${pkgname/perl-/}/" +distfiles="${CPAN_SITE}/XML/${pkgname/perl-/}-${version}.tar.gz" checksum=b48197cd2265a26c5f016489f11a7b450d8833cb8b3d6a46ee15975740894de9 -long_desc=" - This module provides ways to parse XML documents. It is built on top of - XML::Parser::Expat, which is a lower level interface to James Clark's - expat library." From f32ee3abe558fe97726760b31dcfd21c339905cf Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 28 Jan 2014 10:43:08 +0100 Subject: [PATCH 08/18] vte: cross build support. --- srcpkgs/vte/template | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/srcpkgs/vte/template b/srcpkgs/vte/template index 54161b32b0c..1fa7f989e8c 100644 --- a/srcpkgs/vte/template +++ b/srcpkgs/vte/template @@ -1,19 +1,31 @@ # Template build file for 'vte'. pkgname=vte version=0.28.2 -revision=5 +revision=6 build_style=gnu-configure configure_args="--disable-static --with-gtk=2.0" -makedepends="pkg-config intltool gtk+-devel ncurses-devel pygtk-devel" +hostmakedepends="automake gettext-devel gtk-doc gobject-introspection libtool pkg-config intltool python-devel glib-devel pygtk-devel" +makedepends="gtk+-devel ncurses-devel pygtk-devel" short_desc="Terminal widget with improved accessibility and I18N support" maintainer="Juan RP " homepage="http://www.gnome.org" license="LGPL-2.1" distfiles="${GNOME_SITE}/vte/0.28/$pkgname-$version.tar.bz2" checksum=8d04e202b617373dfb47689e5e628febe2c58840b34cccc4af4feb88c48df903 -long_desc=" - Terminal widget with improved font, internationalization and - accessibility support for the GNOME 2 desktop." + +pre_configure() { + NOCONFIGURE=1 autoreconf -fi +} + +do_configure() { + if [ "$CROSS_BUILD" ]; then + # XXX share python-config wrapper for all pkgs. + # create a python-config wrapper to fake --includes + install -m755 ${XBPS_SRCPKGDIR}/py2cairo/files/python-config ${wrksrc} + export PATH=${wrksrc}:$PATH + fi + env PYTHON=python ./configure ${configure_args} +} vte-python_package() { depends="pygtk" @@ -25,11 +37,12 @@ vte-python_package() { } vte-devel_package() { - depends="libglib-devel pango-devel cairo-devel gtk+-devel vte-${version}_${revision}" + depends="libglib-devel pango-devel cairo-devel gtk+-devel vte>=${version}_${revision}" short_desc+=" -- development files" pkg_install() { vmove usr/include vmove usr/lib/pkgconfig + vmove "usr/lib/*.so" vmove usr/share/gtk-doc } } From 74fbd07054677a6a05aa5c5a5940fea8f4f682b9 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 28 Jan 2014 10:50:31 +0100 Subject: [PATCH 09/18] libwnck2: added gir build option to allow cross builds. --- srcpkgs/libwnck2/template | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/srcpkgs/libwnck2/template b/srcpkgs/libwnck2/template index 0d2e32ae531..964b3b376ef 100644 --- a/srcpkgs/libwnck2/template +++ b/srcpkgs/libwnck2/template @@ -1,10 +1,10 @@ # Template build file for 'libwnck2'. pkgname=libwnck2 version=2.30.7 -revision=4 -wrksrc=libwnck-${version} +revision=5 +wrksrc="${pkgname/2/}-${version}" build_style=gnu-configure -hostmakedepends="pkg-config intltool gobject-introspection" +hostmakedepends="pkg-config intltool gdk-pixbuf-devel" makedepends="startup-notification-devel libXres-devel gtk+-devel" short_desc="Library for layout and rendering of text (GTK+2)" maintainer="Juan RP " @@ -12,24 +12,38 @@ homepage="http://www.gnome.org/" license="LGPL-2.1" distfiles="${GNOME_SITE}/libwnck/2.30/libwnck-$version.tar.bz2" checksum=8aabbe6c87b89b170dbd6e1577a89d248323da128fff0b3ab673010f0cd6156c -long_desc=" - libwnck is Window Navigator Construction Kit, i.e. a library to use - for writing pagers and taskslists and stuff. - This package is based in the GTK+2 Toolkit." +# Package build options +build_options="gir" +desc_option_gir="Enable support for building gobject introspection data" + +# Disable gir for cross builds. +if [ -z "$CROSS_BUILD" ]; then + build_options_default="gir" +fi + +if [ "$build_option_gir" ]; then + configure_args+=" --enable-introspection" + hostmakedepends+=" gobject-introspection" +else + configure_args+=" --disable-introspection" +fi post_install() { rm -rf ${DESTDIR}/usr/bin } libwnck2-devel_package() { - depends="gtk+-devel startup-notification-devel libXres-devel libwnck2>=${version}" + depends="gtk+-devel startup-notification-devel libXres-devel ${sourcepkg}>=${version}_${revision}" short_desc+=" -- development files" pkg_install() { vmove usr/include vmove usr/lib/pkgconfig vmove "usr/lib/*.a" - vmove usr/share/gir-1.0 + vmove "usr/lib/*.so" + if [ "$build_option_gir" ]; then + vmove usr/share/gir-1.0 + fi vmove usr/share/gtk-doc } } From 831595ca9b499b1d764ea4f8d505121047278187 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 28 Jan 2014 10:57:01 +0100 Subject: [PATCH 10/18] gpicview: update to 0.2.4. --- srcpkgs/gpicview/template | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/srcpkgs/gpicview/template b/srcpkgs/gpicview/template index a565865fab6..64d5a0169d2 100644 --- a/srcpkgs/gpicview/template +++ b/srcpkgs/gpicview/template @@ -1,13 +1,18 @@ # Template file for 'gpicview' pkgname=gpicview -version=0.2.3 +version=0.2.4 revision=1 build_style=gnu-configure -makedepends="pkg-config intltool libjpeg-turbo-devel gtk+-devel" +hostmakedepends="pkg-config intltool" +makedepends="libjpeg-turbo-devel gtk+-devel desktop-file-utils" depends="desktop-file-utils" short_desc="A Simple and Fast Image Viewer for X" maintainer="Juan RP " homepage="http://lxde.org/" license="GPL-2" -distfiles="${DEBIAN_SITE}/main/g/${pkgname}/${pkgname}_${version}.orig.tar.xz" -checksum=e1cd963e0954677efec3bc08f4318f1214d2b33c1498d402133a7ca35cec0bfd +distfiles="${SOURCEFORGE_SITE}/lxde/${pkgname}-${version}.tar.gz" +checksum=99beb7df6765b386cd3f65b3ff77e9a25027a009db432f02bd60be8558f06ceb + +pre_configure() { + sed -i '/^Categories=/ s/Utility;//' gpicview.desktop.in +} From 89faf0de9545cdf645590db7bda74ce2cff54d5c Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 28 Jan 2014 10:59:15 +0100 Subject: [PATCH 11/18] lxde: unset noarch, so that it's available only in supported platforms. --- srcpkgs/lxde/template | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/srcpkgs/lxde/template b/srcpkgs/lxde/template index 9f32132df48..812b78494f8 100644 --- a/srcpkgs/lxde/template +++ b/srcpkgs/lxde/template @@ -1,8 +1,7 @@ # Template file for 'lxde' pkgname=lxde version=0.5.0 -revision=4 -noarch="yes" +revision=5 build_style=meta makedepends=" openbox @@ -21,9 +20,7 @@ makedepends=" xdg-utils xdg-user-dirs" depends="${makedepends}" -short_desc="LXDE meta-package" +short_desc="The LXDE meta-package" homepage="http://lxde.org" license="GPL-2" maintainer="Juan RP " -long_desc=" - This package installs all required packages for the LXDE desktop system." From 44824e20062993af358c39a273b210b646ed4f7a Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 28 Jan 2014 11:15:04 +0100 Subject: [PATCH 12/18] slim: fix build with newer freetype. --- srcpkgs/slim/template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/srcpkgs/slim/template b/srcpkgs/slim/template index 205e850c37a..df6cd30da35 100644 --- a/srcpkgs/slim/template +++ b/srcpkgs/slim/template @@ -1,11 +1,11 @@ # Template file for 'slim' pkgname=slim version=1.3.6 -revision=2 +revision=3 build_style=cmake -configure_args="-DUSE_PAM=yes -DUSE_CONSOLEKIT=no" +configure_args="-DUSE_PAM=yes -DUSE_CONSOLEKIT=no -DFREETYPE_INCLUDE_DIR_freetype2=${XBPS_CROSS_BASE}/usr/include/freetype2" hostmakedepends="cmake pkg-config" -makedepends="libpng-devel>=1.6 libjpeg-turbo-devel libXrandr-devel libXmu-devel libXft-devel pam-devel" +makedepends="libpng-devel>=1.6 freetype-devel libjpeg-turbo-devel libXrandr-devel libXmu-devel libXft-devel pam-devel" conf_files="/etc/slim.conf /etc/pam.d/slim" systemd_services="slim.service off" short_desc="Desktop-independent graphical login manager for X11" From fbb7da477261a067da6fefb0d87f6370e0339e75 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 28 Jan 2014 12:07:13 +0100 Subject: [PATCH 13/18] common/cross-profiles: add a simple README. --- common/cross-profiles/README | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 common/cross-profiles/README diff --git a/common/cross-profiles/README b/common/cross-profiles/README new file mode 100644 index 00000000000..a9c0a13f417 --- /dev/null +++ b/common/cross-profiles/README @@ -0,0 +1,14 @@ +CROSS PROFILES +============== + +This directory contains cross profiles to allow cross compilation for the specified target. +A cross profile file must provide the following variables: + + - XBPS_TARGET_ARCH (as returned by uname -m) + - XBPS_CROSS_TRIPLET (the cross compiler triplet) + - XBPS_CFLAGS (C compiler flags for host compiler) + - XBPS_CXXFLAGS (C++ compiler flags for the host compiler) + - XBPS_CROSS_CFLAGS (C compiler flags for the cross compiler) + - XBPS_CROSS_CXXFLAGS (C++ compiler flags for the cross compiler) + +A source package matching `cross-${XBPS_CROSS_TRIPLET}' must also exist. From 0abdc0c09e65ba0e22a784f0345bb5d49db87c1a Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 28 Jan 2014 12:08:52 +0100 Subject: [PATCH 14/18] common/build_style: added a simple README. --- common/build_style/README | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 common/build_style/README diff --git a/common/build_style/README b/common/build_style/README new file mode 100644 index 00000000000..8ed990b7242 --- /dev/null +++ b/common/build_style/README @@ -0,0 +1,12 @@ +BUILD STYLES +============ + +These shell snippets provide support for multiple build systems, i.e GNU configure, +CMake, etc. A build style file must provide at least the following functions: + + - do_configure + - do_build + - do_install + +If a source package defines its own do_xxx() function, the function defined in +the build style file is simply ignored. From eba93e2adb54659bce76e86ebd9f51523e15711c Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 28 Jan 2014 12:10:04 +0100 Subject: [PATCH 15/18] common: added a helpers directory with common shell helpers. --- common/helpers/README | 25 ++++++++++++++++ common/helpers/replace-interpreter.sh | 41 +++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 common/helpers/README create mode 100644 common/helpers/replace-interpreter.sh diff --git a/common/helpers/README b/common/helpers/README new file mode 100644 index 00000000000..ff5e3b865cf --- /dev/null +++ b/common/helpers/README @@ -0,0 +1,25 @@ +SHELL HELPERS +============= + +This directory contains shell files that are read by xbps-src and can be used at any +phase when building source packages. Only files with the `.sh' extension will be read. + +A shell helper must provide its own function for use in the source packages. +The following examples illustrates a fake helper named `myhelper.sh' that provides +the `myhelper_func' function: + +myhelper.sh: +... +myhelper_func() { + ... +} +... + +You can then use this helper in a source package like this: + +srcpkgs/foo/template: +... +do_install() { + myhelper_func ... +} +... diff --git a/common/helpers/replace-interpreter.sh b/common/helpers/replace-interpreter.sh new file mode 100644 index 00000000000..1660ac6fa1b --- /dev/null +++ b/common/helpers/replace-interpreter.sh @@ -0,0 +1,41 @@ +# This helper replaces shebang paths pointing to the correct ones +# as used by xbps. Multiple languages are supported: +# +# - GNU Bash +# - Perl +# - Python +# + +bash_regexp=".*sh" +perl_regexp=".*perl[^[:space:]]*" +python_regexp=".*python[^[:space:]]*" + +replace_interpreter() { + local lang="$1" file="$2" trsb orsb + + [ -z $lang -o -z $file ] && return 1 + + case $lang in + bash) + orsb=$bash_regexp + trpath="/bin/bash" + ;; + perl) + orsb=$perl_regexp + trpath="/usr/bin/perl" + ;; + python) + orsb=$python_regexp + trpath="/usr/bin/python" + ;; + *) + ;; + esac + + if [ -f $file ]; then + sed -i -e "1s|^#![[:space:]]*${orsb}|#!${trpath}|" $file + msg_normal "Transformed $lang script: ${file##$wrksrc}.\n" + else + msg_warn "Ignoring unexistent $lang script: ${file##$wrksrc}.\n" + fi +} From 2a76aa6c118d1aecc9b5e002e391f7ba51e25377 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 28 Jan 2014 13:06:01 +0100 Subject: [PATCH 16/18] xbps-src: bump version (v100). --- srcpkgs/xbps-src/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/xbps-src/template b/srcpkgs/xbps-src/template index 5fd71738999..94a813f45e3 100644 --- a/srcpkgs/xbps-src/template +++ b/srcpkgs/xbps-src/template @@ -1,6 +1,6 @@ # Template file for 'xbps-src' pkgname=xbps-src -version=20140127 +version=20140128 revision=1 bootstrap=yes conf_files="/etc/xbps/xbps-src.conf" From 9b3f5617f4d804c6004b7455074db1155d885f76 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 28 Jan 2014 13:07:02 +0100 Subject: [PATCH 17/18] Update infrastructure for xbps-src >= 100. --- .../0000-REQUIREMENTS.sh} | 9 +++------ common/environment/0001-bootstrap.sh | 6 ++++++ common/environment/0001-configure-args.sh | 6 ++++++ common/environment/0002-cross.sh | 8 ++++++++ common/{vars.sh => environment/0003-misc.sh} | 0 common/environment/README | 11 +++++++++++ 6 files changed, 34 insertions(+), 6 deletions(-) rename common/{global-defs.sh => environment/0000-REQUIREMENTS.sh} (70%) create mode 100644 common/environment/0001-bootstrap.sh create mode 100644 common/environment/0001-configure-args.sh create mode 100644 common/environment/0002-cross.sh rename common/{vars.sh => environment/0003-misc.sh} (100%) create mode 100644 common/environment/README diff --git a/common/global-defs.sh b/common/environment/0000-REQUIREMENTS.sh similarity index 70% rename from common/global-defs.sh rename to common/environment/0000-REQUIREMENTS.sh index 269c5a58d78..04bf5e7f6e6 100644 --- a/common/global-defs.sh +++ b/common/environment/0000-REQUIREMENTS.sh @@ -7,13 +7,10 @@ # ========================================================= # # xbps-src version. -XBPS_SRC_REQ=98 +export XBPS_SRC_REQ=98 # XBPS utils version. -XBPS_UTILS_REQ=0.29 +export XBPS_UTILS_REQ=0.29 # XBPS utils API version. -XBPS_UTILS_API_REQ=20131224 - -# Obsolete since xbps-src>=96 (base-chroot version). -BASE_CHROOT_REQ=0.40_1 +export XBPS_UTILS_API_REQ=20131224 diff --git a/common/environment/0001-bootstrap.sh b/common/environment/0001-bootstrap.sh new file mode 100644 index 00000000000..5d4aed052e8 --- /dev/null +++ b/common/environment/0001-bootstrap.sh @@ -0,0 +1,6 @@ +# This file sets some envvars to allow building bootstrap packages +# when the chroot is not yet ready. + +[ -z "$CHROOT_READY" ] && return 0 + +export PKG_CONFIG_PATH="${XBPS_MASTERDIR}/usr/lib/pkgconfig:${XBPS_MASTERDIR}/usr/share/pkgconfig" diff --git a/common/environment/0001-configure-args.sh b/common/environment/0001-configure-args.sh new file mode 100644 index 00000000000..e9b5fb7e5e6 --- /dev/null +++ b/common/environment/0001-configure-args.sh @@ -0,0 +1,6 @@ +# This file sets up configure_args with commong settings for packages +# that don't set $build_style or set it to gnu-configure. + +if [ "$build_style" = "gnu-configure" -o -z "$build_style" ]; then + export configure_args="--prefix=/usr --sysconfdir=/etc --infodir=/usr/share/info --mandir=/usr/share/man --localstatedir=/var ${configure_args}" +fi diff --git a/common/environment/0002-cross.sh b/common/environment/0002-cross.sh new file mode 100644 index 00000000000..bfcec33a863 --- /dev/null +++ b/common/environment/0002-cross.sh @@ -0,0 +1,8 @@ +# This file sets some envvars to allow cross compiling packages. + +[ -z "$CROSS_BUILD" ] && return 0 + +export PKG_CONFIG_SYSROOT_DIR="$XBPS_CROSS_BASE" +export PKG_CONFIG_PATH="$XBPS_CROSS_BASE/lib/pkgconfig:$XBPS_CROSS_BASE/usr/share/pkgconfig" +export PKG_CONFIG_LIBDIR="$XBPS_CROSS_BASE/lib/pkgconfig" +export configure_args+=" --host=$XBPS_CROSS_TRIPLET --with-sysroot=$XBPS_CROSS_BASE --with-libtool-sysroot=$XBPS_CROSS_BASE " diff --git a/common/vars.sh b/common/environment/0003-misc.sh similarity index 100% rename from common/vars.sh rename to common/environment/0003-misc.sh diff --git a/common/environment/README b/common/environment/README new file mode 100644 index 00000000000..99812870e10 --- /dev/null +++ b/common/environment/README @@ -0,0 +1,11 @@ +ENVIRONMENT SHELL SNIPPETS +========================== + +This directory contains shell files (must not be executable nor contain a shebang) +that are read by xbps-src when building source packages. The shell files +are read in lexical order (as ordered by shell rules). + +These files shall set environment variables for use in the xbps-src helpers +(libexec/xbps-src-*). Only files with the `.sh' extension are read, so this file +will be simply ignored. + From f0584130c307a6efb622683409834484db287796 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 28 Jan 2014 13:13:34 +0100 Subject: [PATCH 18/18] Require xbps-src >= 100. --- common/environment/0000-REQUIREMENTS.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/environment/0000-REQUIREMENTS.sh b/common/environment/0000-REQUIREMENTS.sh index 04bf5e7f6e6..92fc4eb4427 100644 --- a/common/environment/0000-REQUIREMENTS.sh +++ b/common/environment/0000-REQUIREMENTS.sh @@ -7,7 +7,7 @@ # ========================================================= # # xbps-src version. -export XBPS_SRC_REQ=98 +export XBPS_SRC_REQ=100 # XBPS utils version. export XBPS_UTILS_REQ=0.29