You are not logged in.
I'm suprised there is no package for this. Or at least I couln't find it.
Offline
make one
Frumpus ♥ addict
[mu'.krum.pus], [frum.pus]
Offline
do I miss the point? why should one use it?
Offline
I'm suprised there is no package for this. Or at least I couln't find it.
Erm from what I can see this hasn't been updated for a while?
any particular reason you need colourgcc as not sure how compatibly it would be with recent versions
Offline
It looks that it was working with the latest gcc3. I'll give it a try but it won't be before this week-end or much later.
Offline
do I miss the point? why should one use it?
I was kind of used to have the compiler output in color. You know, warnings in yellow, errors in red. Very easy to spot those things.
Offline
I was kind of used to have the compiler output in color. You know, warnings in yellow, errors in red. Very easy to spot those things.
Okay, I'll see if I can make a working PKGBUILD for you
Offline
It was not that much of a problem, works fine with gcc4, didn't try other compilers.
Didn't quite knew what to do with those echo messages, well, at least it should now be clear what to do.
# Contributor: pressh <pressh@gmail.com>
pkgname=colorgcc
pkgver=1.3.2
pkgrel=1
pkgdesc="A Perl wrapper to colorize the output of compilers with warning / error messages matching the gcc output format. Customizable through a ~/.colorgccrc file."
url="http://www.mindspring.com/~jamoyers/software/"
license="gpl"
source=(http://www.mindspring.com/~jamoyers/software/colorgcc/colorgcc-1.3.2.tar.gz)
depends=()
md5sums=()
conflicts=()
build() {
mkdir $startdir/pkg/usr/ $startdir/pkg/usr/share $startdir/pkg/usr/share/$pkgname
mv -f $startdir/src/$pkgname-$pkgver/colorgcc* $startdir/pkg/usr/share/$pkgname/
mkdir $startdir/pkg/bin
ln -s /usr/share/$pkgname/colorgcc $startdir/pkg/bin/gcc
ln -s /usr/share/$pkgname/colorgcc $startdir/pkg/bin/g++
ln -s /usr/share/$pkgname/colorgcc $startdir/pkg/bin/cc
ln -s /usr/share/$pkgname/colorgcc $startdir/pkg/bin/c++
echo
echo "The following should be done after you installed this package through pacman:"
echo "copy /usr/share/colorgcc/colorgccrc to $HOME/.colorgccrc"
echo "make sure that if you use the compiler as root, this should be your roots home directory"
echo "You will at least have to edit the path variables for the compilers in this file"
echo
}
[edit]
This PKGBUILD assumes that /bin is located in your path variable (/etc/profile) BEFORE /usr/bin, as this is standard in Arch
Offline
pressh was quicker than me
Here's a few comments about the PKGBUILD:
- the echo statements should be in an .install file.
- colorgcc should go in /usr/bin and colorgccrc in /etc
- missing depends (perl)
- default colorgccrc could be patched to use AL paths instead of having the user change them. I assume that most users uses the official package or at least installs the gcc binaries to the same location.
I'll make these changes (plus some cosmetic changes) and post the corrected PKGBUILD & .install file.
Offline
pressh was quicker than me
Here's a few comments about the PKGBUILD:
I think there's a reason for a few of these - the reason it cannot go into the real directory is that the files are named the same thing - I think the symlinks are being set in /bin because thatg comes *first* in most $PATH variables...
that way, running "gcc" will run the wrapper version.
The way around it, of course, is to install to /opt or something and create a profile.d script which does:
export PATH=/opt/colored/:$PATH
and not:
export PATH=$PATH:/opt/colored/
Offline
Snowman wrote:pressh was quicker than me
Here's a few comments about the PKGBUILD:I think there's a reason for a few of these - the reason it cannot go into the real directory is that the files are named the same thing - I think the symlinks are being set in /bin because thatg comes *first* in most $PATH variables...
that way, running "gcc" will run the wrapper version.
The way around it, of course, is to install to /opt or something and create a profile.d script which does:
export PATH=/opt/colored/:$PATHand not:
export PATH=$PATH:/opt/colored/
It is the wrapper colorgcc that should go in /usr/bin. The links can go in /bin or in another location as you explained. Here's my PKGBUILD below. I'll put it in AUR unless pressh or someone else is interested in maintaining it in AUR.
pkgname=colorgcc
pkgver=1.3.2
pkgrel=1
pkgdesc="A Perl wrapper to colorize the output of compilers with warning / error messages matching the gcc output format."
url="http://www.mindspring.com/~jamoyers/software/"
license="GPL"
depends=('perl')
install=colorgcc.install
source=(http://www.mindspring.com/~jamoyers/software/colorgcc/$pkgname-$pkgver.tar.gz)
md5sums=('7d62f92ab99c8271c79c40a0a470e8f7')
build() {
cd $startdir/src/$pkgname-$pkgver
sed -i 's|/usr/local/bin|/usr/bin|' colorgccrc
install -D -m644 colorgccrc $startdir/pkg/etc/colorgccrc
install -D -m755 colorgcc $startdir/pkg/usr/bin/colorgcc
install -d $startdir/pkg/bin
ln -s /usr/bin/colorgcc $startdir/pkg/bin/gcc
ln -s /usr/bin/colorgcc $startdir/pkg/bin/g++
ln -s /usr/bin/colorgcc $startdir/pkg/bin/cc
ln -s /usr/bin/colorgcc $startdir/pkg/bin/c++
}
colorgcc.install:
post_install() {
cat << EOF
==> The following should be done after you installed this package through pacman:
==> copy /etc/colorgccrc to $HOME/.colorgccrc
==> Make sure that if you use the compiler as root, this should also be your roots home directory.
EOF
}
post_upgrade() {
post_install $1
}
op=$1
shift
$op $*
Offline
Here's my PKGBUILD below. I'll put it in AUR unless pressh or someone else is interested in maintaining it in AUR.
It's your baby (Don't think collorgcc get's much upgraded though)
Offline
Thanks! I will try it tomorrow at work
Offline
Now in AUR : http://aur.archlinux.org/packages.php?d … =1&ID=2384
Offline