[csw-devel] SF.net SVN: gar:[4484] csw/mgar/pkg
dmichelsen at users.sourceforge.net
dmichelsen at users.sourceforge.net
Mon Apr 27 14:36:18 CEST 2009
Revision: 4484
http://gar.svn.sourceforge.net/gar/?rev=4484&view=rev
Author: dmichelsen
Date: 2009-04-27 12:36:18 +0000 (Mon, 27 Apr 2009)
Log Message:
-----------
anjuta: Add legacy build description from Michael Gernoth
Added Paths:
-----------
csw/mgar/pkg/anjuta/
csw/mgar/pkg/anjuta/trunk/
csw/mgar/pkg/anjuta/trunk/legacy/
csw/mgar/pkg/anjuta/trunk/legacy/scripts/
csw/mgar/pkg/anjuta/trunk/legacy/scripts/analyzer.pl
csw/mgar/pkg/anjuta/trunk/legacy/scripts/human.pl
csw/mgar/pkg/anjuta/trunk/legacy/scripts/pkghelper.pl
csw/mgar/pkg/anjuta/trunk/legacy/sources/
csw/mgar/pkg/anjuta/trunk/legacy/sources/anjuta.about.patch
csw/mgar/pkg/anjuta/trunk/legacy/sources/anjuta.patch
csw/mgar/pkg/anjuta/trunk/legacy/sources/anjuta.patch.header
csw/mgar/pkg/anjuta/trunk/legacy/specs/
csw/mgar/pkg/anjuta/trunk/legacy/specs/Makefile
csw/mgar/pkg/anjuta/trunk/legacy/specs/anjuta
Added: csw/mgar/pkg/anjuta/trunk/legacy/scripts/analyzer.pl
===================================================================
--- csw/mgar/pkg/anjuta/trunk/legacy/scripts/analyzer.pl (rev 0)
+++ csw/mgar/pkg/anjuta/trunk/legacy/scripts/analyzer.pl 2009-04-27 12:36:18 UTC (rev 4484)
@@ -0,0 +1,22 @@
+#!/usr/bin/perl -w
+
+use strict;
+
+my %counter;
+
+while (<>) {
+ if (/\"GET (\/csw\/.*) HTTP\/.\..\"/) {
+ # print "match: $1\n";
+ my $path = $1;
+
+ if ($path =~ /\/csw\/(unstable|stable)\/(sparc|i386)\/5\.(8|9|10)\/([^-]*)-.*\.pkg.gz/) {
+ # print "real match: $1 $2 $3 $4\n";
+ $counter{$4}++;
+ }
+
+ }
+}
+
+foreach my $pkg (reverse(sort {$counter{$a} <=> $counter{$b} or $b cmp $a} (keys(%counter)))) {
+ printf "% 20.20s -> %d\n", $pkg, $counter{$pkg};
+}
Added: csw/mgar/pkg/anjuta/trunk/legacy/scripts/human.pl
===================================================================
--- csw/mgar/pkg/anjuta/trunk/legacy/scripts/human.pl (rev 0)
+++ csw/mgar/pkg/anjuta/trunk/legacy/scripts/human.pl 2009-04-27 12:36:18 UTC (rev 4484)
@@ -0,0 +1,315 @@
+#!/usr/bin/perl -w
+#
+# $Id: human.pl,v 1.1 2004/03/09 10:21:13 simigern Exp $
+#
+# Copyright (c) 2000-2001, Jeremy Mates. This script is free
+# software; you can redistribute it and/or modify it under the same
+# terms as Perl itself.
+#
+# Run perldoc(1) on this file for additional documentation.
+#
+######################################################################
+#
+# REQUIREMENTS
+
+require 5;
+
+use strict;
+
+######################################################################
+#
+# MODULES
+
+use Carp; # better error reporting
+use Getopt::Std; # command line option processing
+
+######################################################################
+#
+# VARIABLES
+
+my $VERSION;
+($VERSION = '$Revision: 1.1 $ ') =~ s/[^0-9.]//g;
+
+my (%opts, $base, $regex);
+
+# various parameters that adjust how the humanization is done
+# these really should be able to be specified on the command line, or
+# read in from a prefs file somewhere, as nobody will agree as to what
+# "proper" human output should look like... :)
+my %format = (
+ # include decimals in output? (e.g. 25.8 K vs. 26 K)
+ 'decimal' => 1,
+ # include .0 in decmail output?
+ 'decimal_zero' => 1,
+ # what to divide file sizes down by
+ # 1024 is generally "Kilobytes," while 1000 is
+ # "kilobytes," technically
+ 'factor' => 1024,
+ # percentage above which will be bumped up
+ # (e.g. 999 bytes -> 1 K as within 5% of 1024)
+ # set to undef to turn off
+ 'fudge' => 0.95,
+ # lengths above which decimals will not be included
+ # for better readability
+ 'max_human_length' => 2,
+ # list of suffixes for human readable output
+ 'suffix' => [ '', 'K', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y' ],
+ );
+
+# default conversion to do nothing
+$base = 1;
+
+# default to working on runs of 4 or more digits
+$regex = '(?:(?<=\s)|(?<=^))(-?\d{4,})(?:\.\d*){0,1}(?=$|\s)';
+
+######################################################################
+#
+# MAIN
+
+# parse command-line options
+getopts('h?kb:m:', \%opts);
+
+help() if exists $opts{'h'} or exists $opts{'?'};
+
+# set the base conversion factor
+if (exists $opts{'b'}) {
+ ($base) = $opts{'b'} =~ m/(\d+)/;
+ die "Error: base should be a positive integer\n" unless $base;
+}
+
+$base = 1024 if exists $opts{'k'};
+
+# set different regex if requried, add matching parens if none
+# detected in input, as we need to match *something*
+$regex = $opts{'m'} if exists $opts{'m'};
+$regex = '(' . $regex . ')' unless $regex =~ m/\(.+\)/;
+
+while (<STDIN>) {
+ s/$regex/humanize($1)/ego;
+ print;
+}
+
+exit;
+
+######################################################################
+#
+# SUBROUTINES
+
+# Inspired from GNU's df -h output, which fixes 133456345 bytes
+# to be something human readable.
+#
+# takes a number, returns formatted string.
+sub humanize {
+ my $num = shift;
+
+ # error checking on input...
+ return $num unless $num =~ m/^-?\d+$/;
+
+ # some local working variables
+ my $count = 0;
+ my $prefix = '';
+ my $tmp = '';
+ my $orig_len = length $num;
+
+ # handle negatives
+ if ($num < 0 ) {
+ $num = abs $num;
+ $prefix = '-';
+ }
+
+ # adjust number to proper base
+ $num *= $base;
+
+ # reduce number to something readable by factor specified
+ while ($num > $format{'factor'}) {
+ $num /= $format{'factor'};
+ $count++;
+ }
+
+ # optionally fudge "near" values up to next higher level
+ if (defined $format{'fudge'}) {
+ if ($num > ($format{'fudge'} * $format{'factor'})) {
+ $count++;
+ $num /= $format{'factor'};
+ }
+ }
+
+ # no .[1-9] decimal on longer numbers for easier reading
+ # only show decimal if format say so
+ if (length sprintf("%.f", $num) > $format{'max_human_length'} ||
+ ! $format{'decimal'}) {
+
+ $tmp = sprintf("%.0f", $num);
+
+ } else {
+ $tmp = sprintf("%.1f", $num);
+
+ # optionally hack trailing .0 as is not needed
+ $tmp =~ s/\.0$// unless $format{'decimal_zero'};
+ }
+
+ # return number with proper style applied and leading whitespace
+ # for proper right-justification
+ $tmp = $prefix . $tmp . $format{'suffix'}->[$count];
+ return (' ' x ($orig_len - length $tmp)) . $tmp;
+}
+
+# a generic help blarb
+sub help {
+ print <<"HELP";
+Usage: $0 [opts]
+
+Script to humanize numbers in data.
+
+Options for version $VERSION:
+ -h/-? Display this message
+
+ -b nn Integer to offset incoming data by.
+ -k Default incoming data to Kilobtyes. Default: bytes.
+
+ -m rr Regex to match what to operate on. Default: $regex.
+
+Run perldoc(1) on this script for additional documentation.
+
+HELP
+ exit;
+}
+
+######################################################################
+#
+# DOCUMENTATION
+
+=head1 NAME
+
+human.pl - humanizes file sizes in data
+
+=head1 SYNOPSIS
+
+Make df(1) output readable on systems lacking the human output option:
+
+ $ df -k | human.pl -k
+
+=head1 DESCRIPTION
+
+Intended as a quick way to humanize the output from random programs
+that displays unreadable file sizes, such as df(1) on large file
+systems:
+
+ $ df -k | grep nfs
+ nfs:/mbt 1026892400 704296472 322595928 69% /mbt
+
+While certain utilities now support humanized output internally, not
+all systems have those utilities. Hence, this perl script is intended
+to fill that gap util more utilities support humanization routines
+directly. This will become more important as file systems continue to
+grow, and the exact number of bytes something takes up less meaningful
+to the user.
+
+The data munged by this script is less accurate, in that rounding is
+done in an effort to make the numbers more readable by a human. In
+the above case, the munged data would look like:
+
+ $ df -k | grep nfs | human.pl -k
+ nfs:/mbt 1.0T 672G 308G 69% /mbt
+
+=head2 Normal Usage
+
+ $ human.pl [options]
+
+See L<"OPTIONS"> for details on the command line switches supported.
+
+human.pl expects the data to be humanized to come via STDIN, and
+results will be piped to STDOUT. Input can either be from a program,
+or you can interactively type numbers into the terminal and get a
+humanized size back.
+
+=head1 OPTIONS
+
+This script currently supports the following command line switches:
+
+=over 4
+
+=item B<-h>, B<-?>
+
+Prints a brief usage note about the script.
+
+=item B<-b> I<base>
+
+Optional integer to factor the incoming data by. The humanizing
+routine operates on bytes by default, so numbers of different formats
+will have to be adjusted accordingly.
+
+The value should be one that adjusts the incoming data to be in bytes
+format; for example, incoming data in Kilobytes would need a base of
+1024 to be converted properly to bytes, as there are 1024 bytes in
+each Kilobyte.
+
+=item B<-k>
+
+Overrides B<-b> and treats the incoming data as if in Kilobytes.
+
+=item B<-m> I<regex>
+
+Optional perl regex to specify what in the incoming data should be
+operated on; the default of digit runs of four or more characters
+should be reasonable in most cases.
+
+Your regex should match integers of some kind; otherwise, the script
+will generally do nothing with your data and not print any warnings.
+If you are matching numbers inside of a more complictated regex, you
+will need to put parentheses around the number you want changed, and
+use non-capturing parentheses for preceeding items, as only $1 is
+passed to the humanizing routine. See perlre(1) for more details.
+
+If you leave parentheses out of your regex, they will be added around
+it by default. This lets you supply regex like '\d{7,}' and have it
+work, which is the same as saying '(\d{7,})' in this case.
+
+=back
+
+=head1 BUGS
+
+=head2 Reporting Bugs
+
+Newer versions of this script may be available from:
+
+http://sial.org/code/perl/
+
+If the bug is in the latest version, send a report to the author.
+Patches that fix problems or add new features are welcome.
+
+=head2 Known Issues
+
+No known issues.
+
+=head1 TODO
+
+Option to read humanizing prefs from a external location would be a
+nice idea.
+
+=head1 SEE ALSO
+
+perl(1)
+
+=head1 AUTHOR
+
+Jeremy Mates, http://sial.org/contact/
+
+=head1 COPYRIGHT
+
+Copyright (c) 2000-2001, Jeremy Mates. This script is free
+software; you can redistribute it and/or modify it under the same
+terms as Perl itself.
+
+=head1 HISTORY
+
+Inspired from the B<-h> option present in GNU df, which is sorely
+lacking in commercial varients of the same name. (On the other hand,
+leaving the job of humanizing to an external script is probably more
+inline with the unix philosphopy of filters.)
+
+=head1 VERSION
+
+ $Id: human.pl,v 1.1 2004/03/09 10:21:13 simigern Exp $
+
+=cut
Added: csw/mgar/pkg/anjuta/trunk/legacy/scripts/pkghelper.pl
===================================================================
--- csw/mgar/pkg/anjuta/trunk/legacy/scripts/pkghelper.pl (rev 0)
+++ csw/mgar/pkg/anjuta/trunk/legacy/scripts/pkghelper.pl 2009-04-27 12:36:18 UTC (rev 4484)
@@ -0,0 +1,696 @@
+#!/opt/csw/bin/perl -w
+use strict;
+use warnings FATAL => 'uninitialized';
+
+use FindBin qw($RealBin $RealScript);
+use File::Basename;
+use Getopt::Long;
+
+my @csw_ignore = qw(
+opt/csw
+opt/csw/bin
+opt/csw/bin/sparcv8
+opt/csw/bin/sparcv8plus
+opt/csw/bin/sparcv8plus+vis
+opt/csw/bin/sparcv9
+opt/csw/lib
+opt/csw/lib/X11
+opt/csw/lib/X11/app-defaults
+opt/csw/lib/sparcv8plus
+opt/csw/lib/sparcv8plus+vis
+opt/csw/lib/sparcv9
+opt/csw/sbin
+opt/csw/share
+opt/csw/share/doc
+opt/csw/share/info
+opt/csw/share/locale
+opt/csw/share/locale/az
+opt/csw/share/locale/az/LC_MESSAGES
+opt/csw/share/locale/be
+opt/csw/share/locale/be/LC_MESSAGES
+opt/csw/share/locale/bg
+opt/csw/share/locale/bg/LC_MESSAGES
+opt/csw/share/locale/ca
+opt/csw/share/locale/ca/LC_MESSAGES
+opt/csw/share/locale/cs
+opt/csw/share/locale/cs/LC_MESSAGES
+opt/csw/share/locale/da
+opt/csw/share/locale/da/LC_MESSAGES
+opt/csw/share/locale/de
+opt/csw/share/locale/de/LC_MESSAGES
+opt/csw/share/locale/el
+opt/csw/share/locale/el/LC_MESSAGES
+opt/csw/share/locale/en at boldquot
+opt/csw/share/locale/en at boldquot/LC_MESSAGES
+opt/csw/share/locale/en at quot
+opt/csw/share/locale/en at quot/LC_MESSAGES
+opt/csw/share/locale/es
+opt/csw/share/locale/es/LC_MESSAGES
+opt/csw/share/locale/et
+opt/csw/share/locale/et/LC_MESSAGES
+opt/csw/share/locale/eu
+opt/csw/share/locale/eu/LC_MESSAGES
+opt/csw/share/locale/fi
+opt/csw/share/locale/fi/LC_MESSAGES
+opt/csw/share/locale/fr
+opt/csw/share/locale/fr/LC_MESSAGES
+opt/csw/share/locale/ga
+opt/csw/share/locale/ga/LC_MESSAGES
+opt/csw/share/locale/gl
+opt/csw/share/locale/gl/LC_MESSAGES
+opt/csw/share/locale/he
+opt/csw/share/locale/he/LC_MESSAGES
+opt/csw/share/locale/hr
+opt/csw/share/locale/hr/LC_MESSAGES
+opt/csw/share/locale/hu
+opt/csw/share/locale/hu/LC_MESSAGES
+opt/csw/share/locale/id
+opt/csw/share/locale/id/LC_MESSAGES
+opt/csw/share/locale/it
+opt/csw/share/locale/it/LC_MESSAGES
+opt/csw/share/locale/ja
+opt/csw/share/locale/ja/LC_MESSAGES
+opt/csw/share/locale/ko
+opt/csw/share/locale/ko/LC_MESSAGES
+opt/csw/share/locale/locale.alias
+opt/csw/share/locale/lt
+opt/csw/share/locale/lt/LC_MESSAGES
+opt/csw/share/locale/nl
+opt/csw/share/locale/nl/LC_MESSAGES
+opt/csw/share/locale/nn
+opt/csw/share/locale/nn/LC_MESSAGES
+opt/csw/share/locale/no
+opt/csw/share/locale/no/LC_MESSAGES
+opt/csw/share/locale/pl
+opt/csw/share/locale/pl/LC_MESSAGES
+opt/csw/share/locale/pt
+opt/csw/share/locale/pt/LC_MESSAGES
+opt/csw/share/locale/pt_BR
+opt/csw/share/locale/pt_BR/LC_MESSAGES
+opt/csw/share/locale/ro
+opt/csw/share/locale/ro/LC_MESSAGES
+opt/csw/share/locale/ru
+opt/csw/share/locale/ru/LC_MESSAGES
+opt/csw/share/locale/sk
+opt/csw/share/locale/sk/LC_MESSAGES
+opt/csw/share/locale/sl
+opt/csw/share/locale/sl/LC_MESSAGES
+opt/csw/share/locale/sp
+opt/csw/share/locale/sp/LC_MESSAGES
+opt/csw/share/locale/sr
+opt/csw/share/locale/sr/LC_MESSAGES
+opt/csw/share/locale/sv
+opt/csw/share/locale/sv/LC_MESSAGES
+opt/csw/share/locale/tr
+opt/csw/share/locale/tr/LC_MESSAGES
+opt/csw/share/locale/uk
+opt/csw/share/locale/uk/LC_MESSAGES
+opt/csw/share/locale/vi
+opt/csw/share/locale/vi/LC_MESSAGES
+opt/csw/share/locale/wa
+opt/csw/share/locale/wa/LC_MESSAGES
+opt/csw/share/locale/zh
+opt/csw/share/locale/zh/LC_MESSAGES
+opt/csw/share/locale/zh_CN
+opt/csw/share/locale/zh_CN/LC_MESSAGES
+opt/csw/share/locale/zh_CN.GB2312
+opt/csw/share/locale/zh_CN.GB2312/LC_MESSAGES
+opt/csw/share/locale/zh_TW
+opt/csw/share/locale/zh_TW/LC_MESSAGES
+opt/csw/share/locale/zh_TW.Big5
+opt/csw/share/locale/zh_TW.Big5/LC_MESSAGES
+opt/csw/share/man
+);
+
+my @csw_dirs = qw();
+#my @csw_dirs = qw(
+#etc/init.d
+#etc/rc0.d
+#etc/rc1.d
+#etc/rc2.d
+#etc/rc3.d
+#etc/rcS.d
+#opt/csw
+#opt/csw/etc
+#opt/csw/bin
+#opt/csw/bin/sparcv8
+#opt/csw/bin/sparcv8plus
+#opt/csw/bin/sparcv8plus+vis
+#opt/csw/bin/sparcv9
+#opt/csw/sbin
+#opt/csw/share
+#opt/csw/share/doc
+#opt/csw/share/locale
+#opt/csw/share/man
+#opt/csw/share/man/man1
+#opt/csw/share/man/man2
+#opt/csw/share/man/man3
+#opt/csw/share/man/man4
+#opt/csw/share/man/man5
+#opt/csw/share/man/man6
+#opt/csw/share/man/man7
+#opt/csw/share/man/man8
+#opt/csw/share/info
+#opt/csw/lib
+#opt/csw/lib/X11
+#opt/csw/lib/X11/app-defaults
+#opt/csw/include
+#opt/csw/libexec
+#opt/csw/var
+#);
+
+my @possible_scripts = qw(request checkinstall preinstall postinstall preremove postremove);
+
+my @sunwsprolocs = ('/opt/forte11x86/SUNWspro/bin', '/opt/forte11/SUNWspro/bin', '/opt/studio/SOS11/SUNWspro/bin', '/opt/studio/SOS10/SUNWspro/bin', '/opt/forte8/SUNWspro/bin', '/opt/SUNWspro/bin');
+my $builddir = $ENV{'BUILDDIR'} || '/opt/build/michael';
+my $packagedir = $ENV{'PACKAGEDIR'} || "${RealBin}/../packages";
+my $content = "/var/sadm/install/contents";
+my %options; # getopt
+
+# variables defined via eval
+my $progname = undef;
+my $version = undef;
+my $buildroot = undef;
+my $category = undef;
+my $vendor = undef;
+my $hotline = 'http://www.opencsw.org/bugtrack/';
+my $email = 'michael at opencsw.org';
+my @sources = undef;
+my $prepatch = undef;
+my @patches = (); # default to no patches
+my $copyright = undef;
+my $build = undef;
+my $suffix = undef;
+my $rev = undef;
+my $arch = undef;
+my $osversion = undef;
+my @packages = undef;
+my @isaexecs = ();
+my $sunwspropath = undef;
+my %attributes = ();
+my %seenpaths = ();
+my %contents = ();
+
+# helper applications
+my $tar = '/opt/csw/bin/gtar';
+
+sub
+prepare
+{
+ chdir($builddir) || die("can't change to $builddir");
+
+ foreach my $source (@sources) {
+ if (($source =~ /tar\.gz$/)
+ ||($source =~ /tgz$/)
+ ||($source =~ /tar\.Z$/)) {
+ system("/bin/gzcat ${RealBin}/../sources/${source} | ${tar} xf -");
+
+ } elsif ($source =~ /tar\.bz2$/) {
+ system("/bin/bzcat ${RealBin}/../sources/${source} | ${tar} xf -");
+
+ } elsif ($source =~ /tar$/) {
+ system("${tar} xf ${RealBin}/../sources/${source}");
+
+ } else {
+ die("don't know how to extrace ${source}");
+ }
+ }
+
+ if (defined($prepatch)) {
+ open(PREPATCH, "> $builddir/prepatch") || die ("can't create $builddir/prepatch: $!");
+ print PREPATCH $prepatch;
+ close(PREPATCH);
+ system("chmod +x $builddir/prepatch");
+ system("/bin/bash -x $builddir/prepatch");
+ unlink("$builddir/prepatch");
+ }
+
+ foreach my $patch (@patches) {
+ chdir("$builddir/@{$patch}[1]") || die("can't change to $builddir/@{$patch}[1]");
+ system("gpatch @{$patch}[2] < ${RealBin}/../sources/@{$patch}[0]");
+ }
+}
+
+sub probe_directory
+{
+ while (my $dir = shift) {
+ -d $dir && return $dir;
+ }
+
+ return undef;
+}
+
+
+sub
+isaexec
+{
+ foreach my $exec (@isaexecs) {
+ open(ISA, "> ${builddir}/isaexec.c") || die("can't create ${builddir}/isaexec.c for overwrite: $!");
+ print ISA <<"EOF";
+#include <unistd.h>
+
+int
+main(int argc, char *argv[], char *envp[])
+{
+ return (isaexec("${exec}", argv, envp));
+}
+EOF
+ close(ISA);
+ system("${sunwspropath}/cc -o ${buildroot}${exec} ${builddir}/isaexec.c");
+ unlink("${builddir}/isaexec.c");
+ }
+}
+
+sub
+build
+{
+ chdir($builddir) || die("can't change to $builddir");
+
+ open(BUILD, "> $builddir/build") || die ("can't create $builddir/build: $!");
+ print BUILD $build;
+ close(BUILD);
+ system("chmod +x $builddir/build");
+ system("/bin/bash -x $builddir/build");
+ unlink("$builddir/build");
+ isaexec();
+ strip();
+}
+
+sub
+compute_ownership
+{
+ my $path = shift;
+ my $perm = shift;
+ my $user = 'root';
+ my $group = 'bin';
+
+ if (%attributes) {
+ $perm = $attributes{$path}->{perm} || $perm;
+ $user = $attributes{$path}->{user} || $user;
+ $group = $attributes{$path}->{group} || $group;
+ }
+
+ return "$perm $user $group\n";
+}
+
+# This functions purpose is to get sure that all directories in /path/to/file
+# are also in file list. It also accounts which filename was packaged in what
+# package. So that it possible to warn the user if a file has been packaed in
+# more than one package.
+
+sub
+verify_path
+{
+ my $r = shift;
+ my $prototype = shift;
+ my $path = shift;
+
+ push(@{$seenpaths{$path}}, "CSW$r->{pkgname}");
+
+ # Handle symlinks in the art of etc/rcS.d/K03cswsamba=../init.d
+ $path =~ s/=.*$//;
+
+ while ('.' ne ($path = dirname($path))) {
+ if (! grep($_ =~ /^d none \/\Q${path}\E\s+/, @$prototype)) {
+ pkgproto($r, $prototype, `echo ${path} | pkgproto`);
+ }
+ }
+}
+
+sub
+pkgproto
+{
+ my $r = shift;
+ my $prototype = shift;
+
+ while (my $line = shift) {
+ my @fields = split(/\s+/, $line);
+ if ($fields[0] eq 'd') {
+ # d none opt/csw 0755 sithglan icipguru
+ if ((! ($fields[2] =~ /\//)) || (grep($fields[2] eq $_, @csw_ignore)) ) {
+ # skip toplevel dirs (opt, etc, ...)
+
+ } elsif (grep($fields[2] eq $_, @csw_dirs)) {
+ unshift(@$prototype, "$fields[0] $fields[1] /$fields[2] ? ? ?\n");
+ } else {
+ unshift(@$prototype, "$fields[0] $fields[1] /$fields[2] " . compute_ownership("/$fields[2]", "$fields[3]"));
+ }
+
+ } elsif ($fields[0] eq 'f') {
+ # f none opt/csw 0755 sithglan icipguru
+ push(@$prototype, "$fields[0] $fields[1] /$fields[2] " . compute_ownership("/$fields[2]", "$fields[3]"));
+ verify_path($r, $prototype, $fields[2]);
+
+ } elsif ( ($fields[0] eq 's')
+ ||($fields[0] eq 'l')) {
+ push(@$prototype, "$fields[0] $fields[1] /$fields[2]\n");
+ verify_path($r, $prototype, $fields[2]);
+ } else {
+ die ("unknown line: <$line>");
+ }
+ }
+}
+
+sub
+generate_prototype
+{
+ my $r = shift;
+
+ my @prototype = ();
+
+ chdir($buildroot) || die("can't change to ${buildroot}: $!");
+ push(@prototype, "i pkginfo\n");
+ push(@prototype, "i depend\n");
+ if (defined(${copyright})) {
+ -f "$builddir/${copyright}" || die("can't find copyrightfile: $!");
+ system("cp $builddir/${copyright} copyright");
+ push(@prototype, "i copyright\n");
+ }
+ foreach my $file (@possible_scripts) {
+ if (defined($r->{"$file"})) {
+ -f "${RealBin}/../sources/$r->{$file}" || die("can't find $file: $!");
+ system("cp -f ${RealBin}/../sources/$r->{$file} $file");
+ push(@prototype, "i $file\n");
+ }
+ }
+
+ my @dirs = `gfind @{$r->{filelist}} -type d | sort | uniq | pkgproto`;
+ pkgproto($r, \@prototype, @dirs);
+ my @links = `gfind @{$r->{filelist}} -type l | sort | uniq | pkgproto`;
+ pkgproto($r, \@prototype, @links);
+ my @files = `gfind @{$r->{filelist}} -type f | sort | uniq | pkgproto`;
+ pkgproto($r, \@prototype, @files);
+
+ open(PROTOTYPE, "> ${buildroot}/prototype") || die("can't open ${buildroot}/prototype for overwrite: $!");
+ print PROTOTYPE @prototype;
+ close(PROTOTYPE);
+}
+
+sub
+uniq
+{
+ my %hash; @hash{@_} = ();
+ return sort keys %hash;
+}
+
+sub
+write_dependencies
+{
+ my $r = shift || die("one reference expected");
+
+ my @out = `pkginfo`;
+ my %pkg = ();
+ foreach my $line (@out) {
+ if ($line =~ /^[^\s]+\s+([^\s]+)\s+([^\s].*)/) {
+ $pkg{$1} = "$2";
+ }
+ }
+
+ open(DEP, '> depend') || die("can't open depend file: $!");
+
+ foreach my $dep (@{$r->{dependencies}}) {
+ if (! defined($pkg{$dep})) {
+ print STDERR "WARNING: FAKEING dependency for <$dep>\n";
+ $pkg{$dep} = 'common - THIS IS A FAKE DEPENDENCY';
+ }
+ print DEP "P $dep $pkg{$dep}\n";
+ }
+
+ if (defined($r->{incompatibilities})) {
+ foreach my $inc (@{$r->{incompatibilities}}) {
+ if (! defined($pkg{$inc})) {
+ print STDERR "WARNING: FAKEING incompatibiltie for <$inc>\n";
+ $pkg{$inc} = 'common - THIS IS A FAKE INCOMPATIBILTY';
+ }
+ print DEP "I $inc $pkg{$inc}\n";
+ }
+ }
+
+ close(DEP);
+}
+
+sub
+resolve_link
+{
+ my $file = shift || die ("one argument expected");
+ my $count = 0;
+
+ chomp($file);
+
+ while ((-l $file)
+ && ($count < 10)) {
+ my $dirname = dirname($file);
+ $file = readlink($file);
+ if(! ($file =~ /^\//)) {
+ $file = $dirname . '/' . $file;
+ }
+ $count++;
+ }
+
+ return $file;
+}
+
+sub
+a1minusa2
+{
+ my ($a1,$a2) = @_;
+ my %h;
+ @h{@$a2} = (1) x @$a2;
+ return grep {!exists $h{$_}} @$a1;
+}
+
+sub
+populate_contents
+{
+ open(FILE, ${content}) || die("can't open ${content}: $!");
+ for my $line (<FILE>) {
+ # /etc/cron.d/queuedefs f none 0644 root sys 17 1164 1018133064 SUNWcsr
+ # 0 1 2 3 4 5 6 7 8 9
+ my @array = split(/\s+/, $line);
+ my ($file, $type, @packages) = @array[0, 1, 9 ... $#array];
+ if ($type =~ /^f$/) {
+ push(@{$contents{$file}}, @packages);
+ }
+ }
+ close(FILE);
+}
+
+sub
+find_dependencies
+{
+ my $r = shift || die("one reference expected");
+ populate_contents();
+
+ chdir(${buildroot}) || die("can't change to ${buildroot}: $!");
+ # look for shared libaries
+ my @deps = `gfind @{$r->{filelist}} \\( -type f -perm +111 \\) -o -path opt/csw/lib/\\*.so\\* | xargs ldd 2> /dev/null | grep -v 'file not found' 2> /dev/null | grep '=>' | awk '{print \$3}'`;
+
+ # look for bangs
+ my @files = `gfind @{$r->{filelist}} -type f -perm +111`;
+ foreach my $file (@possible_scripts) {
+ -f "${buildroot}/${file}" && push(@files, "${buildroot}/${file}");
+ }
+ foreach my $file (@files) {
+ chomp($file);
+ open(FILE, $file) || die("can't open ${file}: $!");
+ my $firstline = <FILE>;
+ if ($firstline =~ /^#!\s?([^\s]+)/) {
+ push(@deps, "$1\n");
+ }
+ close(FILE);
+ }
+
+ # resolve symlinks / substitute
+ @deps = uniq(@deps);
+ for my $element (@deps) {
+ # /bin and /lib are packages in /usr/{bin,lib}
+ $element =~ s#^/bin#/usr/bin#;
+ $element =~ s#^/lib#/usr/lib#;
+ # /opt/csw/lib/sparcv8 is a symlink to .
+ $element =~ s#^/opt/csw/lib/sparcv8#/opt/csw/lib#;
+ # Resolve links if necessary
+ $element = resolve_link($element);
+ }
+
+ # get dependencies
+ foreach my $dep (@deps) {
+ # </usr/lib/../openwin/lib/libX11.so.4>
+ $dep =~ s#\w+\/\.\.##g;
+
+ if (defined($contents{$dep})) {
+ push(@{$r->{dependencies}}, @{$contents{$dep}});
+ }
+ }
+
+ # make them uniq and don't include a dependency to the packet itself
+ @{$r->{dependencies}} = grep("CSW$r->{pkgname}" ne $_, uniq(@{$r->{dependencies}}));
+
+ if (defined($r->{exclude_dependencies})) {
+ @{$r->{dependencies}} = a1minusa2($r->{dependencies}, $r->{exclude_dependencies});
+ }
+
+ write_dependencies($r);
+}
+
+sub
+strip
+{
+ system("/usr/ccs/bin/strip ${buildroot}/opt/csw/bin/* ${buildroot}/opt/csw/bin/sparcv8/* ${buildroot}/opt/csw/bin/sparcv8plus/* ${buildroot}/opt/csw/bin/sparcv8plus+vis/* ${buildroot}/opt/csw/bin/sparcv9/* 2> /dev/null");
+}
+
+sub
+generate_pkginfo
+{
+ my $r = shift || die("one reference expected");
+
+ chdir(${buildroot}) || die("can't change to ${buildroot}: $!");
+ open(PKGINFO, '> pkginfo');
+
+print PKGINFO <<"EOF";
+PKG=CSW$r->{pkgname}
+NAME=$r->{name}
+ARCH=${arch}
+CATEGORY=${category}
+VERSION=${version}
+VENDOR=${vendor}
+HOTLINE=${hotline}
+EMAIL=${email}
+EOF
+# DESC=[Optional extra info about software. Omit this line if you wish]
+ close(PKGINFO);
+}
+
+sub
+actually_package
+{
+ my $r = shift || die("one reference expected");
+
+ my $filename="$r->{filename}-${version}-SunOS${osversion}-${arch}-CSW.pkg";
+
+ chdir(${buildroot}) || die("can't change to ${buildroot}: $!");
+ system("/usr/bin/pkgmk -o -r ${buildroot}");
+ system("/usr/bin/pkgtrans -s /var/spool/pkg ${packagedir}/$filename CSW$r->{pkgname}");
+ unlink("${packagedir}/${filename}.gz");
+ system("/usr/bin/gzip ${packagedir}/$filename");
+ system("rm -rf /var/spool/pkg/CSW$r->{pkgname}");
+}
+
+# This function makes all files not readable by me readable. This is because
+# the bang checker and pkgmk needs this. The correct permissions are allready
+# in pkginfo file so everything is as it should be.
+
+sub
+make_all_files_readable_by_user
+{
+ my $r = shift || die("one reference expected");
+
+ chdir(${buildroot}) || die("can't change to ${buildroot}: $!");
+ system("gfind @{$r->{filelist}} -perm -400 -o -print | xargs -x -n 1 chmod u+r");
+}
+
+sub
+mkpackage
+{
+ foreach my $r (@packages) {
+ generate_prototype($r);
+ make_all_files_readable_by_user($r);
+ generate_pkginfo($r);
+ find_dependencies($r);
+ actually_package($r);
+ }
+
+ foreach my $key (keys(%seenpaths)) {
+ if (1 < @{$seenpaths{$key}}) {
+ print "$key -> @{$seenpaths{$key}}\n";
+ }
+ }
+}
+
+if (! (-d $builddir)) {
+ mkdir("$builddir", 0755) || die("can't create $builddir: $!");
+}
+
+#main
+# {
+
+if (! GetOptions(\%options, "p", "b", "c", "s", "u", "rev=s")) {
+ print <<"__EOF__";
+${RealBin}/${RealScript} [-p] [-b] [-c] [-s] specfile ...
+
+ -p prepare: extract and patch sources
+ -b build: build and install sources into destenation
+ -c create: create package
+ -s show: show build script and exit (high precedence!)
+ -u cleanUp: remove ${builddir}
+ -rev <rev> use <rev> instead of current date
+
+ If no parameter is specified. The given specfile is processed. (eg.
+ prepared, build and packaged)
+__EOF__
+ exit(1);
+}
+
+# Unset makeflags
+$ENV{'MFLAGS'} = '';
+$ENV{'MAKEFLAGS'} = '';
+
+my $infile = shift || die('one argument expected');
+
+if (! defined($arch)) {
+ $arch = `/bin/uname -p` || die("can't get arch: $!");
+ chomp($arch);
+}
+
+$sunwspropath = probe_directory(@sunwsprolocs) || die ("couldn't find SUNWspro");
+
+eval `/bin/cat $infile`;
+
+if (! defined($rev)) {
+ $rev = $options{'rev'} || $ENV{'REV'} || `/bin/date '+20%y.%m.%d'`;
+}
+chomp ($rev);
+
+$version .= ',REV=' . ${rev};
+
+if (defined($suffix)) {
+ $version .= $suffix;
+}
+
+if (! defined($osversion)) {
+ $osversion = `/bin/uname -r`;
+ chomp($osversion);
+}
+
+if (! -d "${packagedir}") {
+ system("/bin/mkdir -p ${packagedir}");
+}
+
+if (! keys(%options)) {
+ prepare();
+ build();
+ mkpackage();
+ exit();
+}
+
+if (defined($options{'s'})) {
+ print $build;
+ exit();
+}
+
+if (defined($options{'p'})) {
+ prepare();
+}
+
+if (defined($options{'b'})) {
+ build();
+}
+
+if (defined($options{'c'})) {
+ mkpackage();
+}
+
+if (defined($options{'u'})) {
+ system("/bin/rm -rf ${builddir}");
+}
+
+# }
Added: csw/mgar/pkg/anjuta/trunk/legacy/sources/anjuta.about.patch
===================================================================
--- csw/mgar/pkg/anjuta/trunk/legacy/sources/anjuta.about.patch (rev 0)
+++ csw/mgar/pkg/anjuta/trunk/legacy/sources/anjuta.about.patch 2009-04-27 12:36:18 UTC (rev 4484)
@@ -0,0 +1,12 @@
+--- src/about.c.orig 2004-06-01 17:43:18.083417542 +0200
++++ src/about.c 2004-06-01 17:43:34.231305154 +0200
+@@ -115,7 +115,8 @@
+ list = NULL;
+ while (!feof(infile) && !ferror (infile))
+ {
+- line = NULL;
++ line = malloc(80);
++ count = 80;
+ getline (&line, &count, infile);
+ if (feof(infile) || ferror (infile))
+ break;
Added: csw/mgar/pkg/anjuta/trunk/legacy/sources/anjuta.patch
===================================================================
--- csw/mgar/pkg/anjuta/trunk/legacy/sources/anjuta.patch (rev 0)
+++ csw/mgar/pkg/anjuta/trunk/legacy/sources/anjuta.patch 2009-04-27 12:36:18 UTC (rev 4484)
@@ -0,0 +1,295 @@
+diff -Nru anjuta-1.2.2.orig/gdl/gdl-dock-item.c anjuta-1.2.2/gdl/gdl-dock-item.c
+--- anjuta-1.2.2.orig/gdl/gdl-dock-item.c 2003-04-10 02:16:07.000000000 -0400
++++ anjuta-1.2.2/gdl/gdl-dock-item.c 2004-05-25 14:38:00.496003000 -0400
+@@ -48,6 +48,10 @@
+ #include "libgdltypebuiltins.h"
+ #include "libgdlmarshal.h"
+
++#define GNOME_CALL_PARENT_INT(parent_class_cast, name, args) \
++ ((parent_class_cast(parent_class)->name != NULL) ? \
++ parent_class_cast(parent_class)->name args : (int)0)
++
+
+ /* ----- Private prototypes ----- */
+
+@@ -853,7 +857,7 @@
+
+ if (GTK_WIDGET_DRAWABLE (widget) && event->window == widget->window) {
+ gdl_dock_item_paint (widget, event);
+- GNOME_CALL_PARENT (GTK_WIDGET_CLASS, expose_event, (widget, event));
++ GNOME_CALL_PARENT_INT (GTK_WIDGET_CLASS, expose_event, (widget, event));
+ }
+
+ return FALSE;
+diff -Nru anjuta-1.2.2.orig/gdl/gdl-dock-object.h anjuta-1.2.2/gdl/gdl-dock-object.h
+--- anjuta-1.2.2.orig/gdl/gdl-dock-object.h 2003-04-10 02:16:07.000000000 -0400
++++ anjuta-1.2.2/gdl/gdl-dock-object.h 2004-05-25 14:24:01.756016000 -0400
+@@ -202,7 +202,7 @@
+
+
+ /* helper macros */
+-#define GDL_TRACE_OBJECT(object, format, args...) \
++#define GDL_TRACE_OBJECT(object, format, ...) \
+ G_STMT_START { \
+ g_log (G_LOG_DOMAIN, \
+ G_LOG_LEVEL_DEBUG, \
+@@ -214,7 +214,7 @@
+ G_OBJECT (object)->ref_count, \
+ (GTK_IS_OBJECT (object) && GTK_OBJECT_FLOATING (object)) ? "(float)" : "", \
+ GDL_IS_DOCK_OBJECT (object) ? GDL_DOCK_OBJECT (object)->freeze_count : -1, \
+- ##args); } G_STMT_END
++ __VA_ARGS__); } G_STMT_END
+
+
+
+diff -Nru anjuta-1.2.2.orig/gdl/gdl-dock-tablabel.c anjuta-1.2.2/gdl/gdl-dock-tablabel.c
+--- anjuta-1.2.2.orig/gdl/gdl-dock-tablabel.c 2003-04-10 02:16:07.000000000 -0400
++++ anjuta-1.2.2/gdl/gdl-dock-tablabel.c 2004-05-25 14:39:30.596086000 -0400
+@@ -35,6 +35,10 @@
+ #include "gdl-dock-item.h"
+ #include "libgdlmarshal.h"
+
++#define GNOME_CALL_PARENT_INT(parent_class_cast, name, args) \
++ ((parent_class_cast(parent_class)->name != NULL) ? \
++ parent_class_cast(parent_class)->name args : (int)0)
++
+
+ /* ----- Private prototypes ----- */
+
+@@ -389,7 +393,7 @@
+ g_return_val_if_fail (event != NULL, FALSE);
+
+ if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_MAPPED (widget)) {
+- GNOME_CALL_PARENT (GTK_WIDGET_CLASS, expose_event, (widget, event));
++ GNOME_CALL_PARENT_INT (GTK_WIDGET_CLASS, expose_event, (widget, event));
+ gdl_dock_tablabel_paint (widget, event);
+ };
+
+diff -Nru anjuta-1.2.2.orig/gdl/gdl-tools.h anjuta-1.2.2/gdl/gdl-tools.h
+--- anjuta-1.2.2.orig/gdl/gdl-tools.h 2003-04-10 02:16:07.000000000 -0400
++++ anjuta-1.2.2/gdl/gdl-tools.h 2004-05-25 14:23:17.676015000 -0400
+@@ -65,13 +65,13 @@
+ __FILE__, \
+ __LINE__); } G_STMT_END
+
+-#define GDL_TRACE_EXTRA(format, args...) G_STMT_START { \
++#define GDL_TRACE_EXTRA(format, ...) G_STMT_START { \
+ g_log (G_LOG_DOMAIN, \
+ G_LOG_LEVEL_DEBUG, \
+ "file %s: line %d: "format, \
+ __FILE__, \
+ __LINE__, \
+- ##args); } G_STMT_END
++ __VA_ARGS__); } G_STMT_END
+ #endif /* __GNUC__ */
+
+ #else /* DO_GDL_TRACE */
+diff -Nru anjuta-1.2.2.orig/global-tags/Makefile.in anjuta-1.2.2/global-tags/Makefile.in
+--- anjuta-1.2.2.orig/global-tags/Makefile.in 2004-04-14 01:07:18.000000000 -0400
++++ anjuta-1.2.2/global-tags/Makefile.in 2004-05-25 14:17:52.406172000 -0400
+@@ -170,7 +170,7 @@
+
+ EXTRA_DIST = create_global_tags.sh
+
+-INCLUDES = -I$(top_srcdir)/tagmanager/include -Wall $(GLIB_CFLAGS)
++INCLUDES = -I$(top_srcdir)/tagmanager/include $(GLIB_CFLAGS)
+
+ noinst_PROGRAMS = tm_global_tags
+
+diff -Nru anjuta-1.2.2.orig/src/launcher.c anjuta-1.2.2/src/launcher.c
+--- anjuta-1.2.2.orig/src/launcher.c 2004-04-08 00:15:31.000000000 -0400
++++ anjuta-1.2.2/src/launcher.c 2004-05-25 14:49:23.346018000 -0400
+@@ -23,7 +23,7 @@
+ #include <unistd.h>
+ #include <fcntl.h>
+ #include <signal.h>
+-#include <pty.h>
++//#include <pty.h>
+ #include <assert.h>
+ #include <gnome.h>
+ #include <termios.h>
+@@ -38,6 +38,91 @@
+ #include "anjuta.h"
+
+ #define FILE_BUFFER_SIZE 1024
++#define __MAX_BAUD B460800
++
++/* Forkpty */
++#include <stdlib.h>
++#include <sys/ioctl.h>
++#include <sys/stream.h>
++#include <sys/stropts.h>
++
++/* fork_pty() remplacement for Solaris.
++ * This ignore the last two arguments
++ * for the moment
++ */
++int
++forkpty (int *amaster,
++ char *name,
++ void *unused1,
++ void *unused2)
++{
++ int master, slave;
++ char *slave_name;
++ pid_t pid;
++
++ master = open("/dev/ptmx", O_RDWR);
++ if (master < 0)
++ return -1;
++
++ if (grantpt (master) < 0)
++ {
++ close (master);
++ return -1;
++ }
++
++ if (unlockpt (master) < 0)
++ {
++ close (master);
++ return -1;
++ }
++
++ slave_name = ptsname (master);
++ if (slave_name == NULL)
++ {
++ close (master);
++ return -1;
++ }
++
++ slave = open (slave_name, O_RDWR);
++ if (slave < 0)
++ {
++ close (master);
++ return -1;
++ }
++
++ if (ioctl (slave, I_PUSH, "ptem") < 0
++ || ioctl (slave, I_PUSH, "ldterm") < 0)
++ {
++ close (slave);
++ close (master);
++ return -1;
++ }
++
++ if (amaster)
++ *amaster = master;
++
++ if (name)
++ strcpy (name, slave_name);
++
++ pid = fork ();
++ switch (pid)
++ {
++ case -1: /* Error */
++ return -1;
++ case 0: /* Child */
++ close (master);
++ dup2 (slave, STDIN_FILENO);
++ dup2 (slave, STDOUT_FILENO);
++ dup2 (slave, STDERR_FILENO);
++ return 0;
++ default: /* Parent */
++ close (slave);
++ return pid;
++ }
++
++ return -1;
++}
++
+ /*
+ static gboolean
+ anjuta_launcher_pty_check_child_exit_code (AnjutaLauncher *launcher,
+diff -Nru anjuta-1.2.2.orig/src/launcher.h anjuta-1.2.2/src/launcher.h
+--- anjuta-1.2.2.orig/src/launcher.h 2004-04-05 06:39:58.000000000 -0400
++++ anjuta-1.2.2/src/launcher.h 2004-05-25 14:51:09.116015000 -0400
+@@ -81,7 +81,7 @@
+ const gchar *charset);
+ void anjuta_launcher_send_stdin (AnjutaLauncher *launcher, const gchar *in);
+ void anjuta_launcher_send_ptyin (AnjutaLauncher *launcher, const gchar *in);
+-gint anjuta_launcher_get_child_pid (AnjutaLauncher *launcher);
++pid_t anjuta_launcher_get_child_pid (AnjutaLauncher *launcher);
+ void anjuta_launcher_reset (AnjutaLauncher *launcher);
+ void anjuta_launcher_signal (AnjutaLauncher *launcher, int sig);
+ void anjuta_launcher_set_buffered_output (AnjutaLauncher *launcher,
+diff -Nru anjuta-1.2.2.orig/src/message-manager-private.cc anjuta-1.2.2/src/message-manager-private.cc
+--- anjuta-1.2.2.orig/src/message-manager-private.cc 2004-04-08 00:15:31.000000000 -0400
++++ anjuta-1.2.2/src/message-manager-private.cc 2004-05-25 14:52:45.936018000 -0400
+@@ -67,7 +67,7 @@
+ #ifdef DEBUG
+ #define DEBUG_PRINT g_message
+ #else
+- #define DEBUG_PRINT(ARGS...)
++ #define DEBUG_PRINT(...)
+ #endif
+
+ enum
+diff -Nru anjuta-1.2.2.orig/src/utilities.c anjuta-1.2.2/src/utilities.c
+--- anjuta-1.2.2.orig/src/utilities.c 2004-04-06 07:26:27.000000000 -0400
++++ anjuta-1.2.2/src/utilities.c 2004-05-25 14:59:35.066006000 -0400
+@@ -37,6 +37,49 @@
+ #include "properties.h"
+ #include "resources.h"
+
++/* This function is only required for SunOS, all other supported OS
++ have this function in their system library. This is taken from viewmol by Joerg-R. Hill */
++
++int scandir(const char *dir, struct dirent ***namelist,
++ int (*select)(const struct dirent *),
++ int (*compar)(const struct dirent **, const struct dirent **))
++{
++ DIR *d;
++ struct dirent *entry;
++ register int i=0;
++ size_t entrysize;
++
++ if ((d=opendir(dir)) == NULL)
++ return(-1);
++
++ *namelist=NULL;
++ while ((entry=readdir(d)) != NULL)
++ {
++ if (select == NULL || (select != NULL && (*select)(entry)))
++ {
++ *namelist=(struct dirent **)realloc((void *)(*namelist),
++ (size_t)((i+1)*sizeof(struct dirent *)));
++ if (*namelist == NULL) return(-1);
++ entrysize=sizeof(struct dirent)-sizeof(entry->d_name)+strlen(entry->d_name)+1;
++ (*namelist)[i]=(struct dirent *)malloc(entrysize);
++ if ((*namelist)[i] == NULL) return(-1);
++ memcpy((*namelist)[i], entry, entrysize);
++ i++;
++ }
++ }
++ if (closedir(d)) return(-1);
++ if (i == 0) return(-1);
++ if (compar != NULL)
++ qsort((void *)(*namelist), (size_t)i, sizeof(struct dirent *), compar);
++
++ return(i);
++}
++
++int alphasort(const struct dirent **a, const struct dirent **b)
++{
++ return(strcmp((*a)->d_name, (*b)->d_name));
++}
++
+ const gchar *
+ extract_filename (const gchar * full_filename)
+ {
+--- anjuta/src/search_preferences.c.orig 2005-03-01 07:47:25.386842000 -0500
++++ anjuta/src/search_preferences.c 2005-03-01 07:48:17.306763000 -0500
+@@ -420,8 +420,11 @@
+ gint nb;
+ GList *list;
+
+- fprintf (stream, "search.setting.nb=%d\n", sps->nb_ss);
+- fprintf (stream, "search.setting.default=%s\n", sps->name_default);
++ if (sps->nb_ss)
++ fprintf (stream, "search.setting.nb=%d\n", sps->nb_ss);
++
++ if (sps->name_default)
++ fprintf (stream, "search.setting.default=%s\n", sps->name_default);
+ list = sps->setting;
+ for (nb=0; nb<sps->nb_ss; nb++)
+ {
Added: csw/mgar/pkg/anjuta/trunk/legacy/sources/anjuta.patch.header
===================================================================
--- csw/mgar/pkg/anjuta/trunk/legacy/sources/anjuta.patch.header (rev 0)
+++ csw/mgar/pkg/anjuta/trunk/legacy/sources/anjuta.patch.header 2009-04-27 12:36:18 UTC (rev 4484)
@@ -0,0 +1,19 @@
+/*******************************************************************************
+* *
+* Viewmol *
+* *
+* S C A N D I R . C *
+* *
+* Copyright (c) Joerg-R. Hill, December 2000 *
+* *
+********************************************************************************
+*
+* $Id: scandir.c,v 1.2 2000/12/10 15:37:02 jrh Exp $
+* $Log: scandir.c,v $
+* Revision 1.2 2000/12/10 15:37:02 jrh
+* Release 2.3
+*
+* Revision 1.1 1999/05/24 01:29:43 jrh
+* Initial revision
+*
+*/
Added: csw/mgar/pkg/anjuta/trunk/legacy/specs/Makefile
===================================================================
--- csw/mgar/pkg/anjuta/trunk/legacy/specs/Makefile (rev 0)
+++ csw/mgar/pkg/anjuta/trunk/legacy/specs/Makefile 2009-04-27 12:36:18 UTC (rev 4484)
@@ -0,0 +1,28 @@
+PACKAGES := $(shell find . -type f | sed "s/^.\///" | grep -v Makefile)
+
+PREPARE := $(PACKAGES:=.p)
+BUILD := $(PACKAGES:=.b)
+CREATE := $(PACKAGES:=.c)
+SHOW := $(PACKAGES:=.s)
+
+clean: ../scripts/pkghelper.pl
+ @echo Do you really want to do this\? Press Ctrl-C to abort
+ @read LUTZ
+ @../scripts/pkghelper.pl -u
+
+$(PACKAGES): ../scripts/pkghelper.pl
+ @../scripts/pkghelper.pl $@
+
+$(PREPARE): ../scripts/pkghelper.pl
+ @../scripts/pkghelper.pl -p $(subst .p,,$@)
+
+$(BUILD): ../scripts/pkghelper.pl
+ @../scripts/pkghelper.pl -b $(subst .b,,$@)
+
+$(CREATE): ../scripts/pkghelper.pl
+ @../scripts/pkghelper.pl -c $(subst .c,,$@)
+
+$(SHOW): ../scripts/pkghelper.pl
+ @../scripts/pkghelper.pl -s $(subst .s,,$@)
+
+.PHONY: $(PACKAGES)
Added: csw/mgar/pkg/anjuta/trunk/legacy/specs/anjuta
===================================================================
--- csw/mgar/pkg/anjuta/trunk/legacy/specs/anjuta (rev 0)
+++ csw/mgar/pkg/anjuta/trunk/legacy/specs/anjuta 2009-04-27 12:36:18 UTC (rev 4484)
@@ -0,0 +1,47 @@
+# vim: ft=perl
+# $Id: anjuta,v 1.4 2005/03/26 12:38:11 simigern Exp $
+
+$progname = 'anjuta';
+$version = '1.2.2';
+
+$buildroot = "${builddir}/${progname}-${version}-buildroot";
+
+$category = 'application';
+$vendor = 'http://anjuta.sourceforge.net/ packaged for CSW by Michael Gernoth';
+
+ at sources = ("${progname}-${version}.tar.gz");
+
+ at patches = (['anjuta.patch', "${progname}-${version}", '-p1'],
+ ['anjuta.about.patch', "${progname}-${version}", '-p0']);
+
+ at packages = ({
+ pkgname => $progname,
+ filename => $progname,
+ name => "$progname - An Integrated Development Environment for GNOME",
+ dependencies => ['CSWcommon'],
+ filelist => [qw(opt)]
+ });
+
+$copyright = "${progname}-${version}/COPYING";
+
+$build = <<"EOF";
+export CC=cc
+export CXX=CC
+export PATH="${sunwspropath}:/usr/ccs/bin:/opt/csw/bin:/usr/bin:/usr/openwin/bin"
+if [ "${arch}" = "sparc" ]; then
+ export CFLAGS='-fast -xarch=v8'
+else
+ export CFLAGS='-xO3 -xspace -xarch=386'
+fi
+export CFLAGS="\$CFLAGS -I/opt/csw/include"
+export CPPFLAGS='-I/opt/csw/include'
+export LD_OPTIONS='-R/opt/csw/lib -L/opt/csw/lib'
+cd ${progname}-${version}
+sed -e 's|-Wall||g' global-tags/Makefile.in >global-tags/Makefile.innew
+mv global-tags/Makefile.innew global-tags/Makefile.in
+sed -e 's| -lutil||g' src/Makefile.in >src/Makefile.innew
+mv src/Makefile.innew src/Makefile.in
+./configure --prefix=/opt/csw --mandir=/opt/csw/share/man --infodir=/opt/csw/share/info
+gmake || exit 1
+gmake DESTDIR=${buildroot} install
+EOF
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list